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

Odoo 16 NOT WORKING

Subscribe

Get notified when there's activity on this post

This question has been flagged
odoo16features
4 Replies
17664 Views
Avatar
426 SRL
Hi, 

just wanted to try out odoo16. When installing modules like sale or product I get this error:
psycopg2.errors.UndefinedFunction: function jsonb_path_query_array(jsonb, unknown) does not exist LINE 1: ...ate_name_index" ON "product_template" USING gin ((jsonb_path... ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts.

Im using PostgreSQL 10.0, which is supported according to the documentation.



Thank you!

1
Avatar
Discard
Ray Carnes (ray)

Can you tell me where you see PostgreSQL 10.0 is supported for Odoo 16?

Our install documentation shows that only versions 12.0 and later are supported.

https://www.odoo.com/documentation/16.0/administration/install/install.html#postgresql

Avatar
Quentin Tawry
Best Answer

Hi, I had the same issue so I checked on postgresql documentation and the function "jsonb_path_query_array" is not available before postgres 12. I upgraded to postgresql 12 and it worked for me.

Hope it will help you

4
Avatar
Discard
Hedaia Hamed

Hello Quentin,
i tried to upgrade postgresql but failed , can you provide doc to updgrade

Quentin Tawry

Hello Hedaia,
Here is the guide I followed:

A) First create a backup of all the databases for that (You can continue from B if you dont need a backup)

Log in as postgres user
sudo su postgres
Create a backup .sql file for all the data you have in all the databases
pg_dumpall > backup.sql
B) Upgrade to PostgreSQL12

update packages and install postgres 12
sudo apt-get update
sudo apt-get install postgresql-12 postgresql-server-dev-12
Stop the postgresql service
sudo systemctl stop postgresql.service
migrate the data
/usr/lib/postgresql/12/bin/pg_upgrade \
--old-datadir=/var/lib/postgresql/10/main \
--new-datadir=/var/lib/postgresql/12/main \
--old-bindir=/usr/lib/postgresql/10/bin \
--new-bindir=/usr/lib/postgresql/12/bin \
--old-options '-c config_file=/etc/postgresql/10/main/postgresql.conf' \
--new-options '-c config_file=/etc/postgresql/12/main/postgresql.conf'
Switch to regular user
exit
Swap the ports the old and new postgres versions.
#change port to 5432
sudo vim /etc/postgresql/12/main/postgresql.conf
#change port to 5433
sudo vim /etc/postgresql/10/main/postgresql.conf
Start the postgresql service
sudo systemctl start postgresql.service
Log in as postgres user
sudo su postgres
Check your new postgres version
psql -c "SELECT version();"
Run the generated new cluster script
./analyze_new_cluster.sh
Return as a normal(default user) user and cleanup up the old version's mess
#uninstalls postgres packages
sudo apt-get remove postgresql-10 postgresql-server-dev-10
#removes the old postgresql directory
sudo rm -rf /etc/postgresql/10/
#login as postgres user
sudo su postgres
#delete the old cluster data
./delete_old_cluster.sh
Congrads! Your postgresql version is now upgraded, If everything works well in B, we dont have to apply the backup as we have already migrated the data from the older version to the newer version, the backup is just in case if anything goes wrong.
NOTE: Change the postgresql.conf and pg_hba.conf as per your requirement

source : https://stackoverflow.com/questions/60409585/how-to-upgrade-postgresql-database-from-10-to-12-without-losing-data-for-openpro

Avatar
Mehjabin Farsana
Best Answer

Hi,

You have to use postgresql 12 or above for odoo 16. If you are using lower version you will receive this error.


Thanks

2
Avatar
Discard
426 SRL
Author

I have odoo 16.0 in my docker file

Jakub Sedinar

then Andreas, you need to build new image locally with newer version.

Avatar
Giovanni Frino
Best Answer

I run into the same problem with the exact same specifications. Postgres 10 and Odoo 16.0

2
Avatar
Discard
Avatar
Nivas M
Best Answer

I faced the same above issue in odoo16 in ubuntu18.4 after installing postgresql12. And I tried this steps and odoo16 is working fine now.

Step 1) Go to odoo -> modules -> registry.py file and command the below lines

# if field.translate:
# column_expression = f'''(jsonb_path_query_array({column_expression}, '$.*')::text)'''

Step 2) replace the below line with existing expression and method variables.

expression = f'{column_expression}'

method = 'btree'

It will work now.

1
Avatar
Discard
Niyas Raphy (Walnut Software Solutions)

the case is that, you may have multiple postgres version in your machine and odoo is still running with older postgres version.

when you are having multiple postgres, adjust the db_port in odoo conf file to take the correct postgres version, you can try with db_port=5433 or 5434

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
DeprecationWarning: The longpolling-port is a deprecated alias to the gevent-port option, please use the latter Solved
odoo16features
Avatar
Avatar
Avatar
Avatar
Avatar
5
Sep 25
25487
How to Add wizard under print button inside the form view.
odoo16features
Avatar
Avatar
Avatar
Avatar
3
Aug 25
3878
How to add @api.onchange in _get_view() method odoo 16
odoo16features
Avatar
Avatar
1
May 25
3779
get all partners which are internal users or portal users odoo16
odoo16features
Avatar
Avatar
1
Apr 25
4621
How to add decoration color green with bold to a record with a single conditon
odoo16features
Avatar
Avatar
1
Apr 25
5441
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