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.

92 lines
6.2 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <openerp>
  3. <data>
  4. <!-- Form view -->
  5. <!-- Show always parent_id plus add affiliates -->
  6. <record id="view_partner_form_add_affiliate" model="ir.ui.view">
  7. <field name="name">res.partner.form</field>
  8. <field name="model">res.partner</field>
  9. <field eval="1" name="priority"/>
  10. <field name="inherit_id" ref="base.view_partner_form"/>
  11. <field name="arch" type="xml">
  12. <field name="parent_id" position="attributes">
  13. <attribute name="attrs"></attribute>
  14. </field>
  15. <page string="Contacts" position="after">
  16. <page string="Affiliates" attrs="{'invisible': [('is_company','=',False)]}">
  17. <field name="affiliate_ids" context="{'default_parent_id': active_id}" mode="kanban">
  18. <kanban>
  19. <field name="color"/>
  20. <field name="name"/>
  21. <field name="title"/>
  22. <field name="email"/>
  23. <field name="parent_id"/>
  24. <field name="is_company"/>
  25. <field name="function"/>
  26. <field name="phone"/>
  27. <field name="street"/>
  28. <field name="street2"/>
  29. <field name="zip"/>
  30. <field name="city"/>
  31. <field name="country_id"/>
  32. <field name="mobile"/>
  33. <field name="fax"/>
  34. <field name="state_id"/>
  35. <field name="has_image"/>
  36. <templates>
  37. <t t-name="kanban-box">
  38. <t t-set="color" t-value="kanban_color(record.color.raw_value)"/>
  39. <div t-att-class="color + (record.title.raw_value == 1 ? ' oe_kanban_color_alert' : '')" style="position: relative">
  40. <a t-if="! read_only_mode" type="delete" style="position: absolute; right: 0; padding: 4px; diplay: inline-block">X</a>
  41. <div class="oe_module_vignette">
  42. <a type="open">
  43. <t t-if="record.has_image.raw_value === true">
  44. <img t-att-src="kanban_image('res.partner', 'image', record.id.value, {'preview_image': 'image_small'})" class="oe_avatar oe_kanban_avatar_smallbox"/>
  45. </t>
  46. <t t-if="record.image and record.image.raw_value !== false">
  47. <img t-att-src="'data:image/png;base64,'+record.image.raw_value" class="oe_avatar oe_kanban_avatar_smallbox"/>
  48. </t>
  49. <t t-if="record.has_image.raw_value === false and (!record.image or record.image.raw_value === false)">
  50. <t t-if="record.is_company.raw_value === true">
  51. <img t-att-src='_s + "/base/static/src/img/company_image.png"' class="oe_kanban_image oe_kanban_avatar_smallbox"/>
  52. </t>
  53. <t t-if="record.is_company.raw_value === false">
  54. <img t-att-src='_s + "/base/static/src/img/avatar.png"' class="oe_kanban_image oe_kanban_avatar_smallbox"/>
  55. </t>
  56. </t>
  57. </a>
  58. <div class="oe_module_desc">
  59. <div class="oe_kanban_box_content oe_kanban_color_bglight oe_kanban_color_border">
  60. <table class="oe_kanban_table">
  61. <tr>
  62. <td class="oe_kanban_title1" align="left" valign="middle">
  63. <h4><a type="open"><field name="name"/></a></h4>
  64. <i><div t-if="record.function.raw_value">
  65. <field name="function"/></div></i>
  66. <div><a t-if="record.email.raw_value" title="Mail" t-att-href="'mailto:'+record.email.value">
  67. <field name="email"/>
  68. </a></div>
  69. <div t-if="record.phone.raw_value">Phone: <field name="phone"/></div>
  70. <div t-if="record.mobile.raw_value">Mobile: <field name="mobile"/></div>
  71. <div t-if="record.fax.raw_value">Fax: <field name="fax"/></div>
  72. </td>
  73. </tr>
  74. </table>
  75. </div>
  76. </div>
  77. </div>
  78. </div>
  79. </t>
  80. </templates>
  81. </kanban>
  82. </field>
  83. </page>
  84. </page>
  85. </field>
  86. </record>
  87. </data>
  88. </openerp>