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.

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