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.

21 lines
633 B

  1. # Copyright (C) 2013 - Today: GRAP (http://www.grap.coop)
  2. # @author: Julien WESTE
  3. # @author: Sylvain LE GAL (https://twitter.com/legalsylvain)
  4. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
  5. import logging
  6. from odoo import api, models
  7. _logger = logging.getLogger(__name__)
  8. class PosSession(models.Model):
  9. _inherit = 'pos.session'
  10. @api.multi
  11. def action_pos_session_close(self):
  12. res = super().action_pos_session_close()
  13. orders = self.mapped('order_ids').filtered(lambda x: x.invoice_id)
  14. orders.mapped('invoice_id').write({'pos_pending_payment': False})
  15. return res