Merge lp:~openerp-dev/openobject-addons/6.0-opw-5186-ach into lp:openobject-addons/6.0

Proposed by Anup(SerpentCS)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/6.0-opw-5186-ach
Merge into: lp:openobject-addons/6.0
Diff against target: 29 lines (+5/-5)
1 file modified
account_voucher/account_voucher.py (+5/-5)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/6.0-opw-5186-ach
Reviewer Review Type Date Requested Status
Jay Vora (Serpent Consulting Services) (community) Approve
Review via email: mp+57650@code.launchpad.net

Description of the change

Hello,

   When the Paid Amount is less than the Open Balance The writeoff calculated is wrong. This fixes the issue. Please check it and share your views.

Thanks.

To post a comment you must log in.
4527. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

4528. By Jay Vora (Serpent Consulting Services)

[MERGE] Merged Tejas' branch for the fix of case 5235

4529. By Jay Vora (Serpent Consulting Services)

[Merge] Merged Tejas' branch for the fix of lp:753133

4530. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

4531. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

4532. By Jay Vora (Serpent Consulting Services)

[Merge] Merged the branch for the fix of lp:722538

4533. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

4534. By Jay Vora (Serpent Consulting Services)

[Merge] Merged Anup's branch for the fix of bug lp:725908

4535. By Jay Vora (Serpent Consulting Services)

[Merge] Merged main branch

4536. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

4537. By Jay Vora (Serpent Consulting Services)

[MERGE] Merged Chs' branch for the fix of Account : Web client sends values of M2M fields in tuple so converting to list.(Ref : 4346,5340)

Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Anup,

We need to discuss with Quentin whether this was the intended behavior or not.

Thanks for the fix.

review: Approve
4538. By Jay Vora (Serpent Consulting Services)

[MERGE] Merged Anup's branch for the fix of invoice created for analyric lines(case 5267). This also covers the fix for the bug lp:728092. Pricelist calculation corrected

4539. By Jay Vora (Serpent Consulting Services)

[REF] HR_timesheet_invoice : Removed unnecesary code(Courtesy : Anup)

4540. By Jay Vora (Serpent Consulting Services)

[MERGE] Merged From Parent branch

4541. By Jay Vora (Serpent Consulting Services)

[MERGE] Merged Tejas' branch

4542. By Jay Vora (Serpent Consulting Services)

[FIX] Stock : Fixed the problem suggested by Buildbot

4543. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

4544. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

4545. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

4546. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

4547. By Jay Vora (Serpent Consulting Services)

[FIX] Lunch : Corrected YAML test, thanks to buildbot

4548. By Jay Vora (Serpent Consulting Services)

[FIX] Users_ldap : Corrected YAML Warnings,Thanks to Buildbot

4549. By Jay Vora (Serpent Consulting Services)

[Merge] Merged Main branch

4550. By Olivier Dony (Odoo)

[MERGE] report_webkit: fixes (mainly UTF8 issues), courtesy of Nicolas Bessi, C2C

4551. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

4552. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

4553. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

4554. By xrg

[MERGE] base_crypt: missing import and better check for active users

4555. By Jay Vora (Serpent Consulting Services)

[MERGE] Merged Dhruti's branch for the fix on decimal accuracy

4556. By Jay Vora (Serpent Consulting Services)

[MERGE] Merged Marco's branch for the fix of lp:718609

4557. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

4558. By Anup(SerpentCS)

[FIX] account_voucher : Writeoff Amount Calculation Corrected

Unmerged revisions

4558. By Anup(SerpentCS)

[FIX] account_voucher : Writeoff Amount Calculation Corrected

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account_voucher/account_voucher.py'
2--- account_voucher/account_voucher.py 2011-01-17 11:20:56 +0000
3+++ account_voucher/account_voucher.py 2011-05-05 09:12:55 +0000
4@@ -145,9 +145,9 @@
5 def _compute_writeoff_amount(self, cr, uid, line_dr_ids, line_cr_ids, amount):
6 debit = credit = 0.0
7 for l in line_dr_ids:
8- debit += l['amount']
9+ debit += l['amount_unreconciled']
10 for l in line_cr_ids:
11- credit += l['amount']
12+ credit += l['amount_unreconciled']
13 return abs(amount - abs(credit - debit))
14
15 def onchange_line_ids(self, cr, uid, ids, line_dr_ids, line_cr_ids, amount):
16@@ -163,10 +163,10 @@
17 debit = credit = 0.0
18 for voucher in self.browse(cr, uid, ids, context=context):
19 for l in voucher.line_dr_ids:
20- debit += l.amount
21+ debit += l.amount_unreconciled
22 for l in voucher.line_cr_ids:
23- credit += l.amount
24- res[voucher.id] = abs(voucher.amount - abs(credit - debit))
25+ credit += l.amount_unreconciled
26+ res[voucher.id] = abs(voucher.amount - abs(credit - debit))
27 return res
28
29 _name = 'account.voucher'