Return most appropiate supplier for requests

In the template of a product, you can fill the suppliers. And when a request is done, the function find_best_supplier will take the most appropriate supplier from the suppliers defined for that product, considering the Lead Time value that the user has filled for that supplier, and the Supply Date of the requisition.

But in the case that find_best_product_supplier doesn`t return nothing because does not meet any of the conditions of the dates, the supplier is not filled with any value and it remains None.

So, I think could be better that, instead of doing this, find_best_product_supplier could return the supplier who has the Lead Time that comes closest to the Supply Date of the requisition or the one with lower sequence. Also we can mark with a boolean and visual color requests that were created without achive lead times.

I do not see the point to fill record with bad data. If the user needs to make a decision, it is better to force him to make the decision.

From my point of view, the user will choose the supplier closest to meeting lead times almost always. Anyways I can understand your opinion.

This is just your opinion.
There are many options for that. For example he can choose a cheaper and slower supplier because as it will be any way late, better to limit the cost.

Okay, so you think there is no correct way to fill the supplier always and fill it with good data without user intervention???
I think that tryton could do the work of choosing the best supplier despite the lead times were not achieved, instead of forcing the user to possibly make a wrong decision, and worse than tryton could make and automated. But this is just my opinion.

What if the supplier is not in the system?

User can make mistakes but usually less often when they exceptionally have to complete missing information.

I do not think so because in this case Tryton is always doing a wrong proposal.

Perfect, thanks for your help!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.