Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nonexistent reference stock.picking_type_in #730

Closed
yelizariev opened this issue Jun 23, 2014 · 3 comments
Closed

nonexistent reference stock.picking_type_in #730

yelizariev opened this issue Jun 23, 2014 · 3 comments

Comments

@yelizariev
Copy link
Contributor

There are references to stock.picking_type_in:

https://github.com/odoo/odoo/blob/master/addons/purchase/purchase.py

def _get_picking_in(self, cr, uid, context=None):
    obj_data = self.pool.get('ir.model.data')
    return obj_data.get_object_reference(cr, uid, 'stock','picking_type_in') and  obj_data.get_object_reference(cr, uid, 'stock','picking_type_in')[1] or False

WHILE it was removed in this commit
27f2eb5#diff-5dadf604db43a956b59e485e17ed4ac1

So, I have error when update database to the latest odoo version:

    2014-06-23 13:04:17,480 14358 CRITICAL LOCAL openerp.service.server: Failed to initialize database `LOCAL`.
   Traceback (most recent call last):
  File "/mnt/files/src/odoo/openerp/service/server.py", line 901, in preload_registries
    registry = RegistryManager.new(dbname, update_module=update_module)
  File "/mnt/files/src/odoo/openerp/modules/registry.py", line 299, in new
    openerp.modules.load_modules(registry._db, force_demo, status, update_module)
  File "/mnt/files/src/odoo/openerp/modules/loading.py", line 351, in load_modules
    force, status, report, loaded_modules, update_module)
  File "/mnt/files/src/odoo/openerp/modules/loading.py", line 259, in load_marked_modules
    loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks)
  File "/mnt/files/src/odoo/openerp/modules/loading.py", line 162, in load_module_graph
    init_module_models(cr, package.name, models)
  File "/mnt/files/src/odoo/openerp/modules/module.py", line 271, in init_module_models
    result = obj._auto_init(cr, {'module': module_name})
  File "/mnt/files/src/odoo/openerp/osv/orm.py", line 2925, in _auto_init
    default = self._defaults[k](self, cr, SUPERUSER_ID, context)
  File "/mnt/files/src/odoo/addons/purchase/purchase.py", line 151, in _get_picking_in
    return obj_data.get_object_reference(cr, uid, 'stock','picking_type_in') and obj_data.get_object_reference(cr, uid, 'stock','picking_type_in')[1] or False
  File "/mnt/files/src/odoo/openerp/addons/base/ir/ir_model.py", line 911, in get_object_reference
    return self.xmlid_lookup(cr, uid, "%s.%s" % (module, xml_id))[1:3]
  File "/mnt/files/src/odoo/openerp/tools/cache.py", line 21, in lookup
    r = self.lookup(self2, cr, *args, **argv)
  File "/mnt/files/src/odoo/openerp/tools/cache.py", line 49, in lookup
    value = d[key] = self.method(self2, cr, *args)
  File "/mnt/files/src/odoo/openerp/addons/base/ir/ir_model.py", line 873, in xmlid_lookup
    raise ValueError('External ID not found in the system: %s' % (xmlid))
ValueError: External ID not found in the system: stock.picking_type_in
@jco-odoo
Copy link
Contributor

That's why we need migration scripts. The picking_type_in is created when the main warehouse is created.

@NicolasWebDev
Copy link

I don't really get how I can resolve this problem manually, or what's causing it.

@jco-odoo
Copy link
Contributor

It is actually created in stock_data.yml

hbrunn pushed a commit to Therp/odoo that referenced this issue Sep 11, 2017
[FIX] sales_team migration error if crm is not installed
moylop260 pushed a commit to vauxoo-dev/odoo that referenced this issue Apr 20, 2018
* [ADD] Test modules in separate jobs

* [REF] .travis.yml: Avoid auto-install generic_coa and disable `test_crawl.py` because is failing in all cases.
MiquelRForgeFlow added a commit to ForgeFlow/odoo that referenced this issue Apr 20, 2018
* [ADD] Test modules in separate jobs

* [REF] .travis.yml: Avoid auto-install generic_coa and disable `test_crawl.py` because is failing in all cases.
MiquelRForgeFlow pushed a commit to ForgeFlow/odoo that referenced this issue Apr 20, 2018
* [ADD] Test modules in separate jobs

* [REF] .travis.yml: Avoid auto-install generic_coa and disable `test_crawl.py` because is failing in all cases.
acsonefho pushed a commit to acsone/odoo that referenced this issue Apr 3, 2019
* [ADD] Test modules in separate jobs

* [REF] .travis.yml: Avoid auto-install generic_coa and disable `test_crawl.py` because is failing in all cases.
davidtranhp added a commit to davidtranhp/odoo that referenced this issue Aug 11, 2023
…230803_01

Merged from upstream 15 230803 01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants