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.

128 lines
5.8 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', '!=', 'worker_eater')]}">
  49. <group>
  50. <group>
  51. <field name="member_card_to_be_printed" />
  52. <field name="last_printed" />
  53. </group>
  54. </group>
  55. <separator string="Eaters" />
  56. <field name="child_eater_ids" widget="many2many_tags"
  57. options="{'no_create': True}"
  58. context="{'default_eater' : 'eater', 'default_customer' : True}" />
  59. <group>
  60. <button string="New Eater" name="%(action_eater_wizard)d"
  61. type="action" />
  62. </group>
  63. <separator string="Cards" />
  64. <field string="Cards" name="member_card_ids">
  65. <tree editable="bottom">
  66. <field name="barcode" />
  67. <field name="create_date" />
  68. <field name="end_date" />
  69. <field name="responsible_id" />
  70. <field name="comment" />
  71. <field name="valid" />
  72. </tree>
  73. </field>
  74. <group>
  75. <button string="New Card"
  76. name="%(action_membercard_wizard)d" type="action" />
  77. </group>
  78. </page>
  79. </xpath>
  80. <field name="barcode" position="attributes">
  81. <attribute name="attrs">{'invisible' : [('eater',
  82. '!=',
  83. 'worker_eater')]}
  84. </attribute>
  85. </field>
  86. <field name="barcode" position="after">
  87. <field name="parent_barcode"
  88. attrs="{'invisible' : [('eater', '!=', 'eater')]}" />
  89. </field>
  90. <button name="toggle_active" position="attributes">
  91. <attribute name="groups" />
  92. </button>
  93. <!-- Temporary fix for the partner_view -->
  94. <xpath expr="//field[@name='customer']" position='before'>
  95. <field name="is_company" invisible="True" />
  96. </xpath>
  97. </field>
  98. </record>
  99. <record model="ir.ui.view" id="beesdoo_partner_search_view">
  100. <field name="name">beesdoo.partner.search.view</field>
  101. <field name="model">res.partner</field>
  102. <field name="inherit_id" ref="base.view_res_partner_filter" />
  103. <field name="arch" type="xml">
  104. <filter name="type_person" position="after">
  105. <filter name="type_a" string="Cooperator type A" domain="[('cooperator_type', '=', 'share_a')]" />
  106. <filter name="type_b" string="Cooperator type B" domain="[('cooperator_type', '=', 'share_b')]" />
  107. <filter name="type_c" string="Cooperator type C" domain="[('cooperator_type', '=', 'share_c')]" />
  108. </filter>
  109. </field>
  110. </record>
  111. <!-- S022 : By default a supplier should be a company -->
  112. <record id="base.action_partner_supplier_form" model="ir.actions.act_window">
  113. <field name="context">{
  114. 'search_default_supplier': 1,
  115. 'default_customer': 0,
  116. 'default_supplier': 1,
  117. 'default_is_company' : True,
  118. 'default_company_type' : 'company',
  119. }
  120. </field>
  121. </record>
  122. </odoo>