Field 'magerp_tmpl' does not exist

Bug #1179757 reported by Ernesto Palma Gonzalez
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Magento OpenERP Connector
New
Undecided
Unassigned

Bug Description

Hi,

I'm trying to upgrade magentoerpconnect 6.1 stable, I have downloaded the following branches:

bzr branch lp:magentoerpconnect/oerp6.1-stable
bzr branch lp:e-commerce-addons/oerp6.1-stable
bzr branch lp:openobject-extension/oerp6.1-stable
bzr branch lp:product-extra-addons/oerp6.1-stable

Then I got an error with base_external_referentials saying there was no external_osv module and I made the following changes on base_external_referentials/report.py:

# EPG from base_external_referentials.external_osv import ExternalSession
from external_osv import ExternalSession
# EPG from base_external_referentials.decorator import commit_now
from decorator import commit_now

Then I upgrade my database using -d database -u all

Then I'm getting the following error:

Client Traceback (most recent call last):
  File "/opt/openerp/server/openerp/addons/web/common/http.py", line 180, in dispatch
    response["result"] = method(controller, self, **self.params)
  File "/opt/openerp/server/openerp/addons/web/controllers/main.py", line 498, in authenticate
    req.session.authenticate(db, login, password, env)
  File "/opt/openerp/server/openerp/addons/web/common/session.py", line 73, in authenticate
    uid = self.proxy('common').authenticate(db, login, password, env)
  File "/opt/openerp/server/openerp/addons/web/common/openerplib/main.py", line 117, in proxy
    result = self.connector.send(self.service_name, method, *args)
  File "/opt/openerp/server/openerp/addons/web/common/http.py", line 608, in send
    raise xmlrpclib.Fault(openerp.tools.exception_to_unicode(e), formatted_info)

Server Traceback (most recent call last):
  File "/opt/openerp/server/openerp/addons/web/common/http.py", line 593, in send
    return openerp.netsvc.dispatch_rpc(service_name, method, args)
  File "/opt/openerp/server/openerp/netsvc.py", line 360, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/opt/openerp/server/openerp/service/web_services.py", line 397, in dispatch
    return fn(*params)
  File "/opt/openerp/server/openerp/service/web_services.py", line 408, in exp_authenticate
    res_users = pooler.get_pool(db).get('res.users')
  File "/opt/openerp/server/openerp/pooler.py", line 50, in get_pool
    return get_db_and_pool(db_name, force_demo, status, update_module)[1]
  File "/opt/openerp/server/openerp/pooler.py", line 33, in get_db_and_pool
    registry = RegistryManager.get(db_name, force_demo, status, update_module, pooljobs)
  File "/opt/openerp/server/openerp/modules/registry.py", line 180, in get
    update_module, pooljobs)
  File "/opt/openerp/server/openerp/modules/registry.py", line 202, in new
    openerp.modules.load_modules(registry.db, force_demo, status, update_module)
  File "/opt/openerp/server/openerp/modules/loading.py", line 334, in load_modules
    processed = load_marked_modules(cr, graph, states_to_load, force, status, report, loaded_modules)
  File "/opt/openerp/server/openerp/modules/loading.py", line 253, in load_marked_modules
    loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules)
  File "/opt/openerp/server/openerp/modules/loading.py", line 192, in load_module_graph
    load_update_xml(module_name, idref, mode)
  File "/opt/openerp/server/openerp/modules/loading.py", line 90, in <lambda>
    load_update_xml = lambda *args: _load_data(cr, *args, kind='update_xml')
  File "/opt/openerp/server/openerp/modules/loading.py", line 138, in _load_data
    tools.convert_xml_import(cr, module_name, fp, idref, mode, noupdate, report)
  File "/opt/openerp/server/openerp/tools/convert.py", line 997, in convert_xml_import
    obj.parse(doc.getroot())
  File "/opt/openerp/server/openerp/tools/convert.py", line 890, in parse
    self._tags[rec.tag](self.cr, rec, n)
  File "/opt/openerp/server/openerp/tools/convert.py", line 857, in _tag_record
    id = self.pool.get('ir.model.data')._update(cr, self.uid, rec_model, self.module, res, rec_id or False, not self.isnoupdate(data_node), noupdate=self.isnoupdate(data_node), mode=self.mode, context=rec_context )
  File "/opt/openerp/server/openerp/addons/base/ir/ir_model.py", line 744, in _update
    res_id = model_obj.create(cr, uid, values, context=context)
  File "/opt/openerp/server/openerp/osv/orm.py", line 4136, in create
    record_id = self.pool.get(table).create(cr, user, tocreate[table], context=parent_context)
  File "/opt/openerp/server/openerp/osv/orm.py", line 4230, in create
    result += self._columns[field].set(cr, self, id_new, field, vals[field], user, rel_context) or []
  File "/opt/openerp/server/openerp/osv/fields.py", line 1143, in set
    self._fnct_inv(obj, cr, user, id, name, value, self._fnct_inv_arg, context)
  File "/opt/openerp/server/openerp/osv/fields.py", line 1335, in _fnct_write
    serialized = getattr(record, self.serialization_field)
  File "/opt/openerp/server/openerp/osv/orm.py", line 478, in __getattr__
    raise AttributeError(e)
AttributeError: "Field 'magerp_tmpl' does not exist in object 'browse_record(product.template, 443)'"

Then I have also downloaded the following branches:

bzr branch lp:openobject-server/6.1
bzr branch lp:openobject-addons/6.1

But I still get the same error, if I create a new database it seems that it can work fine. I don't know if this is a bug or I am doing something wrong, for what I have read, it seems that should be possible upgrade magentoerpconnect, right? Even if I was using the 6.1 legacy version? I don't remember if that was the one I installed... how can I check that?

I would apreciate any help on this, I have already been looking for an answer but I can't find any related issue neither in launchpad.net nor on any other open google search.

Best Regards,

EPG

Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote :

Hi,

I'm not aware of any migration path from oerp6.1-oldstable to oerp6.1-stable.
Note that we at Camptocamp choosed not to migrate to oerp6.1-stable, but we keep instead oerp6.1-oldstable for some reasons.
If you have no particular reason to go with oerp6.1-stable and have a working oerp6.1-oldstable, I would recommend you to stay with it.

If you want to know which version you actually have, you should check the parent of the branch using `bzr status`. If it contains '6.1-oldstable' that's what you call the legacy version.

Revision history for this message
Ernesto Palma Gonzalez (p-shakespeare) wrote :

Hi Guewen,

First of all, thanks a lot for your help, I have been around for a year and this is my first post, I didn't think responses were so quick.

I agree, and I wouldn't tried to upgrade without a particular reason, the thing is that I'm unable to export stock level from openerp to magento and I can't find a reason or thread that talk about it. Then I saw that one of the improvements of 6.1 stable was to add reporting when exporting stock level and thought that might help. Perhaps I should started a thread about that export stock level issue instead tried to upgrade.

The error I get is:
"User Error
The product 'myproduct' can not be exported to the shop 'myshop'.
Please check :
- if their are in the root category
- if the website option is correctly configured.
- if the check box Magento exportable is checked"

The check box Magento exportable is checked; I don't know what means website option, but is the same shop/website from where I imported the product to openerp (I mean all my openerp products were imported from the same magento website); finally, since I have several websites (and root categories) on my magento instance, I have tried changing the root category but the error is still the same. I'm sorry I have mixed two different problems on this thread.

About the upgrade problem, I have tried to use bzr status without success, I have never used it before and just get "not a branch" or "no workingtree exist for ..." when I tried to use it. I guess I need the lp... string I used to download magentoerpconnect module in order to use it, right? the thing is that I don´t remember which one I used.

I remember a year ago when I installed the module I tried with the 6.1 legacy and the 6.1 other version cause one of them caused me trouble and didn't work. Comparing the installed modules I would say I have the legacy version (oldstable) since I have no magentoerpconnect_report_synchronizer module. The version shown in openerp for magentoerpconnect module is 6.1.1.0.1 , I don't know if that information is enough to be sure what version do I have or what else can I do to figure it out.

Best regards,

EPG

Revision history for this message
David (dhecar) wrote :
Download full text (5.9 KiB)

I'm in similar situation.

I want to change addons to ocb branch, and server too.

I have downloaded this branch and linked the modules in addons folder.

Tha connector in DB are stable version, with revision 693, like in the new instalation, but the problem is the same:

WARNING Grupo_Mobile_2014 openerp.osv.orm.browse_record.product.template: Field 'magerp_tmpl' does not exist in object 'browse_record(product.template, 3586)'
2014-02-22 18:19:51,255 14497 ERROR Grupo_Mobile_2014 openerp.tools.convert: Parse error in /opt/openerp-ocb/server_launch/openerp/addons/product/product_data.xml:175:
<record id="product_consultant" model="product.product">
            <field name="list_price">75.0</field>
            <field name="standard_price">30.0</field>
            <field name="uom_id" ref="product.uom_hour"/>
            <field name="uom_po_id" ref="product.uom_hour"/>
            <field name="name">Service on Timesheet</field>
            <field name="categ_id" ref="product.cat0"/>
            <field name="type">service</field>
            <field eval="False" name="purchase_ok"/>
        </record>
Traceback (most recent call last):
  File "/opt/openerp-ocb/server_launch/openerp/tools/convert.py", line 890, in parse
    self._tags[rec.tag](self.cr, rec, n)
  File "/opt/openerp-ocb/server_launch/openerp/tools/convert.py", line 857, in _tag_record
    id = self.pool.get('ir.model.data')._update(cr, self.uid, rec_model, self.module, res, rec_id or False, not self.isnoupdate(data_node), noupdate=self.isnoupdate(data_node), mode=self.mode, context=rec_context )
  File "/opt/openerp-ocb/server_launch/openerp/addons/base/ir/ir_model.py", line 744, in _update
    res_id = model_obj.create(cr, uid, values, context=context)
  File "/opt/openerp-ocb/server_launch/openerp/osv/orm.py", line 4142, in create
    record_id = self.pool.get(table).create(cr, user, tocreate[table], context=parent_context)
  File "/opt/openerp-ocb/server_launch/openerp/osv/orm.py", line 4235, in create
    result += self._columns[field].set(cr, self, id_new, field, vals[field], user, rel_context) or []
  File "/opt/openerp-ocb/server_launch/openerp/osv/fields.py", line 1145, in set
    self._fnct_inv(obj, cr, user, id, name, value, self._fnct_inv_arg, context)
  File "/opt/openerp-ocb/server_launch/openerp/osv/fields.py", line 1328, in _fnct_write
    serialized = getattr(record, self.serialization_field)
  File "/opt/openerp-ocb/server_launch/openerp/osv/orm.py", line 478, in __getattr__
    raise AttributeError(e)
AttributeError: "Field 'magerp_tmpl' does not exist in object 'browse_record(product.template, 3586)'"
2014-02-22 18:19:51,263 14497 ERROR Grupo_Mobile_2014 openerp: Failed to initialize database `Grupo_Mobile_2014`.
Traceback (most recent call last):
  File "/opt/openerp-ocb/server_launch/openerp-server", line 95, in preload_registry
    db, registry = openerp.pooler.get_db_and_pool(dbname, update_module=config['init'] or config['update'], pooljobs=False)
  File "/opt/openerp-ocb/server_launch/openerp/pooler.py", line 33, in get_db_and_pool
    registry = RegistryManager.get(db_name, force_demo, status, update_module, pooljobs)
  File "/opt/openerp-ocb/server_launc...

Read more...

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.