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.

142 lines
7.5 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="minimum_quantity" attrs="{'invisible':[('is_share','=',False)]}" groups="easy_my_coop.group_energiris_user"/>
  29. <field name="by_company" attrs="{'invisible':[('is_share','=',False)]}" groups="easy_my_coop.group_energiris_user"/>
  30. <field name="by_individual" attrs="{'invisible':[('is_share','=',False)]}" groups="easy_my_coop.group_energiris_user"/>
  31. </xpath>
  32. </field>
  33. </record>
  34. <record id="share_product_action" model="ir.actions.act_window">
  35. <field name="name">Share type</field>
  36. <field name="type">ir.actions.act_window</field>
  37. <field name="res_model">product.template</field>
  38. <field name="view_type">form</field>
  39. <field name="view_mode">kanban,tree,form</field>
  40. <!-- <field name="context">{"search_default_filter_to_purchase":1}</field> -->
  41. <field name="search_view_id" eval="False"/> <!-- Force empty -->
  42. <field name="view_id" eval="False"/> <!-- Force empty -->
  43. <field name="domain">[('is_share','=',True)]</field>
  44. <field name="help" type="html">
  45. <p class="oe_view_nocontent_create">
  46. Click to define a new share product.
  47. </p>
  48. </field>
  49. </record>
  50. <menuitem action="share_product_action" name="Share type" id="menu_easy_my_coop_share_product" parent="menu_easy_my_coop_main_subscription" sequence="20"/>
  51. <!-- overriding product views to not display share product in the purchase and sale views-->
  52. <record id="product.product_normal_action" model="ir.actions.act_window">
  53. <field name="name">Product</field>
  54. <field name="type">ir.actions.act_window</field>
  55. <field name="res_model">product.product</field>
  56. <field name="view_mode">tree,form,kanban</field>
  57. <field name="view_type">form</field>
  58. <field name="search_view_id" ref="product.product_search_form_view"/>
  59. <field name="view_id" eval="False"/> <!-- Force empty -->
  60. <field name="domain">[('is_share','=',False)]</field>
  61. <field name="help" type="html">
  62. <p class="oe_view_nocontent_create">
  63. Click to define a new product.
  64. </p><p>
  65. You must define a product for everything you sell, whether it's
  66. a physical product, a consumable or a service you offer to
  67. customers.
  68. </p><p>
  69. The product form contains information to simplify the sale
  70. process: price, notes in the quotation, accounting data,
  71. procurement methods, etc.
  72. </p>
  73. </field>
  74. </record>
  75. <record id="product.product_template_action" model="ir.actions.act_window">
  76. <field name="name">Products</field>
  77. <field name="type">ir.actions.act_window</field>
  78. <field name="res_model">product.template</field>
  79. <field name="view_mode">kanban,tree,form</field>
  80. <field name="view_type">form</field>
  81. <field name="view_id" ref="product.product_template_kanban_view"/>
  82. <field name="context">{"search_default_filter_to_sell":1}</field>
  83. <field name="domain">[('is_share','=',False)]</field>
  84. <field name="help" type="html">
  85. <p class="oe_view_nocontent_create">
  86. Click to define a new product.
  87. </p><p>
  88. You must define a product for everything you sell, whether it's a physical product, a consumable or a service you offer to customers.
  89. </p><p>
  90. The product form contains information to simplify the sale process: price, notes in the quotation, accounting data, procurement methods, etc.
  91. </p>
  92. </field>
  93. </record>
  94. <record id="product.product_template_action_product" model="ir.actions.act_window">
  95. <field name="name">Products</field>
  96. <field name="type">ir.actions.act_window</field>
  97. <field name="res_model">product.template</field>
  98. <field name="view_mode">kanban,tree,form</field>
  99. <field name="view_type">form</field>
  100. <field name="context">{"search_default_products": 1, 'default_type': 'product'}</field>
  101. <field name="domain">[('is_share','=',False)]</field>
  102. <field name="help" type="html">
  103. <p class="oe_view_nocontent_create">
  104. Click to define a new product.
  105. </p>
  106. </field>
  107. </record>
  108. <record id="product.product_normal_action_puchased" model="ir.actions.act_window">
  109. <field name="name">Products</field>
  110. <field name="type">ir.actions.act_window</field>
  111. <field name="res_model">product.template</field>
  112. <field name="view_type">form</field>
  113. <field name="view_mode">kanban,tree,form</field>
  114. <field name="context">{"search_default_filter_to_purchase":1}</field>
  115. <field name="search_view_id" eval="False"/> <!-- Force empty -->
  116. <field name="view_id" eval="False"/> <!-- Force empty -->
  117. <field name="domain">[('is_share','=',False)]</field>
  118. <field name="help" type="html">
  119. <p class="oe_view_nocontent_create">
  120. Click to define a new product.
  121. </p><p>
  122. You must define a product for everything you purchase, whether
  123. it's a physical product, a consumable or services you buy to
  124. subcontractants.
  125. </p><p>
  126. The product form contains detailed information to improve the
  127. purchase process: prices, procurement logistics, accounting data,
  128. available vendors, etc.
  129. </p>
  130. </field>
  131. </record>
  132. </data>
  133. </openerp>