I have multiple Vendors for several Products.
I would like Odoo to automatically select the Vendor with the cheapest price (the prices change each month) when generating an RFQ (draft Purchase Order).
Is this possible.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
I have multiple Vendors for several Products.
I would like Odoo to automatically select the Vendor with the cheapest price (the prices change each month) when generating an RFQ (draft Purchase Order).
Is this possible.
Note: Right Click the images below and select VIEW IMAGE / OPEN IMAGE IN A NEW TAB to see larger versions.
Yes.
Odoo uses the first Vendor in the list by default.
To have it choose the cheapest, the easiest way is to sort the list by price each time it is edited. You will also have to remove the drag handle from the list to stop users re-sorting the list.
1. Create an Automated Action that makes sure the list of is always sorted after any edits (also works if you change prices from the Vendor Pricelist menu).
2. Remove the drag handle by creating your own view that inherits and overrides the default:
Is there a way to stop Odoo to pick the cheapest price? It's handy when there are several vendors for one product. However, when there is only one supplier and prices increase every year, this function does not make sense. It's really difficult to remove old prices one by one when there is a huge number of products in the system.
Just a thought...
Did you try to work with the start and end dates of the price?
Another approach would be to add a custom boolean field "current_price". Export the whole list (updatable) and set current_price to 0. Add your new records with the current_price = 1.
Now all you need is the add this field in the sort somehow, perhaps a Python specialist can help with that.
In odoo 13 CE is not possible sort suppliers list from product template, changes will not be saved.
It's possible sort suppliers list from product.supplierlist, changes will be saved.
Can anyone adapt code descripted in this post, for use it in template product.supplierinfo
Below original code:
if record.seller_ids: record['seller_ids'] = record.seller_ids.sorted(key = lambda s: s.price)
Thanks
Hi Ray, thanks for your help. I've do it some days ago, and it work. I've do step 1 only (1. Create an Automated Action) and not step 2. (2. Remove the drag handle). But if I change manually a supplier price, in product template, It not reoder automatic supplier list. Maybe I must to do step 2, for work well? Thanks
Here's a step-by-step guide: https://odootricks.tips/automatically-select-lowest-price-vendor/
Hi Chris, thanks for guide. I've try, and suppliers are sorted by price. But I've look that suppliers are sorted by min_qty first , and by price after. If I have some suppliers with high min_qty and more expensive, they will be sorted before others more cheap end with low min_qty. I don't know if is this correct action, but I needed sort by price first , and by min_qty secondary. Any idea?