Skip to content

Commit

Permalink
[REF] stock_account: valuation layer and not admin user
Browse files Browse the repository at this point in the history
missing bit from rev[0]

[0] 7ef11e3

closes odoo#42491

Signed-off-by: Simon Lejeune (sle) <[email protected]>
  • Loading branch information
sle-odoo committed Dec 30, 2019
1 parent 70e4a71 commit d6c8c34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/stock_account/models/stock_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ def product_price_update_before_done(self, forced_qty=None):
# 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_context(force_company=move.company_id.id).product_id.cost_method == 'average'):
product_tot_qty_available = move.product_id.with_context(force_company=move.company_id.id).quantity_svl + tmpl_dict[move.product_id.id]
product_tot_qty_available = move.product_id.sudo().with_context(force_company=move.company_id.id).quantity_svl + tmpl_dict[move.product_id.id]
rounding = move.product_id.uom_id.rounding

valued_move_lines = move._get_in_move_lines()
Expand Down

0 comments on commit d6c8c34

Please sign in to comment.