[18.0][IMP] mrp_byproduct_auto_create_lot: add lot propagation to byproducts#1707
Open
yostashiro wants to merge 1 commit intoOCA:18.0from
Open
[18.0][IMP] mrp_byproduct_auto_create_lot: add lot propagation to byproducts#1707yostashiro wants to merge 1 commit intoOCA:18.0from
yostashiro wants to merge 1 commit intoOCA:18.0from
Conversation
16b02f7 to
6b4ed8a
Compare
Add option to propagate main product's lot to byproducts instead of generating unique lots. Configurable at company level with product-level override. Unused method _get_lot_sequence() is removed from mrp.production.
6b4ed8a to
4c6cbf6
Compare
AungKoKoLin1997
approved these changes
Feb 2, 2026
Contributor
AungKoKoLin1997
left a comment
There was a problem hiding this comment.
Functional and Code review: LGTM
nobuQuartile
reviewed
Feb 2, 2026
|
|
||
| 1. Go to *Settings \> Manufacturing* and set "Propagate Lot to Byproducts". | ||
| 2. Optionally override at product level via "Propagate Lot to Byproduct" field | ||
| (after the "Auto Create Lot" field in the General Information tab). |
There was a problem hiding this comment.
Suggested change
| (after the "Auto Create Lot" field in the General Information tab). | |
| (after the byproducts' "Auto Create Lot" field in the General Information tab). |
Member
Author
There was a problem hiding this comment.
@nobuQuartile That's not the design. The current description should be okay.
| return self.env["ir.sequence"].next_by_code("stock.lot.serial") | ||
| for line in lines: | ||
| if propagate_lot_to_byproduct and production.lot_producing_id: | ||
| line.lot_name = production.lot_producing_id.name |
There was a problem hiding this comment.
When multiple units of a serial-tracked byproduct are produced, an error occurs indicating that the same serial number has been created multiple times.
This might be something we should add to the roadmap
Member
Author
There was a problem hiding this comment.
This might be something we should add to the roadmap
@nobuQuartile Please help do so.
| _inherit = "res.company" | ||
|
|
||
| propagate_lot_to_byproduct = fields.Selection( | ||
| selection=[("no", "No"), ("yes", "Yes")], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Add option to propagate main product's lot to byproducts instead of generating unique lots. Configurable at company level with product-level override.
Unused method _get_lot_sequence() is removed from mrp.production.
@qrtl QT5959