Conversation
d39f316 to
495a3ee
Compare
495a3ee to
6e69cb0
Compare
1de4451 to
e822aa4
Compare
5ff413b to
bb3f1d4
Compare
| "because some linked moves are already done.\n" | ||
| "Repair: %(repair)s\nLines: %(lines)s" | ||
| ) | ||
| % { |
There was a problem hiding this comment.
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.
| "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 hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. |
03ee39f to
ecaef28
Compare
update repair line location and lot after preparation is done
…repair_preparation enabled
ecaef28 to
a9a9c81
Compare
- Do not call action on empty recordset - Remove depends in manifest - Use trnaslate function args
Problem: The 'repair_stock_move' module overrides standard behavior in a way that causes duplicate stock moves when used alongside this module. Because this behavior is hard-coded and not toggleable, there is no way to prevent the conflict via configuration.
3ec6d19 to
af08b5d
Compare
|
I think there is an incompatibility between @api.onchange("type")
def onchange_operation_type(self):
# this onchange was overriding the changes from the compute
# method `_compute_location_id`, we ensure that the locations
# in the types have more priority by explicit calling the compute.
res = super().onchange_operation_type()
self._compute_location_id() # <- THIS LINE IS THE CULPRIT
return resThe logic for the computation of the locations are not compatible. NB: I tested on a database with only |
Before this commit, the stock picking generated for preparing spare parts used the default destination location defined on the picking type. This resulted in poor UX, as the operator was forced to manually edit the destination location on the generated picking to match the specific location of the repair order before validating the transfer. This manual step was confusing, added unnecessary clicks, and was prone to errors. Now, the procurement uses the `location_id` of the Repair Order as its destination. The generated picking is automatically routed to the exact location where the repair takes place, eliminating the need for manual intervention and streamlining the operator's workflow.
712332a to
251e285
Compare
…c integrity When the repair preparation flow is enabled, procurement moves are generated upon order confirmation or when "Under Repair". Modifying quantities or products while the order is in the 'Confirmed' state (but before the repair has started) can lead to stock moves getting out of sync with the repair lines.
|
@sbejaoui @nicolas-delbovier-acsone Tests seem red |
Yes I know, as I said above, installing ONLY Maybe rebasing the branch will fix it? I'll test that when I have more time |
Previously, the module used a standard stock action, which led to several usability issues: - Breadcrumb name "Transfers" was inconsistent with the "Preparation" context. - The "New" button was visible despite creation being invalid in this flow. - Users were forced through a list view even when only one picking existed. This change refactors the action to be generated dynamically in Python. It: - Sets the breadcrumb title to "Preparation Pickings". - Disables creation via the action context. - Automatically opens the form view if only one record is found.
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