pack_view.xml 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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="pricecosto" string="Precio Costo"/>
  48. <field name="price" string="Precio"/>
  49. <field name="subtotal"/>
  50. <field name="subtotalcosto"/>
  51. <!-- <field name="discount" groups="sale.group_discount_per_so_line" invisible="context.get('pack_price_type') == 'fixed_price'"/> -->
  52. </group>
  53. </form>
  54. </field>
  55. </record>
  56. <record model="ir.ui.view" id="product_pack_line_tree">
  57. <field name="name">product.pack.line.tree</field>
  58. <field name="model">product.pack.line</field>
  59. <field name="type">tree</field>
  60. <field name="arch" type="xml">
  61. <tree string="Pack Product Lines" editable="bottom">
  62. <field name="product_id"/>
  63. <field name="quantity"/>
  64. <field name="pricecosto" string="Precio Costo"/>
  65. <field name="price" string="Precio"/>
  66. <field name="subtotalcosto" sum="totalcosto"/>
  67. <field name="subtotal" sum="total"/>
  68. <!-- <field name="discount" groups="sale.group_discount_per_so_line" invisible="context.get('pack_price_type') == 'fixed_price'"/> -->
  69. </tree>
  70. </field>
  71. </record>
  72. </data>
  73. </openerp>