Merge lp://staging/~camptocamp/ocb-addons/7.0-duplicate-picking-1281558 into lp://staging/ocb-addons

Proposed by Guewen Baconnier @ Camptocamp
Status: Merged
Approved by: Yannick Vaucher @ Camptocamp
Approved revision: no longer in the source branch.
Merged at revision: 9952
Proposed branch: lp://staging/~camptocamp/ocb-addons/7.0-duplicate-picking-1281558
Merge into: lp://staging/ocb-addons
Diff against target: 33 lines (+6/-7)
1 file modified
stock/stock.py (+6/-7)
To merge this branch: bzr merge lp://staging/~camptocamp/ocb-addons/7.0-duplicate-picking-1281558
Reviewer Review Type Date Requested Status
Leonardo Pistone code review Approve
Yannick Vaucher @ Camptocamp code review, no tests Approve
Holger Brunn (Therp) code review Approve
Review via email: mp+206925@code.staging.launchpad.net

Commit message

[FIX] use copy_data rather than doing a write after that the moves are created

Description of the change

Fixes: lp:1281558

Explanation on the bug report.

With this patch, the tracking_id and prodlot_id are also removed when duplicating stock moves directly, which makes more sense IMO than the current behavior that remove them only when the moves are copied from a picking.

Equivalent proposal on the official addons: https://code.launchpad.net/~camptocamp/openobject-addons/7.0-duplicate-picking-1281558/+merge/206922

To post a comment you must log in.
Revision history for this message
Holger Brunn (Therp) (hbrunn) wrote :

I agree completely.

Only 26ff should be setdefaults for the case somebody wants to init the new copy with a tracking_id etc.

review: Needs Fixing (code review)
Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote :

> Only 26ff should be setdefaults for the case somebody wants to init the new
> copy with a tracking_id etc.

I didn't thought of that and it is indeed really better.

Revision history for this message
Holger Brunn (Therp) (hbrunn) wrote :

thanks!

review: Approve (code review)
Revision history for this message
Yannick Vaucher @ Camptocamp (yvaucher-c2c) wrote :

LGTM

review: Approve (code review, no tests)
Revision history for this message
Leonardo Pistone (lepistone) wrote :

good, thanks

review: Approve (code review)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.