Se rendre au contenu
Odoo Menu
  • Se connecter
  • Essai gratuit
  • Applications
    Finance
    • Comptabilité
    • Facturation
    • Notes de frais
    • Feuilles de calcul (BI)
    • Documents
    • Signature
    Ventes
    • CRM
    • Ventes
    • PdV Boutique
    • PdV Restaurant
    • Abonnements
    • Location
    Sites web
    • Site Web
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Chaîne d'approvisionnement
    • Inventaire
    • Fabrication
    • PLM
    • Achats
    • Maintenance
    • Qualité
    Ressources Humaines
    • Employés
    • Recrutement
    • Congés
    • Évaluations
    • Recommandations
    • Parc automobile
    Marketing
    • Marketing Social
    • E-mail Marketing
    • SMS Marketing
    • Événements
    • Marketing Automation
    • Sondages
    Services
    • Projet
    • Feuilles de temps
    • Services sur Site
    • Assistance
    • Planification
    • Rendez-vous
    Productivité
    • Discussion
    • Validations
    • Internet des Objets
    • VoIP
    • Connaissances
    • WhatsApp
    Applications tierces Odoo Studio Plateforme Cloud d'Odoo
  • Industries
    Commerce de détail
    • Librairie
    • Magasin de vêtements
    • Magasin de meubles
    • Épicerie
    • Quincaillerie
    • Magasin de jouets
    Food & Hospitality
    • Bar et Pub
    • Restaurant
    • Fast-food
    • Maison d’hôtes
    • Distributeur de boissons
    • Hôtel
    Immobilier
    • Agence immobilière
    • Cabinet d'architecture
    • Construction
    • Gestion immobilière
    • Jardinage
    • Association de copropriétaires
    Consultance
    • Cabinet d'expertise comptable
    • Partenaire Odoo
    • Agence Marketing
    • Cabinet d'avocats
    • Aquisition de talents
    • Audit & Certification
    Fabrication
    • Textile
    • Métal
    • Meubles
    • Alimentation
    • Brewery
    • Cadeaux d'entreprise
    Santé & Fitness
    • Club de sports
    • Opticien
    • Salle de fitness
    • Praticiens bien-être
    • Pharmacie
    • Salon de coiffure
    Trades
    • Bricoleur
    • Matériel informatique et support
    • Systèmes photovoltaïques
    • Cordonnier
    • Services de nettoyage
    • Services CVC
    Autres
    • Organisation à but non lucratif
    • Agence environnementale
    • Location de panneaux d'affichage
    • Photographie
    • Leasing de vélos
    • Revendeur de logiciel
    Browse all Industries
  • Communauté
    Apprenez
    • Tutoriels
    • Documentation
    • Certifications
    • Formation
    • Blog
    • Podcast
    Renforcer l'éducation
    • Programme éducatif
    • Business Game Scale-Up!
    • Rendez-nous visite
    Obtenir le logiciel
    • Téléchargement
    • Comparez les éditions
    • Versions
    Collaborer
    • Github
    • Forum
    • Événements
    • Traductions
    • Devenez partenaire
    • Services for Partners
    • Enregistrer votre cabinet comptable
    Nos Services
    • Trouver un partenaire
    • Trouver un comptable
    • Rencontrer un conseiller
    • Services de mise en œuvre
    • Références clients
    • Assistance
    • Mises à niveau
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Obtenir une démonstration
  • Tarification
  • Aide

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

  • CRM
  • e-Commerce
  • Comptabilité
  • Inventaire
  • PoS
  • Projet
  • MRP
All apps
Vous devez être inscrit pour interagir avec la communauté.
Toutes les publications Personnes Badges
Étiquettes (Voir toutl)
odoo accounting v14 pos v15
À propos de ce forum
Vous devez être inscrit pour interagir avec la communauté.
Toutes les publications Personnes Badges
Étiquettes (Voir toutl)
odoo accounting v14 pos v15
À propos de ce forum
Aide

Deleting COA then install inventory causing error

S'inscrire

Recevez une notification lorsqu'il y a de l'activité sur ce poste

Cette question a été signalée
InventoryAccountingCOA
2 Réponses
2195 Vues
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
Ignorer
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
Auteur Meilleure réponse

ok, posted, here is the link

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

0
Avatar
Ignorer
Aryono
Auteur

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)
Meilleure réponse

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
Ignorer
Vous appréciez la discussion ? Ne vous contentez pas de lire, rejoignez-nous !

Créez un compte dès aujourd'hui pour profiter de fonctionnalités exclusives et échanger avec notre formidable communauté !

S'inscrire
Publications associées Réponses Vues Activité
Switch COA in running company Résolu
Accounting COA
Avatar
Avatar
2
nov. 24
1484
Inventory Adjustments in Loss Account Résolu
Inventory Accounting
Avatar
Avatar
Avatar
11
févr. 23
10954
Automatic expense of inventory items when moved to another internal location Résolu
Inventory Accounting Automation COGS
Avatar
Avatar
Avatar
3
août 24
3195
Quant's editing is restricted, you can't do this operation.
Inventory
Avatar
Avatar
Avatar
2
nov. 25
379
How to attach specific locations to products
Inventory
Avatar
Avatar
Avatar
2
août 25
1400
Communauté
  • Tutoriels
  • Documentation
  • Forum
Open Source
  • Téléchargement
  • Github
  • Runbot
  • Traductions
Services
  • Hébergement Odoo.sh
  • Assistance
  • Migration
  • Développements personnalisés
  • Éducation
  • Trouver un comptable
  • Trouver un partenaire
  • Devenez partenaire
À propos
  • Notre société
  • Actifs de la marque
  • Contactez-nous
  • Emplois
  • Événements
  • Podcast
  • Blog
  • Clients
  • Informations légales • Confidentialité
  • Sécurité.
الْعَرَبيّة 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 est une suite d'applications open source couvrant tous les besoins de votre entreprise : CRM, eCommerce, Comptabilité, Inventaire, Point de Vente, Gestion de Projet, etc.

Le positionnement unique d'Odoo est d'être à la fois très facile à utiliser et totalement intégré.

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