Merge lp:~alanbell/openobject-addons/openobject-addons into lp:openobject-addons

Proposed by Alan Bell
Status: Needs review
Proposed branch: lp:~alanbell/openobject-addons/openobject-addons
Merge into: lp:openobject-addons
Diff against target: 21 lines (+2/-2)
1 file modified
account/account_invoice.py (+2/-2)
To merge this branch: bzr merge lp:~alanbell/openobject-addons/openobject-addons
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+212830@code.launchpad.net

Description of the change

fixes bug lp:1108801 and doesn't merge different taxes that happen to have the same categories

To post a comment you must log in.

Unmerged revisions

9253. By Alan Bell

fix lp:1108801 don't merge different taxes

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account/account_invoice.py'
2--- account/account_invoice.py 2014-02-12 17:51:41 +0000
3+++ account/account_invoice.py 2014-03-26 12:19:54 +0000
4@@ -843,7 +843,7 @@
5 for tax in inv.tax_line:
6 if tax.manual:
7 continue
8- key = (tax.tax_code_id.id, tax.base_code_id.id, tax.account_id.id, tax.account_analytic_id.id)
9+ key = (tax.tax_code_id.id, tax.base_code_id.id, tax.account_id.id, tax.account_analytic_id.id,tax.name)
10 tax_key.append(key)
11 if not key in compute_taxes:
12 raise osv.except_osv(_('Warning!'), _('Global taxes defined, but they are not in invoice lines !'))
13@@ -1759,7 +1759,7 @@
14 val['account_id'] = tax['account_paid_id'] or line.account_id.id
15 val['account_analytic_id'] = tax['account_analytic_paid_id']
16
17- key = (val['tax_code_id'], val['base_code_id'], val['account_id'], val['account_analytic_id'])
18+ key = (val['tax_code_id'], val['base_code_id'], val['account_id'], val['account_analytic_id'],val['name'])
19 if not key in tax_grouped:
20 tax_grouped[key] = val
21 else:

Subscribers

People subscribed via source and target branches

to all changes: