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.

24 lines
872 B

  1. # Copyright (C) 2018 - Today: GRAP (http://www.grap.coop)
  2. # @author: Sylvain LE GAL (https://twitter.com/legalsylvain)
  3. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
  4. from odoo import api, fields, models
  5. class PosConfig(models.Model):
  6. _inherit = 'pos.config'
  7. use_pos_place = fields.Boolean(
  8. string="Use Point of Sale places",
  9. default=False)
  10. group_pos_place_user_id = fields.Many2one(
  11. 'res.groups', string='Point of Sale Place User Group',
  12. compute='_compute_group_pos_place_user_id',
  13. help="This field is there to pass the id of the pos place user"
  14. " group to the point of sale client.")
  15. @api.multi
  16. def _compute_group_pos_place_user_id(self):
  17. for config in self:
  18. config.group_pos_place_user_id =\
  19. self.env.ref('pos_place.group_pos_place_user')