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.

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