Merge lp:~openerp-dev/openobject-addons/6.0-bug-767208-vro into lp:openobject-addons/6.0

Proposed by Valencia Rodrigues (OpenERP)
Status: Merged
Approved by: Jay Vora (Serpent Consulting Services)
Approved revision: no longer in the source branch.
Merged at revision: 4717
Proposed branch: lp:~openerp-dev/openobject-addons/6.0-bug-767208-vro
Merge into: lp:openobject-addons/6.0
Diff against target: 12 lines (+1/-1)
1 file modified
stock/stock.py (+1/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/6.0-bug-767208-vro
Reviewer Review Type Date Requested Status
Jay Vora (Serpent Consulting Services) (community) Approve
Review via email: mp+68251@code.launchpad.net

Description of the change

Hello,

There was a problem of product lot being overwritten in Manufacturing Orders as reported in LP bug 767208.

This fixes the issue.

Thanks.

To post a comment you must log in.
Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Valencia,

Thanks for the very good fix, of the bug generated by me (due to wrong commit of https://bugs.launchpad.net/openobject-addons/+bug/763437).

You should opt to write the author name = bruno bottacini while doing the commit.

Moreover, you should improve the line 9 as move.product_id.id == move.move_dest_id.product_id.id.

Thanks to both of you.

review: Approve
Revision history for this message
Valencia Rodrigues (OpenERP) (vro-openerp) wrote :

Hello Sir,

I have made the recommended changes.

Bruno Bottacini has been credited for his work too.

Thanks.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'stock/stock.py'
2--- stock/stock.py 2011-07-06 12:17:09 +0000
3+++ stock/stock.py 2011-07-19 06:50:44 +0000
4@@ -2133,7 +2133,7 @@
5 self.write(cr, uid, [move.id], {'move_history_ids': [(4, move.move_dest_id.id)]})
6 #cr.execute('insert into stock_move_history_ids (parent_id,child_id) values (%s,%s)', (move.id, move.move_dest_id.id))
7 if move.move_dest_id.state in ('waiting', 'confirmed'):
8- if move.prodlot_id.id:
9+ if move.prodlot_id.id and move.product_id.id == move.move_dest_id.product_id.id:
10 self.write(cr, uid, [move.move_dest_id.id], {'prodlot_id':move.prodlot_id.id})
11 self.force_assign(cr, uid, [move.move_dest_id.id], context=context)
12 if move.move_dest_id.picking_id: