partner_extra_data_affiliate_view.xml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. <?xml version="1.0"?>
  2. <openerp>
  3. <data>
  4. <record id="res_partner_extra_data_affiliate" model="ir.ui.view">
  5. <field name="name">res.partner.extra.data.affiliate</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. <page string="Internal Notes" position="before">
  10. <page name="credito" string="Informacion de Credito" attrs="{'invisible':[('is_company','=',True)]}">
  11. <group name="Domicilio">
  12. <group name="Informa">
  13. <group name="datos_referencia" string="Tipo de Referencia">
  14. <field name="is_affiliate_reference" string="Es una referencia Beneficiario"/>
  15. <!-- <field name="is_commercial_reference" string="Es una referencia Comercial"/> -->
  16. </group>
  17. </group>
  18. </group>
  19. <group name="affiliates" string="Referencias Beneficiarios">
  20. <field name="ref_affiliate_ids" nolabel="1" mode="kanban" context="{'default_parent_id': active_id, 'default_customer': False,'default_supplier': False,'default_is_affiliate_reference': True}">
  21. <kanban>
  22. <field name="color"/>
  23. <field name="name"/>
  24. <field name="title"/>
  25. <field name="email"/>
  26. <field name="parent_id"/>
  27. <field name="is_company"/>
  28. <field name="is_affiliate_reference"/>
  29. <field name="phone"/>
  30. <field name="street"/>
  31. <field name="street2"/>
  32. <field name="zip"/>
  33. <field name="city"/>
  34. <field name="country_id"/>
  35. <field name="mobile"/>
  36. <field name="state_id"/>
  37. <field name="has_image"/>
  38. <templates>
  39. <t t-name="kanban-box">
  40. <t t-set="color" t-value="kanban_color(record.color.raw_value)"/>
  41. <div t-att-class="color + (record.title.raw_value == 1 ? ' oe_kanban_color_alert' : '')" style="position: relative">
  42. <a t-if="! read_only_mode" type="delete" style="position: absolute; right: 0; padding: 4px; diplay: inline-block">X</a>
  43. <div class="oe_module_vignette">
  44. <a type="open">
  45. <t t-if="record.has_image.raw_value === true">
  46. <img t-att-src="kanban_image('res.partner', 'image', record.id.value, {'preview_image': 'image_small'})" class="oe_avatar oe_kanban_avatar_smallbox"/>
  47. </t>
  48. <t t-if="record.image and record.image.raw_value !== false">
  49. <img t-att-src="'data:image/png;base64,'+record.image.raw_value" class="oe_avatar oe_kanban_avatar_smallbox"/>
  50. </t>
  51. <t t-if="record.has_image.raw_value === false and (!record.image or record.image.raw_value === false)">
  52. <t t-if="record.is_company.raw_value === true">
  53. <img t-att-src='_s + "/base/static/src/img/company_image.png"' class="oe_kanban_image oe_kanban_avatar_smallbox"/>
  54. </t>
  55. <t t-if="record.is_company.raw_value === false">
  56. <img t-att-src='_s + "/base/static/src/img/avatar.png"' class="oe_kanban_image oe_kanban_avatar_smallbox"/>
  57. </t>
  58. </t>
  59. </a>
  60. <div class="oe_module_desc">
  61. <div class="oe_kanban_box_content oe_kanban_color_bglight oe_kanban_color_border">
  62. <table class="oe_kanban_table">
  63. <tr>
  64. <td class="oe_kanban_title1" align="left" valign="middle">
  65. <h4><a type="open"><field name="name"/></a></h4>
  66. <div>Referencia Beneficiario</div>
  67. <i><div t-if="record.function.raw_value">
  68. <field name="function"/></div></i>
  69. <div><a t-if="record.email.raw_value" title="Mail" t-att-href="'mailto:'+record.email.value">
  70. <field name="email"/>
  71. </a></div>
  72. <div t-if="record.phone.raw_value">Phone: <field name="phone"/></div>
  73. <div t-if="record.mobile.raw_value">Mobile: <field name="mobile"/></div>
  74. </td>
  75. </tr>
  76. </table>
  77. </div>
  78. </div>
  79. </div>
  80. </div>
  81. </t>
  82. </templates>
  83. </kanban>
  84. <form string="Contact">
  85. <sheet>
  86. <field name="image" widget='image' class="oe_avatar oe_left" options='{"preview_image": "image_medium"}'/>
  87. <div class="oe_title">
  88. <label for="name" class="oe_edit_only"/>
  89. <h1><field name="name" style="width: 100%%"/></h1>
  90. </div>
  91. <group>
  92. <field name="email"/>
  93. <field name="phone" required="True"/>
  94. <field name="mobile"/>
  95. </group>
  96. <group>
  97. <label for="street" string="Address"/>
  98. <div name="div_address">
  99. <field name="street" placeholder="Street..."/>
  100. <field name="street2"/>
  101. <div class="address_format">
  102. <field name="city" placeholder="City" style="width: 50%%"/>
  103. <field name="state_id" class="oe_no_button" placeholder="State" style="width: 50%%" options="{'no_open': True,'no_create':True}" on_change="onchange_state(state_id)"/>
  104. </div>
  105. <field name="country_id" placeholder="Country" class="oe_no_button" options="{'no_open': True,'no_create':True}"/>
  106. </div>
  107. </group>
  108. <field name="supplier" invisible="True"/>
  109. <field name="customer" invisible="True"/>
  110. <field name="is_affiliate_reference" invisible="True"/>
  111. </sheet>
  112. </form>
  113. </field>
  114. </group>
  115. <!-- <group name="personales" string="Referencias Comerciales">
  116. <field name="ref_comercial_ids" nolabel="1" mode="tree" context="{'default_is_company': True,'default_customer': False, 'default_is_commercial_reference':True}">
  117. <tree string="Referencias" editable="bottom">
  118. <field name="name"/>
  119. <field name="phone"/>
  120. <field name="mobile"/>
  121. </tree>
  122. </field>
  123. </group> -->
  124. </page>
  125. </page>
  126. <!-- <field name="phone" position="before">
  127. <field name="estado_civil" attrs="{'invisible':[('is_company','=',True)]}"/>
  128. </field>
  129. <field name="function" position="replace">
  130. <field name="function" invisible="1"/>
  131. </field>
  132. <field name="title" position="replace">
  133. <field name="title" invisible="1"/>
  134. </field>
  135. <field name="user_id" position="after">
  136. <field name="create_uid" readonly="1"/>
  137. </field> -->
  138. </field>
  139. </record>
  140. <record id="res_partner_extra_data_search_affiliate" model="ir.ui.view">
  141. <field name="name">res.partner.extra.data.affiliate.search</field>
  142. <field name="model">res.partner</field>
  143. <field name="inherit_id" ref="base.view_res_partner_filter"/>
  144. <field name="arch" type="xml">
  145. <!-- <field name="name" position="before">
  146. <field name="ruc" filter_domain="['|','|','|',('ruc','ilike',self),('name','ilike',self),('mobile','ilike',self),('phone','ilike',self)]" string="general"/>
  147. </field> -->
  148. <filter name="supplier" position="after">
  149. <filter string="Referencias Beneficiarios" name="type_personal_reference" domain="[('is_affiliate_reference','=',1)]"/>
  150. </filter>
  151. </field>
  152. </record>
  153. </data>
  154. </openerp>