product_view.xml 4.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <openerp>
  3. <data>
  4. <!-- Avoid Menu of product Variants -->
  5. <delete model="ir.ui.menu" search="[('id','=',ref('product.menu_products'))]"/>
  6. <menuitem id="menu_products2" action="product.product_normal_action_sell" parent="base.menu_product" groups="group_no_variants" sequence="10"/>
  7. <delete model="ir.ui.menu" search="[('id','=',ref('stock.menu_product_variant_config_stock'))]"/>
  8. <menuitem
  9. action="product.product_normal_action" id="menu_product_variant_config_stock2"
  10. parent="stock.menu_product_in_config_stock" groups="group_no_variants" sequence="2"/>
  11. <!-- Avoid page of product Variants -->
  12. <record id="product_template_only_form_view_avoid_variants" model="ir.ui.view">
  13. <field name="name">product.template.product.form.avoid.variants</field>
  14. <field name="model">product.template</field>
  15. <field name="inherit_id" ref="product.product_template_only_form_view"/>
  16. <field name="arch" type="xml">
  17. <page name="variants" position="attributes">
  18. <attribute name="groups">hide_product_variants.group_no_variants</attribute>
  19. </page>
  20. </field>
  21. </record>
  22. <record id="product.product_template_action" model="ir.actions.act_window">
  23. <field name="name">Products</field>
  24. <field name="type">ir.actions.act_window</field>
  25. <field name="res_model">product.product</field>
  26. <field name="view_mode">kanban,tree,form</field>
  27. <field name="view_type">form</field>
  28. <field name="view_id" ref="product.product_template_kanban_view"/>
  29. <field name="context">{"search_default_filter_to_sell":1}</field>
  30. </record>
  31. <record id="purchase.product_normal_action_puchased" model="ir.actions.act_window">
  32. <field name="name">Products</field>
  33. <field name="type">ir.actions.act_window</field>
  34. <field name="res_model">product.product</field>
  35. <field name="view_type">form</field>
  36. <field name="view_mode">kanban,tree,form</field>
  37. <field name="context">{"search_default_filter_to_purchase":1}</field>
  38. <field name="search_view_id" eval="False"/> <!-- Force empty -->
  39. <field name="view_id" eval="False"/> <!-- Force empty -->
  40. <field name="help" type="html">
  41. <p class="oe_view_nocontent_create">
  42. Click to define a new product.
  43. </p><p>
  44. You must define a product for everything you purchase, whether
  45. it's a physical product, a consumable or services you buy to
  46. subcontractants.
  47. </p><p>
  48. The product form contains detailed information to improve the
  49. purchase process: prices, procurement logistics, accounting data,
  50. available suppliers, etc.
  51. </p>
  52. </field>
  53. </record>
  54. <record id="product_normal_form_view_rev_name" model="ir.ui.view">
  55. <field name="name">product.product.form.rev_name</field>
  56. <field name="model">product.product</field>
  57. <field name="inherit_id" ref="product.product_normal_form_view"/>
  58. <field name="arch" type="xml">
  59. <field name="name" position="replace">
  60. <field name="name"/>
  61. </field>
  62. <field name="product_tmpl_id" position="replace">
  63. <field name="product_tmpl_id" invisible="1" required="0"/>
  64. </field>
  65. </field>
  66. </record>
  67. <record id="product_template_kanban_view_hide_variants" model="ir.ui.view">
  68. <field name="name">Product.template.product.kanban.hide_variants</field>
  69. <field name="model">product.template</field>
  70. <field name="inherit_id" ref="product.product_template_kanban_view"/>
  71. <field name="arch" type="xml">
  72. <xpath expr="/kanban/templates/t/div/div/a" position="replace"/>
  73. </field>
  74. </record>
  75. </data>
  76. </openerp>