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

4 years ago
4 years ago
4 years ago
4 years ago
  1. from odoo import fields, models
  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. allow_shopping = fields.Boolean(
  20. string="Allow owner to shop?",
  21. help="Owner of this type of share are allowed to shop.",
  22. )
  23. eater = fields.Selection(
  24. [("eater", "Eater"), ("worker_eater", "Worker and Eater")],
  25. string="Eater/Worker",
  26. )