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
    • Artificial Intelligence
    • 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
    • Property 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
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

Vendor pricelists: Wrong value adding new column "product_code"

Subscribe

Get notified when there's activity on this post

This question has been flagged
product_codepricelistsrelated_fieldsprovidervendorPricelist
1 Reply
1878 Views
Avatar
Patricia Díaz

Hello,


I am trying to add a new related field in the "Vendor pricelist" list. The related field is the "product_code" which is stored in database in the table product_supplierinfo as "product_code" for each product variant.


My issue is that when I loaded the "product_id.seller_ids.product_code" field, what I am getting is the same product_code value for all product variants, regardless the provider line.

I mean, I have two different providers, with two different product_code for the same product and when I get this related field, it is getting the same product_code for both providers, which is incorrect and I have checked in the database that both have different codes for all products.

Also, I have checked it inside the providers products view, where the field value is correct.


So clearly I am not getting the correct related field or it is not working as it should. Which field should I get to show the correct product_code for each product and for each provider in the vendor pricelists list?


Thanks a lot!


Note: Odoo v16

0
Avatar
Discard
Altela

hi, did you tried to loop through seller_ids and access the product_code.product_id.name instead? if it's successfully, try to change the .name into something you want to grab. Or perhaps could you please share the code for better analysis? thank you

Avatar
Patricia Díaz
Author Best Answer

Hi Altela,

Thanks for your help.

I am doing this in the graphic editor studio (domain.odoo.com/web#action=studio&mode=editor&_action=169&_view_type=list&_tab=views&menu_id=334&cids=1) so I can not share with you any code. If there is a way to do this by code, I will appreciate your help if you tell me how should I do it.

In the related field generated, this is the code generated for the field: product_id.seller_ids.product_code. I tried to get the field by many ways, but always getting the same result (same product_code for different vendors and even same product_code for different variants).

Thanks and regards!

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
Tiered discounts Solved
pricelists
Avatar
Avatar
1
Apr 25
2672
Missing Advanced & Multiple Pricelist functions Solved
pricelists
Avatar
Avatar
1
Nov 24
3074
CODIGOS QR
product_code
Avatar
Avatar
1
Jan 24
2661
Assign pricelists to a group of customers Solved
pricelists
Avatar
Avatar
1
Mar 24
4704
odoo 13 related field to a custom field not working
related_fields
Avatar
Avatar
2
Apr 23
7805
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 Svenska ภาษาไทย 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