[FIX] Fixed filter icon for cash registers; removed a space for view_mode definition...
authorThibault Delavallée <tde@openerp.com>
Fri, 10 Feb 2012 13:46:06 +0000 (14:46 +0100)
committerThibault Delavallée <tde@openerp.com>
Fri, 10 Feb 2012 13:46:06 +0000 (14:46 +0100)
bzr revid: tde@openerp.com-20120210134606-8aa4hnn8vuhwdzrz

addons/account/account_view.xml
addons/account_bank_statement_extensions/account_bank_statement.py
addons/point_of_sale/wizard/pos_open_statement.py

index f7b73f1..8790712 100644 (file)
                 <search string="Search Bank Statements">
                     <group>
                         <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"/>
                         <separator orientation="vertical"/>
                         <field name="date"/>
index 507590b..1aa1cd8 100644 (file)
@@ -50,7 +50,7 @@ class account_bank_statement(osv.osv):
     def button_cancel(self, cr, uid, ids, context=None):
         super(account_bank_statement, self).button_cancel(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  \
                     SET state='draft' WHERE id in %s ",
                     (tuple([x.id for x in st.line_ids]),))
index 18bfb14..a6e45a9 100644 (file)
@@ -79,9 +79,9 @@ class pos_open_statement(osv.osv_memory):
             'type': 'ir.actions.act_window',
             'name': _('List of Cash Registers'),
             'view_type': 'form',
-            'view_mode': 'tree, form',
+            'view_mode': 'tree,form',
             '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')],
             'search_view_id': search_id,
         }