Skip to content
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

[ADD] stock_exception: when to run the exception (confirm/validate) #2046

Open
wants to merge 1 commit into
base: 16.0
Choose a base branch
from

Conversation

mav-adhoc
Copy link
Contributor

When we were testing the model, in case we choose 'stock.picking' as the model where we wanted to apply the exception, we noticed that the exception also ran when we confirmed sale orders.
This happens because, by confirming sale orders, the action confirm creates the respective records in stock.picking (IN/OUT, depending on the configuration you have) and run the exception.
What we want is to have the decision when to run the exception, if at the creation of the stock.picking record or if at the validation of the stock.picking record.

Due to this desire, we created two new boolean fields in the stock.exception class (check_on_validate and check_on_confirm) in order to indicate when to run the exception. If you select check_on_confirm, it will run the exception when you create the stock.picking record. If you select check_on_validate, it will run the exception when you validate the stock.picking record.

@mav-adhoc mav-adhoc force-pushed the 16.0-mig-stock_exception-2 branch 4 times, most recently from 0f6434e to b03e1be Compare May 23, 2024 12:12
@mav-adhoc
Copy link
Contributor Author

@yostashiro @rousseldenis Hi! is there a possibility we can add this improvement on the stock_exception module? Thanks

@jcadhoc
Copy link

jcadhoc commented Jun 25, 2024

Hello!

@OCA/deployment-tools-maintainers merge please :)

@mav-adhoc mav-adhoc force-pushed the 16.0-mig-stock_exception-2 branch 2 times, most recently from 267bd8a to 4df08ed Compare July 4, 2024 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants