flectra/addons/l10n_in_gst/views/account_invoice_view.xml
2018-12-03 11:28:24 +05:30

140 lines
7.1 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='date_due']" position="after">
<field name="reverse_charge" attrs="{'invisible': [('type', 'in', ['out_invoice', 'out_refund'])]}"/>
</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>
<xpath expr="//field/tree/field[@name='invoice_line_tax_ids']" position="after">
<field name="reverse_invoice_line_tax_ids" widget="many2many_tags" invisible="1"/>
</xpath>
<xpath expr="//page[@name='other_info']" position="after">
<page string="Reverse Charge" name="reverse_charge_info" attrs="{'invisible': [('reverse_charge', '=', False)]}">
<field name="reverse_tax_line_ids" nolabel="1"/>
</page>
</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>
<record id="view_in_reverse_invoice_tax_tree" model="ir.ui.view">
<field name="name">in_reverse.account.invoice.tax.tree</field>
<field name="model">reverse.account.invoice.tax</field>
<field name="arch" type="xml">
<tree string="Reverse Invoice Taxes">
<field name="name"/>
<field name="account_id" groups="account.group_account_user"/>
<field name="base"/>
<field name="amount_total"/>
</tree>
</field>
</record>
</flectra>