[IMP] product: rename labels in product list view

In this commit, I have make responsible optional hidden and rename some labels
in product list view.

TaskID - 3150983

Part-of: odoo/odoo#116799
This commit is contained in:
Tejas Modi
2023-06-20 19:08:56 +02:00
parent 812af37275
commit 4d9da8b9eb
3 changed files with 6 additions and 5 deletions
+2 -1
View File
@@ -179,9 +179,10 @@ class ProductTemplate(models.Model):
for template in self:
template.currency_id = template.company_id.sudo().currency_id.id or main_company.currency_id.id
@api.depends('company_id')
@api.depends_context('company')
def _compute_cost_currency_id(self):
self.cost_currency_id = self.env.company.currency_id.id
self.cost_currency_id = self.company_id.currency_id or self.env.company.currency_id.id
def _compute_template_field_from_variant_field(self, fname, default=False):
"""Sets the value of the given field based on the template variant values
@@ -15,7 +15,7 @@
<field name="priority" widget="priority" optional="show" nolabel="1"/>
<field name="name" string="Product Name"/>
<field name="default_code" optional="show"/>
<field name="product_tag_ids" widget="many2many_tags" options="{'color_field': 'color'}" optional="show"/>
<field name="product_tag_ids" string="Tags" widget="many2many_tags" options="{'color_field': 'color'}" optional="show"/>
<field name="barcode" optional="hide" attrs="{'readonly': [('product_variant_count', '!=', 1)]}"/>
<field name="company_id" options="{'no_create': True}"
groups="base.group_multi_company" optional="hide"/>
@@ -24,7 +24,7 @@
<field name="categ_id" optional="hide"/>
<field name="detailed_type" optional="hide" readonly="1"/>
<field name="type" invisible="1"/>
<field name="uom_id" readonly="1" optional="show" groups="uom.group_uom"/>
<field name="uom_id" string="Unit" readonly="1" optional="show" groups="uom.group_uom"/>
<field name="active" invisible="1"/>
<field name="activity_exception_decoration" widget="activity_exception"/>
</tree>
+2 -2
View File
@@ -338,9 +338,9 @@
<field name="lst_price" optional="show" string="Sales Price"/>
<field name="standard_price" optional="show"/>
<field name="categ_id" optional="hide"/>
<field name="product_tag_ids" widget="many2many_tags" options="{'color_field': 'color', 'no_edit_color': 1}" optional="hide"/>
<field name="product_tag_ids" string="Tags" widget="many2many_tags" options="{'color_field': 'color', 'no_edit_color': 1}" optional="hide"/>
<field name="type" optional="hide" readonly="1"/>
<field name="uom_id" options="{'no_open': True, 'no_create': True}" groups="uom.group_uom" optional="show" readonly="1"/>
<field name="uom_id" string="Unit" groups="uom.group_uom" optional="show" readonly="1"/>
<field name="product_tmpl_id" invisible="1" readonly="1"/>
<field name="active" invisible="1"/>
</tree>