summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorsvs-odoo <svs@odoo.com>2019-07-16 10:07:44 +0000
committersvs-odoo <svs@odoo.com>2019-08-14 08:44:52 +0000
commit629e8da14fdeae534ab08b86f2cfed63901a61e2 (patch)
tree4bd0307c347c60e0b04bb37ab662baa22081aeab /addons
parente9dbf45b3b4a9b411e159c4c783a75852950ce54 (diff)
[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.
Diffstat (limited to 'addons')
-rw-r--r--addons/mrp/models/product.py6
1 files changed, 1 insertions, 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