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
This commit is contained in:
Cédric Krier committed 2013-10-09 18:25:14 +02:00
1 parent ae26884825
commit 0273506b7c
1 file changed
+2 -2
+2 -2
View File
@@ -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'))