diff --git a/journal.py b/journal.py index f8adf6fd88..e644d09045 100644 --- a/journal.py +++ b/journal.py @@ -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'))",