Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Approvals
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Estate Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Pricing
  • Help

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Accounting
  • Inventory
  • PoS
  • Project
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
Help

Is it possible to relate Products and Vendors?

Subscribe

Get notified when there's activity on this post

This question has been flagged
purchaseproductrelatedvendorefficiency
2 Replies
7835 Views
Avatar
Ricardo Gross

Hi,

It is possible that when creating an RFQ and selecting a vendor, the list of products that can be added is limited to products related to that vendor, or if I add first the product I can only choose the vendor(s) related to this product?

Thanks,

Ricardo

3
Avatar
Discard
Chris TRINGHAM

Can you use Supplier Price Lists (product.supplierinfo) for the linkage?

Avatar
Ray Carnes (ray)
Best Answer

Adding this domain to the product_id field on the Request for Quotation Form View will do that:

 ['|',  ('seller_ids.name', '=', parent.partner_id),
        ('seller_ids.name.child_ids', '=', parent.partner_id),
        ('purchase_ok', '=', True)] 
2
Avatar
Discard
Oscar Beltran

Hi Ray, thanks for your great Idea. I try to use your code in V13 last update. It seems that the code is changed a little.

I get this result:

["&","|",["seller_ids.name","=","parent.partner_id"],["seller_ids.name.child_ids","=","parent.partner_id"],["purchase_ok","=",True]]

However, I am doing something wrong, because I do not get any product. Can you please guide. Tks a lot.

Ray Carnes (ray)

Your domain is wrong. I posted an example tested with v13. You are asking Odoo to show you products where (1) the name of one of the Vendors is the same as the Vendor on the PO "and" (2) the name of one of the child records of the Vendors is the same as the Vendor on the PO "or" (3) the product can be purchased. (1) and (2) cannot be true at the same time.

Avatar
Antoine Huvelle (ahu)
Best Answer

Some update for Odoo 16 as the datamodel changed slightly:

domain="[('seller_ids.partner_id','=',parent.partner_id),('purchase_ok', '=', True), '|', ('company_id', '=', False), ('company_id', '=', parent.company_id)]"

Seems to work in terms of limiting the access to only the product sold by this supplier.

1
Avatar
Discard
Gulraiz Raza

Hello Ray & Antoine, hope you are keeping well.
I am new Odoo user, just wanted to say thanks for your help.
I was struggling with this for a long time and finally I got it today :)
I found clues to the problem in both of your answers and that is how it became possible for me. So yeah, thanks once again.

Here I would like to share how I did it! I thought this might be useful for new avid users.

First clue to the problem was knowing that you had to change the field domain code, in this case the product field domain code, Ray was explicit about it, as to where to find it. That was such a great help!!!!! That got me going. Secondly, notice he was also clear that the code had to be ADDED and not changed, (point that I completely missed :) and went about trying to changing the code, good luck with that!!! So, this is something really to watch out)

Time to jump to Antoine's code (because its applicable to current version), he got the code right (Thank you, Antoine) however, he was not explicit like Ray. So knowing that you need to ADD the code as an extension and not changing the already
existing code is the solution.

Finally here is my complete working domain code (the existing plus the Antoine's extension)
domain="[('purchase_ok', '=', True), '|', ('company_id', '=', False), ('company_id', '=', parent.company_id), ('seller_ids.partner_id','=',parent.partner_id),('purchase_ok', '=', True), '|', ('company_id', '=', False), ('company_id', '=', parent.company_id)]"/>

To edit the product form, here is step by step instructions;
>First enable the developers mode
> then go to the RFQ form page
> click on the developer mode mark next to chat
> on the pop up menu look for edit view form and click to open it
> a new window will open
> on the Architecture tab, scroll down to row 90 & 115 where you will find the required field: product_id
> scroll to the right further up the columns up you will find the domain code where it will say (domain=) this is where you copy paste the above code (remember to change on both row 90 and 115) > save and go back to RFQ > its done!

Still learning and hoping to progress! please correct if I am wrong!

Ricardo Gross
Author

Hi Gulraiz, good explanation, but still incomplete, because if for some reason, you have to do an update of the purchase module or a base upgrade, your changes will be lost, so it would be important to add the steps:
- go to settings->technical->views
- open the view "purchase.order.form"
- in developer tools open -> view metadata and by clicking on top (false) change the value of No Update to "true (change)"
so your changes will not be lost in an update

Gulraiz Raza

Yes Ricardo, when I made the change, system did display a message window saying that this change will not last an update, it talked about making the changes in the inherit view but I did not know what to do. So I did what you said, and that makes sense. While I still don't fully appreciate the different views but I think I am beginning to understand some bit :) Thank you so much once again. Good day to all, Later.

Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Sign up
Related Posts Replies Views Activity
Vendor tax access to users in products purchase tab
purchase product vendor taxes
Avatar
Avatar
2
Aug 24
1510
How to apply Vendor discount for specific product in purchase side?
purchase product vendor Discount
Avatar
Avatar
Avatar
2
Dec 23
2548
Vendor Pricelist on Products isn't opening in new window (v14.0)
purchase product vendor pricelist
Avatar
Avatar
2
Mar 21
3441
V13 - How to see the products that a vendor sell to us, from the vendor view. Solved
product vendor
Avatar
Avatar
1
Dec 22
3087
Assign vendor to purchase order (EE 14)
purchase vendor
Avatar
Avatar
1
Dec 22
2829
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now