[FIX] point_of_sale: Use the right values for the state and fix the closing button

bzr revid: stw@openerp.com-20120509103959-dgb2qzd7v1afh2hp
This commit is contained in:
Stephane Wirtel
2012-05-09 12:39:59 +02:00
parent 1050ef628c
commit cd171effd5
2 changed files with 4 additions and 4 deletions
+4 -3
View File
@@ -311,12 +311,13 @@ class pos_session(osv.osv):
def wkf_action_close(self, cr, uid, ids, context=None):
# Close CashBox
record.cash_register_id.button_confirm_cash(context=context)
return self.write(cr, uid, ids, {'state' : 'close', 'stop_at' : time.strftime('%Y-%m-%d %H:%M:%S')}, context=context)
for record in self.browse(cr, uid, ids, context=context):
record.cash_register_id.button_confirm_cash(context=context)
return self.write(cr, uid, ids, {'state' : 'closed', 'stop_at' : time.strftime('%Y-%m-%d %H:%M:%S')}, context=context)
def wkf_action_post(self, cr, uid, ids, context=None):
self._confirm_orders(cr, uid, ids, context=context)
return self.write(cr, uid, ids, {'state' : 'post'}, context=context)
return self.write(cr, uid, ids, {'state' : 'posted'}, context=context)
def _confirm_orders(self, cr, uid, ids, context=None):
wf_service = netsvc.LocalService("workflow")
@@ -890,7 +890,6 @@
<field name="subtotal_closing" string="Closing Subtotal"/>
</tree>
</field>
<field name="journal_ids" colspan="4" nolabel="1" />
</page>
</notebook>