partner_extra_data_crifin.py 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. # -*- coding: utf-8 -*-
  2. ##############################################################################
  3. #
  4. # OpenERP, Open Source Management Solution
  5. # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
  6. #
  7. # This program is free software: you can redistribute it and/or modify
  8. # it under the terms of the GNU Affero General Public License as
  9. # published by the Free Software Foundation, either version 3 of the
  10. # License, or (at your option) any later version.
  11. #
  12. # This program is distributed in the hope that it will be useful,
  13. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. # GNU Affero General Public License for more details.
  16. #
  17. # You should have received a copy of the GNU Affero General Public License
  18. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  19. #
  20. ##############################################################################
  21. from openerp import models, fields, tools, api
  22. class res_partner(models.Model):
  23. _name = 'res.partner'
  24. _inherit = 'res.partner'
  25. _description = 'Add extra data media to Partner for Crifin'
  26. #informacion personal basica
  27. estado_civil = fields.Selection([('soltero','Soltero/a'),('casado','Casado/a'),('divorciado','Divorciado/a'),('viudo','Viudo/a')],'Estado Civil')
  28. #direccion
  29. barrio = fields.Char('Barrio')
  30. # #informacion trabajo
  31. trab_cargo = fields.Char('Cargo')
  32. trab_empresa = fields.Char('Empresa')
  33. trab_telefono = fields.Char('Telefono')
  34. trab_antiguedad = fields.Integer('Antiguedad', size=2)
  35. trab_antiguedad_a = fields.Integer('Antiguedad años', size=2)
  36. trab_antiguedad_m = fields.Integer('Antiguedad meses', size=2)
  37. trab_salario = fields.Float('Salario')
  38. trab_salario_bonif = fields.Float('Comisión')
  39. #direccion laboral
  40. trab_street = fields.Char('Dirección Laboral')
  41. trab_city = fields.Char('Ciudad donde trabaja')
  42. #
  43. #informacion conyugue
  44. conyuge_id = fields.One2many('res.partner','parent_id','Cónyuge',
  45. domain=['&', ('is_personal_reference','=',False),('is_commercial_reference','=',False)])
  46. # conyuge = fields.Many2one('res.partner','Cónyuge')
  47. #
  48. #informacion casa
  49. casa_propia = fields.Boolean('Casa propia')
  50. casa_alquiler = fields.Boolean('Casa alquiler')
  51. #
  52. #informacion referencias personales y comerciales
  53. ref_personal_ids = fields.One2many('res.partner','parent_id','Personal Reference', domain=[('active','=',True),('is_personal_reference','=',True)])
  54. ref_comercial_ids = fields.Many2many('res.partner','rel_partner_ref_commercial','parent_id','partner_id',string='Commercial Reference',domain=[('active','=',True),('is_company','=',True)])
  55. is_personal_reference = fields.Boolean('Is a Personal Reference', help="Check if the contact is a personal reference")
  56. is_commercial_reference = fields.Boolean('Is a Commercial Reference', help="Check if the contact is a commercial reference")
  57. #datos deudor
  58. name_deudor = fields.Char('Nombre del Deudor')
  59. cin_deudor = fields.Char('N° de Documento')
  60. tel_deudor = fields.Char('Telefono del Deudor')
  61. dir_deudor = fields.Char('Dirección del Deudor')