| 1 |
<?xml version="1.0" encoding="utf-8"?> |
| 2 |
<odoo> |
| 3 |
<record id="invoice_form_inherit_l10n_in_edi" model="ir.ui.view"> |
| 4 |
<field name="name">account.move.form.inherit.l10n.in.edi</field> |
| 5 |
<field name="model">account.move</field> |
| 6 |
<field name="inherit_id" ref="account.view_move_form"/> |
| 7 |
<field name="arch" type="xml"> |
| 8 |
<!-- E-Invoice --> |
| 9 |
<xpath expr="//group[@name='sale_info_group']" position="inside"> |
| 10 |
<field name="l10n_in_edi_cancel_reason" |
| 11 |
string="EDI Cancel Reason" |
| 12 |
invisible="not l10n_in_edi_cancel_reason" |
| 13 |
readonly="1"/> |
| 14 |
<field name="l10n_in_edi_cancel_remarks" |
| 15 |
string="EDI Cancel Remarks" |
| 16 |
invisible="not l10n_in_edi_cancel_remarks" |
| 17 |
readonly="1"/> |
| 18 |
</xpath> |
| 19 |
<xpath expr="//header" position="after"> |
| 20 |
<div class="alert alert-danger" role="alert" |
| 21 |
invisible="not l10n_in_edi_error"> |
| 22 |
<div class="o_row"> |
| 23 |
<field name="l10n_in_edi_error"/> |
| 24 |
<button name="action_l10n_in_edi_force_cancel" |
| 25 |
type="object" |
| 26 |
class="oe_link oe_inline" |
| 27 |
confirm="Are you sure you want to cancel this invoice without waiting for the EDI document to be canceled?" |
| 28 |
invisible="l10n_in_edi_status != 'sent'" |
| 29 |
string="Force Cancel"/> |
| 30 |
</div> |
| 31 |
</div> |
| 32 |
</xpath> |
| 33 |
<xpath expr="//button[@name='button_draft']" position="after"> |
| 34 |
<button name="action_export_l10n_in_edi_content_json" |
| 35 |
type="object" |
| 36 |
class="btn-secondary" |
| 37 |
invisible="not l10n_in_edi_error" |
| 38 |
groups="base.group_no_one" |
| 39 |
string="Download EDI JSON"/> |
| 40 |
</xpath> |
| 41 |
<xpath expr="//div[@name='journal_div']" position="after"> |
| 42 |
<field name="l10n_in_edi_status" invisible="not l10n_in_edi_status or state == 'draft'"/> |
| 43 |
</xpath> |
| 44 |
</field> |
| 45 |
</record> |
| 46 |
<record id="view_out_invoice_tree_inherit_l10n_in_edi" model="ir.ui.view"> |
| 47 |
<field name="name">out.invoice.list.inherit.l10n_in_edi</field> |
| 48 |
<field name="model">account.move</field> |
| 49 |
<field name="inherit_id" ref="account.view_out_invoice_tree"/> |
| 50 |
<field name="arch" type="xml"> |
| 51 |
<field name="status_in_payment" position="before"> |
| 52 |
<field name="l10n_in_edi_status" |
| 53 |
optional="hide" |
| 54 |
widget="badge" |
| 55 |
decoration-success="l10n_in_edi_status == 'sent'" |
| 56 |
decoration-info="l10n_in_edi_status == 'to_send'" |
| 57 |
decoration-danger="l10n_in_edi_status == 'cancelled'"/> |
| 58 |
</field> |
| 59 |
</field> |
| 60 |
</record> |
| 61 |
<record id="view_out_credit_note_tree_inherit_l10n_in_edi" model="ir.ui.view"> |
| 62 |
<field name="name">out.credit.note.list.inherit.l10n_in_edi</field> |
| 63 |
<field name="model">account.move</field> |
| 64 |
<field name="inherit_id" ref="account.view_out_credit_note_tree"/> |
| 65 |
<field name="arch" type="xml"> |
| 66 |
<field name="status_in_payment" position="before"> |
| 67 |
<field name="l10n_in_edi_status" |
| 68 |
optional="hide" |
| 69 |
widget="badge" |
| 70 |
decoration-success="l10n_in_edi_status == 'sent'" |
| 71 |
decoration-info="l10n_in_edi_status == 'to_send'" |
| 72 |
decoration-danger="l10n_in_edi_status == 'cancelled'"/> |
| 73 |
</field> |
| 74 |
</field> |
| 75 |
</record> |
| 76 |
<record id="l10n_in_edi_inherit_account_move_search_view" model="ir.ui.view"> |
| 77 |
<field name="name">l10n.in.edi.inherit.account.move.search</field> |
| 78 |
<field name="model">account.move</field> |
| 79 |
<field name="inherit_id" ref="account.view_account_invoice_filter" /> |
| 80 |
<field name="arch" type="xml"> |
| 81 |
<xpath expr="//filter[@name='cancel']" position="after"> |
| 82 |
<separator/> |
| 83 |
<filter name="l10n_in_edi_to_send" string="Indian E-Invoices To Send" domain="[('l10n_in_edi_status', '=', 'to_send')]"/> |
| 84 |
<filter name="l10n_in_edi_error_move" string="Indian E-Invoices In Error" domain="[('l10n_in_edi_error', '!=', False)]"/> |
| 85 |
</xpath> |
| 86 |
<xpath expr="//filter[@name='status']" position="after"> |
| 87 |
<filter name="groupby_l10n_in_edi_status" string="Indian E-invoice status" context="{'group_by' : 'l10n_in_edi_status'}"/> |
| 88 |
</xpath> |
| 89 |
</field> |
| 90 |
</record> |
| 91 |
</odoo> |