[FIX] account_edi: Prevent opening the EDI documents in any case
Also, remove the duplicated 'edi_document_ids' field inside the view. 'edi_document_ids' is now in debug mode for payments. closes odoo/odoo#76123 X-original-commit: ad346eec9fd06e430b9b5859578b00e0b28cc443 Signed-off-by: Florian Gilbert <FlorianGilbert@users.noreply.github.com> Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
This commit is contained in:
@@ -95,12 +95,14 @@
|
||||
</div>
|
||||
</xpath>
|
||||
<xpath expr="//div[@name='journal_div']" position="after">
|
||||
<field name="edi_document_ids" invisible="1" />
|
||||
<field name="edi_state" attrs="{'invisible': ['|', ('edi_state', '=', False), ('state', '=', 'draft')]}"/>
|
||||
</xpath>
|
||||
<xpath expr="//page[@id='other_tab']" position="after">
|
||||
<page id="edi_documents" string="EDI Documents" groups="base.group_no_one" attrs="{'invisible': [('edi_document_ids', '=', [])]}">
|
||||
<field name="edi_document_ids">
|
||||
<page id="edi_documents"
|
||||
string="EDI Documents"
|
||||
groups="base.group_no_one"
|
||||
attrs="{'invisible': [('edi_document_ids', '=', [])]}">
|
||||
<field name="edi_document_ids" options="{'no_open': '1'}">
|
||||
<tree create="false" delete="false" edit="false" decoration-danger="error">
|
||||
<field name="name"/>
|
||||
<field name="edi_format_name"/>
|
||||
|
||||
@@ -48,12 +48,15 @@
|
||||
</div>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='journal_id']" position="after">
|
||||
<field name="edi_document_ids" invisible="1" />
|
||||
<field name="edi_state" attrs="{'invisible': ['|', ('edi_state', '=', False), ('state', '=', 'draft')]}"/>
|
||||
</xpath>
|
||||
<xpath expr="//group[@name='group2']" position="after">
|
||||
<group groups="base.group_no_one">
|
||||
<field name="edi_document_ids" string="EDI Documents" attrs="{'invisible': [('edi_document_ids', '=', [])]}">
|
||||
<field name="edi_document_ids"
|
||||
string="EDI Documents"
|
||||
groups="base.group_no_one"
|
||||
options="{'no_open': '1'}"
|
||||
attrs="{'invisible': [('edi_document_ids', '=', [])]}">
|
||||
<tree create="false" delete="false" edit="false" decoration-danger="error">
|
||||
<field name="name"/>
|
||||
<field name="edi_format_name"/>
|
||||
|
||||
Reference in New Issue
Block a user