Merge lp:~arthru/ocb-addons/fix-1181283 into lp:ocb-addons

Proposed by arthru
Status: Rejected
Rejected by: Yannick Vaucher @ Camptocamp
Proposed branch: lp:~arthru/ocb-addons/fix-1181283
Merge into: lp:ocb-addons
Diff against target: 19 lines (+2/-2)
1 file modified
hr_expense/hr_expense.py (+2/-2)
To merge this branch: bzr merge lp:~arthru/ocb-addons/fix-1181283
Reviewer Review Type Date Requested Status
Yannick Vaucher @ Camptocamp Disapprove
Holger Brunn (Therp) Needs Information
Review via email: mp+204510@code.launchpad.net

Description of the change

Yet another fix for bug 1181283.

To post a comment you must log in.
Revision history for this message
Holger Brunn (Therp) (hbrunn) wrote :

Did you have a look at https://code.launchpad.net/~camptocamp/ocb-addons/ocb-addons-hr_expense-tax_vre/+merge/196122 ?
I think we shouldn't be working on the same issue in different MPs, please post your input there.

review: Needs Information
Revision history for this message
Yannick Vaucher @ Camptocamp (yvaucher-c2c) wrote :

https://code.launchpad.net/~camptocamp/ocb-addons/ocb-addons-hr_expense-tax_vre/+merge/196122 fix the issue.

Please comment the other MP if you think anything is wrong. Or reopen the bug if you still experience the same issue

review: Disapprove

Unmerged revisions

9895. By arthru

Fix 1181283 : the base_sign was already applied at line 327

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hr_expense/hr_expense.py'
2--- hr_expense/hr_expense.py 2013-09-09 08:02:09 +0000
3+++ hr_expense/hr_expense.py 2014-02-03 15:05:11 +0000
4@@ -340,13 +340,13 @@
5 is_price_include = tax_obj.read(cr,uid,tax['id'],['price_include'],context)['price_include']
6 if is_price_include:
7 ## We need to deduce the price for the tax
8- res[-1]['price'] = res[-1]['price'] - (tax['amount'] * tax['base_sign'] or 0.0)
9+ res[-1]['price'] = res[-1]['price'] - (tax['amount'] or 0.0)
10 assoc_tax = {
11 'type':'tax',
12 'name':tax['name'],
13 'price_unit': tax['price_unit'],
14 'quantity': 1,
15- 'price': tax['amount'] * tax['base_sign'] or 0.0,
16+ 'price': tax['amount'] or 0.0,
17 'account_id': tax['account_collected_id'] or mres['account_id'],
18 'tax_code_id': tax['tax_code_id'],
19 'tax_amount': tax['amount'] * tax['base_sign'],