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.

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