[FIX] point_of_sale: incorrect sequences for orders
authorMartin Trigaux <mat@openerp.com>
Tue, 26 Aug 2014 12:31:42 +0000 (14:31 +0200)
committerMartin Trigaux <mat@openerp.com>
Tue, 26 Aug 2014 14:33:58 +0000 (16:33 +0200)
commit69cd13a0841fa81f881a616aa28424af7ce6a4c8
tree9b9498f5be6dbbb3a5718def75d6906ddf7567de
parentf6dceb2ef6e17202ce47b637c7e83ed2402e3d4b
[FIX] point_of_sale: incorrect sequences for orders

A new ir.sequence is generated at pos.config creation for the orders. However it was not used as the type was not set. The fallback was done on the general sequence.
In addition to the sequences being shared, it was not possible to create a pos.order in multicompany (no sequence found for user company, name was null).
Same issue for the pos.order.line.
This patch generates correctly pos.order and pos.order.line sequences at pos.config creation.

Instead of using the pos.config sequence to generate session number (not what this field was intended to), use the existing sequence for pos.session.
Remove company_id value on default pos.session sequence to make sure it's shared between companies and correctly set the prefix.
addons/point_of_sale/__openerp__.py
addons/point_of_sale/point_of_sale.py
addons/point_of_sale/point_of_sale_sequence.xml