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:12 +02:00
1 parent 004c5e0ad3
commit 46a0c0a936
1 file changed
+4 -4
+4 -4
View File
@@ -18,7 +18,7 @@ class Category:
account_expense = fields.Property(fields.Many2One('account.account',
'Account Expense', domain=[
('kind', '=', 'expense'),
('company', '=', Eval('context', {}).get('company', 0)),
('company', '=', Eval('context', {}).get('company', -1)),
], on_change=['account_expense'],
states={
'invisible': (~Eval('context', {}).get('company')
@@ -28,7 +28,7 @@ class Category:
account_revenue = fields.Property(fields.Many2One('account.account',
'Account Revenue', domain=[
('kind', '=', 'revenue'),
('company', '=', Eval('context', {}).get('company', 0)),
('company', '=', Eval('context', {}).get('company', -1)),
], on_change=['account_revenue'],
states={
'invisible': (~Eval('context', {}).get('company')
@@ -165,7 +165,7 @@ class Template:
account_expense = fields.Property(fields.Many2One('account.account',
'Account Expense', domain=[
('kind', '=', 'expense'),
('company', '=', Eval('context', {}).get('company', 0)),
('company', '=', Eval('context', {}).get('company', -1)),
], on_change=['account_category', 'account_expense'],
states={
'invisible': (~Eval('context', {}).get('company')
@@ -176,7 +176,7 @@ class Template:
account_revenue = fields.Property(fields.Many2One('account.account',
'Account Revenue', domain=[
('kind', '=', 'revenue'),
('company', '=', Eval('context', {}).get('company', 0)),
('company', '=', Eval('context', {}).get('company', -1)),
], on_change=['account_category', 'account_revenue'],
states={
'invisible': (~Eval('context', {}).get('company')