| 1 |
<?xml version="1.0" encoding="utf-8"?> |
| 2 |
<odoo> |
| 3 |
|
| 4 |
<record id="account_move_form_inherit_l10n_ro_edi" model="ir.ui.view"> |
| 5 |
<field name="name">account.move.form.inherit.l10n_ro_edi</field> |
| 6 |
<field name="model">account.move</field> |
| 7 |
<field name="priority">30</field> |
| 8 |
<field name="inherit_id" ref="account.view_move_form"/> |
| 9 |
<field name="arch" type="xml"> |
| 10 |
<xpath expr="//div[@name='journal_div']" position="after"> |
| 11 |
<field name="l10n_ro_edi_state" |
| 12 |
invisible="not l10n_ro_edi_state or move_type in ('out_receipt', 'in_receipt')"/> |
| 13 |
<field name="l10n_ro_edi_index" |
| 14 |
invisible="not l10n_ro_edi_index or move_type in ('out_receipt', 'in_receipt')"/> |
| 15 |
</xpath> |
| 16 |
|
| 17 |
<!-- CIUS-RO Documents Tab --> |
| 18 |
<xpath expr="//page[@id='other_tab_entry']" position="after"> |
| 19 |
<page id="l10n_ro_edi_documents" |
| 20 |
string="E-Factura" |
| 21 |
invisible="not l10n_ro_edi_document_ids"> |
| 22 |
<field name="l10n_ro_edi_document_ids"> |
| 23 |
<list create="false" delete="false" edit="false" no_open="1" |
| 24 |
decoration-danger="state == 'invoice_refused'" |
| 25 |
decoration-warning="state == 'invoice_sent'" |
| 26 |
decoration-success="state == 'invoice_validated'"> |
| 27 |
<field name="datetime"/> |
| 28 |
<field name="state" widget="account_document_state"/> |
| 29 |
<field name="key_download" optional="hide"/> |
| 30 |
|
| 31 |
<button name="action_l10n_ro_edi_fetch_status" |
| 32 |
type="object" |
| 33 |
string="Fetch status" |
| 34 |
invisible="not show_fetch_status_button"/> |
| 35 |
<button name="action_l10n_ro_edi_download_attachment" |
| 36 |
type="object" |
| 37 |
string="Download the document sent" |
| 38 |
invisible="not attachment or state not in ['invoice_not_indexed', 'invoice_sent']"/> |
| 39 |
<button name="action_l10n_ro_edi_download_attachment" |
| 40 |
type="object" |
| 41 |
string="Download the signature" |
| 42 |
invisible="not attachment or state not in ['invoice_validated', 'invoice_refused']"/> |
| 43 |
</list> |
| 44 |
</field> |
| 45 |
</page> |
| 46 |
</xpath> |
| 47 |
</field> |
| 48 |
</record> |
| 49 |
|
| 50 |
<record id="out_invoice_tree_inherit_l10n_ro_edi" model="ir.ui.view"> |
| 51 |
<field name="name">out.invoice.list.inherit.l10n_ro_edi</field> |
| 52 |
<field name="model">account.move</field> |
| 53 |
<field name="inherit_id" ref="account.view_out_invoice_tree"/> |
| 54 |
<field name="arch" type="xml"> |
| 55 |
<field name="status_in_payment" position="before"> |
| 56 |
<field name="l10n_ro_edi_state" optional="hide"/> |
| 57 |
</field> |
| 58 |
</field> |
| 59 |
</record> |
| 60 |
|
| 61 |
<record id="out_credit_note_tree_inherit_l10n_ro_edi" model="ir.ui.view"> |
| 62 |
<field name="name">out.credit.note.list.inherit.l10n_ro_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_ro_edi_state" optional="hide"/> |
| 68 |
</field> |
| 69 |
</field> |
| 70 |
</record> |
| 71 |
|
| 72 |
<record id="in_invoice_tree_inherit_l10n_ro_edi" model="ir.ui.view"> |
| 73 |
<field name="name">in.invoice.list.inherit.l10n_ro_edi</field> |
| 74 |
<field name="model">account.move</field> |
| 75 |
<field name="inherit_id" ref="account.view_in_invoice_tree"/> |
| 76 |
<field name="arch" type="xml"> |
| 77 |
<field name="status_in_payment" position="before"> |
| 78 |
<field name="l10n_ro_edi_state" optional="hide"/> |
| 79 |
</field> |
| 80 |
</field> |
| 81 |
</record> |
| 82 |
|
| 83 |
<record id="l10n_ro_edi_view_account_invoice_filter" model="ir.ui.view"> |
| 84 |
<field name="name">account.invoice.select.inherit.l10n.ro.edi</field> |
| 85 |
<field name="model">account.move</field> |
| 86 |
<field name="inherit_id" ref="account.view_account_invoice_filter"/> |
| 87 |
<field name="arch" type="xml"> |
| 88 |
<xpath expr="//search/field[@name='journal_id']" position="after"> |
| 89 |
<field name="l10n_ro_edi_state"/> |
| 90 |
</xpath> |
| 91 |
<xpath expr="//filter[@name='out_refund']" position="after"> |
| 92 |
<filter string="Sent E-Factura" name="l10n_ro_edi_state_invoice_sent" |
| 93 |
domain="[('l10n_ro_edi_state', 'in', ['invoice_not_indexed', 'invoice_sent'])]"/> |
| 94 |
<filter string="Refused E-Factura" name="l10n_ro_edi_state_invoice_refused" |
| 95 |
domain="[('l10n_ro_edi_state', '=', 'invoice_refused')]"/> |
| 96 |
<filter string="Validated E-Factura" name="l10n_ro_edi_state_invoice_validated" |
| 97 |
domain="[('l10n_ro_edi_state', '=', 'invoice_validated')]"/> |
| 98 |
</xpath> |
| 99 |
<xpath expr="//group" position="inside"> |
| 100 |
<filter string="E-Factura Status" name="l10n_ro_edi_state_group" |
| 101 |
domain="" context="{'group_by':'l10n_ro_edi_state'}"/> |
| 102 |
</xpath> |
| 103 |
</field> |
| 104 |
</record> |
| 105 |
|
| 106 |
<record id="l10n_ro_edi_action_fetch_ciusro_status" model="ir.actions.server"> |
| 107 |
<field name="name">Fetch E-Factura Status</field> |
| 108 |
<field name="model_id" ref="account.model_account_move"/> |
| 109 |
<field name="binding_model_id" ref="account.model_account_move"/> |
| 110 |
<field name="binding_view_types">list,kanban</field> |
| 111 |
<field name="state">code</field> |
| 112 |
<field name="code"> |
| 113 |
if records: |
| 114 |
records._l10n_ro_edi_fetch_invoice_sent_documents() |
| 115 |
</field> |
| 116 |
</record> |
| 117 |
|
| 118 |
</odoo> |