partner_extra_data_contract.py 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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_affiliate(models.Model):
  23. _inherit = 'account.analytic.account'
  24. affiliate_ids = fields.One2many(
  25. comodel_name='account.analytic.account.affiliate',
  26. inverse_name='affiliate_id',
  27. string='Lista de afiliados'
  28. )
  29. class AffiliateLine(models.Model):
  30. _name = 'account.analytic.account.affiliate'
  31. _description = 'Clientes to contract'
  32. _inherit = ['mail.thread', 'ir.needaction_mixin']
  33. affiliate_id = fields.Many2one(
  34. comodel_name='account.analytic.account',
  35. string='Afiliados')
  36. partner_id = fields.Many2one(
  37. comodel_name='res.partner',
  38. string='Cliente'
  39. )
  40. ruc = fields.Char(string='C.I/RUC Nº')
  41. mobile = fields.Char(string='Celular')
  42. phone = fields.Char(string="Teléfono")