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

Deleting COA then install inventory causing error

Suscribirse

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

Se marcó esta pregunta
InventoryAccountingCOA
2 Respuestas
2222 Vistas
Avatar
Aryono

Hello Odooers,


When I tried to install Inventory on sh, it fail and error occurs.

After several trial and error on my local build, I found out the cause of that error: delete unused COA's.

I confirmed that on clean build and new database. here are the steps:

1. create new database (v17)

2. install accounting

3. delete all but required COA (I know its required, by the popup when I try to delete it)

4. install inventory/upgrading account


My questions are: 

1. how to delete unused COA's safely?

2. did COA's should not be deleted at all, even on a new database?

3. how to fix the error without abandoning current build/creating new database?


Thank you in advance



2024-06-23 14:53:20,571 4674 ERROR odoodb odoo.modules.registry: Failed to load registry 
Traceback (most recent call last):
  File "/Users/aryono/WebProjects/odoo/odoo/odoo/tools/cache.py", line 99, in lookup
    r = d[key]
        ~^^^^^
  File "", line 2, in __getitem__
  File "/Users/aryono/WebProjects/odoo/odoo/odoo/tools/func.py", line 87, in locked
    return func(inst, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/aryono/WebProjects/odoo/odoo/odoo/tools/lru.py", line 34, in __getitem__
    a = self.d[obj]
        ~~~~~~^^^^^
KeyError: ('ir.model.data', , 'account.1_stock_in')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/Users/aryono/WebProjects/odoo/odoo/odoo/modules/registry.py", line 113, in new
    odoo.modules.load_modules(registry, force_demo, status, update_module)
  File "/Users/aryono/WebProjects/odoo/odoo/odoo/modules/loading.py", line 480, in load_modules
    processed_modules += load_marked_modules(env, graph,
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/aryono/WebProjects/odoo/odoo/odoo/modules/loading.py", line 364, in load_marked_modules
    loaded, processed = load_module_graph(
                        ^^^^^^^^^^^^^^^^^^
  File "/Users/aryono/WebProjects/odoo/odoo/odoo/modules/loading.py", line 245, in load_module_graph
    getattr(py_module, post_init)(env)
  File "/Users/aryono/WebProjects/odoo/odoo/addons/stock_account/__init__.py", line 41, in _configure_journals
    ChartTemplate._post_load_data(template_code, company, template_data)
  File "/Users/aryono/WebProjects/odoo/odoo/addons/stock_account/models/account_chart_template.py", line 26, in _post_load_data
    self.env['ir.property']._set_default(fname, 'product.category', self.ref(value).id, company=company)
                                                                    ^^^^^^^^^^^^^^^
  File "/Users/aryono/WebProjects/odoo/odoo/addons/account/models/chart_template.py", line 1038, in ref
    or self.env.ref(f"account.{self.env.company.parent_ids[0].id}_{xmlid}", raise_if_not_found)
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/aryono/WebProjects/odoo/odoo/odoo/api.py", line 580, in ref
    res_model, res_id = self['ir.model.data']._xmlid_to_res_model_res_id(
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/aryono/WebProjects/odoo/odoo/odoo/addons/base/models/ir_model.py", line 2187, in _xmlid_to_res_model_res_id
    return self._xmlid_lookup(xmlid)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "", line 2, in _xmlid_lookup
  File "/Users/aryono/WebProjects/odoo/odoo/odoo/tools/cache.py", line 104, in lookup
    value = d[key] = self.method(*args, **kwargs)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/aryono/WebProjects/odoo/odoo/odoo/addons/base/models/ir_model.py", line 2180, in _xmlid_lookup
    raise ValueError('External ID not found in the system: %s' % xmlid)
ValueError: External ID not found in the system: account.1_stock_in
2024-06-23 14:53:20,578 4674 INFO odoodb odoo.modules.loading: loading 1 modules...
2024-06-23 14:53:20,583 4674 INFO odoodb odoo.modules.loading: 1 modules loaded in 0.00s, 0 queries (+0 extra)
2024-06-23 14:53:20,588 4674 INFO odoodb odoo.modules.loading: loading 74 modules...
2024-06-23 14:53:20,611 4674 INFO odoodb odoo.modules.loading: 74 modules loaded in 0.02s, 0 queries (+0 extra)
2024-06-23 14:53:20,676 4674 INFO odoodb odoo.modules.loading: Modules loaded.
2024-06-23 14:53:20,678 4674 INFO odoodb odoo.modules.registry: Registry loaded in 0.104s
2024-06-23 14:53:20,679 4674 ERROR odoodb odoo.http: Exception during request handling.
Traceback (most recent call last):
  File "/Users/aryono/WebProjects/odoo/odoo/odoo/tools/cache.py", line 99, in lookup
    r = d[key]
        ~^^^^^
  File "", line 2, in __getitem__
  File "/Users/aryono/WebProjects/odoo/odoo/odoo/tools/func.py", line 87, in locked
    return func(inst, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/aryono/WebProjects/odoo/odoo/odoo/tools/lru.py", line 34, in __getitem__
    a = self.d[obj]
        ~~~~~~^^^^^
KeyError: ('ir.model.data', , 'account.1_stock_in')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/Users/aryono/WebProjects/odoo/odoo/odoo/http.py", line 2189, in __call__
    response = request._serve_db()
               ^^^^^^^^^^^^^^^^^^^
  File "/Users/aryono/WebProjects/odoo/odoo/odoo/http.py", line 1764, in _serve_db
    return service_model.retrying(self._serve_ir_http, self.env)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/aryono/WebProjects/odoo/odoo/odoo/service/model.py", line 133, in retrying
    result = func()
             ^^^^^^
  File "/Users/aryono/WebProjects/odoo/odoo/odoo/http.py", line 1791, in _serve_ir_http
    response = self.dispatcher.dispatch(rule.endpoint, args)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/aryono/WebProjects/odoo/odoo/odoo/http.py", line 1995, in dispatch
    result = self.request.registry['ir.http']._dispatch(endpoint)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/aryono/WebProjects/odoo/odoo/odoo/addons/base/models/ir_http.py", line 222, in _dispatch
    result = endpoint(**request.params)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/aryono/WebProjects/odoo/odoo/odoo/http.py", line 741, in route_wrapper
    result = endpoint(self, *args, **params_ok)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/aryono/WebProjects/odoo/odoo/addons/web/controllers/dataset.py", line 28, in call_button
    action = self._call_kw(model, method, args, kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/aryono/WebProjects/odoo/odoo/addons/web/controllers/dataset.py", line 20, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/aryono/WebProjects/odoo/odoo/odoo/api.py", line 468, in call_kw
    result = _call_kw_multi(method, model, args, kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/aryono/WebProjects/odoo/odoo/odoo/api.py", line 453, in _call_kw_multi
    result = method(recs, *args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "", line 2, in button_immediate_install
  File "/Users/aryono/WebProjects/odoo/odoo/odoo/addons/base/models/ir_module.py", line 75, in check_and_log
    return method(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/aryono/WebProjects/odoo/odoo/odoo/addons/base/models/ir_module.py", line 466, in button_immediate_install
    return self._button_immediate_function(self.env.registry[self._name].button_install)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/aryono/WebProjects/odoo/odoo/odoo/addons/base/models/ir_module.py", line 590, in _button_immediate_function
    registry = modules.registry.Registry.new(self._cr.dbname, update_module=True)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "", line 2, in new
  File "/Users/aryono/WebProjects/odoo/odoo/odoo/tools/func.py", line 87, in locked
    return func(inst, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/aryono/WebProjects/odoo/odoo/odoo/modules/registry.py", line 113, in new
    odoo.modules.load_modules(registry, force_demo, status, update_module)
  File "/Users/aryono/WebProjects/odoo/odoo/odoo/modules/loading.py", line 480, in load_modules
    processed_modules += load_marked_modules(env, graph,
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/aryono/WebProjects/odoo/odoo/odoo/modules/loading.py", line 364, in load_marked_modules
    loaded, processed = load_module_graph(
                        ^^^^^^^^^^^^^^^^^^
  File "/Users/aryono/WebProjects/odoo/odoo/odoo/modules/loading.py", line 245, in load_module_graph
    getattr(py_module, post_init)(env)
  File "/Users/aryono/WebProjects/odoo/odoo/addons/stock_account/__init__.py", line 41, in _configure_journals
    ChartTemplate._post_load_data(template_code, company, template_data)
  File "/Users/aryono/WebProjects/odoo/odoo/addons/stock_account/models/account_chart_template.py", line 26, in _post_load_data
    self.env['ir.property']._set_default(fname, 'product.category', self.ref(value).id, company=company)
                                                                    ^^^^^^^^^^^^^^^
  File "/Users/aryono/WebProjects/odoo/odoo/addons/account/models/chart_template.py", line 1038, in ref
    or self.env.ref(f"account.{self.env.company.parent_ids[0].id}_{xmlid}", raise_if_not_found)
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/aryono/WebProjects/odoo/odoo/odoo/api.py", line 580, in ref
    res_model, res_id = self['ir.model.data']._xmlid_to_res_model_res_id(
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/aryono/WebProjects/odoo/odoo/odoo/addons/base/models/ir_model.py", line 2187, in _xmlid_to_res_model_res_id
    return self._xmlid_lookup(xmlid)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "", line 2, in _xmlid_lookup
  File "/Users/aryono/WebProjects/odoo/odoo/odoo/tools/cache.py", line 104, in lookup
    value = d[key] = self.method(*args, **kwargs)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/aryono/WebProjects/odoo/odoo/odoo/addons/base/models/ir_model.py", line 2180, in _xmlid_lookup
    raise ValueError('External ID not found in the system: %s' % xmlid)
ValueError: External ID not found in the system: account.1_stock_in
2024-06-23 14:53:20,680 4674 INFO odoodb werkzeug: 127.0.0.1 - - [23/Jun/2024 14:53:20] "POST /web/dataset/call_button HTTP/1.1" 200 - 8919 1.876 1.893
2024-06-23 14:53:37,801 4674 INFO odoodb odoo.addons.base.models.ir_cron: Starting job `Procurement: run scheduler`.
2024-06-23 14:53:37,809 4674 ERROR odoodb odoo.addons.base.models.ir_cron: Call from cron Procurement: run scheduler for server action #349 failed in Job #28
Traceback (most recent call last):
  File "/Users/aryono/WebProjects/odoo/odoo/odoo/addons/base/models/ir_cron.py", line 393, in _callback
    self.env['ir.actions.server'].browse(server_action_id).run()
  File "/Users/aryono/WebProjects/odoo/odoo/odoo/addons/base/models/ir_actions.py", line 917, in run
    self.env[model_name].check_access_rights("write")
    ~~~~~~~~^^^^^^^^^^^^
  File "/Users/aryono/WebProjects/odoo/odoo/odoo/api.py", line 534, in __getitem__
    return self.registry[model_name](self, (), ())
           ~~~~~~~~~~~~~^^^^^^^^^^^^
  File "/Users/aryono/WebProjects/odoo/odoo/odoo/modules/registry.py", line 213, in __getitem__
    return self.models[model_name]
           ~~~~~~~~~~~^^^^^^^^^^^^
KeyError: 'procurement.group'
0
Avatar
Descartar
Hemangi Rupareliya(rupareliyahemangi145@gmail.com)

Hello Aryono,

Did you find any solution for this? I am facing same error when installing POS module after installing CRM module.

Lars Aam

Just a guess: When you install Inventory it creates Product categories where there are default accounts for income and expense. The accounts depends on your fiscal localization.
If you deleted these, it might be the reason for the error. Strange that the error message mention key error as 'procurement.group'. There is no direct relation to product categories from that model, but relations to manufacturing and stock moves. That might be the reason behind. Stock moves create accounting entries, and the account come from Product categories.

A safer way to put accounts you do not need out of use, is to flag as 'Deprecated'. It is recommended.

Avatar
Aryono
Autor Mejor respuesta

ok, posted, here is the link

https://github.com/odoo/odoo/issues/170471

0
Avatar
Descartar
Aryono
Autor

Hi Hemangi Rupareliya,
as my project not live yet, I really considering nuking everything and starts over

Hi Lars Aam, thank you for answering.
ok, from now on, I will mark unused COAs to deprecated.
Would be nice if Odoo fix this and give warning for unsafe COA deletion.

Avatar
Niyas Raphy (Walnut Software Solutions)
Mejor respuesta

Hi,
Can you report the same with detailed steps to reproduce in: https://github.com/odoo/odoo/issues  so that odoo can look into it and fix it.

Thanks

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
Switch COA in running company Resuelto
Accounting COA
Avatar
Avatar
2
nov 24
1496
Inventory Adjustments in Loss Account Resuelto
Inventory Accounting
Avatar
Avatar
Avatar
11
feb 23
10975
Automatic expense of inventory items when moved to another internal location Resuelto
Inventory Accounting Automation COGS
Avatar
Avatar
Avatar
3
ago 24
3226
Quant's editing is restricted, you can't do this operation.
Inventory
Avatar
Avatar
Avatar
2
nov 25
425
How to attach specific locations to products
Inventory
Avatar
Avatar
Avatar
2
ago 25
1438
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.

Sitio web hecho con

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