partner_extra_data.py 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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'
  26. #informacion personal basica
  27. ruc = fields.Char('R.U.C./C.I.', size=12, required=True)
  28. # email = fields.Char('Email')
  29. phone = fields.Char('Telefono')
  30. mobile = fields.Char('Movil')
  31. sexo = fields.Selection([('femenino','Femenino'),('masculino','Masculino')],'Sexo', required=True)
  32. fecha_nac = fields.Date('Fecha de Nacimiento')
  33. estado_civil = fields.Selection([('soltero','Soltero/a'),('casado','Casado/a'),('divorciado','Divorciado/a'),('viudo','Viudo/a')],'Estado Civil')
  34. #direccion
  35. barrio = fields.Char('Barrio')
  36. # #informacion trabajo
  37. trab_cargo = fields.Char('Cargo')
  38. trab_empresa = fields.Char('Empresa')
  39. trab_telefono = fields.Char('Telefono')
  40. trab_antiguedad = fields.Integer('Antiguedad', size=2)
  41. trab_antiguedad_a = fields.Integer('Antiguedad años', size=2)
  42. trab_antiguedad_m = fields.Integer('Antiguedad meses', size=2)
  43. trab_salario = fields.Float('Salario')
  44. trab_salario_bonif = fields.Float('Comisión')
  45. #direccion laboral
  46. trab_street = fields.Char('Dirección Laboral')
  47. trab_city = fields.Char('Ciudad donde trabaja')
  48. ubicacion = fields.Char('Ubicación Google Map')
  49. _sql_constraints = [
  50. ('ruc_uniq', 'unique (ruc)', 'El número de R.U.C./C.I. debe ser único!')
  51. ]