# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (). # # 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 . # ############################################################################## from openerp import models, fields, tools, api, _ class res_affiliate(models.Model): _inherit = 'account.analytic.account' affiliate_ids = fields.One2many( comodel_name='account.analytic.account.affiliate', inverse_name='affiliate_id', string='Lista de afiliados' ) class AffiliateLine(models.Model): _name = 'account.analytic.account.affiliate' _description = 'Clientes to contract' _inherit = ['mail.thread', 'ir.needaction_mixin'] affiliate_id = fields.Many2one( comodel_name='account.analytic.account', string='Afiliados') partner_id = fields.Many2one( comodel_name='res.partner', string='Cliente' ) ruc = fields.Char(string='C.I/RUC Nº') mobile = fields.Char(string='Celular') phone = fields.Char(string="Teléfono")