Community mailing list archives

Re: Point of sale and invoices in OpenERP 7.0

- 10/13/2015 12:13:55
Hello Ludovic, unfortunately the situation you are describing is a 
limitation on the PoS implementation that is present in v8 too.

For solve that limitation we developed a custom module for a customer 
that use the accounting techniques used on Hotels for register the 
income coming from front desk and invoice with out duplicate the journal 

The module will allow for follow features:

* Invoice a ticket to customer while the PoS session is open and make 
the right accounting entries.
* Invoice one or more tickets to a customer after the PoS session is closed
* As the PoS accounting behaviour will change with the module you must 
be forced to generate invoices for all the tickets, so we added also a 
couple of wizards for allow easy mass ticket selection.

The module is AGPL but not public available yet as develop is on going, 
if you are interested please contact me for discuss if the module is 
valid for your current situation.

On 13/10/15 08:07, Ludovic CHEVALIER wrote:
> Hi!
> I have a problem with point of sale and invoices for few months now.
> I really nead advices about this question.
> My first problem is about invoicing pos orders.
> >From point of sale, when I validate a pos order, an account entrie will
> be created at pos closing. If my customer want an invoice for his/her
> purchase, OpenERP permit to create invoice from the pos order. But, that
> generate a second account entrie. So, my accounting is false. :-(
> I already have discussion about this with OpenERP employees, but I never
> had a answer that solved this problem.
> My second problem, which is the consequence of the first.
> I disable the invoice button of the point of sale module due to the
> first problem. So, my customers never have invoices for their purchases.
> Then, I thank there was no matter having same sale journal for sales
> from point of sale orders and sales from invoices. Indeed, when we close
> a point of sale session, an account with a number wich come from journal
> sequence is created.
> If  the point of sale use the same journal as invoices, we make holes in
> the invoices numbering.
> So, I created a new sale journal, just for the point of sale, with its
> own sequence.
> Problem: when I create an invoice, this point of sale journal was
> selected by default. So, I created a default value with condition, like
> its describe in this thread:
> It works, but, when I create an invoice from a sale order (not point of
> sale order, just sale order), that doesn't work.
> For my second problem, here is the method of account.invoice object
> (from account module) that select the journal:
> > def _get_journal(self, cr, uid, context=None):
> >         if context is None:
> >             context = {}
> >         type_inv = context.get('type', 'out_invoice')
> >         user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
> >         company_id = context.get('company_id',
> >         type2journal = {'out_invoice': 'sale', 'in_invoice': 'purchase', 'out_refund': 'sale_refund', 'in_refund': 'purchase_refund'}
> >         journal_obj = self.pool.get('account.journal')
> >         domain = [('company_id', '=', company_id)]
> >         if isinstance(type_inv, list):
> >             domain.append(('type', 'in', [type2journal.get(type) for type in type_inv if type2journal.get(type)]))
> >         else:
> >             domain.append(('type', '=', type2journal.get(type_inv, 'sale')))
> >         res =, uid, domain, limit=1)
> >, uid, [('state', '=', 'done')], context=context)
> >         return res and res[0] or False
> We can see that the journal is chosen arbitrary by selecting the first
> one of the request ("limit=1").
> Is it normal that users can't choose the journal they want for invoices?
> Why OpenERP prefers choose it by "chance"?
> Maybe it was not a good idea to create a different journal for point of
> sale. But I'm not sure that create account entries numbered with invoice
> sequence, with point of sale session, account entries that are not
> related to an invoice, is a good idea.
> Is someone have the same thoughts as me?
> Is someone have some answers for those questions/problems?
> Thanks.
> Ludovic
> _______________________________________________
> Mailing-List:
> Post to:
> Unsubscribe: