# Copyright 2022 Le Filament (https://le-filament.com) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html) from odoo import fields, models class ResPartner(models.Model): _inherit = "res.partner" # ------------------------------------------------------ # Fields declaration # ------------------------------------------------------ customer = fields.Boolean(string="Est un Client") supplier = fields.Boolean(string="Est un fournisseur") channel_acquisition = fields.Many2one("res.partner.channel", "Canal d'acquisition") contributor = fields.Char("Apporteur") # ------------------------------------------------------ # SQL Constraints # ------------------------------------------------------ # ------------------------------------------------------ # Default methods # ------------------------------------------------------ # ------------------------------------------------------ # Computed fields / Search Fields # ------------------------------------------------------ # ------------------------------------------------------ # Onchange / Constraints # ------------------------------------------------------ # ------------------------------------------------------ # CRUD methods (ORM overrides) # ------------------------------------------------------ # ------------------------------------------------------ # Actions # ------------------------------------------------------ # ------------------------------------------------------ # Business methods # ------------------------------------------------------ class ResPartnerChannel(models.Model): _name = "res.partner.channel" _description = "Canal d'acquisition" # ------------------------------------------------------ # Fields declaration # ------------------------------------------------------ name = fields.Char("Nom", required=True)