[FIX] point_of_sale: Confirm the bank statements for the pos session
[FIX] account_bank_statement_extensions: fix bzr revid: stw@openerp.com-20120509144108-n5ol7twovy639s7s
This commit is contained in:
@@ -42,9 +42,10 @@ class account_bank_statement(osv.osv):
|
||||
def button_confirm_bank(self, cr, uid, ids, context=None):
|
||||
super(account_bank_statement, self).button_confirm_bank(cr, uid, ids, context=context)
|
||||
for st in self.browse(cr, uid, ids, context=context):
|
||||
cr.execute("UPDATE account_bank_statement_line \
|
||||
SET state='confirm' WHERE id in %s ",
|
||||
(tuple([x.id for x in st.line_ids]),))
|
||||
if st.line_ids:
|
||||
cr.execute("UPDATE account_bank_statement_line \
|
||||
SET state='confirm' WHERE id in %s ",
|
||||
(tuple([x.id for x in st.line_ids]),))
|
||||
return True
|
||||
|
||||
def button_cancel(self, cr, uid, ids, context=None):
|
||||
|
||||
@@ -317,10 +317,7 @@ class pos_session(osv.osv):
|
||||
# Close CashBox
|
||||
for record in self.browse(cr, uid, ids, context=context):
|
||||
for st in record.statement_ids:
|
||||
if st.journal_id.type == 'cash':
|
||||
st.button_confirm_cash(context=context)
|
||||
if st.journal_id.type == 'bank':
|
||||
st.button_confirm_bank(context=context)
|
||||
getattr(st, 'button_confirm_%s' % st.journal_id.type)(context=context)
|
||||
|
||||
return self.write(cr, uid, ids, {'state' : 'closing_control', 'stop_at' : time.strftime('%Y-%m-%d %H:%M:%S')}, context=context)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user