From 629e8da14fdeae534ab08b86f2cfed63901a61e2 Mon Sep 17 00:00:00 2001 From: svs-odoo Date: Tue, 16 Jul 2019 10:07:44 +0000 Subject: [PATCH] [REF] mrp: remove duplication in mrp product The method `action_view_mos` was written two times just for a difference in the action's context. --- addons/mrp/models/product.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/addons/mrp/models/product.py b/addons/mrp/models/product.py index 7b4982b27bd..a4577418d53 100644 --- a/addons/mrp/models/product.py +++ b/addons/mrp/models/product.py @@ -143,10 +143,6 @@ class ProductProduct(models.Model): return action def action_view_mos(self): - action = self.env.ref('mrp.mrp_production_report').read()[0] + action = self.product_tmpl_id.action_view_mos() action['domain'] = [('state', '=', 'done'), ('product_id', 'in', self.ids)] - action['context'] = { - 'time_ranges': {'field': 'date_planned_start', 'range': 'last_365_days'}, - 'graph_measure': 'product_uom_qty', - } return action