Mayur Maheshwari(OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-opw-580795-port-mma into
lp:openobject-addons.
Requested reviews:
OpenERP Core Team (openerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-opw-580795-port-mma/+merge/136355
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, those information should not be copied.
Code is forward port from 6.1
Thanks,
Mayur
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-opw-580795-port-mma/+merge/136355
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-opw-580795-port-mma.
=== modified file 'stock/stock.py'
--- stock/stock.py 2012-11-26 18:28:11 +0000
+++ stock/stock.py 2012-11-27 10:24:06 +0000
@@ -1566,6 +1566,16 @@
"""
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 = {}
+ else:
+ 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