Merge lp:~vauxoo/addons-vauxoo/7.0-amount_residual_payslip-dev_luis into lp:addons-vauxoo/7.0

Proposed by Luis Torres - http://www.vauxoo.com
Status: Merged
Merged at revision: 1079
Proposed branch: lp:~vauxoo/addons-vauxoo/7.0-amount_residual_payslip-dev_luis
Merge into: lp:addons-vauxoo/7.0
Diff against target: 24 lines (+2/-7)
1 file modified
payroll_amount_residual/hr_payslip.py (+2/-7)
To merge this branch: bzr merge lp:~vauxoo/addons-vauxoo/7.0-amount_residual_payslip-dev_luis
Reviewer Review Type Date Requested Status
Julio Serna-http://www.vauxoo.com Pending
Review via email: mp+226848@code.launchpad.net

Description of the change

Se quitó la funcionalidad de multicurrency en el calculo del monto restante

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'payroll_amount_residual/hr_payslip.py'
2--- payroll_amount_residual/hr_payslip.py 2014-06-04 00:04:34 +0000
3+++ payroll_amount_residual/hr_payslip.py 2014-07-15 14:35:13 +0000
4@@ -35,19 +35,14 @@
5 context = {}
6 ctx = context.copy()
7 result = {}
8- currency_obj = self.pool.get('res.currency')
9 for payslip in self.browse(cr, uid, ids, context=context):
10 nb_inv_in_partial_rec = max_invoice_id = 0
11 result[payslip.id] = 0.0
12 if payslip.move_id:
13 for aml in payslip.move_id.line_id:
14 if aml.account_id.type in ('receivable','payable'):
15- if aml.currency_id and aml.currency_id.id == payslip.currency_id.id:
16- result[payslip.id] += aml.amount_residual_currency
17- else:
18- ctx['date'] = aml.date
19- result[payslip.id] += currency_obj.compute(cr, uid, aml.company_id.currency_id.id, payslip.currency_id.id, aml.amount_residual, context=ctx)
20- #prevent the residual amount on the invoice to be less than 0
21+ result[payslip.id] += aml.amount_residual_currency
22+ #prevent the residual amount on the payslip to be less than 0
23 result[payslip.id] = max(result[payslip.id], 0.0)
24 return result
25