[IMP] account: bank statement reconciliation widget: allow to filter move lines on...
authorArthur Maniet <me@whisno.be>
Wed, 26 Nov 2014 10:38:24 +0000 (11:38 +0100)
committerArthur Maniet <me@whisno.be>
Wed, 26 Nov 2014 10:38:32 +0000 (11:38 +0100)
addons/account/account_bank_statement.py

index 0e16ba6..8dd3107 100644 (file)
@@ -606,15 +606,21 @@ class account_bank_statement_line(osv.osv):
         if additional_domain is None:
             additional_domain = []
         # Make domain
-        domain = additional_domain + [('reconcile_id', '=', False),
-                                      ('state', '=', 'valid'),
-                                      ('account_id.reconcile', '=', True)]
+        domain = additional_domain + [
+            ('reconcile_id', '=', False),
+            ('state', '=', 'valid'),
+            ('account_id.reconcile', '=', True)
+        ]
         if st_line.partner_id.id:
             domain += [('partner_id', '=', st_line.partner_id.id)]
         if excluded_ids:
             domain.append(('id', 'not in', excluded_ids))
         if str:
-            domain += ['|', ('move_id.name', 'ilike', str), ('move_id.ref', 'ilike', str)]
+            domain += [
+                '|', ('move_id.name', 'ilike', str),
+                '|', ('move_id.ref', 'ilike', str),
+                ('date_maturity', 'like', str),
+            ]
             if not st_line.partner_id.id:
                 domain.insert(-1, '|', )
                 domain.append(('partner_id.name', 'ilike', str))