From de76e5e081792eab757b06de37a04b0b2753dbdc Mon Sep 17 00:00:00 2001 From: "Lucas Perais (lpe)" Date: Thu, 15 Nov 2018 15:09:04 +0000 Subject: [PATCH] [FIX] purchase: wrongly written domain closes odoo/odoo#28735 --- addons/purchase/models/product.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/purchase/models/product.py b/addons/purchase/models/product.py index 724fdb45069..49897429a4e 100644 --- a/addons/purchase/models/product.py +++ b/addons/purchase/models/product.py @@ -43,7 +43,7 @@ class ProductTemplate(models.Model): @api.multi def action_view_po(self): action = self.env.ref('purchase.action_purchase_order_report_all').read()[0] - action['domain'] = [('state', 'in', ['purchase', 'done']), '&', ('product_tmpl_id', 'in', self.ids)] + action['domain'] = ['&', ('state', 'in', ['purchase', 'done']), ('product_tmpl_id', 'in', self.ids)] action['context'] = { 'search_default_last_year_purchase': 1, 'search_default_status': 1, 'search_default_order_month': 1, @@ -75,7 +75,7 @@ class ProductProduct(models.Model): @api.multi def action_view_po(self): action = self.env.ref('purchase.action_purchase_order_report_all').read()[0] - action['domain'] = [('state', 'in', ['purchase', 'done']), '&', ('product_id', 'in', self.ids)] + action['domain'] = ['&', ('state', 'in', ['purchase', 'done']), ('product_id', 'in', self.ids)] action['context'] = { 'search_default_last_year_purchase': 1, 'search_default_status': 1, 'search_default_order_month': 1,