partner_extra_data_view.xml 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285
  1. <?xml version="1.0"?>
  2. <openerp>
  3. <data>
  4. <record id="res_partner_extra_data" model="ir.ui.view">
  5. <field name="name">res.partner.extra.data</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="estado">
  13. <group name="datos_credito" col="2" string="Estado del Credito">
  14. <field name="credit_state"/>
  15. </group>
  16. </group>
  17. <group name="Informa">
  18. <group name="datos_domicilio" col="2" string="Recidencia">
  19. <field name="casa_propia"/>
  20. <field name="casa_alquiler"/>
  21. </group>
  22. <group name="datos_referencia" col="2" string="Tipo de Referencia">
  23. <field name="is_personal_reference" string="Es una referencia Personal"/>
  24. <field name="is_commercial_reference" string="Es una referencia Comercial"/>
  25. </group>
  26. </group>
  27. </group>
  28. <group name="Información laboral">
  29. <group name="datos_laboral" col="2" string="Datos de la Empresa">
  30. <field name="trab_empresa"/>
  31. <field name="trab_street"/>
  32. <field name="trab_city"/>
  33. <field name="trab_telefono"/>
  34. </group>
  35. <group name="datos_laboral_cargo" col="2" string="Datos del Empleado">
  36. <field name="trab_cargo"/>
  37. <field digits="(2,0)" name="trab_antiguedad_a"/> años
  38. <field name="trab_antiguedad_m" class="oe_inline"/> meses
  39. <field name="trab_salario"/>
  40. </group>
  41. </group>
  42. <group name="datos_conyuge" string="Datos del Conyuge">
  43. <field name="conyuge_id" nolabel="1" mode="kanban"
  44. context="{'default_parent_id': active_id, 'default_street': street, 'default_street2': street2, 'default_city': city, 'default_state_id': state_id, 'default_zip': zip, 'default_country_id': country_id, 'default_customer': False,'default_supplier': False,'default_is_personal_reference': False,'default_is_commercial_reference': False}">
  45. <kanban>
  46. <field name="color"/>
  47. <field name="name"/>
  48. <field name="title"/>
  49. <field name="email"/>
  50. <field name="parent_id"/>
  51. <field name="is_company"/>
  52. <field name="is_personal_reference"/>
  53. <field name="is_commercial_reference"/>
  54. <field name="phone"/>
  55. <field name="street"/>
  56. <field name="street2"/>
  57. <field name="city"/>
  58. <field name="country_id"/>
  59. <field name="mobile"/>
  60. <field name="state_id"/>
  61. <field name="has_image"/>
  62. <templates>
  63. <t t-name="kanban-box">
  64. <t t-set="color" t-value="kanban_color(record.color.raw_value)"/>
  65. <div t-att-class="color + (record.title.raw_value == 1 ? ' oe_kanban_color_alert' : '')" style="position: relative">
  66. <a t-if="! read_only_mode" type="delete" style="position: absolute; right: 0; padding: 4px; diplay: inline-block">X</a>
  67. <div class="oe_module_vignette">
  68. <a type="open">
  69. <t t-if="record.has_image.raw_value === true">
  70. <img t-att-src="kanban_image('res.partner', 'image', record.id.value, {'preview_image': 'image_small'})" class="oe_avatar oe_kanban_avatar_smallbox"/>
  71. </t>
  72. <t t-if="record.image and record.image.raw_value !== false">
  73. <img t-att-src="'data:image/png;base64,'+record.image.raw_value" class="oe_avatar oe_kanban_avatar_smallbox"/>
  74. </t>
  75. <t t-if="record.has_image.raw_value === false and (!record.image or record.image.raw_value === false)">
  76. <t t-if="record.is_company.raw_value === true">
  77. <img t-att-src='_s + "/base/static/src/img/company_image.png"' class="oe_kanban_image oe_kanban_avatar_smallbox"/>
  78. </t>
  79. <t t-if="record.is_company.raw_value === false">
  80. <img t-att-src='_s + "/base/static/src/img/avatar.png"' class="oe_kanban_image oe_kanban_avatar_smallbox"/>
  81. </t>
  82. </t>
  83. </a>
  84. <div class="oe_module_desc">
  85. <div class="oe_kanban_box_content oe_kanban_color_bglight oe_kanban_color_border">
  86. <table class="oe_kanban_table">
  87. <tr>
  88. <td class="oe_kanban_title1" align="left" valign="middle">
  89. <h4><a type="open"><field name="name"/></a></h4>
  90. <div>Pareja</div>
  91. <i><div t-if="record.function.raw_value">
  92. <field name="function"/></div></i>
  93. <div><a t-if="record.email.raw_value" title="Mail" t-att-href="'mailto:'+record.email.value">
  94. <field name="email"/>
  95. </a></div>
  96. <div t-if="record.phone.raw_value">Phone: <field name="phone"/></div>
  97. <div t-if="record.mobile.raw_value">Mobile: <field name="mobile"/></div>
  98. </td>
  99. </tr>
  100. </table>
  101. </div>
  102. </div>
  103. </div>
  104. </div>
  105. </t>
  106. </templates>
  107. </kanban>
  108. <form string="Conyuge">
  109. <sheet>
  110. <field name="image" widget='image' class="oe_avatar oe_left" options='{"preview_image": "image_medium"}'/>
  111. <div class="oe_title">
  112. <label for="name" class="oe_edit_only"/>
  113. <h1><field name="name" style="width: 100%%"/></h1>
  114. </div>
  115. <group>
  116. <field name="email"/>
  117. <field name="phone" required="True"/>
  118. <field name="mobile"/>
  119. </group>
  120. <group>
  121. <label for="street" string="Address"/>
  122. <div name="div_address">
  123. <field name="street" placeholder="Street..."/>
  124. <field name="street2"/>
  125. <div class="address_format">
  126. <field name="city" placeholder="City" style="width: 50%%"/>
  127. <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)"/>
  128. </div>
  129. <field name="country_id" placeholder="Country" class="oe_no_button" options="{'no_open': True,'no_create':True}"/>
  130. </div>
  131. </group>
  132. <field name="supplier" invisible="True"/>
  133. <field name="customer" invisible="True"/>
  134. <field name="is_personal_reference" invisible="True"/>
  135. <field name="is_commercial_reference" invisible="True"/>
  136. </sheet>
  137. </form>
  138. </field>
  139. </group>
  140. <group name="personales" string="Referencias Personales">
  141. <field name="ref_personal_ids" nolabel="1" mode="kanban" context="{'default_parent_id': active_id, 'default_customer': False,'default_supplier': False,'default_is_personal_reference': True,'default_is_commercial_reference': False}">
  142. <kanban>
  143. <field name="color"/>
  144. <field name="name"/>
  145. <field name="title"/>
  146. <field name="email"/>
  147. <field name="parent_id"/>
  148. <field name="is_company"/>
  149. <field name="is_personal_reference"/>
  150. <field name="is_commercial_reference"/>
  151. <field name="phone"/>
  152. <field name="street"/>
  153. <field name="street2"/>
  154. <field name="zip"/>
  155. <field name="city"/>
  156. <field name="country_id"/>
  157. <field name="mobile"/>
  158. <field name="state_id"/>
  159. <field name="has_image"/>
  160. <templates>
  161. <t t-name="kanban-box">
  162. <t t-set="color" t-value="kanban_color(record.color.raw_value)"/>
  163. <div t-att-class="color + (record.title.raw_value == 1 ? ' oe_kanban_color_alert' : '')" style="position: relative">
  164. <a t-if="! read_only_mode" type="delete" style="position: absolute; right: 0; padding: 4px; diplay: inline-block">X</a>
  165. <div class="oe_module_vignette">
  166. <a type="open">
  167. <t t-if="record.has_image.raw_value === true">
  168. <img t-att-src="kanban_image('res.partner', 'image', record.id.value, {'preview_image': 'image_small'})" class="oe_avatar oe_kanban_avatar_smallbox"/>
  169. </t>
  170. <t t-if="record.image and record.image.raw_value !== false">
  171. <img t-att-src="'data:image/png;base64,'+record.image.raw_value" class="oe_avatar oe_kanban_avatar_smallbox"/>
  172. </t>
  173. <t t-if="record.has_image.raw_value === false and (!record.image or record.image.raw_value === false)">
  174. <t t-if="record.is_company.raw_value === true">
  175. <img t-att-src='_s + "/base/static/src/img/company_image.png"' class="oe_kanban_image oe_kanban_avatar_smallbox"/>
  176. </t>
  177. <t t-if="record.is_company.raw_value === false">
  178. <img t-att-src='_s + "/base/static/src/img/avatar.png"' class="oe_kanban_image oe_kanban_avatar_smallbox"/>
  179. </t>
  180. </t>
  181. </a>
  182. <div class="oe_module_desc">
  183. <div class="oe_kanban_box_content oe_kanban_color_bglight oe_kanban_color_border">
  184. <table class="oe_kanban_table">
  185. <tr>
  186. <td class="oe_kanban_title1" align="left" valign="middle">
  187. <h4><a type="open"><field name="name"/></a></h4>
  188. <div>Referencia Personal</div>
  189. <i><div t-if="record.function.raw_value">
  190. <field name="function"/></div></i>
  191. <div><a t-if="record.email.raw_value" title="Mail" t-att-href="'mailto:'+record.email.value">
  192. <field name="email"/>
  193. </a></div>
  194. <div t-if="record.phone.raw_value">Phone: <field name="phone"/></div>
  195. <div t-if="record.mobile.raw_value">Mobile: <field name="mobile"/></div>
  196. </td>
  197. </tr>
  198. </table>
  199. </div>
  200. </div>
  201. </div>
  202. </div>
  203. </t>
  204. </templates>
  205. </kanban>
  206. <form string="Contact">
  207. <sheet>
  208. <field name="image" widget='image' class="oe_avatar oe_left" options='{"preview_image": "image_medium"}'/>
  209. <div class="oe_title">
  210. <label for="name" class="oe_edit_only"/>
  211. <h1><field name="name" style="width: 100%%"/></h1>
  212. </div>
  213. <group>
  214. <field name="email"/>
  215. <field name="phone" required="True"/>
  216. <field name="mobile"/>
  217. </group>
  218. <group>
  219. <label for="street" string="Address"/>
  220. <div name="div_address">
  221. <field name="street" placeholder="Street..."/>
  222. <field name="street2"/>
  223. <div class="address_format">
  224. <field name="city" placeholder="City" style="width: 50%%"/>
  225. <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)"/>
  226. </div>
  227. <field name="country_id" placeholder="Country" class="oe_no_button" options="{'no_open': True,'no_create':True}"/>
  228. </div>
  229. </group>
  230. <field name="supplier" invisible="True"/>
  231. <field name="customer" invisible="True"/>
  232. <field name="is_personal_reference" invisible="True"/>
  233. <field name="is_commercial_reference" invisible="True"/>
  234. </sheet>
  235. </form>
  236. </field>
  237. </group>
  238. <group name="personales" string="Referencias Comerciales">
  239. <field name="ref_comercial_ids" nolabel="1" mode="tree" context="{'default_is_company': True,'default_customer': False, 'default_is_commercial_reference':True}">
  240. <tree string="Referencias" editable="bottom">
  241. <field name="name"/>
  242. <field name="phone"/>
  243. <field name="mobile"/>
  244. </tree>
  245. </field>
  246. </group>
  247. </page>
  248. </page>
  249. <field name="phone" position="before">
  250. <field name="ruc"/>
  251. <field name="sexo" attrs="{'invisible':[('is_company','=',True)],'required':[('is_company','=',False)]}"/>
  252. <field name="estado_civil" attrs="{'invisible':[('is_company','=',True)]}"/>
  253. <field name="fecha_nac" attrs="{'invisible':[('is_company','=',True)]}"/>
  254. </field>
  255. <field name="function" position="replace">
  256. <field name="function" invisible="1"/>
  257. </field>
  258. <field name="title" position="replace">
  259. <field name="title" invisible="1"/>
  260. </field>
  261. <field name="user_id" position="after">
  262. <field name="create_uid" readonly="1"/>
  263. </field>
  264. </field>
  265. </record>
  266. <record id="res_partner_extra_data_search" model="ir.ui.view">
  267. <field name="name">res.partner.extra.data.search</field>
  268. <field name="model">res.partner</field>
  269. <field name="inherit_id" ref="base.view_res_partner_filter"/>
  270. <field name="arch" type="xml">
  271. <field name="name" position="before">
  272. <field name="ruc" filter_domain="['|','|','|',('ruc','ilike',self),('name','ilike',self),('mobile','ilike',self),('phone','ilike',self)]" string="general"/>
  273. </field>
  274. <filter name="supplier" position="after">
  275. <filter string="Referencias Personales" name="type_personal_reference" domain="[('is_personal_reference','=',1)]"/>
  276. <filter string="Referencias Comerciales" name="type_commercial_reference" domain="[('is_commercial_reference','=',1)]"/>
  277. </filter>
  278. </field>
  279. </record>
  280. </data>
  281. </openerp>