Skip to Content
Menu
This question has been flagged
1 Reply
1727 Views

Dear all,

I'm trying to install sale_order_dates \module.

I'm having this error. Can you please help ?

Traceback (most recent call last):
  File "/home/odoo/odoo/openerp/http.py", line 544, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/home/odoo/odoo/openerp/http.py", line 581, in dispatch
result = self._call_function(**self.params)
File "/home/odoo/odoo/openerp/http.py", line 317, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/home/odoo/odoo/openerp/service/model.py", line 118, in wrapper
return f(dbname, *args, **kwargs)
File "/home/odoo/odoo/openerp/http.py", line 314, in checked_call
return self.endpoint(*a, **kw)
File "/home/odoo/odoo/openerp/http.py", line 810, in __call__
return self.method(*args, **kw)
File "/home/odoo/odoo/openerp/http.py", line 410, in response_wrap
response = f(*args, **kw)
File "/home/odoo/odoo/addons/web/controllers/main.py", line 948, in call_button
action = self._call_kw(model, method, args, {})
File "/home/odoo/odoo/addons/web/controllers/main.py", line 936, in _call_kw
return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)
File "/home/odoo/odoo/openerp/api.py", line 268, in wrapper
return old_api(self, *args, **kwargs)
File "/home/odoo/odoo/openerp/addons/base/module/module.py", line 447, in button_immediate_install
return self._button_immediate_function(cr, uid, ids, self.button_install, context=context)
File "/home/odoo/odoo/openerp/api.py", line 268, in wrapper
return old_api(self, *args, **kwargs)
File "/home/odoo/odoo/openerp/addons/base/module/module.py", line 495, in _button_immediate_function
registry = openerp.modules.registry.RegistryManager.new(cr.dbname, update_module=True)
File "/home/odoo/odoo/openerp/modules/registry.py", line 370, in new
openerp.modules.load_modules(registry._db, force_demo, status, update_module)
File "/home/odoo/odoo/openerp/modules/loading.py", line 355, in load_modules
loaded_modules, update_module)
File "/home/odoo/odoo/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 "/home/odoo/odoo/openerp/modules/loading.py", line 176, in load_module_graph
_load_data(cr, module_name, idref, mode, kind='data')
File "/home/odoo/odoo/openerp/modules/loading.py", line 118, in _load_data
tools.convert_file(cr, module_name, filename, idref, mode, noupdate, kind, report)
File "/home/odoo/odoo/openerp/tools/convert.py", line 897, in convert_file
convert_xml_import(cr, module, fp, idref, mode, noupdate, report)
File "/home/odoo/odoo/openerp/tools/convert.py", line 983, in convert_xml_import
obj.parse(doc.getroot(), mode=mode)
File "/home/odoo/odoo/openerp/tools/convert.py", line 849, in parse
self._tags[rec.tag](self.cr, rec, n, mode=mode)
File "/home/odoo/odoo/openerp/tools/convert.py", line 759, in _tag_record
id = self.pool['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 "/home/odoo/odoo/openerp/api.py", line 268, in wrapper
return old_api(self, *args, **kwargs)
File "/home/odoo/odoo/openerp/addons/base/ir/ir_model.py", line 1069, in _update
res_id = model_obj.create(cr, uid, values, context=context)
File "/home/odoo/odoo/openerp/api.py", line 268, in wrapper
return old_api(self, *args, **kwargs)
File "/home/odoo/odoo/openerp/addons/base/ir/ir_ui_view.py", line 257, in create
context=context)
File "/home/odoo/odoo/openerp/api.py", line 268, in wrapper
return old_api(self, *args, **kwargs)
File "/home/odoo/odoo/openerp/api.py", line 372, in old_api
result = method(recs, *args, **kwargs)
File "/home/odoo/odoo/openerp/models.py", line 4104, in create
record = self.browse(self._create(old_vals))
File "/home/odoo/odoo/openerp/api.py", line 266, in wrapper
return new_api(self, *args, **kwargs)
File "/home/odoo/odoo/openerp/api.py", line 508, in new_api
result = method(self._model, cr, uid, *args, **old_kwargs)
File "/home/odoo/odoo/openerp/models.py", line 4301, in _create
recs._validate_fields(vals)
File "/home/odoo/odoo/openerp/api.py", line 266, in wrapper
return new_api(self, *args, **kwargs)
File "/home/odoo/odoo/openerp/models.py", line 1275, in _validate_fields
raise ValidationError('\n'.join(errors))
ParseError: "ValidateError
Field(s) `arch` failed against a constraint: Invalid view definition Error details:
Element '<field name="date_order">' cannot be located in parent view Error context:
View `sale.order tree`
[view_id: 1025, xml_id: n/a, model: sale.order, parent_id: 640]" while parsing /home/odoo/odoo/addons/sale_order_dates/sale_order_dates_view.xml:20, near
<record id="view_order_tree_date" model="ir.ui.view">
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_order_tree"/>
<field name="arch" type="xml">
<field name="date_order" position="after">
<field name="requested_date"/>
<field name="commitment_date"/>
</field>
</field>
</record>
Avatar
Discard
Best Answer

Strange...try to update the sales module/your Odoo instance first.

This is how to update your Odoo instance (Linux):

https://nightly.odoo.com/

Avatar
Discard
Author

Hello, I did it before installing the module : no change. :(

What version are you using? How did you install the module?

Can you see <field name="date_order"> in your sales.order.tree view?

Author

Thanks for helping, Ermin.

It's Version 8.0.1.1.

I downloaded it from https://www.odoo.com/apps/online/sale_order_dates/ then put it in the addon directory, chown -R odoo:odoo and chmod 755 all files.

Then updated module list, clicked on "Install" and kaboom, error.

:'(

Author

Hey Ermin, your second message led me to the answer. I could not see <field name="date_order"> in sales.order.tree view.

Added it, refresh and kaboom ! It now works !

Thanks !

Hmmm...according to the actual software releases as published on Github, it must work. The field order_date is available in the parent view (sales.order.tree). Did you download the proper 8.0 version of the module? If yes, the only thing that comes to my mind is to update your Odoo instance to the latest nightly.

Great, but do not add this line, update your Odoo instance!

And by the way...it was all said in your traceback ;-)

Author

Thanks mate ! :-)

How can I update my instance ? (I'm running Odoo community v8)

See my amended answer and thanks for the upvote and checking as answered.