banking-addons-team team mailing list archive
-
banking-addons-team team
-
Mailing list archive
-
Message #01499
[Merge] lp:~acsone-openerp/banking-addons/7.0-bug-1280814-base_completion into lp:banking-addons/bank-statement-reconcile-7.0
Laurent Mignon (Acsone) has proposed merging lp:~acsone-openerp/banking-addons/7.0-bug-1280814-base_completion into lp:banking-addons/bank-statement-reconcile-7.0.
Requested reviews:
Banking Addons Core Editors (banking-addons-team)
Related bugs:
Bug #1280814 in Banking Addons: " [7.0] account_statement_base_completion - completion on partner name in the statement line label fails"
https://bugs.launchpad.net/banking-addons/+bug/1280814
For more details, see:
https://code.launchpad.net/~acsone-openerp/banking-addons/7.0-bug-1280814-base_completion/+merge/206617
[FIX] completion on partner name in the statement line label (lp:1280814)
--
https://code.launchpad.net/~acsone-openerp/banking-addons/7.0-bug-1280814-base_completion/+merge/206617
Your team Banking Addons Core Editors is requested to review the proposed merge of lp:~acsone-openerp/banking-addons/7.0-bug-1280814-base_completion into lp:banking-addons/bank-statement-reconcile-7.0.
=== modified file 'account_statement_base_completion/statement.py'
--- account_statement_base_completion/statement.py 2014-02-02 10:58:40 +0000
+++ account_statement_base_completion/statement.py 2014-02-16 15:31:39 +0000
@@ -319,7 +319,9 @@
if not context['partner_memoizer']:
return res
st_obj = self.pool.get('account.bank.statement.line')
- sql = "SELECT id FROM res_partner WHERE name ~* %s and id in %s"
+ sql = """SELECT id FROM (
+ SELECT id, regexp_matches(%s, name) AS name_match FROM res_partner) AS res_patner_matcher
+ WHERE name_match IS NOT NULL AND id IN %s """
pattern = ".*%s.*" % re.escape(st_line['name'])
cr.execute(sql, (pattern, context['partner_memoizer']))
result = cr.fetchall()
@@ -332,7 +334,7 @@
res['partner_id'] = result[0][0]
st_vals = st_obj.get_values_for_line(cr,
uid,
- profile_id=st_line['porfile_id'],
+ profile_id=st_line['profile_id'],
master_account_id=st_line['master_account_id'],
partner_id=res['partner_id'],
line_type=False,
Follow ups