[FIX] The read_group returns the cost summatory, but should the is co…#1283
[FIX] The read_group returns the cost summatory, but should the is co…#1283rossasa wants to merge 1 commit intoodoomrp:8.0from
Conversation
…st average, so this commit compute each line to get the right average value for the product
|
Rossasa, your commit only work when do not exist "Reverse Transfer" movements, the search take all quants and the result is an average price inaccurate. |
|
In my opinion problem is not filtering quants by location, and that the cost was multiplied by the quantity of quants found. I do not think it is required to compute average cost quant by quant as the cost will be the same for each one, take into account that this code will be executed only when product cost method is average cost. |
|
@anajuaristi @pedrobaeza @rossasa @ltobar What do you think about it? |
|
Hi, we are used filtered domain and work fine for average cost. On Tue, Sep 6, 2016, 11:46 agaldona notifications@github.com wrote:
|
| @@ -245,10 +245,12 @@ def _product_price_update(self, move, new_price): | |||
| ('product_id', 'in', | |||
| product.product_tmpl_id.product_variant_ids.ids), | |||
| ('id', 'not in', move.quant_ids.ids)] | |||
There was a problem hiding this comment.
@rossasa Can you add a control by location usage? The quants to take into account must be internal only. In the other case you are summing the amounts of the old quants.
…st average, so this commit compute each line to get the right average value for the product
this tries to solve the same problem that #1276