installation fails base_sale_multichannels

Asked by Chris Haus

Hi,

for the connection to Magento I'd like to install it according to this:
http://openlabs.co.in/article/open-erp-magento-integration-new
(Is this still up to date?)

When I install that module:
base_sale_multichannels
I get the following error (from the GTK client):

Environment Information :
System : Linux-3.0.0-15-generic-x86_64-with-Ubuntu-11.10-oneiric
OS Name : posix
LSB Version: core-2.0-amd64:core-2.0-noarch:core-3.0-amd64:core-3.0-noarch:core-3.1-amd64:core-3.1-noarch:core-3.2-amd64:core-3.2-noarch:core-4.0-amd64:core-4.0-noarch
Distributor ID: Ubuntu
Description: Ubuntu 11.10
Release: 11.10
Codename: oneiric
Operating System Release : 3.0.0-15-generic
Operating System Version : #24-Ubuntu SMP Mon Dec 12 15:23:55 UTC 2011
Operating System Architecture : 64bit
Operating System Locale : de_DE.UTF-8
Python Version : 2.7.2+
OpenERP-Client Version : 6.0.3
Last revision No. & ID :Bazaar Package not Found !Traceback (most recent call last):
  File "/opt/openerp/server/bin/netsvc.py", line 489, in dispatch
    result = ExportService.getService(service_name).dispatch(method, auth, params)
  File "/opt/openerp/server/bin/service/web_services.py", line 599, in dispatch
    res = fn(db, uid, *params)
  File "/opt/openerp/server/bin/osv/osv.py", line 122, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/opt/openerp/server/bin/osv/osv.py", line 176, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/opt/openerp/server/bin/osv/osv.py", line 167, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/opt/openerp/server/bin/addons/base/module/wizard/base_module_upgrade.py", line 98, in upgrade_module
    _db, pool = pooler.restart_pool(cr.dbname, update_module=True)
  File "/opt/openerp/server/bin/pooler.py", line 60, in restart_pool
    return get_db_and_pool(db_name, force_demo, status, update_module=update_module)
  File "/opt/openerp/server/bin/pooler.py", line 39, in get_db_and_pool
    addons.load_modules(db, force_demo, status, update_module)
  File "/opt/openerp/server/bin/addons/__init__.py", line 883, in load_modules
    processed_modules.extend(load_module_graph(cr, graph, status, report=report, skip_modules=processed_modules))
  File "/opt/openerp/server/bin/addons/__init__.py", line 748, in load_module_graph
    load_init_update_xml(cr, m, idref, mode, kind)
  File "/opt/openerp/server/bin/addons/__init__.py", line 635, in load_init_update_xml
    tools.convert_csv_import(cr, m, os.path.basename(filename), fp.read(), idref, mode=mode, noupdate=noupdate)
  File "/opt/openerp/server/bin/tools/convert.py", line 947, in convert_csv_import
    result, rows, warning_msg, dummy = pool.get(model).import_data(cr, uid, fields, datas,mode, module, noupdate, filename=fname_partial)
  File "/opt/openerp/server/bin/osv/orm.py", line 870, in import_data
    process_liness(self, datas, [], current_module, self._name, fields_def, position=position)
  File "/opt/openerp/server/bin/osv/orm.py", line 820, in process_liness
    res = _get_id(relation, line[i], current_module, mode)
  File "/opt/openerp/server/bin/osv/orm.py", line 734, in _get_id
    record_id = ir_model_data_obj._get_id(cr, uid, module, xml_id)
  File "/opt/openerp/server/bin/tools/misc.py", line 823, in cached_result
    result2 = fn(self2, cr, *args[:self.skiparg-2], **kwargs2)
  File "/opt/openerp/server/bin/addons/base/ir/ir_model.py", line 602, in _get_id
    raise ValueError('No references to %s.%s' % (module, xml_id))
ValueError: No references to product.group_product_manager

I found some similar errors here, but most of them were really old and should be solved according to what I read.

Any ideas on that?

Thank you in advance
Bye, Chris

Question information

Language:
English Edit question
Status:
Solved
For:
Odoo Addons (MOVED TO GITHUB) Edit question
Assignee:
No assignee Edit question
Solved by:
Kyle Waid
Solved:
Last query:
Last reply:

This question was originally filed as bug #908795.

Revision history for this message
Chris Haus (spamonme) said :
#1

Ok .. I got it working. Downloaded the trunk. Now I copied the folder for this module into my server/bin/addons directory.
In the CSV file are no entries with product_manager or group_product_manager.
After trying to install it again, I get a different error:

...
  File "/opt/openerp/server/bin/addons/base/ir/ir_model.py", line 609, in get_object_reference
    data_id = self._get_id(cr, uid, module, xml_id)
  File "/opt/openerp/server/bin/tools/misc.py", line 823, in cached_result
    result2 = fn(self2, cr, *args[:self.skiparg-2], **kwargs2)
  File "/opt/openerp/server/bin/addons/base/ir/ir_model.py", line 602, in _get_id
    raise ValueError('No references to %s.%s' % (module, xml_id))
  ValueError: No references to base_external_referentials.external_report_form_view

What do I have to do now?
I can edit the code in my folder base_sale_multichannels/ and subfiles - but where should I do what?

Thanks for your help
Chris

Revision history for this message
Serpent Consulting Services (serpent-consulting-services) said :
#2

Hello Chris,

This kind of error normally occurs in one of the following circumstances:

1. Either the xml reference mentioned is not found.
2. Either the module on which we depend is not in the system.

Can you please make sure whether your addons directory contains the module 'base_external_referentials' or not?

If not, you will need to get this module from the same repository where you took base_sale_multichannel from.

Hope this helps.

Thanks,
Serpent Consulting Services.

Revision history for this message
Chris Haus (spamonme) said :
#3

Thank you .. I think there is sth wrong with my installation?

/opt/openerp/server/bin/addons is where I got my addons.
I just downloaded the whole trunk to my home dir and copied it to opt:

sudo cp -R /home/automater/Software/Office/openerpextras/extra-6.0/product_m2mcategories/ .
sudo cp -R /home/automater/Software/Office/openerpextras/extra-6.0/base_external_referentials/ .
sudo cp -R /home/automater/Software/Office/openerpextras/extra-6.0/base_sale_multichannels/ .
ls -lah
all folders are available.

Just to be sure:
sudo /etc/init.d/openerp-server stop
sudo /etc/init.d/openerp-server start

Restarting the client:
~/Software/Office/openerp-client-6.0.3/bin$ ./openerp-client.py
(It's inside my home directory, but still works fine).

Then I click on: Administration - Modules - Modules
Type in: base_sale_multichannels
Double click, install, apply scheduled upgrades and I get the error:

Environment Information :
System : Linux-3.0.0-15-generic-x86_64-with-Ubuntu-11.10-oneiric
OS Name : posix
LSB Version: core-2.0-amd64:core-2.0-noarch:core-3.0-amd64:core-3.0-noarch:core-3.1-amd64:core-3.1-noarch:core-3.2-amd64:core-3.2-noarch:core-4.0-amd64:core-4.0-noarch
Distributor ID: Ubuntu
Description: Ubuntu 11.10
Release: 11.10
Codename: oneiric
Operating System Release : 3.0.0-15-generic
Operating System Version : #24-Ubuntu SMP Mon Dec 12 15:23:55 UTC 2011
Operating System Architecture : 64bit
Operating System Locale : de_DE.UTF-8
Python Version : 2.7.2+
OpenERP-Client Version : 6.0.3
Last revision No. & ID :Bazaar Package not Found !Traceback (most recent call last):
  File "/opt/openerp/server/bin/netsvc.py", line 489, in dispatch
    result = ExportService.getService(service_name).dispatch(method, auth, params)
  File "/opt/openerp/server/bin/service/web_services.py", line 599, in dispatch
    res = fn(db, uid, *params)
  File "/opt/openerp/server/bin/osv/osv.py", line 122, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/opt/openerp/server/bin/osv/osv.py", line 176, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/opt/openerp/server/bin/osv/osv.py", line 167, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/opt/openerp/server/bin/addons/base/module/wizard/base_module_upgrade.py", line 98, in upgrade_module
    _db, pool = pooler.restart_pool(cr.dbname, update_module=True)
  File "/opt/openerp/server/bin/pooler.py", line 60, in restart_pool
    return get_db_and_pool(db_name, force_demo, status, update_module=update_module)
  File "/opt/openerp/server/bin/pooler.py", line 39, in get_db_and_pool
    addons.load_modules(db, force_demo, status, update_module)
  File "/opt/openerp/server/bin/addons/__init__.py", line 883, in load_modules
    processed_modules.extend(load_module_graph(cr, graph, status, report=report, skip_modules=processed_modules))
  File "/opt/openerp/server/bin/addons/__init__.py", line 748, in load_module_graph
    load_init_update_xml(cr, m, idref, mode, kind)
  File "/opt/openerp/server/bin/addons/__init__.py", line 641, in load_init_update_xml
    tools.convert_xml_import(cr, m, fp, idref, mode=mode, **kwargs)
  File "/opt/openerp/server/bin/tools/convert.py", line 975, in convert_xml_import
    obj.parse(doc.getroot())
  File "/opt/openerp/server/bin/tools/convert.py", line 865, in parse
    self._tags[rec.tag](self.cr, rec, n)
  File "/opt/openerp/server/bin/tools/convert.py", line 824, in _tag_record
    f_val = self.id_get(cr, f_ref)
  File "/opt/openerp/server/bin/tools/convert.py", line 842, in id_get
    res = self.model_id_get(cr, id_str)
  File "/opt/openerp/server/bin/tools/convert.py", line 851, in model_id_get
    return model_data_obj.get_object_reference(cr, self.uid, mod, id_str)
  File "/opt/openerp/server/bin/tools/misc.py", line 823, in cached_result
    result2 = fn(self2, cr, *args[:self.skiparg-2], **kwargs2)
  File "/opt/openerp/server/bin/addons/base/ir/ir_model.py", line 609, in get_object_reference
    data_id = self._get_id(cr, uid, module, xml_id)
  File "/opt/openerp/server/bin/tools/misc.py", line 823, in cached_result
    result2 = fn(self2, cr, *args[:self.skiparg-2], **kwargs2)
  File "/opt/openerp/server/bin/addons/base/ir/ir_model.py", line 602, in _get_id
    raise ValueError('No references to %s.%s' % (module, xml_id))
ValueError: No references to base_external_referentials.external_report_form_view

Aber:

/opt/openerp/server/bin/addons/base_external_referentials$ ls -lah
insgesamt 104K
drwxr-xr-x 3 openerp openerp 4,0K 2011-12-28 17:09 .
drwxr-xr-x 172 openerp openerp 4,0K 2011-12-28 17:10 ..
-rw-r--r-- 1 openerp openerp 3,1K 2011-12-28 17:09 base_external_referentials_menu.xml
-rw-r--r-- 1 openerp openerp 16K 2011-12-28 17:09 base_external_referentials.py
-rwxr-xr-x 1 openerp openerp 3,3K 2011-12-28 17:09 base_external_referentials_view.xml
-rwxr-xr-x 1 openerp openerp 30K 2011-12-28 17:09 external_osv.py
drwxr-xr-x 2 openerp openerp 4,0K 2011-12-28 17:09 i18n
-rwxr-xr-x 1 openerp openerp 68 2011-12-28 17:09 __init__.py
-rwxr-xr-x 1 openerp openerp 2,8K 2011-12-28 17:09 __openerp__.py
-rw-r--r-- 1 openerp openerp 15K 2011-12-28 17:09 report.py
-rw-r--r-- 1 openerp openerp 8,2K 2011-12-28 17:09 report_view.xml

That looks fine for me.
The folder / module is there, the XML exists and is readable by the appropriate user.

:(

Revision history for this message
Serpent Consulting Services (serpent-consulting-services) said :
#4

Hello Chris,

Can you see the file base_external_referentials/report_view.xml ?
Line 6 contains the definition of the xml record.

Thanks.

Revision history for this message
Chris Haus (spamonme) said :
#5

Yes, this file exists.
I opened it and see the following:

                <record id="external_report_form_view" model="ir.ui.view">
                        <field name="name">external_report_form_view</field>
                        <field name="model">external.report</field>
                        <field name="type">form</field>
                        <field name="arch" type="xml">
                                <form string="External Referential Reports">
etc.

I commented it out and tryed to install it again, but I keep on getting the same error.
What I don't understand is, what I have to comment out here.
Since the error is coming from:

  File "/opt/openerp/server/bin/addons/base/ir/ir_model.py", line 602, in _get_id
    raise ValueError('No references to %s.%s' % (module, xml_id))
ValueError: No references to base_external_referentials.external_report_form_view
Which means for me, that the software expects a reference to external_report_form_view?

Revision history for this message
Serpent Consulting Services (serpent-consulting-services) said :
#6

Chris,

The software expects the reference to external_report_form_view from base_external_referentials module.

Based on what you say, it should get reference for sure.

You dont need to comment any code.

What is the addons-path you have given?

Thanks.

Revision history for this message
Chris Haus (spamonme) said :
#7

Ok, I deleted my comments - still no change.

But your point was exactly right:

I pointed my addons-path to my home directory, where I downloaded the trunk:
/home/automater/Software/Office/openerpextras/extra-6.0/

If I delete this, I get the following error during installation:

Python Version : 2.7.2+
OpenERP-Client Version : 6.0.3
Last revision No. & ID :Bazaar Package not Found !Traceback (most recent call last):
  File "/opt/openerp/server/bin/netsvc.py", line 489, in dispatch
    result = ExportService.getService(service_name).dispatch(method, auth, params)
  File "/opt/openerp/server/bin/service/web_services.py", line 599, in dispatch
    res = fn(db, uid, *params)
  File "/opt/openerp/server/bin/osv/osv.py", line 122, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/opt/openerp/server/bin/osv/osv.py", line 176, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/opt/openerp/server/bin/osv/osv.py", line 167, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/opt/openerp/server/bin/addons/base/module/wizard/base_module_upgrade.py", line 98, in upgrade_module
    _db, pool = pooler.restart_pool(cr.dbname, update_module=True)
  File "/opt/openerp/server/bin/pooler.py", line 60, in restart_pool
    return get_db_and_pool(db_name, force_demo, status, update_module=update_module)
  File "/opt/openerp/server/bin/pooler.py", line 39, in get_db_and_pool
    addons.load_modules(db, force_demo, status, update_module)
  File "/opt/openerp/server/bin/addons/__init__.py", line 883, in load_modules
    processed_modules.extend(load_module_graph(cr, graph, status, report=report, skip_modules=processed_modules))
  File "/opt/openerp/server/bin/addons/__init__.py", line 717, in load_module_graph
    modules = pool.instanciate(package.name, cr)
  File "/opt/openerp/server/bin/osv/osv.py", line 258, in instanciate
    res.append(klass.createInstance(self, module, cr))
  File "/opt/openerp/server/bin/osv/osv.py", line 336, in createInstance
    assert pool.get(parent_name), "parent class %s does not exist in module %s !" % (parent_name, module)
AssertionError: parent class external.report does not exist in module base_sale_multichannels !

But there in the file: base_sale_multichannels/report.py
I can see:

from osv import osv, fields
from tools.translate import _
class external_report(osv.osv):
    _inherit = 'external.report'

So the inherit command doesn't work - but I'm not sure whether this is a way to go here?

If I put my addons_path back, I'm back with the old error - so it doesn't work either way :(

Revision history for this message
Best Kyle Waid (midwest) said :
#8

Are you serious? Where on earth do people keep getting this openlabs guide reference? This guide has not been updated in YEARS.
The magentoerpconnect project is being managed by the community, NOT openlabs.

The magento module available on magento connect is deprecated. The magento module, and magentoerpconnect can be found on its official repository

lp:magentoerpconnect
lp:openobject-addons/extra-trunk "yes, extra trunk for 6.0"
lp:~sebastien.beau/openobject-server/akretion-backport-for-magentoerpconnect-v61-to-v6
Because the official openobject-server has not yet merged changes for serialization field, developed by Akretion
Magentoerpconnect depends on it

Also, the error you have in the first message is because you are not using current sources. product group manager was removed from OpenERP before the release of 6.0. All of your problems are most likely because you are not using the right source code.

Revision history for this message
Kyle Waid (midwest) said :
#9

  File "/opt/openerp/server/bin/addons/base/ir/ir_model.py", line 602, in _get_id
    raise ValueError('No references to %s.%s' % (module, xml_id))

This is a placeholder text, the % sign is a variable where the error is inserted. The error is thrown here because this method initiated the installation of the xml record and failed.

The error originates from the xml file you are trying to install.

Revision history for this message
Kyle Waid (midwest) said :
#10

Additionally, you shouldnt copy the modules to your server addons. You should create symbolic links to the addons path so you can update your sources from launchpad.

Revision history for this message
Serpent Consulting Services (serpent-consulting-services) said :
#11

Chris,

Kyle Waid is right .

I hope the problem might have been solved now.

Revision history for this message
Chris Haus (spamonme) said :
#12

It's so messy.
Now I downloaded everything again to another directory copied simply everything into the addon directory and changed my config files.
It's pretty ugly now, but it works now.

And of course, people who are new to this software use the guide that fits best. The openlabs guide is good, structured and leads us all the way through the installation.
It doesn't say anything about the date, that it is outdated or provides comments.
Form the community and online, I couldn't find a decent hint or installation manual.
It's a pitty. The software is good but the documentation is as rare as the support in the forums - unfortunately.

Revision history for this message
Chris Haus (spamonme) said :
#13

Thanks Kyle Waid - http://www.gcotech.com, that solved my question.