Odoo Help


How to pay Point of sale invoices?

Anabela Damas
on 9/2/15, 12:47 PM 1,996 views

I'm using odoo v8 and POS (Point of sale) module.

But when I make a sale and choose the payment method and then the option "Invoice", the system creates an invoice but in the state open. It shouldn't be in the state paid?

How do I configure the POS to create the Invoices in the state paid thought the POS ?




Anabela Damas

--Anabela Damas--

| 6 7 7
Aveiro, Portugal
--Anabela Damas--
IT Consultant
Anabela Damas
On 9/4/15, 4:07 AM

This worked for me:


Did you use the method def _confirm_orders(self, cr, uid, ids, context=None): ???? Is this what works for you?

Pascal Tremblay
on 11/20/15, 8:19 PM

Ok! this new method works very well. Thanks

Pascal Tremblay
on 11/20/15, 8:42 PM

Pascal Tremblay

--Pascal Tremblay--
| 5 3 7
Alma, Canada
--Pascal Tremblay--

Pascal Tremblay
On 12/1/15, 10:55 AM

We have corrected the method on https://github.com/odoo/odoo/issues/6534. 

Here is our new method who can manage also the return amount (the money we give back to customer).

We hope it could help somebody.

from openerp.osv import fields, osv
import logging
logger = logging.getLogger(__name_)

class pos_session(osv.osv):
_inherit = 'pos.session'

def _confirm_orders(self, cr, uid, ids, context=None):

account_move_obj = self.pool.get('account.move')
account_move_line_obj = self.pool.get('account.move.line')
pos_order_obj = self.pool.get('pos.order')
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 = account_move_obj.create(cr, uid, {'ref' : session.name, 'journal_id' : session.config_id.journal_id.id, }, context=local_context)
pos_order_obj._create_account_move_line(cr, uid, order_ids, session, move_id, context=local_context)
for order in session.order_ids:
if order.state == 'done':
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"))
pos_order_obj.signal_workflow(cr, uid, [order.id], 'done')
order_ids = self.pool.get('pos.order').search(cr, uid, [('session_id','=', session.id)])

for obj_order_id in self.pool.get('pos.order').browse(cr, uid, order_ids, context=context):
move_line = []
for move_line_id in obj_order_id.invoice_id.move_id.line_id:
if move_line_id.name == obj_order_id.name:

move_line_ids_1 = []

for statement_id in obj_order_id.statement_ids:

move_line_ids = account_move_line_obj.search(cr, uid, [('statement_id','=', statement_id.statement_id and statement_id.statement_id.id)])

if (move_line_ids != move_line_ids_1) :

for line in account_move_line_obj.browse(cr, uid, move_line_ids):

if line.credit and line.name.strip().strip(':') == obj_order_id.name:
if line.debit and 'return' in line.name:

move_line_ids_1 = move_line_ids

ctx = context.copy()
ctx.update({'active_ids': move_line})
self.pool.get('account.move.line.reconcile').trans_rec_reconcile_full(cr, uid, [], ctx)

return True



| 3 2 6
Gandhinagar, India

Having 8+ years of OpenERP Experience. We are Specialized in OpenERP/CRM Solutions, software development, Web development, E commerce solutions & other open source solutions.

Skype : acespritech

Email : info@acespritech.com

On 9/4/15, 1:10 AM

Hello !

There is not specific configuration for this situation in POS that you want.

We have to customize because, we have to select payment method again from Invoice also when registering payment but it is possible by changing workflow.


Acespritech Solutions Pvt. Ltd.

Skype: acespritech


On 1/25/16, 7:14 AM


For your query, to set POS payment invoice to PAID status automatically there is no configuration in Odoo. For this we need to have customized module as because, in general without any customization unless we register a payment in the Invoicing Menu for any POS Order,we wont be able to see the POS order invoice in PAID state

Hope this helps


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: 9/2/15, 12:47 PM
Seen: 1996 times
Last updated: 3/1/16, 12:10 PM