Merge lp:~openerp-dev/openobject-addons/6.1-opw-580795-rha into lp:openobject-addons/6.1

Proposed by Rifakat Husen (OpenERP)
Status: Approved
Approved by: Naresh(OpenERP)
Approved revision: 7050
Proposed branch: lp:~openerp-dev/openobject-addons/6.1-opw-580795-rha
Merge into: lp:openobject-addons/6.1
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/6.1-opw-580795-rha
Reviewer Review Type Date Requested Status
Numérigraphe (community) Approve
Naresh(OpenERP) Pending
Review via email: mp+131316@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.

Thanks for your review,
Rifakat Haradwala

To post a comment you must log in.
7044. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

7045. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

7046. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

7047. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

7048. By Xavier ALT

[MERGE] OPW 579331: base_vat: button check_vat should not return 'None' uppon success - this will cause error for clients using XML-RPC

Revision history for this message
Numérigraphe (numerigraphe) wrote :

Just nitpicking: you could replace:
    if default is None: default = {}
    default = default.copy()
by:
    if default is None:
        default = {}
    else:
        default.copy()

Lionel.

review: Approve
7049. By Rifakat Husen (OpenERP)

[IMP] improved fix

7050. By Rifakat Husen (OpenERP)

[fix] default.copy()

Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

Hello,

This bug was qualified as Confirmed on Trunk (means still existing and reproducible). A Merge Proposal for trunk was created to fix it. Here is the link to follow the MP on Launchpad https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-opw-580795-port-mma/+merge/136355 and be informed once it's been merged in trunk: ... If this Merge Proposal could not be merged in v6.1 at the release of v7.0, it will be closed.

Thanks,
Naresh Soni

Unmerged revisions

7050. By Rifakat Husen (OpenERP)

[fix] default.copy()

7049. By Rifakat Husen (OpenERP)

[IMP] improved fix

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-10-05 07:47:57 +0000
3+++ stock/stock.py 2012-10-29 10:16:21 +0000
4@@ -1473,6 +1473,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):