summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Morel <xmo@tinyerp.com>2010-02-24 09:48:52 +0100
committerXavier Morel <xmo@tinyerp.com>2010-02-24 09:48:52 +0100
commit0ef6728c208fb65ca2e8167ff5f1ccd3ded4cdf1 (patch)
treee254028a2a9405ca3de4c3c565437933a0076fbb
parent1a229637b6db73252a2dd906a73884e64eb331b3 (diff)
[imp] account: replace string concatenation with string formatting in invoice.inv_line_characteristic_hashcode
bzr revid: xmo@tinyerp.com-20100224084852-zy1s11micx7w8uo8
-rw-r--r--addons/account/invoice.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/addons/account/invoice.py b/addons/account/invoice.py
index 3bcf8a6739f..96f3a0afb40 100644
--- a/addons/account/invoice.py
+++ b/addons/account/invoice.py
@@ -667,12 +667,12 @@ class account_invoice(osv.osv):
will be grouped together if the journal has the 'group line' option. Of course a module
can add fields to invoice lines that would need to be tested too before merging lines
or not."""
- code = str(invoice_line['account_id'])
- code += '-'+str(invoice_line.get('tax_code_id',"False"))
- code += '-'+str(invoice_line.get('product_id',"False"))
- code += '-'+str(invoice_line.get('analytic_account_id',"False"))
- code += '-'+str(invoice_line.get('date_maturity',"False"))
- return code
+ return "%s-%s-%s-%s-%s"%(
+ invoice_line['account_id'],
+ invoice_line.get('tax_code_id',"False"),
+ invoice_line.get('product_id',"False"),
+ invoice_line.get('analytic_account_id',"False"),
+ invoice_line.get('date_maturity',"False"))
def group_lines(self, cr, uid, iml, line, inv):
"""Merge account move lines (and hence analytic lines) if invoice line hashcodes are equals"""