[IMP] product,*_*: Improve the product and contact list view

* stock, website_sale, base

Purpose fo the task is to improve the product list view and
contact list view.

So in this commit, we have Updated the list view of the product
updated decoration, string apply the monetory widget on cost
and sales price.
Also on contact list view make the user_id field as optiona show
instead of hide.

TaskID: 2309699
Related Enterprise: https://github.com/odoo/enterprise/pull/12288

closes odoo/odoo#55451

Closes: #55451
Related: odoo/enterprise#12288
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
This commit is contained in:
Mithilesh Rao
2020-08-14 10:37:01 +00:00
committed by Barad Mahendra
parent 8de815e8fc
commit 05c1cb6977
4 changed files with 14 additions and 8 deletions
@@ -6,15 +6,18 @@
<field name="arch" type="xml">
<tree string="Product" multi_edit="1" sample="1">
<field name="product_variant_count" invisible="1"/>
<field name="sale_ok" invisible="1"/>
<field name="currency_id" invisible="1"/>
<field name="cost_currency_id" invisible="1"/>
<field name="sequence" widget="handle" readonly="1"/>
<field name="name" string="Product Name"/>
<field name="default_code" optional="show"/>
<field name="barcode" optional="hide" attrs="{'readonly': [('product_variant_count', '>', 1)]}"/>
<field name="name"/>
<field name="company_id" options="{'no_create_edit': True}"
groups="base.group_multi_company" optional="hide"/>
<field name="list_price" string="Sales Price" optional="show"/>
<field name="standard_price" optional="show" readonly="1"/>
<field name="list_price" string="Sales Price" widget='monetary' options="{'currency_field': 'currency_id'}" optional="show" decoration-muted="not sale_ok"/>
<field name="standard_price" widget='monetary' options="{'currency_field': 'cost_currency_id'}" optional="show" readonly="1"/>
<field name="categ_id" optional="hide"/>
<field name="type" optional="hide" readonly="1"/>
<field name="uom_id" readonly="1" optional="show" groups="uom.group_uom"/>
+5 -2
View File
@@ -50,8 +50,11 @@
<field name="inherit_id" ref="product.product_template_tree_view"/>
<field name="arch" type="xml">
<field name="uom_id" position="before">
<field name="qty_available" attrs="{'invisible':[('type', '!=', 'product')]}" optional="show" decoration-danger="virtual_available &lt; 0" decoration-warning="virtual_available == 0"/>
<field name="virtual_available" attrs="{'invisible':[('type', '!=', 'product')]}" optional="show" decoration-danger="virtual_available &lt; 0" decoration-warning="virtual_available == 0" decoration-bf="1"/>
<field name="qty_available" attrs="{'invisible':[('type', '!=', 'product')]}" optional="show" decoration-danger="qty_available &lt; 0"/>
<field name="virtual_available" attrs="{'invisible':[('type', '!=', 'product')]}" optional="show" decoration-danger="virtual_available &lt; 0" decoration-bf="1"/>
</field>
<field name="default_code" position="after">
<field name="responsible_id" widget="many2one_avatar_user"/>
</field>
</field>
</record>
+2 -2
View File
@@ -30,8 +30,8 @@
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_tree_view"/>
<field name="arch" type="xml">
<field name="name" position="after">
<field name="website_id" groups="website.group_multi_website" optional="show"/>
<field name="default_code" position="after">
<field name="website_id" groups="website.group_multi_website" optional="hide"/>
</field>
</field>
</record>
+1 -1
View File
@@ -48,7 +48,7 @@
<field name="function" invisible="1"/>
<field name="phone" class="o_force_ltr" optional="show"/>
<field name="email" optional="show"/>
<field name="user_id" optional="hide" widget="many2one_avatar_user"/>
<field name="user_id" optional="show" widget="many2one_avatar_user"/>
<field name="city" optional="show"/>
<field name="state_id" optional="hide"/>
<field name="country_id" optional="show"/>