From 0273506b7cc4f935edc3aa4e0f65121f420d3dae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 9 Oct 2013 18:25:14 +0200 Subject: [PATCH] Fix usage of context company Default value of company should be -1 to get the right cast and an impossible value. Replace False by None as other value in "in" clause. issue3394 review1119002 --- product.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/product.py b/product.py index 8f807f6f9c..064aa3f1b4 100644 --- a/product.py +++ b/product.py @@ -13,7 +13,7 @@ class Category: account_cogs = fields.Property(fields.Many2One('account.account', 'Account Cost of Goods Sold', domain=[ ('kind', '!=', 'view'), - ('company', '=', Eval('context', {}).get('company', 0)), + ('company', '=', Eval('context', {}).get('company', -1)), ], states={ 'invisible': (~Eval('context', {}, ).get('company') @@ -29,7 +29,7 @@ class Template: account_cogs = fields.Property(fields.Many2One('account.account', 'Account Cost of Goods Sold', domain=[ ('kind', '!=', 'view'), - ('company', '=', Eval('context', {}).get('company', 0)), + ('company', '=', Eval('context', {}).get('company', -1)), ], states={ 'invisible': ((~Eval('context', {}).get('company'))