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

Pre-selecting products in orders depending on customer ...

Subscribe

Get notified when there's activity on this post

This question has been flagged
productorder
3 Replies
2774 Views
Avatar
Reto Schmid

Hi all


I offer products (e.g. "computing course") to various customers (e.g. "school XY").

These products are customer-specific (e.g. "computing course" for "school XY").


When looking the the proper product on the oder line, odoo should list only the products relevant for the respective customer.


I've tried / thought about the following:

Approach

Comment

Drawback

Adding a prefix to the product name reflecting the customer name.


This prefix is shown on the order  too. This "concatenated product name" is not in line with the product name the customers expects.

Entering the customer name in the field "internal reference" of the product.

That seems to work.

However, it seems to add the "internal reference" to the order which is not in line with the product description the customers expects.

Creating order templates per customer with all the products for this very customer.

By design, odoo adds all the products from the selected template.

Every time I have to manually remove the product line, which is not needed in tha particular sales order.

Moreover, trying to add later on a product - that I removed earlier - leads me again in the position of finding products of other customers. This is what I tried to avoid to begin with.

Do you have an idea how to "pre-select" the subset of relevant products in the product selection field of the oder line?


Thanks a lot

1
Avatar
Discard
Avatar
Chris TRINGHAM
Best Answer

It's simple to do in Odoo Studio if you have that installed:

1. Add a many2many field on products for a list of customers who will buy the product

2. Add this field to the domain for the product code, something like this


["&", ("sale_ok", "=", True), ("x_studio_customer", "=", parent.partner_id)]

More information: Adding fields using Odoo Studio - please me know if you need more details on this!

Or the same could be achieved by manually adding the field and displaying it in the Form View.  

0
Avatar
Discard
Reto Schmid
Author

Hi Chris
Many thanks for your support. I'm very new to odoo. I've installed Studio now and went through the respective documentation and videos.

Reto Schmid
Author

I added a new tab to customer called "CU related product" (CU stands for "customization").
I added the many2many field called "CU product of customer".
This part seems to work. I can add / reference products for a specific customer.

I don't understand your comment "add this field to the domain". Can you give me one more hint?

Now, I would like to make sure in my "sales order" to make this new field "CU related product" available in my "product search" in my "sales order -> line item".
This is where I get stuck. Even trying to add this field "CU related product" to "user defined search" does not work, because my new field "CU related product" is not available.

Can you please give me some more hints?

Thank you very much for your support
Reto

Chris TRINGHAM

I added an example above - the domain is matching the customer on the product with the customer on the sales order. This probably isn't exactlly what you want, but maybe it helps.

Reto Schmid
Author

Thanks again!!!!
I believe this is exactly what I'm looking for.
However, entering below code in the field "domain" of "product" in "order lines", I'm getting the error message "This domain is not supported".

Do you have an idea what is wrong with "my" code? I also tried out various alternatives with " and '. It did not help. The name of my new attribute is 'CU_product_of_partner' (I changed it compared to my orignal message, since I thought odoo doesn't like spaces in names).

Thank you once more. Thank you for your valuable time and expertise. I really appreciate this a lot!!!

========================

<data>
  <xpath expr="//field[@name='product_template_id']" position="attributes">
    <attribute name="domain">["&amp;", ("sale_ok", "=", True), ("CU_product_of_partner", "=", parent.partner_id)]</attribute>
  </xpath>
</data>
["&", ("sale_ok", "=", True), ("CU_product_of_partner", "=", parent.partner_id)]

========================

I also tried this option. However, I got the same error message:
<data>
  <xpath expr="//field[@name='product_template_id']" position="attributes">
    <attribute name="CU_product_of_partner">["&amp;", ("sale_ok", "=", True), ("CU_product_of_partner", "=", parent.partner_id)]</attribute>
  </xpath>
</data>
["&", ("sale_ok", "=", True), ("CU_product_of_partner", "=", parent.partner_id)]

Chris TRINGHAM

If you are using Studio, the field name should be something like x_studio_cu_product_of_partner. This is a field on product.product / product.template that contains the customer for a product.

Avatar
Reto Schmid
Author Best Answer

Thanks for your thoughts.


The functionality looks promising.


However ... correct me, if I'm wrong:

  • It's not available for "odoo online"; and I am on "odoo online".
  • It's available for odoo V 16.0 but not V 17.0; which I guess is not an issue, right?


Regards

Reto

0
Avatar
Discard
Avatar
Cybrosys Techno Solutions Pvt.Ltd
Best Answer

Hi,
Please go through our blog 'Product Recommendations in Sales Order'

https://www.cybrosys.com/blog/product-recommendation-in-sales-order-odoo-app

Try this app,

https://apps.odoo.com/apps/modules/13.0/product_recommendation_in_sales_order/


Hope it helps

0
Avatar
Discard
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
What field activates the "order grid entry" option in a product ?
product order grid
Avatar
1
Dec 23
2491
How to define order units for products? Solved
product order unit
Avatar
Avatar
Avatar
Avatar
3
Oct 21
10228
[Sales App] add automatically a product B if product A is added to order
sales product order
Avatar
Avatar
Avatar
3
Aug 20
5095
Sales order line pop-up Solved
sales product order
Avatar
Avatar
Avatar
Avatar
5
Oct 19
9871
How to disable product autocomplete?
product
Avatar
Avatar
Avatar
2
Sep 25
874
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