Amit Dodiya (OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/6.0-opw-575823-ado into 
lp:openobject-addons/6.0.

Requested reviews:
  Naresh(OpenERP) (nch-openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-575823-ado/+merge/110044

Hello,

"[FIX]: When duplicating the inventory it will also duplicate the stock move 
from privious inventory"

Steps:
1). Open any inventory which is in done state
2). Duplicate that inventory
You will find the stock move also duplicate in Posted Inventory Tab.

Code is backp-ported from stable 6.1

Regards,
Amit
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-575823-ado/+merge/110044
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/6.0-opw-575823-ado.
=== modified file 'stock/stock.py'
--- stock/stock.py	2012-04-30 14:27:39 +0000
+++ stock/stock.py	2012-06-13 11:30:34 +0000
@@ -2548,6 +2548,13 @@
         'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'stock.inventory', context=c)
     }
 
+    def copy(self, cr, uid, id, default=None, context=None):
+        if default is None:
+            default = {}
+        default = default.copy()
+        default.update({'move_ids': [], 'date_done': False})
+        return super(stock_inventory, self).copy(cr, uid, id, default, context=context)
+
     def _inventory_line_hook(self, cr, uid, inventory_line, move_vals):
         """ Creates a stock move from an inventory line
         @param inventory_line:

_______________________________________________
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