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
664 B

  1. # coding: utf-8
  2. # @author Raphael Reverdy <raphael.reverdy@akretion.com>
  3. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
  4. from openerp import models, api
  5. class Partner(models.Model):
  6. _inherit = "res.partner"
  7. @api.multi
  8. def select_in_pos_current_order(self):
  9. """Set point of sale customer to this partner.
  10. Action called from view with self.id = a res.partner.
  11. """
  12. return {
  13. 'type': 'ir.actions.act_tell_pos',
  14. 'payload': {
  15. 'type': 'partner.partner_selected',
  16. 'partner_id': self.id,
  17. 'name': self.name,
  18. },
  19. }