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.

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