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.

123 lines
5.6 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <record model="ir.actions.act_window" id="action_membercard_wizard">
  4. <field name="name">New Member Card</field>
  5. <field name="res_model">membercard.new.wizard</field>
  6. <field name="view_mode">form</field>
  7. <field name="target">new</field>
  8. </record>
  9. <record model="ir.actions.act_window" id="action_eater_wizard">
  10. <field name="name">New Eater</field>
  11. <field name="res_model">eater.new.wizard</field>
  12. <field name="view_mode">form</field>
  13. <field name="target">new</field>
  14. </record>
  15. <record model="ir.ui.view" id="beesdoo_partner_form_view">
  16. <field name="name">beesdoo.partner.form.view</field>
  17. <field name="model">res.partner</field>
  18. <field name="inherit_id" ref="point_of_sale.view_partner_property_form" />
  19. <field name="arch" type="xml">
  20. <field name="type" position="before">
  21. <field name="cooperator_type" />
  22. </field>
  23. <field name="website" position="after">
  24. <field name="eater"
  25. attrs="{'invisible': [('customer', '=', False)]}" />
  26. <field name="parent_eater_id"
  27. attrs="{'invisible' : [('eater', '!=', 'eater')]}" />
  28. </field>
  29. <xpath expr="//notebook/page[1]" position="attributes">
  30. <attribute name="attrs">{'invisible':
  31. [('cooperator_type', '=', 'share_a')]}</attribute>
  32. </xpath>
  33. <xpath expr="//notebook" position="inside">
  34. <page string="Worker information"
  35. attrs="{'invisible': [('cooperator_type', '!=', 'share_a')]}"
  36. name="work">
  37. <group name="info_session" />
  38. </page>
  39. <page string="Member Card"
  40. attrs="{'invisible': ['|', ('customer', '=', False), ('eater', 'not in', ('worker_eater', 'eater'))]}">
  41. <group>
  42. <group>
  43. <field name="member_card_to_be_printed" />
  44. <field name="last_printed" />
  45. </group>
  46. </group>
  47. <group attrs="{'invisible': ['|', ('customer', '=', False), ('eater', '!=', 'worker_eater')]}">
  48. <separator string="Eaters" />
  49. <field name="child_eater_ids" widget="many2many_tags"
  50. options="{'no_create': True}"
  51. context="{'default_eater' : 'eater', 'default_customer' : True}" />
  52. <group>
  53. <button string="New Eater" name="%(action_eater_wizard)d"
  54. type="action" />
  55. </group>
  56. <separator string="Cards" />
  57. <field string="Cards" name="member_card_ids">
  58. <tree editable="bottom">
  59. <field name="barcode" />
  60. <field name="create_date" />
  61. <field name="end_date" />
  62. <field name="responsible_id" />
  63. <field name="comment" />
  64. <field name="valid" />
  65. </tree>
  66. </field>
  67. <group>
  68. <button string="New Card"
  69. name="%(action_membercard_wizard)d" type="action" />
  70. </group>
  71. </group>
  72. </page>
  73. </xpath>
  74. <field name="barcode" position="attributes">
  75. <attribute name="attrs">{'invisible' : [('eater',
  76. '!=',
  77. 'worker_eater')]}
  78. </attribute>
  79. </field>
  80. <field name="barcode" position="after">
  81. <field name="parent_barcode"
  82. attrs="{'invisible' : [('eater', '!=', 'eater')]}" />
  83. </field>
  84. <button name="toggle_active" position="attributes">
  85. <attribute name="groups" />
  86. </button>
  87. <!-- Temporary fix for the partner_view -->
  88. <xpath expr="//field[@name='customer']" position='before'>
  89. <field name="is_company" invisible="True" />
  90. </xpath>
  91. </field>
  92. </record>
  93. <record model="ir.ui.view" id="beesdoo_partner_search_view">
  94. <field name="name">beesdoo.partner.search.view</field>
  95. <field name="model">res.partner</field>
  96. <field name="inherit_id" ref="base.view_res_partner_filter" />
  97. <field name="arch" type="xml">
  98. <filter name="type_person" position="after">
  99. <filter name="type_a" string="Cooperator type A" domain="[('cooperator_type', '=', 'share_a')]" />
  100. <filter name="type_b" string="Cooperator type B" domain="[('cooperator_type', '=', 'share_b')]" />
  101. <filter name="type_c" string="Cooperator type C" domain="[('cooperator_type', '=', 'share_c')]" />
  102. </filter>
  103. </field>
  104. </record>
  105. <!-- S022 : By default a supplier should be a company -->
  106. <record id="base.action_partner_supplier_form" model="ir.actions.act_window">
  107. <field name="context">{
  108. 'search_default_supplier': 1,
  109. 'default_customer': 0,
  110. 'default_supplier': 1,
  111. 'default_is_company' : True,
  112. 'default_company_type' : 'company',
  113. }
  114. </field>
  115. </record>
  116. </odoo>