# -*- coding: utf-8 -*- from openerp import models, fields, api class BeesdooProduct(models.Model): _inherit = "product.template" eco_label = fields.Many2one('beesdoo.product.label', domain = [('type', '=', 'eco')]) local_label = fields.Many2one('beesdoo.product.label', domain = [('type', '=', 'local')]) fair_label = fields.Many2one('beesdoo.product.label', domain = [('type', '=', 'fair')]) origin_label = fields.Many2one('beesdoo.product.label', domain = [('type', '=', 'delivery')]) class BeesdooProductLabel(models.Model): _name = "beesdoo.product.label" name = fields.Char() type = fields.Selection([('eco', 'Écologique'), ('local', 'Local'), ('fair', 'Équitable'), ('delivery', 'Distribution')]) color_code = fields.Char()