Merge lp:~openerp-dev/openobject-addons/6.0-opw-582485-ado into lp:openobject-addons/6.0

Proposed by Amit Dodiya (OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/6.0-opw-582485-ado
Merge into: lp:openobject-addons/6.0
Diff against target: 13 lines (+0/-3)
1 file modified
sale/sale.py (+0/-3)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/6.0-opw-582485-ado
Reviewer Review Type Date Requested Status
Naresh(OpenERP) Pending
Review via email: mp+139420@code.launchpad.net

Description of the change

Hello,

[FIX] sale: paying an advanced invoice on sale order makes wrong the calculation of the progress bar invoiced

Steps:
1). Create a sale order of 1000 now make an advance invoice of 100
2). Pay that invoice and back to the sale order and check in the list view the progress bar for invoiced field is set to 100 %. If you skip the step 3 and don t pay the advanced invoice, the result is correct and shows 10 %.

Regards,
Amit

To post a comment you must log in.

Unmerged revisions

5385. By Amit Dodiya<email address hidden>

[FIX] sale: paying an advanced invoice on sale order makes wrong the calculation of the progress bar invoiced

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'sale/sale.py'
--- sale/sale.py 2012-12-04 13:29:03 +0000
+++ sale/sale.py 2012-12-12 09:56:24 +0000
@@ -128,9 +128,6 @@
128 def _invoiced_rate(self, cursor, user, ids, name, arg, context=None):128 def _invoiced_rate(self, cursor, user, ids, name, arg, context=None):
129 res = {}129 res = {}
130 for sale in self.browse(cursor, user, ids, context=context):130 for sale in self.browse(cursor, user, ids, context=context):
131 if sale.invoiced:
132 res[sale.id] = 100.0
133 continue
134 tot = 0.0131 tot = 0.0
135 for invoice in sale.invoice_ids:132 for invoice in sale.invoice_ids:
136 if invoice.state not in ('draft', 'cancel'):133 if invoice.state not in ('draft', 'cancel'):