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.

36 lines
1.8 KiB

  1. # -*- coding: utf-8 -*-
  2. # Copyright 2016 Ursa Information Systems <http://ursainfosystems.com>
  3. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
  4. from openerp import fields, models
  5. class ResPartner(models.Model):
  6. _inherit = 'res.partner'
  7. caloric_intake = fields.Float("Calories")
  8. caloric_intake_uom = fields.Many2one("product.uom", "Calories UoM",
  9. domain="[('category_id', '=', "
  10. "self.env.ref('product_uom.\
  11. product_category_energy').id)]"
  12. )
  13. carbohydrate_intake = fields.Float("Carbohydrate")
  14. carbohydrate_intake_uom = fields.Many2one("product.uom",
  15. "Carbohydrate UoM",
  16. domain="[('category_id', '=', "
  17. "self.env.ref('product.\
  18. product_uom_categ_kgm').id)]" # noqa
  19. )
  20. fat_intake = fields.Float("Fat")
  21. fat_intake_uom = fields.Many2one("product.uom", "Fat UoM",
  22. domain="[('category_id', '=', "
  23. "self.env.ref('product.\
  24. product_uom_categ_kgm').id)]"
  25. )
  26. protein_intake = fields.Float("Protein")
  27. protein_intake_uom = fields.Many2one("product.uom", "Protein UoM",
  28. domain="[('category_id', '=', "
  29. "self.env.ref('product.\
  30. product_uom_categ_kgm').id)]"
  31. )