Skip to Content
Odoo Meniu
  • Autentificare
  • Try it free
  • Aplicații
    Finanțe
    • Contabilitate
    • Facturare
    • Cheltuieli
    • Spreadsheet (BI)
    • Documente
    • Semn
    Vânzări
    • CRM
    • Vânzări
    • POS Shop
    • POS Restaurant
    • Abonamente
    • Închiriere
    Site-uri web
    • Constructor de site-uri
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Lanț Aprovizionare
    • Inventar
    • Producție
    • PLM
    • Achiziție
    • Maintenance
    • Calitate
    Resurse Umane
    • Angajați
    • Recrutare
    • Time Off
    • Evaluări
    • Referințe
    • Flotă
    Marketing
    • Social Marketing
    • Marketing prin email
    • SMS Marketing
    • Evenimente
    • Automatizare marketing
    • Sondaje
    Servicii
    • Proiect
    • Foi de pontaj
    • Servicii de teren
    • Centru de asistență
    • Planificare
    • Programări
    Productivitate
    • Discuss
    • Aprobări
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Aplicații Terțe Odoo Studio Platforma Odoo Cloud
  • Industrii
    Retail
    • Book Store
    • Magazin de îmbrăcăminte
    • Magazin de Mobilă
    • Magazin alimentar
    • Magazin de materiale de construcții
    • Magazin de jucării
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Distribuitor de băuturi
    • Hotel
    Proprietate imobiliara
    • Real Estate Agency
    • Firmă de Arhitectură
    • Construcție
    • Estate Managament
    • Grădinărit
    • Asociația Proprietarilor de Proprietăți
    Consultanta
    • Firma de Contabilitate
    • Partener Odoo
    • Agenție de marketing
    • Law firm
    • Atragere de talente
    • Audit & Certification
    Producție
    • Textil
    • Metal
    • Mobilier
    • Mâncare
    • Brewery
    • Cadouri corporate
    Health & Fitness
    • Club Sportiv
    • Magazin de ochelari
    • Centru de Fitness
    • Wellness Practitioners
    • Farmacie
    • Salon de coafură
    Trades
    • Handyman
    • IT Hardware and Support
    • Asigurare socială de stat
    • Cizmar
    • Servicii de curățenie
    • HVAC Services
    Altele
    • Organizație nonprofit
    • Agenție de Mediu
    • Închiriere panouri publicitare
    • Fotografie
    • Închiriere biciclete
    • Asigurare socială
    Browse all Industries
  • Comunitate
    Învăță
    • Tutorials
    • Documentație
    • Certificări
    • Instruire
    • Blog
    • Podcast
    Empower Education
    • Program Educațional
    • Scale Up! Business Game
    • Visit Odoo
    Obține Software-ul
    • Descărcare
    • Compară Edițiile
    • Lansări
    Colaborați
    • Github
    • Forum
    • Evenimente
    • Translations
    • Devino Partener
    • Services for Partners
    • Înregistrează-ți Firma de Contabilitate
    Obține Servicii
    • Găsește un Partener
    • Găsiți un contabil
    • Meet an advisor
    • Servicii de Implementare
    • Referințe ale clienților
    • Suport
    • Actualizări
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Obține un demo
  • Prețuri
  • Ajutor

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

  • CRM
  • e-Commerce
  • Contabilitate
  • Inventar
  • PoS
  • Proiect
  • MRP
All apps
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
All Posts Oameni Insigne
Etichete (View all)
odoo accounting v14 pos v15
Despre acest forum
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
All Posts Oameni Insigne
Etichete (View all)
odoo accounting v14 pos v15
Despre acest forum
Suport

ImportError: cannot import name 'babel_locale_parse'

Abonare

Primiți o notificare când există activitate la acestă postare

Această întrebare a fost marcată
pythonerrorimporterror_updating12.0
1 Răspunde
9834 Vizualizări
Imagine profil
brendan.l@athenadistribution.com

Hello

During the update from Odoo 12.0 to 12.0, a critical error occurred: ImportError: cannot import name 'babel_locale_parse'

At the end of the update, the website has a 500 error and the backend part reports errors. How to fix this problem when updating all modules? Thank you in advance.


Command used on Debian 9.13

service odoo stop

cd /odoo/odoo12

./odoo-bin -r odoo -d ODOO -u all

mkdir -p /odoo/sources

cd /odoo/sources

git clone https://github.com/odoo/odoo.git -b 12.0

cp -rv odoo /odoo/odoo12

cd /odoo/odoo12

chmod -R 777 ./

chown -R odoo:odoo ./

pip3 install -r requirements.txt

service odoo stop

./odoo-bin -r odoo -d ODOO -u all   # <--- the error this occurs here


Log of error : 

2021-02-26 16:10:04,243 628 INFO ODOO odoo.tools.translate: loading /odoo/odoo12/odoo/addons/web_diagram/i18n/fr.po 

2021-02-26 16:10:04,342 628 CRITICAL ODOO odoo.modules.module: Couldn't load module web_editor 

2021-02-26 16:10:04,342 628 CRITICAL ODOO odoo.modules.module: cannot import name 'babel_locale_parse' 

2021-02-26 16:10:04,347 628 WARNING ODOO odoo.modules.loading: Transient module states were reset 

2021-02-26 16:10:04,349 628 ERROR ODOO odoo.modules.registry: Failed to load registry 

Traceback (most recent call last):

  File "/odoo/odoo12/odoo/modules/registry.py", line 86, in new

    odoo.modules.load_modules(registry._db, force_demo, status, update_module)

  File "/odoo/odoo12/odoo/modules/loading.py", line 419, in load_modules

    force, status, report, loaded_modules, update_module, models_to_check)

  File "/odoo/odoo12/odoo/modules/loading.py", line 315, in load_marked_modules

    perform_checks=perform_checks, models_to_check=models_to_check

  File "/odoo/odoo12/odoo/modules/loading.py", line 181, in load_module_graph

    load_openerp_module(package.name)

  File "/odoo/odoo12/odoo/modules/module.py", line 368, in load_openerp_module

    __import__('odoo.addons.' + module_name)

  File "/odoo/odoo12/odoo/modules/module.py", line 82, in load_module

    exec(open(modfile, 'rb').read(), new_mod.__dict__)

  File "<string>", line 5, in <module>

  File "/odoo/odoo12/odoo/addons/web_editor/models/__init__.py", line 5, in <module>

    from . import ir_qweb

  File "/odoo/odoo12/odoo/addons/web_editor/models/ir_qweb.py", line 35, in <module>

    from odoo.tools.misc import babel_locale_parse

ImportError: cannot import name 'babel_locale_parse'

2021-02-26 16:10:04,351 628 CRITICAL ODOO odoo.service.server: Failed to initialize database `ODOO`. 

Traceback (most recent call last):

  File "/odoo/odoo12/odoo/service/server.py", line 1042, in preload_registries

    registry = Registry.new(dbname, update_module=update_module)

  File "/odoo/odoo12/odoo/modules/registry.py", line 86, in new

    odoo.modules.load_modules(registry._db, force_demo, status, update_module)

  File "/odoo/odoo12/odoo/modules/loading.py", line 419, in load_modules

    force, status, report, loaded_modules, update_module, models_to_check)

  File "/odoo/odoo12/odoo/modules/loading.py", line 315, in load_marked_modules

    perform_checks=perform_checks, models_to_check=models_to_check

  File "/odoo/odoo12/odoo/modules/loading.py", line 181, in load_module_graph

    load_openerp_module(package.name)

  File "/odoo/odoo12/odoo/modules/module.py", line 368, in load_openerp_module

    __import__('odoo.addons.' + module_name)

  File "/odoo/odoo12/odoo/modules/module.py", line 82, in load_module

    exec(open(modfile, 'rb').read(), new_mod.__dict__)

  File "<string>", line 5, in <module>

  File "/odoo/odoo12/odoo/addons/web_editor/models/__init__.py", line 5, in <module>

    from . import ir_qweb

  File "/odoo/odoo12/odoo/addons/web_editor/models/ir_qweb.py", line 35, in <module>

    from odoo.tools.misc import babel_locale_parse

ImportError: cannot import name 'babel_locale_parse'

2021-02-26 16:10:04,358 628 INFO ODOO odoo.modules.loading: loading 1 modules... 



0
Imagine profil
Abandonează
Imagine profil
brendan.l@athenadistribution.com
Autor Cel mai bun răspuns

I found the solution:

replace the command  cp -rv odoo /odoo/odoo12 -> cp -rv odoo/* /odoo/odoo12/

But there is another error

2021-03-01 13:49:23,033 499 CRITICAL ODOO odoo.service.server: Failed to initialize database `ODOO`. 
Traceback (most recent call last):
  File "/odoo/odoo12/odoo/tools/convert.py", line 758, in parse
    self._tags[rec.tag](rec, de, mode=mode)
  File "/odoo/odoo12/odoo/tools/convert.py", line 663, in _tag_record
    record = model.with_context(rec_context)._load_records([data], self.mode == 'update')
  File "/odoo/odoo12/odoo/models.py", line 3881, in _load_records
    data['record']._load_records_write(data['values'])
  File "/odoo/odoo12/odoo/models.py", line 3819, in _load_records_write
    self.write(values)
  File "/odoo/odoo12/addons/mail/models/res_users.py", line 157, in write
    write_res = super(res_groups_mail_channel, self).write(vals)
  File "/odoo/odoo12/odoo/addons/base/models/res_users.py", line 1008, in write
    res = super(GroupsView, self).write(values)
  File "/odoo/odoo12/odoo/addons/base/models/res_users.py", line 940, in write
    self._check_one_user_type()
  File "/odoo/odoo12/odoo/addons/base/models/res_users.py", line 113, in _check_one_user_type
    self.mapped('users')._check_one_user_type()
  File "/odoo/odoo12/addons/account/models/res_users.py", line 25, in _check_one_user_type
    raise ValidationError(_("A user cannot have both Tax B2B and Tax B2C.\n"
odoo.exceptions.ValidationError: ("A user cannot have both Tax B2B and Tax B2C.\nYou should go in General Settings, and choose to display Product Prices\neither in 'Tax-Included' or in 'Tax-Excluded' mode\n(or switch twice the mode if you are already in the desired one).", None)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/odoo/odoo12/odoo/service/server.py", line 1162, in preload_registries
    registry = Registry.new(dbname, update_module=update_module)
  File "/odoo/odoo12/odoo/modules/registry.py", line 86, in new
    odoo.modules.load_modules(registry._db, force_demo, status, update_module)
  File "/odoo/odoo12/odoo/modules/loading.py", line 417, in load_modules
    force, status, report, loaded_modules, update_module, models_to_check)
  File "/odoo/odoo12/odoo/modules/loading.py", line 313, in load_marked_modules
    perform_checks=perform_checks, models_to_check=models_to_check
  File "/odoo/odoo12/odoo/modules/loading.py", line 222, in load_module_graph
    load_data(cr, idref, mode, kind='data', package=package, report=report)
  File "/odoo/odoo12/odoo/modules/loading.py", line 68, in load_data
    tools.convert_file(cr, package.name, filename, idref, mode, noupdate, kind, report)
  File "/odoo/odoo12/odoo/tools/convert.py", line 802, in convert_file
    convert_xml_import(cr, module, fp, idref, mode, noupdate, report)
  File "/odoo/odoo12/odoo/tools/convert.py", line 865, in convert_xml_import
    obj.parse(doc.getroot(), mode=mode)
  File "/odoo/odoo12/odoo/tools/convert.py", line 755, in parse
    self.parse(rec, mode)
  File "/odoo/odoo12/odoo/tools/convert.py", line 764, in parse
    exc_info[2]
  File "/odoo/odoo12/odoo/tools/pycompat.py", line 86, in reraise
    raise value.with_traceback(tb)
  File "/odoo/odoo12/odoo/tools/convert.py", line 758, in parse
    self._tags[rec.tag](rec, de, mode=mode)
  File "/odoo/odoo12/odoo/tools/convert.py", line 663, in _tag_record
    record = model.with_context(rec_context)._load_records([data], self.mode == 'update')
  File "/odoo/odoo12/odoo/models.py", line 3881, in _load_records
    data['record']._load_records_write(data['values'])
  File "/odoo/odoo12/odoo/models.py", line 3819, in _load_records_write
    self.write(values)
  File "/odoo/odoo12/addons/mail/models/res_users.py", line 157, in write
    write_res = super(res_groups_mail_channel, self).write(vals)
  File "/odoo/odoo12/odoo/addons/base/models/res_users.py", line 1008, in write
    res = super(GroupsView, self).write(values)
  File "/odoo/odoo12/odoo/addons/base/models/res_users.py", line 940, in write
    self._check_one_user_type()
  File "/odoo/odoo12/odoo/addons/base/models/res_users.py", line 113, in _check_one_user_type
    self.mapped('users')._check_one_user_type()
  File "/odoo/odoo12/addons/account/models/res_users.py", line 25, in _check_one_user_type
    raise ValidationError(_("A user cannot have both Tax B2B and Tax B2C.\n"
odoo.tools.convert.ParseError: "A user cannot have both Tax B2B and Tax B2C.
You should go in General Settings, and choose to display Product Prices
either in 'Tax-Included' or in 'Tax-Excluded' mode
(or switch twice the mode if you are already in the desired one).
None" while parsing /odoo/odoo12/addons/account/security/account_security.xml:5, near
<record id="group_account_invoice" model="res.groups">
        <field name="name">Billing</field>
        <field name="category_id" ref="base.module_category_accounting_and_finance"/>
        <field name="implied_ids" eval="[(4, ref('base.group_user'))]"/>
    </record>

either :
raise ValidationError(_("A user cannot have both Tax B2B and Tax B2C.\n"
odoo.tools.convert.ParseError: "A user cannot have both Tax B2B and Tax B2C.
You should go in General Settings, and choose to display Product Prices
either in 'Tax-Included' or in 'Tax-Excluded' mode
(or switch twice the mode if you are already in the desired one)

The bug seems to be already known, but no reliable information to help me solve it. 
https://github.com/odoo/odoo/issues/37481

My solution for Mc Giver is to replace the new account module by the old one.

Do you have a real solution to debug the account module?

0
Imagine profil
Abandonează
Enjoying the discussion? Don't just read, join in!

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

Înscrie-te
Related Posts Răspunsuri Vizualizări Activitate
error when starting odoo v12 server
error 12.0
Imagine profil
Imagine profil
3
oct. 20
4104
Cannot import date field Rezolvat
import 12.0
Imagine profil
Imagine profil
1
ian. 20
13053
Odoo12 babel error Rezolvat
error import
Imagine profil
Imagine profil
1
nov. 19
7991
unicode decode error Rezolvat
python error
Imagine profil
Imagine profil
Imagine profil
Imagine profil
4
ian. 24
14759
Bug following a contact import : column res_partner_bank.active doesn't exist
error import
Imagine profil
Imagine profil
1
mar. 15
5253
Comunitate
  • Tutorials
  • Documentație
  • Forum
Open Source
  • Descărcare
  • Github
  • Runbot
  • Translations
Servicii
  • Hosting Odoo.sh
  • Suport
  • Actualizare
  • Custom Developments
  • Educație
  • Găsiți un contabil
  • Găsește un Partener
  • Devino Partener
Despre Noi
  • Compania noastră
  • Active de marcă
  • Contactați-ne
  • Locuri de muncă
  • Evenimente
  • Podcast
  • Blog
  • Clienți
  • Aspecte juridice • Confidențialitate
  • Securitate
الْعَرَبيّة 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 este o suită de aplicații de afaceri open source care acoperă toate nevoile companiei dvs.: CRM, comerț electronic, contabilitate, inventar, punct de vânzare, management de proiect etc.

Propunerea de valoare unică a Odoo este să fie în același timp foarte ușor de utilizat și complet integrat.

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