summaryrefslogtreecommitdiff
path: root/addons/account_edi_extended/views/account_move_views.xml
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2022-05-10 21:51:50 +0700
committerstephanchrst <stephanchrst@gmail.com>2022-05-10 21:51:50 +0700
commit3751379f1e9a4c215fb6eb898b4ccc67659b9ace (patch)
treea44932296ef4a9b71d5f010906253d8c53727726 /addons/account_edi_extended/views/account_move_views.xml
parent0a15094050bfde69a06d6eff798e9a8ddf2b8c21 (diff)
initial commit 2
Diffstat (limited to 'addons/account_edi_extended/views/account_move_views.xml')
-rw-r--r--addons/account_edi_extended/views/account_move_views.xml52
1 files changed, 52 insertions, 0 deletions
diff --git a/addons/account_edi_extended/views/account_move_views.xml b/addons/account_edi_extended/views/account_move_views.xml
new file mode 100644
index 00000000..820fa1ea
--- /dev/null
+++ b/addons/account_edi_extended/views/account_move_views.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+ <data>
+
+ <record id="view_move_form_inherit" model="ir.ui.view">
+ <field name="name">account.move.form.inherit</field>
+ <field name="model">account.move</field>
+ <field name="inherit_id" ref="account_edi.view_move_form_inherit" />
+ <field name="arch" type="xml">
+ <xpath expr="//button[@name='%(account_edi.action_open_edi_documents)d']" position="after">
+ <button name="action_retry_edi_documents_error" type="object" class="oe_link oe_inline" string="Retry" />
+ </xpath>
+ <xpath expr="//button[@name='button_cancel_posted_moves']" position="after">
+ <field name="edi_show_abandon_cancel_button" invisible="1"/>
+ <button name="button_abandon_cancel_posted_posted_moves"
+ string="Call off EDI Cancellation"
+ type="object"
+ groups="account.group_account_invoice"
+ attrs="{'invisible' : [('edi_show_abandon_cancel_button', '=', False)]}"/>
+ </xpath>
+ <!-- Nasty xpath to replace the error count warning banner. In master, it will be merged. -->
+ <xpath expr="//div[hasclass('alert-warning')]" position="replace">
+ <field name="edi_blocking_level" invisible="1" />
+ <field name="edi_error_count" invisible="1" />
+ <div class="alert alert-danger" role="alert" style="margin-bottom:0px;"
+ attrs="{'invisible': ['|', ('edi_error_count', '=', 0), ('edi_blocking_level', '!=', 'error')]}">
+ <div class="o_row">
+ <field name="edi_error_message" />
+ <button name="%(account_edi.action_open_edi_documents)d" string="⇒ See errors" type="action" class="oe_link" attrs="{'invisible': [('edi_error_count', '=', 1)]}" />
+ <button name="action_retry_edi_documents_error" type="object" class="oe_link oe_inline" string="Retry" />
+ </div>
+ </div>
+ <div class="alert alert-warning" role="alert" style="margin-bottom:0px;"
+ attrs="{'invisible': ['|', ('edi_error_count', '=', 0), ('edi_blocking_level', '!=', 'warning')]}">
+ <div class="o_row">
+ <field name="edi_error_message" />
+ <button name="%(account_edi.action_open_edi_documents)d" string="⇒ See errors" type="action" class="oe_link" attrs="{'invisible': [('edi_error_count', '=', 1)]}" />
+ </div>
+ </div>
+ <div class="alert alert-info" role="alert" style="margin-bottom:0px;"
+ attrs="{'invisible': ['|', ('edi_error_count', '=', 0), ('edi_blocking_level', '!=', 'info')]}">
+ <div class="o_row">
+ <field name="edi_error_message" />
+ <button name="%(account_edi.action_open_edi_documents)d" string="⇒ See errors" type="action" class="oe_link" attrs="{'invisible': [('edi_error_count', '=', 1)]}" />
+ </div>
+ </div>
+ </xpath>
+
+ </field>
+ </record>
+ </data>
+</odoo>