[FIX] stock_account: AML date
The a product valuation is real-time, the date used is the scheduled date of the move, not the actual move processing date. This is because the date is updated on the move after the AML creation. opw-671372 Fixes #11228
This commit is contained in:
@@ -337,7 +337,7 @@ class stock_quant(osv.osv):
|
||||
move_obj = self.pool.get('account.move')
|
||||
for cost, qty in quant_cost_qty.items():
|
||||
move_lines = self._prepare_account_move_line(cr, uid, move, qty, cost, credit_account_id, debit_account_id, context=context)
|
||||
date = context.get('force_period_date', move.date)
|
||||
date = context.get('force_period_date', fields.date.context_today(self, cr, uid, context=context))
|
||||
new_move = move_obj.create(cr, uid, {'journal_id': journal_id,
|
||||
'line_ids': move_lines,
|
||||
'date': date,
|
||||
|
||||
Reference in New Issue
Block a user