sale_commission_view.xml 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <openerp>
  3. <data>
  4. <record model="ir.ui.view" id="sale_commission_tree">
  5. <field name="name">Sales commissions tree</field>
  6. <field name="model">sale.commission</field>
  7. <field name="arch" type="xml">
  8. <tree string="Commissions">
  9. <field name="name" />
  10. <field name="commission_type" />
  11. <field name="amount_base_type" />
  12. </tree>
  13. </field>
  14. </record>
  15. <record model="ir.ui.view" id="sale_commission_form">
  16. <field name="name">Sales commissions form</field>
  17. <field name="model">sale.commission</field>
  18. <field name="arch" type="xml">
  19. <form string="Commission">
  20. <group string="General information">
  21. <group>
  22. <field name="name" />
  23. <field name="active" />
  24. <field name="company_id" />
  25. </group>
  26. <group>
  27. <field name="commission_type" />
  28. <field name="amount_base_type" />
  29. <field name="invoice_state"/>
  30. </group>
  31. </group>
  32. <group string="Rates definition" colspan="4">
  33. <field name="fix_qty"
  34. attrs="{'invisible': [('commission_type', '!=', 'fixed')], 'required': [('commission_type', '=', 'fixed')]}" />
  35. </group>
  36. </form>
  37. </field>
  38. </record>
  39. <record model="ir.actions.act_window" id="action_commission">
  40. <field name="name">Commission types</field>
  41. <field name="type">ir.actions.act_window</field>
  42. <field name="res_model">sale.commission</field>
  43. <field name="view_type">form</field>
  44. <field name="view_mode">tree,form</field>
  45. </record>
  46. <menuitem name="Commissions"
  47. id="menu_sale_commissions_conf"
  48. parent="base.menu_base_config" />
  49. <menuitem name="Commission types"
  50. id="menu_sale_commissions_types"
  51. parent="menu_sale_commissions_conf"
  52. action="action_commission" />
  53. </data>
  54. </openerp>