Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Prevent using already produced serial number #34038
With this commit, the manufacturer will now be noticed earlier in the process if he produced/consumed a serial number already produced/consumed in a previous production. Before this commit, an error was triggered as well but only at the very last step of the production. This leaded to two issues : - The user had to unlock-edit-lock to update the wrong serial number - On large production, it was difficult to figure out which was/were the product(s) to fix. The search on previous production is done each time the produce wizard is closed or once the production is done on a workorder Task 2002133
The company_id on product_produce_line is a computed field due to the relation with abstract workorder model. This emplies the company_id of new line in the produce wizard is still blanck. Therefore, the domains on product_id and lot_id are wrongly executed. This commit uses parent.company_id in the domains. Which means the wizard itself.
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.