Merge lp://staging/~yann-papouin/ocb-addons/6.1-bug-1234678-return-product-backorder-false into lp://staging/ocb-addons/6.1

Proposed by Yann Papouin
Status: Merged
Merged at revision: 6819
Proposed branch: lp://staging/~yann-papouin/ocb-addons/6.1-bug-1234678-return-product-backorder-false
Merge into: lp://staging/ocb-addons/6.1
Diff against target: 21 lines (+8/-3)
1 file modified
stock/wizard/stock_return_picking.py (+8/-3)
To merge this branch: bzr merge lp://staging/~yann-papouin/ocb-addons/6.1-bug-1234678-return-product-backorder-false
Reviewer Review Type Date Requested Status
Omar (Pexego) code review Abstain
Guewen Baconnier @ Camptocamp code review Approve
Holger Brunn (Therp) code review Approve
Review via email: mp+189069@code.staging.launchpad.net
To post a comment you must log in.
Revision history for this message
Holger Brunn (Therp) (hbrunn) :
review: Approve (code review)
Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) :
review: Approve (code review)
Revision history for this message
Omar (Pexego) (omar7r) wrote :

Hi Yann,

backorder_id is set to False in the copy method of stock.picking object in the stock module, but only when name not in default or default['name'] == '/'. Then, I think, the good fix should be in the copy method, extract this line out of this condition, not here.

Regards

review: Needs Fixing (code review)
Revision history for this message
Yann Papouin (yann-papouin) wrote :

Hi Omar,

I don't think like you about this. The return product action is specific and that's one of the only case where we have to set the backorder_id to False as we usually keep the backorder for any picking duplicate. Hiding this operation in the copy method could be awkward for a code reader and I don't know what condition could be used for this.

Revision history for this message
Omar (Pexego) (omar7r) wrote :

H Yann,

I think that don't have any sense keep the backorder_id for duplicating picking in any case, much less, like by default, when there isn't name or name == '/' Why?

Revision history for this message
Yann Papouin (yann-papouin) wrote :

I agree with you, backorder_id should be False by design when duplicating a picking but fixing it in ocb-addons is something "too deep" as it may require more changes in other places (built-in addons and other ones) to reintroduce the backorder_id value. (note that this sentence is just an assertion, I didn't made any code search on this behavior).

Revision history for this message
Omar (Pexego) (omar7r) wrote :

OK, I agree with you in this point. If any other reviewer shares this point I approve the merge. Meanwhile I abstain.

Thanks

review: Abstain (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.

Subscribers

People subscribed via source and target branches