123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- # -*- coding: utf-8 -*-
- ##############################################################################
- #
- # OpenERP, Open Source Management Solution
- # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
- #
- # This program is free software: you can redistribute it and/or modify
- # it under the terms of the GNU Affero General Public License as
- # published by the Free Software Foundation, either version 3 of the
- # License, or (at your option) any later version.
- #
- # This program is distributed in the hope that it will be useful,
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- # GNU Affero General Public License for more details.
- #
- # You should have received a copy of the GNU Affero General Public License
- # along with this program. If not, see <http://www.gnu.org/licenses/>.
- #
- ##############################################################################
- from openerp import models, fields, tools, api, _
- class res_partner(models.Model):
- _name = 'res.partner'
- _inherit = 'res.partner'
- _description = 'Add extra data media to Partner'
- #informacion personal basica
- ruc = fields.Char('R.U.C./C.I.', size=12, required=True)
- # email = fields.Char('Email')
- phone = fields.Char('Telefono')
- mobile = fields.Char('Movil')
- sexo = fields.Selection([('femenino','Femenino'),('masculino','Masculino')],'Sexo', required=True)
- fecha_nac = fields.Date('Fecha de Nacimiento')
- estado_civil = fields.Selection([('soltero','Soltero/a'),('casado','Casado/a'),('divorciado','Divorciado/a'),('viudo','Viudo/a')],'Estado Civil')
- #direccion
- barrio = fields.Char('Barrio')
- # #informacion trabajo
- trab_cargo = fields.Char('Cargo')
- trab_empresa = fields.Char('Empresa')
- trab_telefono = fields.Char('Telefono')
- trab_antiguedad = fields.Integer('Antiguedad', size=2)
- trab_antiguedad_a = fields.Integer('Antiguedad años', size=2)
- trab_antiguedad_m = fields.Integer('Antiguedad meses', size=2)
- trab_salario = fields.Float('Salario')
- trab_salario_bonif = fields.Float('Comisión')
- #direccion laboral
- trab_street = fields.Char('Dirección Laboral')
- trab_city = fields.Char('Ciudad donde trabaja')
- ubicacion = fields.Char('Ubicación Google Map')
- _sql_constraints = [
- ('ruc_uniq', 'unique (ruc)', 'El número de R.U.C./C.I. debe ser único!')
- ]
|