Odoo Help


pos session could not closed

on 6/27/14, 8:12 AM 2,079 views

i am trying to close the pos session for many times. it shows following warning and could not be closed...



You cannot confirm all orders of this session, because they have not the 'paid' status

I have the same problem. Orders don't get the « paid » status automatically in the POS. I have to go in Point of sales->Orders to pay each one.... One by one....

Pascal Tremblay
on 2/15/15, 12:42 PM
Sudhir Arya (SA)
On 6/27/14, 4:25 PM

I doubt that some of the order are in draft (New) state. That is why this error has arised.

Either delete those draft records or make payment for them. Then it will work.

Jagdish Panchal
On 6/27/14, 8:21 AM


When close pos session all order of that will be in 'paid' or 'invioced'. One of your order in 'new' or other state thats why this Erros is comming. See folloing code: 

    def _confirm_orders(self, cr, uid, ids, context=None):
        wf_service = netsvc.LocalService("workflow")

        for session in self.browse(cr, uid, ids, context=context):
            local_context = dict(context or {}, force_company=session.config_id.journal_id.company_id.id)
            order_ids = [order.id for order in session.order_ids if order.state == 'paid']

            move_id = self.pool.get('account.move').create(cr, uid, {'ref' : session.name, 'journal_id' : session.config_id.journal_id.id, }, context=local_context)

            self.pool.get('pos.order')._create_account_move_line(cr, uid, order_ids, session, move_id, context=local_context)

            for order in session.order_ids:
                if order.state not in ('paid', 'invoiced'):
                    raise osv.except_osv(
                        _("You cannot confirm all orders of this session, because they have not the 'paid' status"))
                    wf_service.trg_validate(uid, 'pos.order', order.id, 'done', cr)

        return True

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 6/27/14, 8:12 AM
Seen: 2079 times
Last updated: 3/16/15, 8:10 AM