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.

95 lines
4.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="website" position="after">
  21. <field name="eater"
  22. attrs="{'invisible': [('customer', '=', False)]}" />
  23. <field name="parent_eater_id"
  24. attrs="{'invisible' : [('eater', '!=', 'eater')]}" />
  25. </field>
  26. <xpath expr="//notebook" position="inside">
  27. <page string="Member Card"
  28. attrs="{'invisible': ['|', ('customer', '=', False), ('eater', 'not in', ('worker_eater', 'eater'))]}">
  29. <group>
  30. <group>
  31. <field name="member_card_to_be_printed" />
  32. <field name="last_printed" />
  33. </group>
  34. </group>
  35. <group attrs="{'invisible': ['|', ('customer', '=', False), ('eater', '!=', 'worker_eater')]}">
  36. <separator string="Eaters" />
  37. <field name="child_eater_ids" widget="many2many_tags"
  38. options="{'no_create': True}"
  39. context="{'default_eater' : 'eater', 'default_customer' : True}" />
  40. <group>
  41. <button string="New Eater" name="%(action_eater_wizard)d"
  42. type="action" />
  43. </group>
  44. <separator string="Cards" />
  45. <field string="Cards" name="member_card_ids">
  46. <tree editable="bottom">
  47. <field name="barcode" />
  48. <field name="create_date" />
  49. <field name="end_date" />
  50. <field name="responsible_id" />
  51. <field name="comment" />
  52. <field name="valid" />
  53. </tree>
  54. </field>
  55. <group>
  56. <button string="New Card"
  57. name="%(action_membercard_wizard)d" type="action" />
  58. </group>
  59. </group>
  60. </page>
  61. </xpath>
  62. <field name="barcode" position="attributes">
  63. <attribute name="attrs">{'invisible' : [('eater',
  64. '!=',
  65. 'worker_eater')]}
  66. </attribute>
  67. </field>
  68. <field name="barcode" position="after">
  69. <field name="parent_barcode"
  70. attrs="{'invisible' : [('eater', '!=', 'eater')]}" />
  71. </field>
  72. <!-- Temporary fix for the partner_view -->
  73. <xpath expr="//field[@name='customer']" position='before'>
  74. <field name="is_company" invisible="True" />
  75. </xpath>
  76. </field>
  77. </record>
  78. <!-- S022 : By default a supplier should be a company -->
  79. <record id="base.action_partner_supplier_form" model="ir.actions.act_window">
  80. <field name="context">{
  81. 'search_default_supplier': 1,
  82. 'default_customer': 0,
  83. 'default_supplier': 1,
  84. 'default_is_company' : True,
  85. 'default_company_type' : 'company',
  86. }
  87. </field>
  88. </record>
  89. </odoo>