[REF] stock_account: valuation layer and not admin user

missing bit from rev[0]

[0] 7ef11e3c96

closes odoo/odoo#42517

X-original-commit: 8ff69abc9010bb2aa05dea5a5f2e1fa545e6179c
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
This commit is contained in:
Simon Lejeune
2019-12-30 17:49:26 +00:00
parent a4c92c6aed
commit 989a78b3fc
+1 -1
View File
@@ -304,7 +304,7 @@ class StockMove(models.Model):
# adapt standard price on incomming moves if the product cost_method is 'average'
std_price_update = {}
for move in self.filtered(lambda move: move._is_in() and move.with_company(move.company_id).product_id.cost_method == 'average'):
product_tot_qty_available = move.product_id.with_company(move.company_id).quantity_svl + tmpl_dict[move.product_id.id]
product_tot_qty_available = move.product_id.sudo().with_company(move.company_id).quantity_svl + tmpl_dict[move.product_id.id]
rounding = move.product_id.uom_id.rounding
valued_move_lines = move._get_in_move_lines()