1
0
forked from Mapan/odoo17e
odoo17e-kedaikipas58/addons/l10n_br_edi/views/account_move_view.xml
2024-12-10 09:04:09 +07:00

59 lines
3.2 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="account_move_form_inherit_l10n_br_edi" model="ir.ui.view">
<field name="name">account.move.form.inherit.l10n_br_edi</field>
<field name="model">account.move</field>
<field name="inherit_id" ref="account.view_move_form"/>
<field name="arch" type="xml">
<xpath expr="//sheet" position="before">
<div class="alert alert-warning" role="alert"
invisible="not l10n_br_edi_error">
<div class="p-0 m-0"><i class="fa fa-warning" role="img" title="EDI (Brazil)"/>
<span class="mx-1">E-invoicing (Brazil)</span>
</div>
<field name="l10n_br_edi_error"/>
</div>
</xpath>
<button name="button_request_cancel" position="after">
<button string="Correction Letter"
name="button_request_correction"
type="object"
groups="account.group_account_invoice"
invisible="l10n_br_last_edi_status != 'accepted'"/>
</button>
<field name="l10n_latam_document_number" position="after">
<field name="l10n_br_last_edi_status" invisible="country_code != 'BR'"/>
<field name="l10n_br_edi_is_needed" invisible="1"/>
<field name="l10n_br_edi_payment_method"
options="{'no_create': True, 'no_open': True}"
invisible="country_code != 'BR'"
required="l10n_br_edi_is_needed and move_type in ('out_invoice', 'out_refund')"
readonly="state in ['cancel', 'posted']"/>
</field>
<field name="incoterm_location" position="after">
<field name="l10n_br_edi_freight_model" invisible="country_code != 'BR'"
readonly="state in ['cancel', 'posted']"/>
<field name="l10n_br_edi_transporter_id" invisible="country_code != 'BR' or l10n_br_edi_freight_model in ('SenderVehicle', 'ReceiverVehicle')"
readonly="state in ['cancel', 'posted']"/>
</field>
<field name="to_check" position="after">
<field name="l10n_br_access_key" invisible="country_code != 'BR' or not l10n_br_access_key"
readonly="state in ['cancel', 'posted']"/>
</field>
</field>
</record>
<record id="view_out_invoice_tree_inherit_l10n_br_edi" model="ir.ui.view">
<field name="name">account.move.tree.inherit.l10n_br_edi</field>
<field name="model">account.move</field>
<field name="inherit_id" ref="account.view_out_invoice_tree"/>
<field name="arch" type="xml">
<field name="state" position="before">
<field name="l10n_br_last_edi_status" optional="hide"/>
</field>
</field>
</record>
</data>
</odoo>