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

75 lines
4.0 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="view_picking_edi_form" model="ir.ui.view">
<field name="model">stock.picking</field>
<field name="name">stock.picking.edi.form</field>
<field name="inherit_id" ref="stock.view_picking_form" />
<field name="arch" type="xml">
<xpath expr="//field[@name='origin']" position="after">
<field name="l10n_pe_edi_status" readonly="1" invisible="state != 'done' or country_code != 'PE'"/>
<field name="l10n_pe_edi_transport_type"
invisible="country_code != 'PE'"
readonly="l10n_pe_edi_status == 'sent'"/>
<field name="l10n_pe_edi_reason_for_transfer"
invisible="not l10n_pe_edi_transport_type"
readonly="l10n_pe_edi_status == 'sent'"/>
<field name="l10n_pe_edi_departure_start_date"
invisible="not l10n_pe_edi_transport_type"
readonly="l10n_pe_edi_status == 'sent'" widget="date"/>
</xpath>
<xpath expr="//header" position="after">
<div class="alert alert-warning" role="alert"
invisible="not l10n_pe_edi_error">
<field name="l10n_pe_edi_error" readonly="1"/>
<button
name="action_send_delivery_guide"
type="object"
class="oe_link"
string="Retry"/>
<button
name="l10n_pe_edi_action_download"
type="object"
class="oe_link"
string="Download"/>
</div>
</xpath>
<xpath expr="//header//button[@name='action_cancel']" position="after">
<button name="action_send_delivery_guide" type="object"
string="Generate Delivery Guide"
invisible="state != 'done' or country_code != 'PE' or picking_type_code != 'outgoing' or l10n_pe_edi_status"/>
</xpath>
<xpath expr="//notebook" position="inside">
<page string="PE EDI" name="pe_edi" invisible="not l10n_pe_edi_transport_type" readonly="l10n_pe_edi_status == 'sent'">
<group>
<group string="Transport" name="pe_edi_group_transport" readonly="l10n_pe_edi_status == 'sent'">
<field
name="l10n_pe_edi_vehicle_id"
invisible="l10n_pe_edi_transport_type == '01'"
readonly="l10n_pe_edi_status == 'sent'"/>
<field
name="l10n_pe_edi_operator_id"
readonly="l10n_pe_edi_status == 'sent'"/>
<field name="l10n_pe_edi_observation"/>
</group>
<group string="SUNAT" name="pe_edi_group_sunat">
<field name="l10n_latam_document_number" readonly="country_code == 'PE'"/>
<field name="l10n_pe_edi_ticket_number"/>
</group>
</group>
<group>
<group string="Related Documents" name="pe_edi_group_related_documents" readonly="l10n_pe_edi_status == 'sent'">
<field
name="l10n_pe_edi_related_document_type"
readonly="l10n_pe_edi_status == 'sent'"/>
<field
name="l10n_pe_edi_document_number"
readonly="l10n_pe_edi_status == 'sent'"
required="l10n_pe_edi_related_document_type"/>
</group>
</group>
</page>
</xpath>
</field>
</record>
</odoo>