Merge lp:~openerp-dev/openobject-addons/6.1-opw-584907-skh into lp:openobject-addons/6.1

Proposed by Somesh Khare
Status: Rejected
Rejected by: Chris Biersbach (OpenERP)
Proposed branch: lp:~openerp-dev/openobject-addons/6.1-opw-584907-skh
Merge into: lp:openobject-addons/6.1
Diff against target: 18 lines (+6/-2)
1 file modified
purchase/purchase.py (+6/-2)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/6.1-opw-584907-skh
Reviewer Review Type Date Requested Status
Naresh(OpenERP) Pending
Review via email: mp+145805@code.launchpad.net

Description of the change

Hello Sir,

[Fix]: Purchase : progress bar received remains 0% when you have service type product in the purchase order line but Boolean Received on PO form view is true.

Steps to reproduce:
1. Create a PO with Service type product.
2. Confirm it and see on the PO form view that Boolean field "Received" becomes True.
3. Open List view of PO and see the progress bar "Received" remain 0%.

Expected: When you have Boolean "Received" True on PO form view then on list view it should also be 100% because PO states that it is received.

This branch fixes this issue, kindly review the branch and please share your views on it.

Thanks,
Somesh Khare

To post a comment you must log in.
Revision history for this message
Chris Biersbach (OpenERP) (cbi-openerp) wrote :

I am rejecting this because we no longer merge in 6.1 (not an LTS) and this is not reproducible in version 7.

Unmerged revisions

7139. By Somesh Khare

[FIX] Purchase : progress bar received remains 0% when you have service type product in the purchase order line but boolean receiced on PO form is true(Ref : Case 584907)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'purchase/purchase.py'
2--- purchase/purchase.py 2012-10-09 12:16:14 +0000
3+++ purchase/purchase.py 2013-01-31 10:36:33 +0000
4@@ -101,8 +101,12 @@
5 def _shipped_rate(self, cr, uid, ids, name, arg, context=None):
6 if not ids: return {}
7 res = {}
8- for id in ids:
9- res[id] = [0.0,0.0]
10+ for line in self.browse(cr, uid, ids, context=context):
11+ res[line.id] = [0.0,0.0]
12+ if line.shipped:
13+ for record in line.order_line:
14+ if record.product_id.type == "service":
15+ res[line.id] = [100.0,100.0]
16 cr.execute('''SELECT
17 p.purchase_id,sum(m.product_qty), m.state
18 FROM