diff --git a/addons/stock_account/models/stock_move.py b/addons/stock_account/models/stock_move.py index 5a5b0e6a4cf73555a85414043d9894c677bd2e35..22d20abbea2cbfac85fd1c33ade8c9d8ae255347 100644 --- a/addons/stock_account/models/stock_move.py +++ b/addons/stock_account/models/stock_move.py @@ -427,8 +427,8 @@ class StockMove(models.Model): account_valuation = accounts_data.get('stock_valuation', False) analytic_line_vals = self.stock_valuation_layer_ids.account_move_id.line_ids.filtered( lambda l: l.account_id == account_valuation)._prepare_analytic_lines() - amount = - sum(sum(vals['amount'] for vals in lists) for lists in analytic_line_vals) - unit_amount = - sum(sum(vals['unit_amount'] for vals in lists) for lists in analytic_line_vals) + amount = - sum(vals['amount'] for vals in analytic_line_vals) + unit_amount = - sum(vals['unit_amount'] for vals in analytic_line_vals) elif sum(self.stock_valuation_layer_ids.mapped('quantity')): amount = sum(self.stock_valuation_layer_ids.mapped('value')) unit_amount = - sum(self.stock_valuation_layer_ids.mapped('quantity'))