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:
1 parent
724d2483a2
commit
298b0296cd
1 file changed
+4
-4
+4
-4
@@ -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),
|
||||
|
||||
Reference in new issue
Block a user