Skip to Content
Menu
This question has been flagged
2 Replies
4384 Views

Hi,

Route = Buy

Is there anyway possible to have odoo run the the reorder rule on only the sales order line items in a sale order once the sales order has been confirmed, then generate the corresponding purchase RFQ.

Conventional method is the run the reorder scheduler but this is taking taking a long time (hours) to complete.

I am using the MTO+MTS Module for items that we may or may not have in stock (no reorder qty) and that works fine.

Any input would be appreciated.


 

Avatar
Discard
Best Answer

Hi Peter,

Just to clarify, are you wanting to have MTS+MTO, as well as to automatically trigger the reorder rules immediately on confirm? So as soon as you confirm a sale order it makes purchase orders for both stock that's required for the order (MTO), as well as for your stock replenishment (reorder rules)?

If so, as far as I can tell there's no way to do it without creating a custom module. If you're capable of developing an app, I've added some notes below.

You could either hook the action_confirm method of the sale order or create an automated action in order to get some code to run when you click confirm. This would allow you to run the scheduler as soon as the order it confirmed.

However, you mentioned that this function is taking hours (how many products/rules do you have?), so you would need a way to limit this to only the products that were in the related sale order. The easiest way I can see is to call the_procure_orderpoint_confirm function with a context containing the products, and to hook the _get_orderpoint_domain function on the procurement.order model to add that into the domain to select only the relevant reorder rules.

Cheers

Avatar
Discard
Best Answer
As the admin user, you can got to
Settings/Technical/
and set the schedule to run more frequently, say every 15 minutes or so. 
Avatar
Discard
Related Posts Replies Views Activity
3
Apr 23
1392
0
Jun 19
1908
1
Aug 24
166
0
Aug 19
2121
0
Mar 15
3118