Merge lp:~openerp-dev/openobject-addons/6.0-bug-740047-rch into lp:openobject-addons/6.0

Proposed by Riken Bhorania (OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/6.0-bug-740047-rch
Merge into: lp:openobject-addons/6.0
Diff against target: 44 lines (+19/-15)
1 file modified
mrp/mrp.py (+19/-15)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/6.0-bug-740047-rch
Reviewer Review Type Date Requested Status
Jay Vora (Serpent Consulting Services) Pending
Review via email: mp+65310@code.launchpad.net

Description of the change

Hello Sir,

When 'Raw Materials Location' and 'Source Location' of 'Products to Consume' in the MO is same then stock move(s) from 'Raw Materials Location' to 'Source Location' should not be generated.

Also no need to create Procurement(s) regarding this kind of stock move(s).

Thanks.

To post a comment you must log in.

Unmerged revisions

4669. By Riken Bhorania (OpenERP)

[FIX] mrp : No need to create extra stock move(s) from MO when 'Raw Materials Location' and 'Source Location' of 'Products to Consume' is same.

4668. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

4667. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'mrp/mrp.py'
--- mrp/mrp.py 2011-04-04 11:25:26 +0000
+++ mrp/mrp.py 2011-06-21 07:31:34 +0000
@@ -888,21 +888,25 @@
888 'company_id': production.company_id.id,888 'company_id': production.company_id.id,
889 })889 })
890 moves.append(res_dest_id)890 moves.append(res_dest_id)
891 move_id = move_obj.create(cr, uid, {891 previous_move_obj = move_obj.browse(cr, uid, res_dest_id)
892 'name':'PROD:' + production.name,892 if production.location_src_id.id != previous_move_obj.location_id.id:
893 'picking_id':picking_id,893 move_id = move_obj.create(cr, uid, {
894 'product_id': line.product_id.id,894 'name':'PROD:' + production.name,
895 'product_qty': line.product_qty,895 'picking_id':picking_id,
896 'product_uom': line.product_uom.id,896 'product_id': line.product_id.id,
897 'product_uos_qty': line.product_uos and line.product_uos_qty or False,897 'product_qty': line.product_qty,
898 'product_uos': line.product_uos and line.product_uos.id or False,898 'product_uom': line.product_uom.id,
899 'date': newdate,899 'product_uos_qty': line.product_uos and line.product_uos_qty or False,
900 'move_dest_id': res_dest_id,900 'product_uos': line.product_uos and line.product_uos.id or False,
901 'location_id': production.location_src_id.id,901 'date': newdate,
902 'location_dest_id': routing_loc or production.location_src_id.id,902 'move_dest_id': res_dest_id,
903 'state': 'waiting',903 'location_id': production.location_src_id.id,
904 'company_id': production.company_id.id,904 'location_dest_id': routing_loc or production.location_src_id.id,
905 })905 'state': 'waiting',
906 'company_id': production.company_id.id,
907 })
908 else:
909 continue;
906 proc_id = proc_obj.create(cr, uid, {910 proc_id = proc_obj.create(cr, uid, {
907 'name': (production.origin or '').split(':')[0] + ':' + production.name,911 'name': (production.origin or '').split(':')[0] + ':' + production.name,
908 'origin': (production.origin or '').split(':')[0] + ':' + production.name,912 'origin': (production.origin or '').split(':')[0] + ':' + production.name,