pack_view.xml 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <openerp>
  3. <data>
  4. <!-- Product view modification -->
  5. <record model="ir.ui.view" id="product_template_only_form_view">
  6. <field name="name">product.template.pack.form</field>
  7. <field name="model">product.template</field>
  8. <field name="inherit_id" ref="product.product_template_only_form_view" />
  9. <field name="arch" type="xml">
  10. <field name="type" position="after">
  11. <field name="pack" string="¿Es un paquete?"/>
  12. <field name="pack_price_type" attrs="{'invisible':[('pack', '=', False)], 'required':[('pack','=',True)]}" context="{'pack_price_type': pack_price_type}" string="Tipo de paquete"/>
  13. </field>
  14. <notebook position="inside">
  15. <page string="Receta" attrs="{'invisible': ['|', ('product_variant_count', '>', 1), ('pack', '=', False)]}">
  16. <field name="pack_line_ids"/>
  17. </page>
  18. </notebook>
  19. </field>
  20. </record>
  21. <record model="ir.ui.view" id="nan_product_pack_form">
  22. <field name="name">product.product.pack.form</field>
  23. <field name="model">product.product</field>
  24. <field name="inherit_id" ref="product.product_normal_form_view" />
  25. <field name="arch" type="xml">
  26. <field name="type" position="after">
  27. <field name="pack" string="¿Es un paquete?"/>
  28. <field name="pack_price_type" attrs="{'invisible':[('pack', '=', False)], 'required':[('pack','=',True)]}" context="{'pack_price_type': pack_price_type}" string="Tipo de paquete"/>
  29. </field>
  30. <notebook position="inside">
  31. <page string="Receta" attrs="{'invisible':[('pack', '=', False)]}">
  32. <field name="pack_line_ids"/>
  33. </page>
  34. </notebook>
  35. </field>
  36. </record>
  37. <!-- product.pack.line -->
  38. <record model="ir.ui.view" id="product_pack_line_form">
  39. <field name="name">product.pack.line.form</field>
  40. <field name="model">product.pack.line</field>
  41. <field name="type">form</field>
  42. <field name="arch" type="xml">
  43. <form string="Pack Product Line">
  44. <group>
  45. <field name="product_id"/>
  46. <field name="quantity"/>
  47. <field name="price" string="Precio"/>
  48. <field name="subtotal"/>
  49. <!-- <field name="discount" groups="sale.group_discount_per_so_line" invisible="context.get('pack_price_type') == 'fixed_price'"/> -->
  50. </group>
  51. </form>
  52. </field>
  53. </record>
  54. <record model="ir.ui.view" id="product_pack_line_tree">
  55. <field name="name">product.pack.line.tree</field>
  56. <field name="model">product.pack.line</field>
  57. <field name="type">tree</field>
  58. <field name="arch" type="xml">
  59. <tree string="Pack Product Lines" editable="bottom">
  60. <field name="product_id"/>
  61. <field name="quantity"/>
  62. <field name="price" string="Precio"/>
  63. <field name="subtotal" sum="total"/>
  64. <!-- <field name="discount" groups="sale.group_discount_per_so_line" invisible="context.get('pack_price_type') == 'fixed_price'"/> -->
  65. </tree>
  66. </field>
  67. </record>
  68. </data>
  69. </openerp>