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

ON CONFLICT DO UPDATE problem

Subscribe

Get notified when there's activity on this post

This question has been flagged
translationodoo12
4 Replies
32551 Views
Avatar
Ibrahim Boudmir

Hi, 

Trying to import translation in Odoo 12, i get the following error : 

ERROR: ON CONFLICT DO UPDATE command cannot affect row a second time
HINT: Ensure that no rows proposed for insertion within the same command have duplicate constrained
values.

i did some research and found out that postgres included On Conflict to 'Upsert' a record. 
That is to say : when you insert a new row into the table, PostgreSQL will update the row if it already exists, otherwise, PostgreSQL inserts the new row. 

See http://www.postgresqltutorial.com/postgresql-upsert/ for more details. 

In my case, what should i do so that i can import translation successfully ?

Thank you.

3
Avatar
Discard
Ray Carnes (ray)

Did you check that you aren't trying to translate the same thing twice in the same import file?

faOtools

I experience the same issue if the option 'Overwrite existing terms' is turned on. It seems that the bug https://github.com/odoo/odoo/issues/27268 is not fully fixed

Ibrahim Boudmir
Author

Hi @Ray,

Yes, i'm not translating the same thing twice in the same import file.

@Odoo Tools,

Thanks for the link. Altough in moylop260's scenario, ``Overwrite existing terms`` is not checked.

In my example, it is indeed checked and get the same problem.

Avatar
Ibrahim Boudmir
Author Best Answer

I found out that in the po file, a word was translated twice as Ray said. had to look carefully for each line to get the wrong one.

0
Avatar
Discard
Pratik Devmurari

Okay, how we can find duplicates? I have more than 3000 translation terms.

Avatar
RAJAONARIVONY Rivo Lalaina
Best Answer

@Ibrahim Boudmir

To check for duplicate lines in your .po file, you can use Poedit https://poedit.net/, which will alert you directly if there are any duplicates.

0
Avatar
Discard
Avatar
marocsys
Best Answer

hi @ibrahim

i had the same issue , its because i installed a module version 11 in 12 version , if it's your case try to adapt your file lang.po  with version 12

0
Avatar
Discard
Avatar
Samo Arko
Best Answer

Did you figure out how to fix it? I've updated odoo 12 to latest version. The 2 modules that I've migrated from odoo 10, I've exported the translation form odoo 12 and replaced the translation files in models.

But I still get the error when I want to add the language with override terms.


0
Avatar
Discard
Samo Arko

after that you cloud just run load translation with option Overwrite existing terms or did you have to remove the module first? Thanks

Ibrahim Boudmir
Author

overwrite existing terms won't delete redundant translations from your po file.

you need to figure out what translation is declared twice or more in it.

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
Cannot Overwrite Existing Terms in loading translation. Get error ON CONFLICT DO UPDATE. Solved
translation odoo12
Avatar
Avatar
2
Jul 20
5953
Translations for the top menu URL's
translation
Avatar
0
Dec 24
2292
downloading the po file
translation
Avatar
Avatar
Avatar
2
Feb 24
3745
Odoo Mail Sending Limit Solved
odoo12
Avatar
Avatar
Avatar
2
Dec 23
16879
Language translation through .po file
translation
Avatar
Avatar
Avatar
Avatar
4
Nov 23
4992
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