Rifakat (OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/6.0-opw-580795-rha into
lp:openobject-addons/6.0.
Requested reviews:
Naresh(OpenERP) (nch-openerp)
Related bugs:
Bug #1067365 in OpenERP Addons: "copying production lot copies its stock
moves, creation date and revisions"
https://bugs.launchpad.net/openobject-addons/+bug/1067365
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-580795-rha/+merge/131315
Hello,
Duplication of production Lot also duplicates its Creation Date, Stock Moves
and Revisions.
Creation Date should be current date, Stock Moves and Revisions should be reset
when we duplicate it.
Thanks for your review,
Rifakat Haradwala
--
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-580795-rha/+merge/131315
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/6.0-opw-580795-rha.
=== modified file 'stock/stock.py'
--- stock/stock.py 2012-08-17 07:46:56 +0000
+++ stock/stock.py 2012-10-25 06:36:23 +0000
@@ -1443,6 +1443,14 @@
"""
value = self.pool.get('action.traceability').action_traceability(cr,uid,ids,context)
return value
+
+ def copy(self, cr, uid, id, default=None, context=None):
+ if context is None: context = {}
+ if default is None: default = {}
+ default = default.copy()
+ default.update(date=time.strftime('%Y-%m-%d %H:%M:%S'), revisions=[], move_ids=[])
+ return super(stock_production_lot, self).copy(cr, uid, id, default=default, context=context)
+
stock_production_lot()
class stock_production_lot_revision(osv.osv):
_______________________________________________
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