← Back to team overview

openerp-community-reviewer team mailing list archive

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

 

arthru has proposed merging lp:~arthru/ocb-addons/fix-1181283 into lp:ocb-addons.

Requested reviews:
  OpenERP Community Backports Team (ocb)
Related bugs:
  Bug #1181283 in OpenERP Community Backports (Addons): "[7.0] Wrong entry generated on expenses"
  https://bugs.launchpad.net/ocb-addons/+bug/1181283

For more details, see:
https://code.launchpad.net/~arthru/ocb-addons/fix-1181283/+merge/204510

Yet another fix for bug 1181283. 
-- 
https://code.launchpad.net/~arthru/ocb-addons/fix-1181283/+merge/204510
Your team OpenERP Community Backports Team is requested to review the proposed merge of lp:~arthru/ocb-addons/fix-1181283 into lp:ocb-addons.
=== modified file 'hr_expense/hr_expense.py'
--- hr_expense/hr_expense.py	2013-09-09 08:02:09 +0000
+++ hr_expense/hr_expense.py	2014-02-03 15:05:11 +0000
@@ -340,13 +340,13 @@
                 is_price_include = tax_obj.read(cr,uid,tax['id'],['price_include'],context)['price_include']
                 if is_price_include:
                     ## We need to deduce the price for the tax
-                    res[-1]['price'] = res[-1]['price']  - (tax['amount'] * tax['base_sign'] or 0.0)
+                    res[-1]['price'] = res[-1]['price']  - (tax['amount'] or 0.0)
                 assoc_tax = {
                              'type':'tax',
                              'name':tax['name'],
                              'price_unit': tax['price_unit'],
                              'quantity': 1,
-                             'price':  tax['amount'] * tax['base_sign'] or 0.0,
+                             'price':  tax['amount'] or 0.0,
                              'account_id': tax['account_collected_id'] or mres['account_id'],
                              'tax_code_id': tax['tax_code_id'],
                              'tax_amount': tax['amount'] * tax['base_sign'],


Follow ups