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.

26 lines
717 B

  1. from odoo import models, fields
  2. class ProductTemplate(models.Model):
  3. _inherit = 'product.template'
  4. max_nb_eater_allowed = fields.Integer(
  5. string="Max number of eater allowed",
  6. default=-1,
  7. help=(
  8. "Maximum number of eater allowed for the owner of the share. "
  9. "A negative value means no maximum."
  10. )
  11. )
  12. allow_working = fields.Boolean(
  13. string="Allow owner to work?",
  14. help=(
  15. "Owner of this type of share are allowed to participate to the "
  16. "shift system."
  17. )
  18. )
  19. eater = fields.Selection(
  20. [("eater", "Eater"), ("worker_eater", "Worker and Eater")],
  21. string="Eater/Worker",
  22. )