v14-facturacionelectronica/l10n_co_account_e_invoicing/views/account_move_views.xml

174 lines
9.7 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="view_move_form" model="ir.ui.view">
<field name="model">account.move</field>
<field name="inherit_id" ref="account.view_move_form"/>
<field name="arch" type="xml">
<xpath expr="//header" position="after">
<field name="warn_remaining_certificate" invisible="1"/>
<field name="warn_inactive_certificate" invisible="1"/>
<div class="alert alert-error"
role="alert"
style="margin-bottom:0px; background-color:#ff9e9e;"
attrs="{'invisible': [('warn_remaining_certificate', '!=', True)]}">
The certificate for this company is nearby to expire.<br/>
<span style="font-weight:bold;">Please, you must to inform the administration.</span>
</div>
<div class="alert alert-error"
role="alert"
style="margin-bottom:0px; background-color:#ff9e9e;"
attrs="{'invisible': [('warn_inactive_certificate', '!=', True)]}">
There is no an active certificate.<br/>
<span style="font-weight:bold;">Please, you must to inform the administration.</span>
</div>
</xpath>
<xpath expr="//field[@name='invoice_date']" position="after">
<field name="sequence_resolution_id" invisible="1"/>
<field name="invoice_datetime" readonly="1"/>
<field name="send_invoice_to_dian"
attrs="{'invisible': [('sequence_resolution_id', '=', False)]}"
groups="l10n_co_account_e_invoicing.group_view_send_invoice_dian_field"/>
<field name="operation_type"
attrs="{'invisible': [('sequence_resolution_id', '=', False)]}"
groups="l10n_co_account_e_invoicing.group_view_operation_type_field"/>
<field name="invoice_type_code"
attrs="{'invisible': [('sequence_resolution_id', '=', False)]}"
groups="l10n_co_account_e_invoicing.group_view_invoice_type_field"/>
<field name="access_token" invisible="1"/>
<field name="is_accepted_rejected"
attrs="{'invisible': [('sequence_resolution_id', '=', False)]}"
groups="l10n_co_account_e_invoicing.group_view_accepted_rejected_fields"/>
<field name="accepted_rejected_datetime"
attrs="{'invisible': [('sequence_resolution_id', '=', False)]}"
groups="l10n_co_account_e_invoicing.group_view_accepted_rejected_fields"/>
</xpath>
<xpath expr="//page[@name='other_info']//field[@name='ref']" position="after">
<field name="receipt_document_reference"/>
</xpath>
<xpath expr="//notebook" position="inside">
<page name="dian_documents"
string="DIAN Documents"
groups="l10n_co_account_e_invoicing.group_view_dian_documents"
attrs="{'invisible': [('move_type', '=', 'entry')]}">
<group groups="l10n_co_account_e_invoicing.group_view_summary_fields">
<group>
<field name="sale_order_id"
domain="[('invoice_status', '=', 'to invoice'), ('partner_id', '=', partner_id)]"
attrs="{'invisible': [
'|',
'|',
('state', '!=', 'draft'),
('summary_amount_total', '>', 0),
('merge_with_sale_order', '=', False)]}"/>
</group>
<group>
<label for="merge_with_sale_order"/>
<div>
<field name="merge_with_sale_order"
attrs="{'invisible': [
('dian_document_state', 'not in', ('pending', 'done', 'exception', 'dian_reject', False))]}"/>
<button name="action_merge_with_sale_order"
type="object"
string="Merge With Sale Order"
attrs="{'invisible': [
'|',
'|',
('state', '!=', 'draft'),
('sale_order_id', '=', False),
('merge_with_sale_order', '=', False)]}"/>
</div>
</group>
<field name="summary_line_ids" widget="section_and_note_one2many" mode="tree,kanban">
<tree editable="bottom">
<field name="product_id"/>
<field name="name"/>
<field name="quantity"/>
<field name="product_uom_category_id" invisible="1"/>
<field name="product_uom_id" string="UoM" groups="uom.group_uom" optional="show"/>
<field name="price_unit" string="Price"/>
<field name="discount" string="Disc.%"/>
<field name="tax_ids" widget="many2many_tags"/>
<field name="price_subtotal"
string="Subtotal"
groups="account.group_show_line_subtotals_tax_excluded"/>
<field name="price_total"
string="Total"
groups="account.group_show_line_subtotals_tax_included"/>
<field name="currency_id" invisible="1"/>
<field name="company_id" invisible="1"/>
</tree>
</field>
<group>
<field name="summary_amount_untaxed" attrs="{'invisible': [('merge_with_sale_order', '=', False)]}"/>
<field name="summary_amount_tax" attrs="{'invisible': [('merge_with_sale_order', '=', False)]}"/>
</group>
<group>
<field name="summary_amount_total" attrs="{'invisible': [('merge_with_sale_order', '=', False)]}"/>
</group>
</group>
<group>
<label for="dian_document_state"/>
<div>
<field name="dian_document_state"/>
<button name="action_set_dian_document"
type="object"
string="Set DIAN Document"
attrs="{'invisible': [('state', '!=', 'posted')]}"/>
<button name="action_process_dian_document"
type="object"
string="Send DIAN Document"/>
</div>
<field name="dian_document_ids" widget="section_and_note_one2many" mode="tree,kanban">
<tree editable="bottom">
<button type="object" name="go_to_dian_document" string="DIAN Document"/>
<field name="cufe_cude"/>
<field name="create_date"/>
<field name="state"/>
</tree>
</field>
</group>
</page>
</xpath>
</field>
</record>
<record id="view_invoice_tree" model="ir.ui.view">
<field name="model">account.move</field>
<field name="inherit_id" ref="account.view_invoice_tree"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='state']" position="after">
<field name="dian_document_state"
optional="show"
invisible="context.get('default_move_type') not in ('out_invoice', 'out_refund', 'out_receipt')"/>
</xpath>
</field>
</record>
<record id="account_invoice_form" model="ir.ui.view">
<field name="model">account.move</field>
<field name="inherit_id" ref="sale.account_invoice_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='partner_shipping_id']" position="after">
<field name="delivery_datetime"/>
</xpath>
</field>
</record>
<record id="view_move_form_debit" model="ir.ui.view">
<field name="model">account.move</field>
<field name="inherit_id" ref="account_debit_note.view_move_form_debit"/>
<field name="arch" type="xml">
<button name="action_reverse" position="attributes">
<attribute name="groups">l10n_co_account_e_invoicing.group_view_invoice_refund_buttons</attribute>
</button>
<button name="%(account_debit_note.action_view_account_move_debit)d" position="attributes">
<attribute name="groups">l10n_co_account_e_invoicing.group_view_invoice_refund_buttons</attribute>
</button>
</field>
</record>
</odoo>