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.

100 lines
3.6 KiB

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