Ir al contenido
Odoo Menú
  • Iniciar sesión
  • Pruébalo gratis
  • Aplicaciones
    Finanzas
    • Contabilidad
    • Facturación
    • Gastos
    • Hoja de cálculo (BI)
    • Documentos
    • Firma electrónica
    Ventas
    • CRM
    • Ventas
    • PdV para tiendas
    • PdV para restaurantes
    • Suscripciones
    • Alquiler
    Sitios web
    • Creador de sitios web
    • Comercio electrónico
    • Blog
    • Foro
    • Chat en vivo
    • eLearning
    Cadena de suministro
    • Inventario
    • Manufactura
    • PLM
    • Compras
    • Mantenimiento
    • Calidad
    Recursos humanos
    • Empleados
    • Reclutamiento
    • Vacaciones
    • Evaluaciones
    • Referencias
    • Flotilla
    Marketing
    • Redes sociales
    • Marketing por correo
    • Marketing por SMS
    • Eventos
    • Automatización de marketing
    • Encuestas
    Servicios
    • Proyectos
    • Registro de horas
    • Servicio externo
    • Soporte al cliente
    • Planeación
    • Citas
    Productividad
    • Conversaciones
    • Aprobaciones
    • IoT
    • VoIP
    • Artículos
    • WhatsApp
    Aplicaciones externas Studio de Odoo Plataforma de Odoo en la nube
  • Industrias
    Venta minorista
    • Librería
    • Tienda de ropa
    • Mueblería
    • Tienda de abarrotes
    • Ferretería
    • Juguetería
    Alimentos y hospitalidad
    • Bar y pub
    • Restaurante
    • Comida rápida
    • Casa de huéspedes
    • Distribuidora de bebidas
    • Hotel
    Bienes inmuebles
    • Agencia inmobiliaria
    • Estudio de arquitectura
    • Construcción
    • Gestión de bienes inmuebles
    • Jardinería
    • Asociación de propietarios
    Consultoría
    • Firma contable
    • Partner de Odoo
    • Agencia de marketing
    • Bufete de abogados
    • Adquisición de talentos
    • Auditorías y certificaciones
    Manufactura
    • Textil
    • Metal
    • Muebles
    • Comida
    • Cervecería
    • Regalos corporativos
    Salud y ejercicio
    • Club deportivo
    • Óptica
    • Gimnasio
    • Especialistas en bienestar
    • Farmacia
    • Peluquería
    Trades
    • Personal de mantenimiento
    • Hardware y soporte de TI
    • Sistemas de energía solar
    • Zapateros y fabricantes de calzado
    • Servicios de limpieza
    • Servicios de calefacción, ventilación y aire acondicionado
    Otros
    • Organización sin fines de lucro
    • Agencia para la protección del medio ambiente
    • Alquiler de anuncios publicitarios
    • Fotografía
    • Alquiler de bicicletas
    • Distribuidor de software
    Descubre todas las industrias
  • Odoo Community
    Aprende
    • Tutoriales
    • Documentación
    • Certificaciones
    • Capacitación
    • Blog
    • Podcast
    Fortalece la educación
    • Programa educativo
    • Scale Up! El juego empresarial
    • Visita Odoo
    Obtén el software
    • Descargar
    • Compara ediciones
    • Versiones
    Colabora
    • GitHub
    • Foro
    • Eventos
    • Traducciones
    • Conviértete en partner
    • Servicios para partners
    • Registra tu firma contable
    Obtén servicios
    • Encuentra un partner
    • Encuentra un contador
    • Contacta a un consultor
    • Servicios de implementación
    • Referencias de clientes
    • Soporte
    • Actualizaciones
    GitHub YouTube Twitter LinkedIn Instagram Facebook Spotify
    +1 (650) 691-3277
    Solicita una demostración
  • Precios
  • Ayuda

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

  • CRM
  • e-Commerce
  • Contabilidad
  • Inventario
  • PoS
  • Proyectos
  • MRP
All apps
Debe estar registrado para interactuar con la comunidad.
Todas las publicaciones Personas Insignias
Etiquetas (Ver todo)
odoo accounting v14 pos v15
Acerca de este foro
Debe estar registrado para interactuar con la comunidad.
Todas las publicaciones Personas Insignias
Etiquetas (Ver todo)
odoo accounting v14 pos v15
Acerca de este foro
Ayuda

ImportError: cannot import name 'babel_locale_parse'

Suscribirse

Reciba una notificación cuando haya actividad en esta publicación

Se marcó esta pregunta
pythonerrorimporterror_updating12.0
1 Responder
9851 Vistas
Avatar
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
Avatar
Descartar
Avatar
brendan.l@athenadistribution.com
Autor Mejor respuesta

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
Avatar
Descartar
¿Le interesa esta conversación? ¡Participe en ella!

Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.

Registrarse
Publicaciones relacionadas Respuestas Vistas Actividad
error when starting odoo v12 server
error 12.0
Avatar
Avatar
3
oct 20
4129
Cannot import date field Resuelto
import 12.0
Avatar
Avatar
1
ene 20
13072
Odoo12 babel error Resuelto
error import
Avatar
Avatar
1
nov 19
8019
unicode decode error Resuelto
python error
Avatar
Avatar
Avatar
Avatar
4
ene 24
14765
Bug following a contact import : column res_partner_bank.active doesn't exist
error import
Avatar
Avatar
1
mar 15
5253
Comunidad
  • Tutoriales
  • Documentación
  • Foro
Código abierto
  • Descargar
  • GitHub
  • Runbot
  • Traducciones
Servicios
  • Alojamiento en Odoo.sh
  • Soporte
  • Actualizaciones del software
  • Desarrollos personalizados
  • Educación
  • Encuentra un contador
  • Encuentra un partner
  • Conviértete en partner
Sobre nosotros
  • Nuestra empresa
  • Activos de marca
  • Contáctanos
  • Empleos
  • Eventos
  • Podcast
  • Blog
  • Clientes
  • Legal • Privacidad
  • Seguridad
الْعَرَبيّة 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 es un conjunto de aplicaciones de código abierto que cubren todas las necesidades de tu empresa: CRM, comercio electrónico, contabilidad, inventario, punto de venta, gestión de proyectos, etc.

La propuesta única de valor de Odoo es ser muy fácil de usar y estar totalmente integrado.

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