Skip to Content
Menu
This question has been flagged
3 Replies
874 Views

Hello,

I am wanting to limit the products that can be seen when a vendor is selected in a Purchase order.

Example:

I choose Vendor A from the pull down for the vendors.  Then go to pick a line item and only the products that are assigned to that vendor are visible in the list.

Have to have this as I have over 1000 parts that are ordered and as is makes for a nightmare situation.

I am hoping this is an easy ask  ( I have seen answers for other Odoo versions but none seem to work with 17 ).

Any help is appreciated.

Thanks

Avatar
Discard
Author

Any idea where to start on this in v17. Would be really helpful to know.

Do You want to view all the products in the dropdown or
just the products have supplier same as the vendor

Author

I just want the products per vendor to appear in the dropdown is the end goal.

Best Answer

Hi Sean
I was struggeling with the same problem, but finally managed to solve it using the following domain for product_id.

<attribute name="domain">[('seller_ids.partner_id','=',parent.partner_id),
                            ('purchase_ok', '=', True)]</attribute>

Regards,
Rickard

Avatar
Discard
Best Answer

Hello,

You can do this:

In your purchase order, after selecting your vendor, instead of selecting "Add an item", hit the "catalogue" link. It will open a new page for you with all the items from this suppliers. You can then add whichever one you want to the order by clicking on the "Cart" button for each item and entering the desired quantity. Once you have added all the items you want and their quantities, hit the "Back to quotation" button on the top left, and they will automatically be added to your purchase order.


Avatar
Discard
Author

This would be a awesome resolution if it had a view that wasn't Kanban. I have too many products and the lists would be really long on some vendors

Best Answer
  • Create a char field and compute this field for getting the domain
    inside the compute
  • Find the supplier ids and get the product_ids related to the supplier
  • return a list only with the received product_ids
Avatar
Discard
Author

I have tried this but seem to get only errors.