[FIX] product : UI product.product form was broken
UI improvements for the form of product.product model. task-3043184 closes odoo/odoo#111052 X-original-commit: d8bc64e6cf04291370e577abe8c58303ae4a9741 Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
This commit is contained in:
committed by
William Braeckman
parent
f5c5e51917
commit
ac0395a1e8
@@ -49,22 +49,18 @@
|
||||
<field name="inherit_id" ref="product.product_variant_easy_edit_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<data>
|
||||
<xpath expr="//field[@name='standard_price']" position="replace">
|
||||
<label for="standard_price"/>
|
||||
<div>
|
||||
<field name="standard_price" widget='monetary' options="{'currency_field': 'cost_currency_id'}"/>
|
||||
<t groups="mrp.group_mrp_manager">
|
||||
<field name="bom_count" invisible="1"/>
|
||||
<field name="cost_method" invisible="1"/>
|
||||
<field name="valuation" invisible="1"/>
|
||||
<button name="button_bom_cost"
|
||||
string="Compute Price from BoM"
|
||||
type="object"
|
||||
attrs="{'invisible': ['|', ('bom_count', '=', 0), '&', ('valuation', '=', 'real_time'), ('cost_method', '=', 'fifo')]}"
|
||||
help="Compute the price of the product using products and operations of related bill of materials, for manufactured products only."
|
||||
class="oe_link pt-0"/>
|
||||
</t>
|
||||
</div>
|
||||
<xpath expr="//field[@name='standard_price']" position="after">
|
||||
<t groups="mrp.group_mrp_manager">
|
||||
<field name="bom_count" invisible="1"/>
|
||||
<field name="cost_method" invisible="1"/>
|
||||
<field name="valuation" invisible="1"/>
|
||||
<button name="button_bom_cost"
|
||||
string="Compute Price from BoM"
|
||||
type="object"
|
||||
attrs="{'invisible': ['|', ('bom_count', '=', 0), '&', ('valuation', '=', 'real_time'), ('cost_method', '=', 'fifo')]}"
|
||||
help="Compute the price of the product using products and operations of related bill of materials, for manufactured products only."
|
||||
class="oe_link pt-0"/>
|
||||
</t>
|
||||
</xpath>
|
||||
</data>
|
||||
</field>
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
<field name="uom_po_id" groups="uom.group_uom" options="{'no_create': True}"/>
|
||||
</group>
|
||||
<group name="group_standard_price">
|
||||
<label for="list_price" class="mt-1"/>
|
||||
<label for="list_price"/>
|
||||
<div name="pricing" class="o_row">
|
||||
<field name="list_price" class="oe_inline" widget='monetary'
|
||||
options="{'currency_field': 'currency_id', 'field_digits': True}"/>
|
||||
@@ -266,10 +266,13 @@
|
||||
<group name="pricing" string="Pricing">
|
||||
<field name="product_variant_count" invisible="1"/>
|
||||
<label for="lst_price" string="Sales Price"/>
|
||||
<div class="o_row col-5 ps-0">
|
||||
<field name="lst_price" widget='monetary' options="{'currency_field': 'currency_id', 'field_digits': True}" attrs="{'readonly': [('product_variant_count', '>', 1)]}"/>
|
||||
<div class="o_row">
|
||||
<field name="lst_price" class="oe_inline" widget='monetary' options="{'currency_field': 'currency_id', 'field_digits': True}" attrs="{'readonly': [('product_variant_count', '>', 1)]}"/>
|
||||
</div>
|
||||
<label for="standard_price"/>
|
||||
<div class="o_row">
|
||||
<field name="standard_price" widget='monetary' class="oe_inline" options="{'currency_field': 'cost_currency_id'}"/>
|
||||
</div>
|
||||
<field name="standard_price" widget='monetary' options="{'currency_field': 'cost_currency_id'}"/>
|
||||
<field name="currency_id" invisible='1'/>
|
||||
<field name="cost_currency_id" invisible="1"/>
|
||||
</group>
|
||||
@@ -278,26 +281,26 @@
|
||||
<group name="weight" string="Logistics" attrs="{'invisible':[('type', 'not in', ['product', 'consu'])]}">
|
||||
<label for="volume"/>
|
||||
<div class="o_row">
|
||||
<field name="volume"/>
|
||||
<field name="volume" class="oe_inline"/>
|
||||
<span><field name="volume_uom_name"/></span>
|
||||
</div>
|
||||
<label for="weight"/>
|
||||
<div class="o_row">
|
||||
<field name="weight"/>
|
||||
<field name="weight" class="oe_inline"/>
|
||||
<span><field name="weight_uom_name"/></span>
|
||||
</div>
|
||||
</group>
|
||||
<group name="packaging" string="Packaging" groups="product.group_stock_packaging">
|
||||
<field colspan="2" name="packaging_ids" nolabel="1"
|
||||
context="{'tree_view_ref':'product.product_packaging_tree_view2', 'default_company_id': company_id}"/>
|
||||
</group>
|
||||
</group>
|
||||
<group>
|
||||
<group name="tags" string="Tags">
|
||||
<field name="product_tag_ids" string="Product Template Tags" widget="many2many_tags" readonly="1" options="{'no_open': True, 'color_field': 'color'}"/>
|
||||
<field name="additional_product_tag_ids" widget="many2many_tags" options="{'color_field': 'color', 'no_edit_color': 1}"/>
|
||||
</group>
|
||||
</group>
|
||||
<group>
|
||||
<group name="packaging" string="Packaging" groups="product.group_stock_packaging">
|
||||
<field colspan="2" name="packaging_ids" nolabel="1"
|
||||
context="{'tree_view_ref':'product.product_packaging_tree_view2', 'default_company_id': company_id}"/>
|
||||
</group>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
|
||||
@@ -173,21 +173,21 @@
|
||||
<field name="model">product.product</field>
|
||||
<field name="inherit_id" ref="product.product_variant_easy_edit_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="standard_price" position="after">
|
||||
<xpath expr="//group[@name='pricing']" position="inside">
|
||||
<label for="base_unit_count" groups="website_sale.group_show_uom_price"/>
|
||||
<div name="base_unit_price" groups="website_sale.group_show_uom_price" class="o_row">
|
||||
<field name="base_unit_count"/>
|
||||
<field name="base_unit_id" options="{'no_open': True}"/>
|
||||
<span attrs="{'invisible': [('base_unit_price','=', 0)]}">
|
||||
(<field name="base_unit_price"/> / <field name="base_unit_name"/>)
|
||||
</span>
|
||||
<div name="base_unit_price" groups="website_sale.group_show_uom_price" class="d-flex flex-row">
|
||||
<field name="base_unit_count" style="width: 4rem;"/>
|
||||
<field name="base_unit_id" options="{'no_open': True}" placeholder="Specify unit" style="width: 10rem;"/>
|
||||
<div class="d-flex flex-row" attrs="{'invisible': [('base_unit_price','=', 0)]}">
|
||||
(<field name="base_unit_price" class="oe_inline"/> / <field name="base_unit_name" class="oe_inline"/>)
|
||||
</div>
|
||||
</div>
|
||||
</field>
|
||||
<sheet position="inside">
|
||||
</xpath>
|
||||
<xpath expr="//group[@name='packaging']" position="after">
|
||||
<group name="product_variant_images" string="Extra Variant Media">
|
||||
<field name="product_variant_image_ids" class="o_website_sale_image_list" context="{'default_name': name}" mode="kanban" add-label="Add a Media" nolabel="1"/>
|
||||
</group>
|
||||
</sheet>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user