This question has been flagged

I would like to automate the calculation of Customer Delivery Time on my Products.

I want to use the longest Vendor Delivery Lead Time.

How easy is this?

Avatar
Discard
Best Answer

You can create a Python Code based Server Action:



Here a default lead time of 3 days will be used if a Vendor has not yet been added to the Product Purchase tab and there will be a Chatter Note added if a Vendor is found.


Copy the example code from HERE


Note: Enterprise Customers - please contact your Odoo Digital Advisor or Odoo Partner if you want to add this customization to your database so it is fully supported. The code here is a prototype that does not support Product Variants and makes assumptions about how your database is setup. It won't necessarily work "as is" for all Users. 

Avatar
Discard