[IMP] pos:solved yaml warning message error,which occured when bank statement are in open state
bzr revid: mtr@mtr-20110112114353-falxyn72h652kysg
This commit is contained in:
parent
b0a6e1a42a
commit
2fd652f206
|
@ -327,9 +327,18 @@
|
|||
I open the statement.
|
||||
-
|
||||
!python {model: pos.open.statement}: |
|
||||
self.open_statement(cr, uid, [ref("pos_open_statement_0")], {"lang": "en_US", "active_model":
|
||||
"ir.ui.menu", "active_ids": [ref("point_of_sale.menu_open_statement")], "tz":
|
||||
False, "active_id": ref("point_of_sale.menu_open_statement"), })
|
||||
jou_obj = self.pool.get('account.journal')
|
||||
statement_obj = self.pool.get('account.bank.statement')
|
||||
cr.execute("SELECT DISTINCT journal_id FROM pos_journal_users "
|
||||
"WHERE user_id = %s ORDER BY journal_id"% (uid, ))
|
||||
jou_ids = map(lambda x1: x1[0], cr.fetchall())
|
||||
journal_ids = jou_obj.search(cr, uid, [('auto_cash', '=', True), ('type', '=', 'cash'), ('id', 'in', jou_ids)], context=context)
|
||||
for journal in jou_obj.browse(cr, uid, journal_ids, context=context):
|
||||
ids = statement_obj.search(cr, uid, [('state', '=', 'open'), ('user_id', '=', uid), ('journal_id', '=', journal.id)], context=context)
|
||||
if not ids:
|
||||
self.open_statement(cr, uid, [ref("pos_open_statement_0")], {"lang": "en_US", "active_model":
|
||||
"ir.ui.menu", "active_ids": [ref("point_of_sale.menu_open_statement")], "tz":
|
||||
False, "active_id": ref("point_of_sale.menu_open_statement"), })
|
||||
-
|
||||
I click on the "Make Payment" wizard.
|
||||
-
|
||||
|
|
Loading…
Reference in New Issue