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.
 
 
 
 
 

29 lines
865 B

from odoo import fields, models
class ProductTemplate(models.Model):
_inherit = "product.template"
max_nb_eater_allowed = fields.Integer(
string="Max number of eater allowed",
default=-1,
help=(
"Maximum number of eater allowed for the owner of the share. "
"A negative value means no maximum."
),
)
allow_working = fields.Boolean(
string="Allow owner to work?",
help=(
"Owner of this type of share are allowed to participate to the "
"shift system."
),
)
allow_shopping = fields.Boolean(
string="Allow owner to shop?",
help="Owner of this type of share are allowed to shop.",
)
eater = fields.Selection(
[("eater", "Eater"), ("worker_eater", "Worker and Eater")],
string="Eater/Worker",
)