[IMP] account: Remove 'Tax Scope' on list and search views

Purpose
=======

- Remove tax scope in the list view of the taxes coming from the search more of the invoice line

- Hide the Filters option (While venders bills search view showing only tax scope purchase and sales bills search view showing only tax scope sales so no need purchase and sales option of the filter, also hide active and inactive filters.)
This commit is contained in:
Priyanka Kakadiya
2018-02-05 11:03:24 +01:00
committed by Yannick Tivisse
parent 7a7f959f74
commit ccf6386acf
4 changed files with 27 additions and 4 deletions
@@ -281,7 +281,7 @@
<field name="uom_id" groups="product.group_uom"/>
<field name="price_unit"/>
<field name="discount" groups="base.group_no_one"/>
<field name="invoice_line_tax_ids" widget="many2many_tags" options="{'no_create': True}" context="{'type':parent.type}"
<field name="invoice_line_tax_ids" widget="many2many_tags" options="{'no_create': True}" context="{'type':parent.type, 'tree_view_ref': 'account.account_tax_view_tree', 'search_view_ref': 'account.account_tax_view_search'}"
domain="[('type_tax_use','=','purchase'),('company_id', '=', parent.company_id)]"/>
<field name="price_subtotal" string="Amount"/>
<field name="currency_id" invisible="1"/>
@@ -438,7 +438,7 @@
<field name="uom_id" groups="product.group_uom"/>
<field name="price_unit"/>
<field name="discount" groups="base.group_no_one"/>
<field name="invoice_line_tax_ids" widget="many2many_tags" options="{'no_create': True}" context="{'type':parent.type}"
<field name="invoice_line_tax_ids" widget="many2many_tags" options="{'no_create': True}" context="{'type':parent.type, 'tree_view_ref': 'account.account_tax_view_tree', 'search_view_ref': 'account.account_tax_view_search'}"
domain="[('type_tax_use','=','sale'),('company_id', '=', parent.company_id)]"/>
<field name="price_subtotal" string="Subtotal"/>
<field name="currency_id" invisible="1"/>
+23
View File
@@ -1000,6 +1000,18 @@
</tree>
</field>
</record>
<record id="account_tax_view_tree" model="ir.ui.view">
<field name="name">account.invoice.line.tax.search</field>
<field name="model">account.tax</field>
<field name="arch" type="xml">
<tree string="Account Tax">
<field name="name"/>
<field name="description"/>
</tree>
</field>
</record>
<record id="view_tax_kanban" model="ir.ui.view">
<field name="name">account.tax.kanban</field>
<field name="model">account.tax</field>
@@ -1043,6 +1055,17 @@
</search>
</field>
</record>
<record id="account_tax_view_search" model="ir.ui.view">
<field name="name">account.tax.search.filters</field>
<field name="model">account.tax</field>
<field name="arch" type="xml">
<search string="Search Taxes">
<field name="name" filter_domain="['|', ('name','ilike',self), ('description','ilike',self)]" string="Tax"/>
<field name="company_id" groups="base.group_multi_company"/>
</search>
</field>
</record>
<record id="view_tax_form" model="ir.ui.view">
<field name="name">account.tax.form</field>
<field name="model">account.tax</field>
+1 -1
View File
@@ -213,7 +213,7 @@
<field name="qty_invoiced" attrs="{'column_invisible': [('parent.state', 'not in', ('purchase', 'done'))]}"/>
<field name="product_uom" groups="product.group_uom" attrs="{'readonly': [('state', 'in', ('purchase', 'done', 'cancel'))]}" force_save="1"/>
<field name="price_unit"/>
<field name="taxes_id" widget="many2many_tags" domain="[('type_tax_use','=','purchase')]" context="{'default_type_tax_use': 'purchase'}" options="{'no_create': True}"/>
<field name="taxes_id" widget="many2many_tags" domain="[('type_tax_use','=','purchase')]" context="{'default_type_tax_use': 'purchase', 'search_view_ref': 'account.account_tax_view_search'}" options="{'no_create': True}"/>
<field name="price_subtotal" widget="monetary"/>
</tree>
<form string="Purchase Order Line">
+1 -1
View File
@@ -273,7 +273,7 @@
</div>
</group>
<group>
<field name="tax_id" widget="many2many_tags" options="{'no_create': True}" domain="[('type_tax_use','=','sale'),('company_id','=',parent.company_id)]"
<field name="tax_id" widget="many2many_tags" options="{'no_create': True}" context="{'search_view_ref': 'account.account_tax_view_search'}" domain="[('type_tax_use','=','sale'),('company_id','=',parent.company_id)]"
attrs="{'readonly': [('qty_invoiced', '&gt;', 0)]}"/>
<label for="customer_lead"/>
<div>