You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
530 B
18 lines
530 B
# -*- coding: utf-8 -*-
|
|
# Copyright 2012 Camptocamp SA - Yannick Vaucher
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
|
|
|
from openerp import fields, models
|
|
|
|
|
|
class ResPartner(models.Model):
|
|
"""Add relation affiliate_ids."""
|
|
_inherit = "res.partner"
|
|
|
|
child_ids = fields.One2many(domain=[('is_company', '=', False)])
|
|
affiliate_ids = fields.One2many(
|
|
comodel_name='res.partner',
|
|
inverse_name='parent_id',
|
|
string='Affiliates',
|
|
domain=[('is_company', '=', True)],
|
|
)
|