Ravi Gohil (OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/6.1-opw-575210-rgo into 
lp:openobject-addons/6.1.

Requested reviews:
  Naresh(OpenERP) (nch-openerp)
Related bugs:
  Bug #1004322 in OpenERP Addons: "[6.1]When changing the quantity of MO using 
wizard `Change Qty`, the changed quantity should be reflected in respective 
move linked to `Move Product` in `Extra Info` tab."
  https://bugs.launchpad.net/openobject-addons/+bug/1004322

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-575210-rgo/+merge/107331

Hello,

When changing the quantity of MO using wizard `Change Qty`, the changed 
quantity should be reflected in respective move linked to `Move Product` in 
`Extra Info` tab.

Product Configuration:
Product Type: Stockable Product
Procurement Method: Make to Stock
Supply Method: Produce

Steps to reproduce:
1) Create a SO for the above configured product, say for example with 15 Qty,
2) Procurement Order will be created for that SO, now run Procurement, MO will 
be created with 15 Qty for that product,
3) Now, as my supplier can produce MAX 8 qty of that product, I changed the qty 
of the MO to 8, but this isn't updated in the move linked to `Move 
Product`(this is the actual BUG), So, I manually changed the quantity in `Move 
Product` to 8.
4) I ran the scheduler with `Automatic orderedpoint` option ticked, this 
creates a MO with remaining quantities of that product, that is 7, and the 
`Move Product` is also linked with Qty 7.

So, in this scenario, if I changed the qty of the MO, this should be reflected 
in respective `Move Product`.

Thanks.
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-575210-rgo/+merge/107331
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/6.1-opw-575210-rgo.
=== modified file 'mrp/wizard/change_production_qty.py'
--- mrp/wizard/change_production_qty.py	2012-02-14 15:57:46 +0000
+++ mrp/wizard/change_production_qty.py	2012-05-25 06:46:18 +0000
@@ -72,7 +72,8 @@
             prod = prod_obj.browse(cr, uid, record_id, context=context)
             prod_obj.write(cr, uid,prod.id, {'product_qty': wiz_qty.product_qty})
             prod_obj.action_compute(cr, uid, [prod.id])
-
+            if prod.move_prod_id and prod.product_id.procure_method == "make_to_stock":
+                self.pool.get('stock.move').write(cr, uid, [prod.move_prod_id.id], {'product_qty': wiz_qty.product_qty}, context=context)
             move_lines_obj = self.pool.get('stock.move')
             for move in prod.move_lines:
                 bom_point = prod.bom_id

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to