-
-
Notifications
You must be signed in to change notification settings - Fork 59
[16.0][ADD] repair_preparation #119
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: 16.0
Are you sure you want to change the base?
Conversation
d39f316 to
495a3ee
Compare
495a3ee to
6e69cb0
Compare
rousseldenis
left a comment
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.
LGTM. Some comments
6e69cb0 to
1de4451
Compare
1de4451 to
e822aa4
Compare
update repair line location and lot after preparation is done
5ff413b to
bb3f1d4
Compare
…repair_preparation enabled
| "because some linked moves are already done.\n" | ||
| "Repair: %(repair)s\nLines: %(lines)s" | ||
| ) | ||
| % { |
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.
Please use translation function arguments instead.
| if not self.preparation_group_id: | ||
| self.preparation_group_id = self.env["procurement.group"].create( | ||
| { | ||
| "name": _("Preparation for") + self.name, |
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.
| "name": _("Preparation for") + self.name, | |
| "name": _("Preparation for ") + self.name, |
| return operations.filtered( | ||
| lambda line: line.type == "add" | ||
| and line.product_id | ||
| and line.product_uom_qty > 0 |
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.
No need of float_compare() ?
The repair module consumes spare parts at the end of the repair without considering the qunatity reservation. the more natural flow is to have a staging step to bring and reserve parts before the repair begins, improving planning and reducing delays at the workbench.
This addon introduces a Preparation flow:
On Confirm (validate) of the repair, a procurement is run procurement for all eligible Add lines
When a repair line is created/edited while the repair is Under Repair:
Finishing a repair is blocked if:
cc/ @lmignon , @rousseldenis