Merge lp:~openerp-dev/openobject-addons/5.0-opw-4435-ach into lp:openobject-addons/5.0

Proposed by Anup(SerpentCS)
Status: Rejected
Rejected by: Raphael Collet (OpenERP)
Proposed branch: lp:~openerp-dev/openobject-addons/5.0-opw-4435-ach
Merge into: lp:openobject-addons/5.0
Diff against target: 40 lines (+9/-3)
2 files modified
account/account_move_line.py (+7/-1)
account/invoice.py (+2/-2)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/5.0-opw-4435-ach
Reviewer Review Type Date Requested Status
Raphael Collet (OpenERP) (community) Disapprove
Stephane Wirtel (OpenERP) Pending
Jay Vora (Serpent Consulting Services) Pending
Review via email: mp+62480@code.launchpad.net

Description of the change

Hello,

The merge fixes the following issues.

 - When you pay the invoice partially using the payment term the residual amount was not being deducted.
 - When you pay invoice in different currency it caused an error.
 - Writeoff was being an issue due to the rounding of amount in different currencies.

All the issues has been fixed by this.

Thanks.

To post a comment you must log in.
Revision history for this message
Raphael Collet (OpenERP) (rco-openerp) wrote :

The case 4435 has been fixed by Quentin (rev 2918) in another way.
Therefore I will reject this branch.

review: Disapprove

Unmerged revisions

2910. By Anup(SerpentCS)

[FIX] account : Invoice Paid in different currencies causing issues, Fixed(Case:4435)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'account/account_move_line.py'
--- account/account_move_line.py 2010-12-16 16:06:42 +0000
+++ account/account_move_line.py 2011-05-26 13:01:38 +0000
@@ -563,7 +563,13 @@
563 account_id = line['account_id']['id']563 account_id = line['account_id']['id']
564 account_type = line['account_id']['type']564 account_type = line['account_id']['type']
565 partner_id = (line['partner_id'] and line['partner_id']['id']) or False565 partner_id = (line['partner_id'] and line['partner_id']['id']) or False
566 writeoff = debit - credit566
567 if (line.invoice.currency_id != line.invoice.company_id.currency_id) or (line.currency_id != line.invoice.company_id.currency_id):
568 # Rounding issues with different currencies
569 writeoff = round(debit - credit,tools.config['price_accuracy']-1)
570 else:
571 writeoff = debit - credit
572
567 # Ifdate_p in context => take this date573 # Ifdate_p in context => take this date
568 if context.has_key('date_p') and context['date_p']:574 if context.has_key('date_p') and context['date_p']:
569 date=context['date_p']575 date=context['date_p']
570576
=== modified file 'account/invoice.py'
--- account/invoice.py 2011-02-28 10:53:53 +0000
+++ account/invoice.py 2011-05-26 13:01:38 +0000
@@ -114,7 +114,7 @@
114 inv_total = inv.amount_total114 inv_total = inv.amount_total
115 context_unreconciled = context.copy()115 context_unreconciled = context.copy()
116 for lines in inv.move_lines:116 for lines in inv.move_lines:
117 if lines.currency_id and lines.currency_id.id == inv.currency_id.id:117 if lines.currency_id and lines.currency_id.id == inv.currency_id.id and lines.amount_currency:
118 if inv.type in ('out_invoice','in_refund'):118 if inv.type in ('out_invoice','in_refund'):
119 inv_total += lines.amount_currency119 inv_total += lines.amount_currency
120 else:120 else:
@@ -144,8 +144,8 @@
144 ids_line = line.reconcile_id.line_id144 ids_line = line.reconcile_id.line_id
145 elif line.reconcile_partial_id:145 elif line.reconcile_partial_id:
146 ids_line = line.reconcile_partial_id.line_partial_ids146 ids_line = line.reconcile_partial_id.line_partial_ids
147 partial_ids.append(line.id)
147 l = map(lambda x: x.id, ids_line)148 l = map(lambda x: x.id, ids_line)
148 partial_ids.append(line.id)
149 res[id] =[x for x in l if x <> line.id and x not in partial_ids]149 res[id] =[x for x in l if x <> line.id and x not in partial_ids]
150 return res150 return res
151151