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.

76 lines
3.2 KiB

  1. <?xml version = "1.0" encoding="utf-8"?>
  2. <openerp>
  3. <data>
  4. <!--Redefine this part of view from firstname_partner module -->
  5. <record id="view_partner_form_firstname_inherit11" model="ir.ui.view">
  6. <field name="name">res.partner.form.firstname.inherit11</field>
  7. <field name="model">res.partner</field>
  8. <field name="inherit_id" ref="partner_firstname.view_partner_form_firstname"/>
  9. <field name="arch" type="xml">
  10. <!--Redefine firstname field in view partner-->
  11. <field name="firstname" position="replace">
  12. <group attrs="{'invisible': [('is_company', '=', True)]}">
  13. <field name="firstname"/>
  14. </group>
  15. </field>
  16. <!--Redefine firstname field in contact view-->
  17. <xpath expr="//form[@string='Contact']/sheet/div//field[@name='firstname']" position="replace">
  18. <field name="firstname" attrs="{'invisible': [('contact_type', '=', 'attached')]}"/>
  19. </xpath>
  20. </field>
  21. </record>
  22. <!--Replace name by full name in kanban view-->
  23. <record id="view_partner_form_firstname_inherit11" model="ir.ui.view">
  24. <field name="model">res.partner</field>
  25. <field name="inherit_id" ref="base_contact_function.view_contact_by_function_form"/>
  26. <field name="arch" type="xml">
  27. <xpath expr="//field[@name='other_contact_history_ids']/kanban//field[@name='name']" position="replace">
  28. <field name="lastname"/>
  29. </xpath>
  30. <xpath expr="//field[@name='other_contact_history_ids']/kanban/templates//t[@t-name='kanban-box']//div[@class='oe_kanban_details']//field[@name='name']"
  31. position="before">
  32. <field name="firstname"/>
  33. </xpath>
  34. <!--Display firstname and name after Image-->
  35. <xpath expr="//field[@name='other_contact_history_ids']/form[@string='Contact']/sheet//field[@name='image']"
  36. position="after">
  37. <h1>
  38. <field name="contact_id" style="width: 70%%" readonly="1"/>
  39. </h1>
  40. </xpath>
  41. </field>
  42. </record>
  43. <!--Display firstname and name in kanban view for other position -->
  44. <record id="view_partner_form_firstname_name" model="ir.ui.view">
  45. <field name="name">res.partner.form.firstname.name</field>
  46. <field name="model">res.partner</field>
  47. <field name="inherit_id" ref="base_contact_function.view_position_info_form"/>
  48. <field name="arch" type="xml">
  49. <xpath expr="//field[@name='other_contact_ids']/form//field[@name='name']"
  50. position="replace"/>
  51. <xpath expr="//field[@name='other_contact_ids']/form//field[@name='image']"
  52. position="after">
  53. <h1>
  54. <field name="contact_id" style="width: 70%%" readonly="1"/>
  55. </h1>
  56. </xpath>
  57. <!-- Don't display the label field -->
  58. <xpath expr="//field[@name='other_contact_ids']/form//label[@for='name']"
  59. position="replace"/>
  60. <!-- Add firstname before name in templates view -->
  61. <xpath expr="//t[@t-name='kanban-box']//div[@class='oe_kanban_details']/h4[@class='oe_partner_heading']//field[@name='name']"
  62. position="before">
  63. <field name="firstname"/>
  64. </xpath>
  65. </field>
  66. </record>
  67. </data>
  68. </openerp>