diff options
| author | Nicolas (vin) <vin@odoo.com> | 2020-08-20 09:16:45 +0000 |
|---|---|---|
| committer | Nicolas (vin) <vin@odoo.com> | 2020-09-04 12:30:03 +0000 |
| commit | 96a8a4aad70c6ff1c53a7f4919fc1aad3039f5ab (patch) | |
| tree | b3b740dd69a639aa542434d4a0664e058357309b | |
| parent | d132bce45997d7e38c03538db762b07b99a893fc (diff) | |
[FIX] account: fix accounts requirement
Since the misc. improvements, the default_account is required on all journals,
while it should not.
Task id #2322643
closes odoo/odoo#57094
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
| -rw-r--r-- | addons/account/views/account_journal_views.xml | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/addons/account/views/account_journal_views.xml b/addons/account/views/account_journal_views.xml index 7a829dfb76f..373a8fc399c 100644 --- a/addons/account/views/account_journal_views.xml +++ b/addons/account/views/account_journal_views.xml @@ -46,11 +46,11 @@ <field name="default_account_type" invisible="1"/> <!-- Bank --> <field name="default_account_id" string="Bank Account" - attrs="{'required': [('id', '!=', False)], 'invisible': [('type', '!=', 'bank')]}" + attrs="{'required': [('id', '!=', False), ('type', '=', 'bank')], 'invisible': [('type', '!=', 'bank')]}" groups="account.group_account_readonly"/> <!-- Cash --> <field name="default_account_id" string="Cash Account" - attrs="{'required': [('id', '!=', False)], 'invisible': [('type', '!=', 'cash')]}" + attrs="{'required': [('id', '!=', False), ('type', '=', 'cash')], 'invisible': [('type', '!=', 'cash')]}" groups="account.group_account_readonly"/> <field name="suspense_account_id" @@ -60,11 +60,11 @@ <field name="loss_account_id" attrs="{'invisible': [('type', '!=', 'cash')]}"/> <!-- Sales --> <field name="default_account_id" string="Default Income Account" - attrs="{'required': [('id', '!=', False)], 'invisible': [('type', '!=', 'sale')]}" + attrs="{'required': [('id', '!=', False), ('type', '=', 'sale')], 'invisible': [('type', '!=', 'sale')]}" groups="account.group_account_readonly"/> <!-- Purchase --> <field name="default_account_id" string="Default Expense Account" - attrs="{'required': [('id', '!=', False)], 'invisible': [('type', '!=', 'purchase')]}" + attrs="{'required': [('id', '!=', False), ('type', '=', 'purchase')], 'invisible': [('type', '!=', 'purchase')]}" groups="account.group_account_readonly"/> <field name="refund_sequence" attrs="{'invisible': [('type', 'not in', ['sale', 'purchase'])]}"/> <field name="code"/> |
