[FIX] mrp: removed unexisting default filter
last_year_mo_order was removed in commit 4a350ff8cc. However it was still used in action_view_mos.
This commit adpat the action context in order to keep the same behaviour than previously.
task id 1922547
closes odoo/odoo#30347
This commit is contained in:
committed by
Arnold Moyaux
parent
d55665faf5
commit
4524ad06a8
@@ -45,8 +45,7 @@ class ProductTemplate(models.Model):
|
||||
action['domain'] = [('state', '=', 'done'), '&', ('product_tmpl_id', 'in', self.ids)]
|
||||
action['context'] = {
|
||||
'graph_measure': 'product_uom_qty',
|
||||
'search_default_confirmed': 0,
|
||||
'time_ranges': {'field': 'date_finished', 'range': 'last_365_days'}
|
||||
'time_ranges': {'field': 'date_planned_start', 'range': 'last_365_days'}
|
||||
}
|
||||
return action
|
||||
|
||||
@@ -102,8 +101,7 @@ class ProductProduct(models.Model):
|
||||
action = self.env.ref('mrp.mrp_production_report').read()[0]
|
||||
action['domain'] = [('state', '=', 'done'), '&', ('product_id', 'in', self.ids)]
|
||||
action['context'] = {
|
||||
'search_default_last_year_mo_order': 1,
|
||||
'search_default_status': 1, 'search_default_scheduled_month': 1,
|
||||
'time_ranges': {'field': 'date_planned_start', 'range': 'last_365_days'},
|
||||
'graph_measure': 'product_uom_qty',
|
||||
}
|
||||
return action
|
||||
|
||||
Reference in New Issue
Block a user