Fix domain and depends on journal because company is not always in context
(transplanted from 5852812e3433f86f52c43a8bf0daa1abd721add7)
This commit is contained in:
1 parent
993f09e1bc
commit
32ae68d087
1 file changed
+4
-2
+4
-2
@@ -85,7 +85,8 @@ class Journal(OSV):
|
||||
domain="[('code', '=', 'account.journal')]")
|
||||
credit_account = fields.Property(type='many2one',
|
||||
relation='account.account', string='Default Credit Account',
|
||||
domain="[('kind', '!=', 'view'), ('company', '=', company)]",
|
||||
domain="[('kind', '!=', 'view'), " \
|
||||
"('company', '=', context.get('company'))]",
|
||||
states={
|
||||
'required': "centralised or " \
|
||||
"(type == 'cash' and context.get('company'))",
|
||||
@@ -93,7 +94,8 @@ class Journal(OSV):
|
||||
})
|
||||
debit_account = fields.Property(type='many2one',
|
||||
relation='account.account', string='Default Debit Account',
|
||||
domain="[('kind', '!=', 'view'), ('company', '=', company)]",
|
||||
domain="[('kind', '!=', 'view'), " \
|
||||
"('company', '=', context.get('company'))]",
|
||||
states={
|
||||
'required': "centralised or " \
|
||||
"(type == 'cash' and context.get('company'))",
|
||||
|
||||
Reference in new issue
Block a user