OCA / stock-logistics-warehouse

Odoo Warehouse Management Addons
https://odoo-community.org/psc-teams/logistics-18
GNU Affero General Public License v3.0
320 stars 718 forks source link

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

Closed mav-adhoc closed 1 month ago

mav-adhoc commented 5 months ago

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 commented 5 months ago

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

jcadhoc commented 4 months ago

Hello!

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