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.

156 lines
8.4 KiB

  1. <openerp>
  2. <data>
  3. <record id="product_template_share_form_view" model="ir.ui.view">
  4. <field name="name">product.template.share.form</field>
  5. <field name="model">product.template</field>
  6. <field name="inherit_id" ref="purchase.view_product_supplier_inherit"/>
  7. <field name="arch" type="xml">
  8. <xpath expr="//label[@for='purchase_ok']/.." position="after">
  9. <div groups="easy_my_coop.group_energiris_super_manager">
  10. <field name="is_share"/>
  11. <label for="is_share"/>
  12. </div>
  13. <div attrs="{'invisible':[('is_share','=',False)]}" groups="easy_my_coop.group_energiris_user">
  14. <field name="display_on_website"/>
  15. <label for="display_on_website"/>
  16. </div>
  17. </xpath>
  18. </field>
  19. </record>
  20. <record id="product_template_form_view" model="ir.ui.view">
  21. <field name="name">product.template.common.form</field>
  22. <field name="model">product.template</field>
  23. <field name="inherit_id" ref="product.product_template_form_view"/>
  24. <field name="arch" type="xml">
  25. <xpath expr="//field[@name='type']" position="after">
  26. <field name="short_name" attrs="{'invisible':[('is_share','=',False)]}" groups="easy_my_coop.group_energiris_user"/>
  27. <field name="default_share_product" attrs="{'invisible':[('is_share','=',False)]}" groups="easy_my_coop.group_energiris_user"/>
  28. <field name="force_min_qty" attrs="{'invisible':[('is_share','=',False)]}" groups="easy_my_coop.group_energiris_user"/>
  29. <field name="minimum_quantity" attrs="{'invisible':[('is_share','=',False)]}" groups="easy_my_coop.group_energiris_user"/>
  30. <field name="customer" attrs="{'invisible':[('is_share','=',False)]}"/>
  31. <field name="by_company" attrs="{'invisible':[('is_share','=',False)]}" groups="easy_my_coop.group_energiris_user"/>
  32. <field name="by_individual" attrs="{'invisible':[('is_share','=',False)]}" groups="easy_my_coop.group_energiris_user"/>
  33. <field name="mail_template" attrs="{'invisible':[('is_share','=',False)]}" groups="easy_my_coop.group_energiris_user"/>
  34. </xpath>
  35. </field>
  36. </record>
  37. <record id="product_template_only_form_view" model="ir.ui.view">
  38. <field name="name">product.template.product.form</field>
  39. <field name="model">product.template</field>
  40. <field name="inherit_id" ref="product.product_template_only_form_view"/>
  41. <field name="arch" type="xml">
  42. <field name="default_code" position="attributes">
  43. <attribute name="attrs">{'required': [('is_share', '=', True)]}</attribute>
  44. </field>
  45. </field>
  46. </record>
  47. <record id="share_product_action" model="ir.actions.act_window">
  48. <field name="name">Share type</field>
  49. <field name="type">ir.actions.act_window</field>
  50. <field name="res_model">product.template</field>
  51. <field name="view_type">form</field>
  52. <field name="view_mode">kanban,tree,form</field>
  53. <!-- <field name="context">{"search_default_filter_to_purchase":1}</field> -->
  54. <field name="search_view_id" eval="False"/> <!-- Force empty -->
  55. <field name="view_id" eval="False"/> <!-- Force empty -->
  56. <field name="domain">[('is_share','=',True)]</field>
  57. <field name="help" type="html">
  58. <p class="oe_view_nocontent_create">
  59. Click to define a new share product.
  60. </p>
  61. </field>
  62. </record>
  63. <menuitem action="share_product_action" name="Share type" id="menu_easy_my_coop_share_product" parent="menu_easy_my_coop_main_subscription" sequence="20"/>
  64. <!-- overriding product views to not display share product in the purchase and sale views-->
  65. <record id="product.product_normal_action" model="ir.actions.act_window">
  66. <field name="name">Product</field>
  67. <field name="type">ir.actions.act_window</field>
  68. <field name="res_model">product.product</field>
  69. <field name="view_mode">tree,form,kanban</field>
  70. <field name="view_type">form</field>
  71. <field name="search_view_id" ref="product.product_search_form_view"/>
  72. <field name="view_id" eval="False"/> <!-- Force empty -->
  73. <field name="domain">[('is_share','=',False)]</field>
  74. <field name="help" type="html">
  75. <p class="oe_view_nocontent_create">
  76. Click to define a new product.
  77. </p><p>
  78. You must define a product for everything you sell, whether it's
  79. a physical product, a consumable or a service you offer to
  80. customers.
  81. </p><p>
  82. The product form contains information to simplify the sale
  83. process: price, notes in the quotation, accounting data,
  84. procurement methods, etc.
  85. </p>
  86. </field>
  87. </record>
  88. <record id="product.product_template_action" model="ir.actions.act_window">
  89. <field name="name">Products</field>
  90. <field name="type">ir.actions.act_window</field>
  91. <field name="res_model">product.template</field>
  92. <field name="view_mode">tree,form,kanban</field>
  93. <field name="view_type">form</field>
  94. <field name="view_id" ref="product.product_template_kanban_view"/>
  95. <field name="context">{"search_default_filter_to_sell":1}</field>
  96. <field name="domain">[('is_share','=',False)]</field>
  97. <field name="help" type="html">
  98. <p class="oe_view_nocontent_create">
  99. Click to define a new product.
  100. </p><p>
  101. You must define a product for everything you sell, whether it's a physical product, a consumable or a service you offer to customers.
  102. </p><p>
  103. The product form contains information to simplify the sale process: price, notes in the quotation, accounting data, procurement methods, etc.
  104. </p>
  105. </field>
  106. </record>
  107. <record id="product.product_template_action_product" model="ir.actions.act_window">
  108. <field name="name">Products</field>
  109. <field name="type">ir.actions.act_window</field>
  110. <field name="res_model">product.template</field>
  111. <field name="view_mode">tree,form,kanban</field>
  112. <field name="view_type">form</field>
  113. <field name="context">{"search_default_products": 1, 'default_type': 'product'}</field>
  114. <field name="domain">[('is_share','=',False)]</field>
  115. <field name="help" type="html">
  116. <p class="oe_view_nocontent_create">
  117. Click to define a new product.
  118. </p>
  119. </field>
  120. </record>
  121. <record id="product.product_normal_action_puchased" model="ir.actions.act_window">
  122. <field name="name">Products</field>
  123. <field name="type">ir.actions.act_window</field>
  124. <field name="res_model">product.template</field>
  125. <field name="view_type">form</field>
  126. <field name="view_mode">kanban,tree,form</field>
  127. <field name="context">{"search_default_filter_to_purchase":1}</field>
  128. <field name="search_view_id" eval="False"/> <!-- Force empty -->
  129. <field name="view_id" eval="False"/> <!-- Force empty -->
  130. <field name="domain">[('is_share','=',False)]</field>
  131. <field name="help" type="html">
  132. <p class="oe_view_nocontent_create">
  133. Click to define a new product.
  134. </p><p>
  135. You must define a product for everything you purchase, whether
  136. it's a physical product, a consumable or services you buy to
  137. subcontractants.
  138. </p><p>
  139. The product form contains detailed information to improve the
  140. purchase process: prices, procurement logistics, accounting data,
  141. available vendors, etc.
  142. </p>
  143. </field>
  144. </record>
  145. </data>
  146. </openerp>