From 298b0296cdc3c8cd40cd9cc987064ad7b9f5216a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 9 Oct 2013 18:25:05 +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 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/product.py b/product.py index 3c058e9787..ac38c61082 100644 --- a/product.py +++ b/product.py @@ -13,7 +13,7 @@ class Category: account_depreciation = fields.Property(fields.Many2One('account.account', 'Account Depreciation', domain=[ ('kind', '=', 'other'), - ('company', '=', Eval('context', {}).get('company', 0)), + ('company', '=', Eval('context', {}).get('company', -1)), ], states={ 'invisible': (~Eval('context', {}).get('company') @@ -26,7 +26,7 @@ class Category: 'Account Asset', domain=[ ('kind', '=', 'expense'), - ('company', '=', Eval('context', {}).get('company', 0)), + ('company', '=', Eval('context', {}).get('company', -1)), ], states={ 'invisible': (~Eval('context', {}).get('company') @@ -46,7 +46,7 @@ class Template: account_depreciation = fields.Property(fields.Many2One('account.account', 'Account Depreciation', domain=[ ('kind', '=', 'other'), - ('company', '=', Eval('context', {}).get('company', 0)), + ('company', '=', Eval('context', {}).get('company', -1)), ], states={ 'readonly': ~Eval('active', True), @@ -64,7 +64,7 @@ class Template: 'Account Asset', domain=[ ('kind', '=', 'expense'), - ('company', '=', Eval('context', {}).get('company', 0)), + ('company', '=', Eval('context', {}).get('company', -1)), ], states={ 'readonly': ~Eval('active', True),