Files
enterprise-addons/l10n_co_dian/views/account_move_views.xml
T

143 lines
8.0 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="view_account_move_form_inherit_l10n_co_dian" model="ir.ui.view">
<field name="name">account.move.form.l10n_co_dian</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="l10n_co_dian_show_support_doc_button" invisible="1"/>
<button name="l10n_co_dian_action_send_bill_support_document"
string="Send Support Document to DIAN"
type="object"
groups="account.group_account_invoice"
invisible="not l10n_co_dian_show_support_doc_button"/>
<button name="l10n_co_dian_send_event_update_status_received"
string="Acknowledge Reception"
type="object"
groups="account.group_account_invoice"
invisible="move_type not in ('in_invoice', 'in_refund') or l10n_co_edi_is_support_document or l10n_co_dian_commercial_state != 'pending' or state != 'posted'"/>
<button name="l10n_co_dian_send_event_update_status_goods_received"
string="Receive Goods"
type="object"
groups="account.group_account_invoice"
invisible="move_type not in ('in_invoice', 'in_refund') or l10n_co_edi_is_support_document or l10n_co_dian_commercial_state != 'received' or state != 'posted'"/>
<button name="l10n_co_dian_send_event_update_status_accepted"
string="Accept"
type="object"
groups="account.group_account_invoice"
invisible="move_type not in ('in_invoice', 'in_refund') or l10n_co_edi_is_support_document or l10n_co_dian_commercial_state != 'goods_received' or state != 'posted'"/>
<button name="%(action_commercial_event_reject)d"
string="Reject"
type="action"
groups="account.group_account_invoice"
invisible="move_type not in ('in_invoice', 'in_refund') or l10n_co_edi_is_support_document or l10n_co_dian_commercial_state != 'goods_received' or state != 'posted'"/>
<button name="l10n_co_dian_send_event_update_status_accepted_by_issuer"
string="Accept by Issuer"
type="object"
groups="account.group_account_invoice"
invisible="move_type not in ('out_invoice', 'out_refund') or l10n_co_edi_is_support_document or l10n_co_dian_commercial_state != 'goods_received' or state != 'posted'"/>
</xpath>
<xpath expr="//group[@id='header_left_group']" position="inside">
<field name="l10n_co_edi_cufe_cude_ref" string="CUFE/CUDE" readonly="False"
invisible="move_type not in ('in_invoice', 'in_refund') or not l10n_co_dian_is_enabled" />
</xpath>
<xpath expr="//group[@id='header_right_group']" position="inside">
<label string="Commercial Status"
for="l10n_co_dian_commercial_state"
invisible="not l10n_co_dian_is_enabled or move_type != 'out_invoice'"/>
<div invisible="not l10n_co_dian_is_enabled or move_type != 'out_invoice'">
<field name="l10n_co_dian_commercial_state" readonly="1" class="oe_inline"/>
<button name="l10n_co_dian_action_update_event_status"
title="Update Event Status"
type="object"
class="oe_inline oe_link fa fa-refresh"
invisible="not l10n_co_dian_update_commercial_event_enabled"/>
</div>
<field string="Commercial Status"
name="l10n_co_dian_commercial_state"
readonly="1"
invisible="not l10n_co_dian_is_enabled or move_type not in ('in_invoice', 'in_refund') or l10n_co_edi_is_support_document"/>
</xpath>
<xpath expr="//page[@id='other_tab_entry']" position="after">
<page id="edi_documents"
string="DIAN"
invisible="not l10n_co_dian_document_ids">
<field name="l10n_co_dian_document_ids">
<list create="false" delete="false" edit="false" no_open="1">
<!-- Invisible fields -->
<field name="attachment_id" column_invisible="1"/>
<field name="message" column_invisible="1"/>
<field name="show_button_get_status" column_invisible="1"/>
<field name="show_button_fetch_attached_document" column_invisible="1"/>
<!-- Visible fields -->
<field name="datetime"/>
<field name="move_id"/>
<field name="commercial_state"/>
<field name="state" widget="account_document_state"/>
<field name="test_environment" optional="show"/>
<field name="certification_process" optional="show"/>
<button name="action_get_status"
type="object"
string="Get Status"
invisible="not show_button_get_status"/>
<button name="action_download_file"
type="object"
string="Download"
invisible="not attachment_id"/>
<button name="action_get_attached_document"
type="object"
string="Fetch Attached Document"
invisible="not show_button_fetch_attached_document"/>
</list>
</field>
</page>
</xpath>
</field>
</record>
<record id="view_out_invoice_list_inherit_l10n_co_dian" model="ir.ui.view">
<field name="name">account.out.invoice.list.l10n_co_dian</field>
<field name="model">account.move</field>
<field name="inherit_id" ref="account.view_out_invoice_tree"/>
<field name="arch" type="xml">
<field name="status_in_payment" position="before">
<field name="l10n_co_dian_commercial_state" optional="show"/>
</field>
</field>
</record>
<record id="view_in_invoice_bill_list_inherit_l10n_co_dian" model="ir.ui.view">
<field name="name">account.in.invoice.bill.list.l10n_co_dian</field>
<field name="model">account.move</field>
<field name="inherit_id" ref="account.view_in_invoice_bill_tree"/>
<field name="arch" type="xml">
<field name="status_in_payment" position="before">
<field name="l10n_co_dian_commercial_state" optional="show"/>
</field>
</field>
</record>
<record id="view_account_invoice_filter_inherit_l10n_co_dian" model="ir.ui.view">
<field name="name">account.invoice.select.inherit.l10n_co_dian</field>
<field name="model">account.move</field>
<field name="inherit_id" ref="account.view_account_invoice_filter"/>
<field name="arch" type="xml">
<field name="line_ids" position="after">
<field string="CUFE/CUDE/CUDS" name="l10n_co_edi_cufe_cude_ref"/>
</field>
<filter name="status" position="after">
<filter string="DIAN status" name="l10n_co_dian_state" context="{'group_by': 'l10n_co_dian_state'}"/>
</filter>
</field>
</record>
</odoo>