Community mailing list archives

community@mail.odoo.com

Re: ParseError - what is the source of this error?

by
Jordi Riera
- 06/22/2015 10:16:21
Hey Ronald,

Could you double check that you have the module responsible to set up pos.categories as dependency of your new module?

It seems, it does not know what is this model yet.

Does it help?

Jordi

On Mon, Jun 22, 2015 at 9:57 AM Ronald Wopereis <woepwoep@gmail.com> wrote:
here is the complete traceback:

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 537, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 574, in dispatch
    result = self._call_function(**self.params)
  File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 310, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/openerp/service/model.py", line 113, in wrapper
    return f(dbname, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 307, in checked_call
    return self.endpoint(*a, **kw)
  File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 803, in __call__
    return self.method(*args, **kw)
  File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 403, in response_wrap
    response = f(*args, **kw)
  File "/usr/lib/python2.7/dist-packages/openerp/addons/web/controllers/main.py", line 948, in call_button
    action = self._call_kw(model, method, args, {})
  File "/usr/lib/python2.7/dist-packages/openerp/addons/web/controllers/main.py", line 936, in _call_kw
    return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 241, in wrapper
    return old_api(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/openerp/addons/base/module/module.py", line 537, in button_immediate_upgrade
    return self._button_immediate_function(cr, uid, ids, self.button_upgrade, context=context)
  File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 241, in wrapper
    return old_api(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/openerp/addons/base/module/module.py", line 498, in _button_immediate_function
    registry = openerp.modules.registry.RegistryManager.new(cr.dbname, update_module=True)
  File "/usr/lib/python2.7/dist-packages/openerp/modules/registry.py", line 370, in new
    openerp.modules.load_modules(registry._db, force_demo, status, update_module)
  File "/usr/lib/python2.7/dist-packages/openerp/modules/loading.py", line 351, in load_modules
    force, status, report, loaded_modules, update_module)
  File "/usr/lib/python2.7/dist-packages/openerp/modules/loading.py", line 255, in load_marked_modules
    loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks)
  File "/usr/lib/python2.7/dist-packages/openerp/modules/loading.py", line 176, in load_module_graph
    _load_data(cr, module_name, idref, mode, kind='data')
  File "/usr/lib/python2.7/dist-packages/openerp/modules/loading.py", line 118, in _load_data
    tools.convert_file(cr, module_name, filename, idref, mode, noupdate, kind, report)
  File "/usr/lib/python2.7/dist-packages/openerp/tools/convert.py", line 901, in convert_file
    convert_xml_import(cr, module, fp, idref, mode, noupdate, report)
  File "/usr/lib/python2.7/dist-packages/openerp/tools/convert.py", line 987, in convert_xml_import
    obj.parse(doc.getroot(), mode=mode)
  File "/usr/lib/python2.7/dist-packages/openerp/tools/convert.py", line 853, in parse
    self._tags[rec.tag](self.cr, rec, n, mode=mode)
  File "/usr/lib/python2.7/dist-packages/openerp/tools/convert.py", line 693, in _tag_record
    model = self.pool[rec_model]
  File "/usr/lib/python2.7/dist-packages/openerp/modules/
registry.py", line 102, in __getitem__
    return self.models[model_name]
ParseError: "pos.category" while parsing /usr/lib/python2.7/dist-packages/openerp/addons/cbl_productgroup/pos_category_main.xml:6, near
<record id="5" model="pos.category">
			<field name="name">Koelvers</field>
		</record>
2015-06-22 15:33 GMT+02:00 Ronald Wopereis <woepwoep@gmail.com>:
still gives error

ParseError: "pos.category" while parsing /usr/lib/python2.7/dist-packages/openerp/addons/cbl_productgroup/pos_category_main.xml:6, near
<record id="5" model="pos.category">
    <field name="name">Koelvers</field>
</record>

it appears that the pos.category model is not recognized?
2015-06-22 12:37 GMT+02:00 Gustavo Orrillo <gustavo.orrillo@moldeointeractive.com.ar>:
the data in field name is wrong. Try setting it to something like "Koelvers" to confirm it is causing the problem.
On Mon, Jun 22, 2015 at 7:22 AM, Ronald Wopereis <woepwoep@gmail.com> wrote:
I created two modules, to load data into V.8
One module works fine, the other one gives a ParseError
The only difference that i can see is the model in which the data should load.
This one works fine: https://github.com/woepwoep/cwa_supplier
This one gives the ParseError: https://github.com/woepwoep/cbl_productgroup
Question: what is the source of this error?
ParseError: "pos.category" while parsing /usr/lib/python2.7/dist-packages/openerp/addons/cbl_productgroup/pos_category_main.xml:6, near
<record id="5" model="pos.category">
	<field name="name">Koelvers / Diepvries</field>
</record>
thx, Ron

----

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe