[FIX] Fixed filter icon for cash registers; removed a space for view_mode definition when returning an act_window; small code optimizations
bzr revid: tde@openerp.com-20120210134606-8aa4hnn8vuhwdzrz
This commit is contained in:
parent
c1a2a66cad
commit
e8d373aa6c
|
@ -525,7 +525,7 @@
|
||||||
<search string="Search Bank Statements">
|
<search string="Search Bank Statements">
|
||||||
<group>
|
<group>
|
||||||
<filter string="Draft" name="state_draft" domain="[('state','=','draft')]" icon="terp-document-new"/>
|
<filter string="Draft" name="state_draft" domain="[('state','=','draft')]" icon="terp-document-new"/>
|
||||||
<filter string="Open" name="state_open" domain="[('state','=','open')]" icon="terp-document-new"/>
|
<filter string="Open" name="state_open" domain="[('state','=','open')]" icon="terp-check"/>
|
||||||
<filter string="Confirmed" name="state_confirmed" domain="[('state','=','confirm')]" icon="terp-camera_test"/>
|
<filter string="Confirmed" name="state_confirmed" domain="[('state','=','confirm')]" icon="terp-camera_test"/>
|
||||||
<separator orientation="vertical"/>
|
<separator orientation="vertical"/>
|
||||||
<field name="date"/>
|
<field name="date"/>
|
||||||
|
|
|
@ -50,7 +50,7 @@ class account_bank_statement(osv.osv):
|
||||||
def button_cancel(self, cr, uid, ids, context=None):
|
def button_cancel(self, cr, uid, ids, context=None):
|
||||||
super(account_bank_statement, self).button_cancel(cr, uid, ids, context=context)
|
super(account_bank_statement, self).button_cancel(cr, uid, ids, context=context)
|
||||||
for st in self.browse(cr, uid, ids, context=context):
|
for st in self.browse(cr, uid, ids, context=context):
|
||||||
if len(st.line_ids) > 0:
|
if st.line_ids:
|
||||||
cr.execute("UPDATE account_bank_statement_line \
|
cr.execute("UPDATE account_bank_statement_line \
|
||||||
SET state='draft' WHERE id in %s ",
|
SET state='draft' WHERE id in %s ",
|
||||||
(tuple([x.id for x in st.line_ids]),))
|
(tuple([x.id for x in st.line_ids]),))
|
||||||
|
|
|
@ -79,9 +79,9 @@ class pos_open_statement(osv.osv_memory):
|
||||||
'type': 'ir.actions.act_window',
|
'type': 'ir.actions.act_window',
|
||||||
'name': _('List of Cash Registers'),
|
'name': _('List of Cash Registers'),
|
||||||
'view_type': 'form',
|
'view_type': 'form',
|
||||||
'view_mode': 'tree, form',
|
'view_mode': 'tree,form',
|
||||||
'res_model': 'account.bank.statement',
|
'res_model': 'account.bank.statement',
|
||||||
'domain': "[('id', 'in', " + str(st_ids) + ")]",
|
'domain': str([('id', 'in', str(st_ids))]),
|
||||||
'views': [(tree_id, 'tree'), (form_id, 'form')],
|
'views': [(tree_id, 'tree'), (form_id, 'form')],
|
||||||
'search_view_id': search_id,
|
'search_view_id': search_id,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue