From 484d33d931c33dbeb5d030cad5124dd908a3e884 Mon Sep 17 00:00:00 2001 From: Axay Javiya Date: Wed, 13 Sep 2017 11:16:50 +0530 Subject: [PATCH] [FIX] point_of_sale: fix traceback on 'Analytic Rules' stat button --- addons/account_analytic_default/models/product.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account_analytic_default/models/product.py b/addons/account_analytic_default/models/product.py index 0fcb61360e1..6d0a04a8a8e 100644 --- a/addons/account_analytic_default/models/product.py +++ b/addons/account_analytic_default/models/product.py @@ -29,5 +29,5 @@ class ProductTemplate(models.Model): result = self.env.ref('account_analytic_default.action_product_default_list').read()[0] result['domain'] = [('product_id', 'in', self.mapped('product_variant_ids').ids)] # Remove context so it is not going to filter on product_id with active_id of template - result['context'] = {'default_product_id': self.mapped('product_variant_ids').id} + result['context'] = {'default_product_id': self.mapped('product_variant_ids')[0].id} return result