Merge lp:~openerp-dev/openobject-addons/trunk-bug-794412-bde into lp:openobject-addons

Proposed by Bharat Devnani (Open ERP)
Status: Rejected
Rejected by: Olivier Dony (Odoo)
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-bug-794412-bde
Merge into: lp:openobject-addons
Diff against target: 19 lines (+8/-1)
1 file modified
sale/sale.py (+8/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-bug-794412-bde
Reviewer Review Type Date Requested Status
Olivier Dony (Odoo) Disapprove
Review via email: mp+86771@code.launchpad.net

Description of the change

Hello Sir,

I have applied some changes in sale/sale.py in order to fix the bug.

Thanks & Regards,
Devnani Bharat R.

To post a comment you must log in.
Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote :

As explained on the previous merge proposal, the proper way to fix this bug is to avoid having the order marked as ' 'shipped' when it has only been partially delivered. Here you are again trying to hide the problem instead of fixing its root cause.

review: Disapprove

Unmerged revisions

6121. By Bharat Devnani (Open ERP)

[FIX] sale : delivery order with back order (after manual split) is wrongly indicated as shipped (and 100% picked)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'sale/sale.py'
2--- sale/sale.py 2011-12-22 12:09:59 +0000
3+++ sale/sale.py 2011-12-23 05:19:31 +0000
4@@ -122,7 +122,14 @@
5
6 for order in self.browse(cr, uid, ids, context=context):
7 if order.shipped:
8- res[order.id] = 100.0
9+ cnt = 0
10+ for picking in order.picking_ids:
11+ if picking.state == 'done':
12+ cnt += 1
13+ if len(order.picking_ids) == cnt:
14+ res[order.id] = 100.0
15+ else:
16+ res[order.id] = tmp[order.id]['total'] and (100.0 * tmp[order.id]['picked'] / tmp[order.id]['total']) or 0.0
17 else:
18 res[order.id] = tmp[order.id]['total'] and (100.0 * tmp[order.id]['picked'] / tmp[order.id]['total']) or 0.0
19 return res

Subscribers

People subscribed via source and target branches

to all changes: