You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

58 lines
2.3 KiB

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <odoo>
  3. <record id="product_template_only_form_view" model="ir.ui.view">
  4. <field name="name">product.template.form.inherited</field>
  5. <field name="model">product.template</field>
  6. <field name="inherit_id" ref="product.product_template_only_form_view" />
  7. <field name="arch" type="xml">
  8. <button name="action_open_attribute_values" position="attributes">
  9. <attribute name="attrs">{'invisible': [
  10. '|',('parent.fix_variant_prices', '=', True),
  11. '|', ('parent.attribute_line_ids', '&lt;=', 0), ('parent.is_product_variant', '=', True),
  12. ]}</attribute>
  13. </button>
  14. <xpath expr="//page/field[@name='attribute_line_ids']" position="before">
  15. <group class="o_label_nowrap">
  16. <field name="fix_variant_prices" />
  17. </group>
  18. </xpath>
  19. <!-- <xpath expr="//field[@name='list_price']" position="attributes">
  20. <attribute name="attrs">{'invisible': [
  21. ('fix_variant_prices', '=', True),
  22. ('product_variant_count', '&gt;', 1)
  23. ]}</attribute>
  24. </xpath> -->
  25. </field>
  26. </record>
  27. <record id="product_normal_form_view_default_check" model="ir.ui.view">
  28. <field name="model">product.product</field>
  29. <field name="inherit_id" ref="product.product_normal_form_view" />
  30. <field name="arch" type="xml">
  31. <xpath expr="//field[@name='uom_id']" position="after">
  32. <field name="fix_variant_prices" invisible="1" />
  33. <field
  34. name="fix_price"
  35. attrs="{'invisible': ['|',('fix_variant_prices','=',False),('product_variant_count', '=', 1)]}"
  36. />
  37. </xpath>
  38. </field>
  39. </record>
  40. <record id="product_variant_easy_edit_price_view" model="ir.ui.view">
  41. <field name="model">product.product</field>
  42. <field name="inherit_id" ref="product.product_variant_easy_edit_view" />
  43. <field name="arch" type="xml">
  44. <xpath expr="//label[@for='standard_price']" position="before">
  45. <field name="fix_variant_prices" invisible="1" />
  46. <field
  47. name="fix_price"
  48. attrs="{'invisible': ['|',('fix_variant_prices','=',False),('product_variant_count', '=', 1)]}"
  49. widget='monetary'
  50. options="{'currency_field': 'currency_id', 'field_digits': True}"
  51. />
  52. </xpath>
  53. </field>
  54. </record>
  55. </odoo>