Skip to content
Snippets Groups Projects
Commit 4da16124 authored by Nicolas Martinelli's avatar Nicolas Martinelli
Browse files

[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
parent 0dd38282
No related branches found
No related tags found
No related merge requests found
......@@ -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'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment