[14.0][FIX] avoid conflict with enterprise module account_bank_statement_import

This commit is contained in:
Alfredo Zamora
2021-02-26 11:19:38 +01:00
parent 1ea7cd7b43
commit a1d3aa0c9c
2 changed files with 9 additions and 3 deletions

View File

@@ -22,7 +22,7 @@ class AccountJournal(models.Model):
rslt.append(("file_import", _("Import") + "(" + import_formats_str + ")"))
return rslt
def import_statement(self):
def import_account_statement(self):
"""return action to import bank/cash statements.
This button should be called only on journals with type =='bank'"""
action = (

View File

@@ -12,11 +12,17 @@
<field name="inherit_id" ref="account.account_journal_dashboard_kanban_view" />
<field name="arch" type="xml">
<xpath expr='//span[@name="button_import_placeholder"]' position='inside'>
<span>or <a type="object" name="import_statement">Import</a></span>
<span>or <a
type="object"
name="import_account_statement"
>Import</a></span>
</xpath>
<xpath expr='//div[@name="bank_cash_commands"]' position="before">
<div t-if="journal_type == 'bank'">
<a type="object" name="import_statement">Import Statement</a>
<a
type="object"
name="import_account_statement"
>Import Statement</a>
</div>
</xpath>
</field>