product_view.xml 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <data>
  4. <record id="product_template_view_tree" model="ir.ui.view">
  5. <field name="name">product.template.tree</field>
  6. <field name="model">product.template</field>
  7. <field name="arch" type="xml">
  8. <tree string="Products" sample="1">
  9. <field name="default_code"/>
  10. <field name="name"/>
  11. <field name="list_price"/>
  12. <field name="taxes_id" widget="many2many_tags"/>
  13. <field name="supplier_taxes_id" widget="many2many_tags"/>
  14. <field name="activity_exception_decoration" widget="activity_exception"/>
  15. </tree>
  16. </field>
  17. </record>
  18. <record id="product_product_action_sellable" model="ir.actions.act_window">
  19. <field name="name">Products</field>
  20. <field name="type">ir.actions.act_window</field>
  21. <field name="res_model">product.template</field>
  22. <field name="view_mode">kanban,tree,form,activity</field>
  23. <field name="context">{'search_default_filter_to_sell': 1}</field>
  24. <field name="view_id" ref="product_template_view_tree"/>
  25. <field name="help" type="html">
  26. <p class="o_view_nocontent_smiling_face">
  27. Create a new sellable product
  28. </p>
  29. </field>
  30. </record>
  31. <record id="product_product_action_purchasable" 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.template</field>
  35. <field name="view_mode">kanban,tree,form,activity</field>
  36. <field name="context">{'search_default_filter_to_purchase': 1}</field>
  37. <field name="view_id" ref="product_template_view_tree"/>
  38. <field name="help" type="html">
  39. <p class="o_view_nocontent_smiling_face">
  40. Create a new purchasable product
  41. </p>
  42. </field>
  43. </record>
  44. <record id="product_template_form_view" model="ir.ui.view">
  45. <field name="name">product.template.form.inherit</field>
  46. <field name="model">product.template</field>
  47. <field name="priority">5</field>
  48. <field name="inherit_id" ref="product.product_template_form_view"/>
  49. <field name="arch" type="xml">
  50. <xpath expr="//page[@name='purchase']" position="attributes">
  51. <attribute name="invisible">0</attribute>
  52. </xpath>
  53. <page name="inventory" position="after">
  54. <page string="Accounting" name="invoicing" groups="account.group_account_readonly,account.group_account_invoice">
  55. <group name="properties" groups="account.group_account_readonly">
  56. <group string="Receivables">
  57. <field name="property_account_income_id"
  58. groups="account.group_account_readonly"/>
  59. </group>
  60. <group string="Payables" name="payables">
  61. <field name="property_account_expense_id"
  62. groups="account.group_account_readonly"/>
  63. </group>
  64. </group>
  65. <group name="accounting" groups="account.group_account_readonly,account.group_account_invoice"/>
  66. </page>
  67. </page>
  68. <xpath expr="//div[@name='pricing']" position="after">
  69. <field name="taxes_id" widget="many2many_tags" context="{'default_type_tax_use':'sale', 'search_default_sale': 1, 'search_default_service': type == 'service', 'search_default_goods': type == 'consu'}"/>
  70. </xpath>
  71. <xpath expr="//div[@name='pricing']" position="inside">
  72. <span class="ms-2"/><field name="tax_string"/>
  73. </xpath>
  74. <group name="bill" position="inside">
  75. <field name="supplier_taxes_id" widget="many2many_tags" context="{'default_type_tax_use':'purchase', 'search_default_purchase': 1, 'search_default_service': type == 'service', 'search_default_goods': type == 'consu'}"/>
  76. </group>
  77. </field>
  78. </record>
  79. <record id="view_category_property_form" model="ir.ui.view">
  80. <field name="name">product.category.property.form.inherit</field>
  81. <field name="model">product.category</field>
  82. <field name="inherit_id" ref="product.product_category_form_view"/>
  83. <field name="arch" type="xml">
  84. <group name="first" position="after">
  85. <group name="account_property" >
  86. <group string="Account Properties" groups="account.group_account_readonly">
  87. <field name="property_account_income_categ_id"/>
  88. <field name="property_account_expense_categ_id"/>
  89. </group>
  90. </group>
  91. </group>
  92. </field>
  93. </record>
  94. </data>
  95. </odoo>