summaryrefslogtreecommitdiff
path: root/addons/account_edi/views
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/views
parent0a15094050bfde69a06d6eff798e9a8ddf2b8c21 (diff)
initial commit 2
Diffstat (limited to 'addons/account_edi/views')
-rw-r--r--addons/account_edi/views/account_edi_document_views.xml15
-rw-r--r--addons/account_edi/views/account_journal_views.xml18
-rw-r--r--addons/account_edi/views/account_move_views.xml59
-rw-r--r--addons/account_edi/views/account_payment_views.xml51
4 files changed, 143 insertions, 0 deletions
diff --git a/addons/account_edi/views/account_edi_document_views.xml b/addons/account_edi/views/account_edi_document_views.xml
new file mode 100644
index 00000000..9b16ff60
--- /dev/null
+++ b/addons/account_edi/views/account_edi_document_views.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+ <data>
+ <record id="view_tree_account_edi_document" model="ir.ui.view">
+ <field name="name">Account.edi.document.tree</field>
+ <field name="model">account.edi.document</field>
+ <field name="arch" type="xml">
+ <tree create="false" delete="false" edit="false">
+ <field name="edi_format_name" />
+ <field name="error" />
+ </tree>
+ </field>
+ </record>
+ </data>
+</odoo>
diff --git a/addons/account_edi/views/account_journal_views.xml b/addons/account_edi/views/account_journal_views.xml
new file mode 100644
index 00000000..09ba292e
--- /dev/null
+++ b/addons/account_edi/views/account_journal_views.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+ <data>
+ <record id="view_account_journal_form_inherited" model="ir.ui.view">
+ <field name="name">account.journal.form.inherited</field>
+ <field name="model">account.journal</field>
+ <field name="inherit_id" ref="account.view_account_journal_form" />
+ <field name="arch" type="xml">
+ <xpath expr="//group[@name='group_alias_edit']" position="after">
+ <group string="Electronic Data Interchange" attrs="{'invisible': [('compatible_edi_ids', '=', [])]}">
+ <field name="compatible_edi_ids" invisible="1" />
+ <field name="edi_format_ids" widget="many2many_checkboxes"/>
+ </group>
+ </xpath>
+ </field>
+ </record>
+ </data>
+</odoo>
diff --git a/addons/account_edi/views/account_move_views.xml b/addons/account_edi/views/account_move_views.xml
new file mode 100644
index 00000000..2b043ba5
--- /dev/null
+++ b/addons/account_edi/views/account_move_views.xml
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+ <data>
+
+ <record id="account_edi.action_open_edi_documents" model="ir.actions.act_window">
+ <field name="name">Electronic invoicing</field>
+ <field name="res_model">account.edi.document</field>
+ <field name="view_mode">tree</field>
+ <field name="domain">[('move_id', '=', active_id), ('error', '!=', False)]</field>
+ </record>
+
+ <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.view_move_form" />
+ <field name="arch" type="xml">
+ <xpath expr="//button[@name='button_cancel']" position="after">
+ <field name="edi_show_cancel_button" invisible="1"/>
+ <button name="button_cancel_posted_moves"
+ string="Request EDI Cancellation"
+ type="object"
+ groups="account.group_account_invoice"
+ attrs="{'invisible' : [('edi_show_cancel_button', '=', False)]}"/>
+ </xpath>
+ <xpath expr="//header" position="after">
+ <div class="alert alert-info" role="alert" style="margin-bottom:0px;"
+ attrs="{'invisible': ['|', ('edi_web_services_to_process', 'in', ['', False]), ('state', '=', 'draft')]}">
+ <div>The invoice will be sent asynchronously to :
+ <field name="edi_web_services_to_process" class="oe_inline"/>
+ </div>
+ <button name="action_process_edi_web_services" type="object" class="oe_link" string="Send now" />
+ </div>
+ <div class="alert alert-warning" role="alert" style="margin-bottom:0px;"
+ attrs="{'invisible': [('edi_error_count', '=', 0)]}">
+ <field name="edi_error_count"/>
+ Electronic invoicing error(s)
+ <button name="%(account_edi.action_open_edi_documents)d" type="action" class="oe_link oe_inline" string="⇒ See errors" />
+ </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">
+ <tree create="false" delete="false" edit="false" decoration-danger="error">
+ <field name="name"/>
+ <field name="edi_format_name"/>
+ <field name="state"/>
+ <field name="error" invisible="1"/>
+ </tree>
+ </field>
+ </page>
+ </xpath>
+ </field>
+ </record>
+ </data>
+</odoo>
diff --git a/addons/account_edi/views/account_payment_views.xml b/addons/account_edi/views/account_payment_views.xml
new file mode 100644
index 00000000..9e46cff3
--- /dev/null
+++ b/addons/account_edi/views/account_payment_views.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+ <data>
+
+ <record id="account_edi.action_open_payment_edi_documents" model="ir.actions.act_window">
+ <field name="name">Electronic invoicing</field>
+ <field name="res_model">account.edi.document</field>
+ <field name="view_mode">tree</field>
+ <field name="domain">[('move_id.payment_id', '=', active_id), ('error', '!=', False)]</field>
+ </record>
+
+ <record id="view_payment_form_inherit" model="ir.ui.view">
+ <field name="name">account.payment.form.inherit</field>
+ <field name="model">account.payment</field>
+ <field name="inherit_id" ref="account.view_account_payment_form" />
+ <field name="arch" type="xml">
+ <xpath expr="//header" position="after">
+ <div class="alert alert-info" role="alert" style="margin-bottom:0px;"
+ attrs="{'invisible': ['|', ('edi_web_services_to_process', 'in', ['', False]), ('state', '=', 'draft')]}">
+ <div>The payment will be sent asynchronously to :
+ <field name="edi_web_services_to_process" class="oe_inline"/>
+ </div>
+ <button name="action_process_edi_web_services" type="object" class="oe_link" string="Send now"/>
+ </div>
+ <div class="alert alert-warning" role="alert" style="margin-bottom:0px;"
+ attrs="{'invisible': [('edi_error_count', '=', 0)]}">
+ <field name="edi_error_count"/>
+ Electronic invoicing error(s)
+ <button name="%(account_edi.action_open_payment_edi_documents)d" type="action" class="oe_link oe_inline" string="⇒ See errors" />
+ </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='group3']" position="after">
+ <group groups="base.group_no_one">
+ <field name="edi_document_ids" string="EDI Documents" attrs="{'invisible': [('edi_document_ids', '=', [])]}">
+ <tree create="false" delete="false" edit="false" decoration-danger="error">
+ <field name="name"/>
+ <field name="edi_format_name"/>
+ <field name="state"/>
+ <field name="error" invisible="1"/>
+ </tree>
+ </field>
+ </group>
+ </xpath>
+ </field>
+ </record>
+ </data>
+</odoo>