Merge lp:~openerp-dev/openobject-addons/trunk-opw-580795-port-mma into lp:openobject-addons

Proposed by Mayur Maheshwari(OpenERP)
Status: Merged
Merged at revision: 8335
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-opw-580795-port-mma
Merge into: lp:openobject-addons
Diff against target: 20 lines (+10/-0)
1 file modified
stock/stock.py (+10/-0)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-opw-580795-port-mma
Reviewer Review Type Date Requested Status
Numérigraphe (community) Approve
OpenERP Core Team Pending
Review via email: mp+136355@code.launchpad.net

Description of the change

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

To post a comment you must log in.
Revision history for this message
Numérigraphe (numerigraphe) wrote :

You forgot to mention the bug reference in your commit command.
That's Bug #1067365: copying production lot copies its stock moves, creation date and revisions.
Please make sure this is mentioned in the commit command when the branch is merged.
Lionel Sausin.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'stock/stock.py'
2--- stock/stock.py 2012-11-26 18:28:11 +0000
3+++ stock/stock.py 2012-11-27 10:24:06 +0000
4@@ -1566,6 +1566,16 @@
5 """
6 value=self.pool.get('action.traceability').action_traceability(cr,uid,ids,context)
7 return value
8+
9+ def copy(self, cr, uid, id, default=None, context=None):
10+ if context is None: context = {}
11+ if default is None:
12+ default = {}
13+ else:
14+ default = default.copy()
15+ default.update(date=time.strftime('%Y-%m-%d %H:%M:%S'), revisions=[], move_ids=[])
16+ return super(stock_production_lot, self).copy(cr, uid, id, default=default, context=context)
17+
18 stock_production_lot()
19
20 class stock_production_lot_revision(osv.osv):

Subscribers

People subscribed via source and target branches

to all changes: