flectra/addons/l10n_in_gst/views/account_invoice_view.xml

116 lines
5.9 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<flectra>
<!-- Inherit Customer Invoice Form View -->
<record id="invoice_form_inherit_l10n_in_gst" model="ir.ui.view">
<field name="name">account.invoice.form.inherit.gst.cust</field>
<field name="model">account.invoice</field>
<field name="inherit_id" ref="account.invoice_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='number']" position="after">
<field name="gst_invoice" readonly="1"
class="oe_right"
attrs="{'invisible': [('state', 'not in', ('open', 'paid'))]}"
style="color: #7c7bad"/>
</xpath>
<xpath expr="//field[@name='fiscal_position_id']" position="replace"/>
<xpath expr="//field[@name='date_invoice']" position="after">
<field name="partner_location" invisible="1"/>
<field name="fiscal_position_id"
options="{'no_create': True}"
attrs="{'required': [('partner_location', '=', 'inter_country')]}"/>
<field name="gst_type" readonly="1"
attrs="{'invisible': [('state', 'not in', ('open', 'paid'))]}"/>
<field name="vat" readonly="1"
attrs="{'invisible': [('state', 'not in', ('open', 'paid'))]}"/>
</xpath>
<xpath expr="//field[@name='partner_id']" position="after">
<field name="e_commerce_partner_id"
attrs="{'readonly': [('state', 'not in', 'draft')]}"
domain="[('e_commerce', '=', True)]"/>
</xpath>
<xpath expr="//field[@name='tax_line_ids']" position="replace"/>
<xpath expr="//group[@name='left_panel']" position="inside">
<field name="tax_line_ids" attrs="{'invisible': [('tax_line_ids', '=', [])]}" nolabel="1" colspan="4">
<tree editable="bottom" string="Taxes"
create="0">
<field name="name"/>
<field name="tax_id" invisible="1"/>
<field name="account_analytic_id"
invisible="1"/>
<field name="sequence" invisible="1"/>
<field name="manual" invisible="1"/>
<field name="account_id"
groups="account.group_account_user"/>
<field name="amount"/>
<field name="currency_id" invisible="1"/>
</tree>
</field>
</xpath>
<xpath expr="//page[@name='other_info']/group/group/field[@name='name']"
position="attributes">
<attribute name="attrs">{'readonly': [('type', '=', 'out_refund')]}</attribute>
</xpath>
</field>
</record>
<!-- Inherit Supplier Invoice Form View -->
<record id="invoice_supplier_form_inherit_l10n_in_gst" model="ir.ui.view">
<field name="name">account.invoice.form.inherit.gst</field>
<field name="model">account.invoice</field>
<field name="inherit_id" ref="account.invoice_supplier_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='number']" position="after">
<field name="gst_invoice" readonly="1"
class="oe_inline oe_right"
attrs="{'invisible': [('state', 'not in', ('open', 'paid'))]}"
style="color: #7c7bad"/>
</xpath>
<xpath expr="//field[@name='fiscal_position_id']" position="replace"/>
<xpath expr="//field[@name='date_invoice']" position="after">
<field name="partner_location" invisible="1"/>
<field name="fiscal_position_id"
options="{'no_create': True}"
attrs="{'required': [('partner_location', '=', 'inter_country')]}"/>
<field name="gst_type" readonly="1"
attrs="{'invisible': [('state', 'not in', ('open', 'paid'))]}"/>
<field name="vat" readonly="1"
attrs="{'invisible': [('state', 'not in', ('open', 'paid'))]}"/>
</xpath>
<xpath expr="//field[@name='partner_id']" position="after">
<field name="e_commerce_partner_id"
attrs="{'readonly': [('state', '!=', 'draft')]}"
domain="[('e_commerce', '=', True)]"/>
</xpath>
<xpath expr="//field[@name='tax_line_ids']" position="attributes">
<attribute name="attrs">{'invisible': [('tax_line_ids', '=', [])]}</attribute>
</xpath>
</field>
</record>
<!-- Inherit Invoice Search View -->
<record id="view_account_invoice_search_inherit_l10n_in_gst" model="ir.ui.view">
<field name="name">account.invoice.search.inherit.gst</field>
<field name="model">account.invoice</field>
<field name="inherit_id" ref="account.view_account_invoice_filter"/>
<field name="arch" type="xml">
<group expand="0" position="inside">
<filter string="GST Invoice"
context="{'group_by':'gst_invoice'}"/>
<filter string="E-Commerce"
context="{'group_by':'e_commerce_partner_id'}"/>
</group>
</field>
</record>
<!-- Fiscal Position acton string change -->
<record id="account.action_account_fiscal_position_form" model="ir.actions.act_window">
<field name="name">Nature of Transaction</field>
</record>
<record id="account.menu_action_account_fiscal_position_form" model="ir.ui.menu">
<field name="name">Nature of Transaction</field>
</record>
</flectra>