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.

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