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.

66 lines
3.2 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.ui.view" id="beesdoo_partner_form_view">
  10. <field name="name">beesdoo.partner.form.view</field>
  11. <field name="model">res.partner</field>
  12. <field name="inherit_id" ref="point_of_sale.view_partner_property_form" />
  13. <field name="arch" type="xml">
  14. <field name="name" position="replace">
  15. <field name="name" class="oe_read_only" />
  16. <field name="first_name" placeholder="First Name" class="oe_edit_only"
  17. attrs="{'invisible' : [('company_type', '=', 'company')]}" />
  18. <field name="last_name" placeholder="Last Name" class="oe_edit_only"
  19. default_focus="1" />
  20. </field>
  21. <field name="website" position="after">
  22. <field name="eater"
  23. attrs="{'invisible': [('company_type', '=', 'company')]}" />
  24. <field name="parent_eater_id" attrs="{'invisible' : [('eater', '!=', 'eater')]}" />
  25. </field>
  26. <xpath expr="//notebook" position="inside">
  27. <page string="Carte de Membre"
  28. attrs="{'invisible': ['|', ('customer', '=', False), ('eater', '!=', 'worker_eater')]}">
  29. <separator string="Mangeurs" />
  30. <field name="child_eater_ids" widget="many2many_tags" />
  31. <separator string="Cartes" />
  32. <field string="Cartes" name="member_card_ids">
  33. <tree editable="bottom">
  34. <field name="barcode" />
  35. <field name="create_date" />
  36. <field name="end_date" />
  37. <field name="responsible_id" />
  38. <field name="comment" />
  39. <field name="valid" />
  40. </tree>
  41. </field>
  42. <group>
  43. <button string="Nouvelle Carte" name="%(action_membercard_wizard)d"
  44. type="action" />
  45. </group>
  46. </page>
  47. </xpath>
  48. <field name="barcode" position="attributes">
  49. <attribute name="attrs">{'invisible' : [('eater', '!=', 'worker_eater')]}</attribute>
  50. </field>
  51. <field name="barcode" position="after">
  52. <field name="parent_barcode" attrs="{'invisible' : [('eater', '!=', 'eater')]}" />
  53. </field>
  54. </field>
  55. </record>
  56. <!-- S022 : By default a supplier should be a company -->
  57. <record id="base.action_partner_supplier_form" model="ir.actions.act_window">
  58. <field name="context">{ 'search_default_supplier': 1,
  59. 'default_customer': 0,
  60. 'default_supplier': 1,
  61. 'default_is_company' : True,
  62. 'default_company_type' : 'company', }
  63. </field>
  64. </record>
  65. </odoo>