diff options
| author | yhu-odoo <yhu@odoo.com> | 2020-01-14 13:21:00 +0000 |
|---|---|---|
| committer | yhu-odoo <yhu@odoo.com> | 2020-01-15 09:02:42 +0000 |
| commit | 4a1dfb50b7cbcd08a46c6b37f4ad2b4c4bf37e6e (patch) | |
| tree | ef95bcbad53fd108bfe14e7577fea590d2262f7b | |
| parent | c87275a69f8f926b1f341d9237bb578b894335c4 (diff) | |
[REF] stock_account: valuation layer and not admin user
missing bit from rev[0], [1], and [2]
[0] 7ef11e3
[1] d6c8c34
[2] 5096e72
closes odoo/odoo#43186
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
| -rw-r--r-- | addons/stock_account/models/stock_move.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/stock_account/models/stock_move.py b/addons/stock_account/models/stock_move.py index 6ecd9f76e11..ab6860d78f2 100644 --- a/addons/stock_account/models/stock_move.py +++ b/addons/stock_account/models/stock_move.py @@ -331,7 +331,7 @@ class StockMove(models.Model): # adapt standard price on incomming moves if the product cost_method is 'fifo' for move in self.filtered(lambda move: move.with_company(move.company_id).product_id.cost_method == 'fifo' - and float_is_zero(move.product_id.quantity_svl, precision_rounding=move.product_id.uom_id.rounding)): + and float_is_zero(move.product_id.sudo().quantity_svl, precision_rounding=move.product_id.uom_id.rounding)): move.product_id.with_company(move.company_id.id).sudo().write({'standard_price': move._get_price_unit()}) def _get_accounting_data_for_valuation(self): |
