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.
 
 
 
 
 

25 lines
950 B

# -*- 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 = fields.Many2one('beesdoo.label.color')
class BeesdooLabelColor(models.Model):
_name = 'beesdoo.label.color'
name = fields.Char()
color_code = fields.Char()