Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] Fix issue 973 : in case incoming picking are split, cost calculation is wrong #974

Open
wants to merge 1 commit into
base: 8.0
Choose a base branch
from

Conversation

cvinh
Copy link
Contributor

@cvinh cvinh commented Sep 5, 2015

in purchase_landed_cost, read_group function has to be "grouped by cost"

@cvinh cvinh changed the title Fix issue 973 [FIX] Fix issue 973 : in case incoming picking are split, cost calculation is wrong Sep 5, 2015
@pedrobaeza
Copy link
Member

You need to rebase the PR to get only the relevant commit.

For the patch itself, we should rework it a little bit more:

  • Quant domain should be obtained from stock.quant method quants_get_prefered_domain, called once per product (remember that the cost price is by product template, not by product variant), and combine results.
  • I think fields appears added (with sum) when you don't group by that field, so please check that the result is not correct. If not, your patch is incorrect, because you need to sum all costs * qty.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants