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.

54 lines
2.6 KiB

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <openerp>
  3. <data>
  4. <record id="view_partner_form" model="ir.ui.view">
  5. <field name="name">Add separate fields for street name and number</field>
  6. <field name="model">res.partner</field>
  7. <field name="inherit_id" ref="base.view_partner_form"/>
  8. <field name="arch" type="xml">
  9. <xpath expr="/form/sheet//div/field[@name='street']"
  10. position="after">
  11. <div>
  12. <field name="street_name" style="width: 80%%"
  13. placeholder="Street..."
  14. attrs="{'readonly': [('use_parent_address','=',True)]}"
  15. />
  16. <field name="street_number" style="width: 19%%"
  17. placeholder="Number..."
  18. attrs="{'readonly': [('use_parent_address','=',True)]}"
  19. />
  20. </div>
  21. </xpath>
  22. <xpath expr="/form/sheet//div/field[@name='street']"
  23. position="attributes">
  24. <attribute name="invisible">1</attribute>
  25. <attribute name="readonly">1</attribute>
  26. </xpath>
  27. <xpath expr="//form[@string='Contact']/sheet/group/div/field[@name='street']"
  28. position="after">
  29. <div>
  30. <field name="street_name" style="width: 80%%"
  31. placeholder="Street..."
  32. />
  33. <field name="street_number" style="width: 19%%"
  34. placeholder="Number..."
  35. />
  36. </div>
  37. </xpath>
  38. <xpath expr="//form[@string='Contact']/sheet/group/div/field[@name='street']"
  39. position="attributes">
  40. <attribute name="invisible">1</attribute>
  41. <attribute name="readonly">1</attribute>
  42. </xpath>
  43. <xpath expr="//field[@name='child_ids']" position="attributes">
  44. <attribute name="context">{'default_parent_id': active_id, 'default_street_name': street_name, 'default_street_number': street_number, 'default_street2': street2, 'default_city': city, 'default_state_id': state_id, 'default_zip': zip, 'default_country_id': country_id, 'default_supplier': supplier, 'default_customer': customer, 'default_use_parent_address': True}</attribute>
  45. </xpath>
  46. </field>
  47. </record>
  48. </data>
  49. </openerp>