[FIX] stock_account: ctx after group by
- Set valuation to FIFO - Make a PO for a product - Validate the picking - Execute the Inventory Valuation report - Apply group by Category - Click on the 'Valuation' info button A traceback occurs because of the usual `group_by` context key which is kept. opw-1918915 closes odoo/odoo#30313
This commit is contained in:
@@ -249,12 +249,14 @@ class ProductProduct(models.Model):
|
||||
"""
|
||||
self.ensure_one()
|
||||
to_date = self.env.context.get('to_date')
|
||||
ctx = self.env.context.copy()
|
||||
ctx.pop('group_by', None)
|
||||
action = {
|
||||
'name': _('Valuation at date'),
|
||||
'type': 'ir.actions.act_window',
|
||||
'view_type': 'form',
|
||||
'view_mode': 'tree,form',
|
||||
'context': self.env.context,
|
||||
'context': ctx,
|
||||
}
|
||||
if self.valuation == 'real_time':
|
||||
action['res_model'] = 'account.move.line'
|
||||
|
||||
Reference in New Issue
Block a user