1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- # -*- 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 for Crifin'
- #informacion personal basica
- 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')
- #
- #informacion conyugue
- conyuge_id = fields.One2many('res.partner','parent_id','Cónyuge',
- domain=['&', ('is_personal_reference','=',False),('is_commercial_reference','=',False)])
- # conyuge = fields.Many2one('res.partner','Cónyuge')
- #
- #informacion casa
- casa_propia = fields.Boolean('Casa propia')
- casa_alquiler = fields.Boolean('Casa alquiler')
- #
- #informacion referencias personales y comerciales
- ref_personal_ids = fields.One2many('res.partner','parent_id','Personal Reference', domain=[('active','=',True),('is_personal_reference','=',True)])
- ref_comercial_ids = fields.Many2many('res.partner','rel_partner_ref_commercial','parent_id','partner_id',string='Commercial Reference',domain=[('active','=',True),('is_company','=',True)])
- is_personal_reference = fields.Boolean('Is a Personal Reference', help="Check if the contact is a personal reference")
- is_commercial_reference = fields.Boolean('Is a Commercial Reference', help="Check if the contact is a commercial reference")
- #datos deudor
- name_deudor = fields.Char('Nombre del Deudor')
- cin_deudor = fields.Char('N° de Documento')
- tel_deudor = fields.Char('Telefono del Deudor')
- dir_deudor = fields.Char('Dirección del Deudor')
|