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.

120 lines
5.4 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. <!-- Temporary fix for the partner_view -->
  85. <xpath expr="//field[@name='customer']" position='before'>
  86. <field name="is_company" invisible="True" />
  87. </xpath>
  88. </field>
  89. </record>
  90. <record model="ir.ui.view" id="beesdoo_partner_search_view">
  91. <field name="name">beesdoo.partner.search.view</field>
  92. <field name="model">res.partner</field>
  93. <field name="inherit_id" ref="base.view_res_partner_filter" />
  94. <field name="arch" type="xml">
  95. <filter name="type_person" position="after">
  96. <filter name="type_a" string="Cooperator type A" domain="[('cooperator_type', '=', 'share_a')]" />
  97. <filter name="type_b" string="Cooperator type B" domain="[('cooperator_type', '=', 'share_b')]" />
  98. <filter name="type_c" string="Cooperator type C" domain="[('cooperator_type', '=', 'share_c')]" />
  99. </filter>
  100. </field>
  101. </record>
  102. <!-- S022 : By default a supplier should be a company -->
  103. <record id="base.action_partner_supplier_form" model="ir.actions.act_window">
  104. <field name="context">{
  105. 'search_default_supplier': 1,
  106. 'default_customer': 0,
  107. 'default_supplier': 1,
  108. 'default_is_company' : True,
  109. 'default_company_type' : 'company',
  110. }
  111. </field>
  112. </record>
  113. </odoo>