From df175f77162d68fe6e61a61b8b1eff223fcab793 Mon Sep 17 00:00:00 2001 From: Swapnesh Shah Date: Sat, 19 Oct 2019 11:18:44 +0000 Subject: [PATCH] [IMP] product_margin: remove create and edit from views Create and Edit Buttons are not needed on views being opened from the Product Margin report Fixes odoo/odoo#39069 closes odoo/odoo#39072 Signed-off-by: Martin Trigaux (mat) --- addons/product_margin/wizard/product_margin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/product_margin/wizard/product_margin.py b/addons/product_margin/wizard/product_margin.py index 32e0cd32e89..b116cc85805 100644 --- a/addons/product_margin/wizard/product_margin.py +++ b/addons/product_margin/wizard/product_margin.py @@ -20,7 +20,7 @@ class ProductMargin(models.TransientModel): def action_open_window(self): self.ensure_one() - context = dict(self.env.context or {}) + context = dict(self.env.context, create=False, edit=False) def ref(module, xml_id): proxy = self.env['ir.model.data']