Files
odoo_source/addons/account_edi/views/account_move_views.xml
T
Benjamin Frantzen (bfr) ce674f1b21 [IMP] account_edi: added error_level + better management of Lock on account.move
- Some errors will never get fixed until user intervention, it doesn't make sense to run the CRON when there is such error.
+ some small improvements and esthetic changes
- When we are in a CRON, we need to commit the changes between each call to web-service to avoid loss of data.
- Small refactor of edi.document prepare_jobs and process_jobs
- Added an arbitrary key to create the batches.
2021-02-01 14:41:58 +00:00

60 lines
3.4 KiB
XML

<?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), ('edi_document_ids', '=', []), ('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>