-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[17.0][MIG] sale_mrp_bom #3262
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 17.0
Are you sure you want to change the base?
[17.0][MIG] sale_mrp_bom #3262
Conversation
|
/ocabot migration sale_mrp_bom @antonioburic sale_mrp_bom looking good with all the tests running and no warnings from this module, but there are linting changes to the RST files of some other modules. Maybe it's best to remove them from this PR, and if you feel like going all the way, propose them separately for bonus points. What do you think? |
2e82374 to
5a5e2d0
Compare
@StefanRijnhart nice catch, oca-port automation and I missed to notice :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
|
This PR has the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code review
| continue | ||
| raise ValidationError( | ||
| _( | ||
| "Please select BoM that has matched product with the line `{}`" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's better to use translate function args:
| "Please select BoM that has matched product with the line `{}`" | |
| "Please select BoM that has matched product with the line `%(product_name)s`", product_name=line_product.name) |
|
|
||
|
|
||
| class TestSaleMrpLink(TransactionCase): | ||
| def setUp(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you switch to class method instead ?
| # Check manufacture order | ||
| mos = self.env["mrp.production"].search([("origin", "=", so.name)]) | ||
| for mo in mos: | ||
| self.assertEqual(mo.bom_id, self.boms.get(mo.product_id.id)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems this line is not reached by tests.
Could you check why ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Functional review (after constraint is fixed)
This commit fixes a bug where the module would not accept a BoM on a Sale Order Line if the product in question had multiple variants and the BoM did not specify a variant. Now, regardless of whether the product has multiple variants or not, if the variant is specified on the BoM, it must match the product on the Sale Order Line (like before), but if it's not specified, matching on the product template is enough.
5a5e2d0 to
25f59b1
Compare
25f59b1 to
bd9149a
Compare
superseeds #3008
includes this fix from v14 too #2947
edit: tests fail seemingly for an unrelated reason