Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
3 Trả lời
5984 Lượt xem

Hi to all,

I found an errror box every time when i try to install a custom module in odoo from settings 

here is the error message.

Traceback (most recent call last): File "/opt/odoo/openerp/http.py", line 517, in _handle_exception return super(JsonRequest, self)._handle_exception(exception) File "/opt/odoo/openerp/http.py", line 535, in dispatch result = self._call_function(**self.params) File "/opt/odoo/openerp/http.py", line 294, in _call_function return checked_call(self.db, *args, **kwargs) File "/opt/odoo/openerp/service/model.py", line 113, in wrapper return f(dbname, *args, **kwargs) File "/opt/odoo/openerp/http.py", line 291, in checked_call return self.endpoint(*a, **kw) File "/opt/odoo/openerp/http.py", line 751, in __call__ return self.method(*args, **kw) File "/opt/odoo/openerp/http.py", line 387, in response_wrap response = f(*args, **kw) File "/opt/odoo/addons/web/controllers/main.py", line 953, in call_button action = self._call_kw(model, method, args, {}) File "/opt/odoo/addons/web/controllers/main.py", line 941, in _call_kw return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs) File "/opt/odoo/openerp/api.py", line 237, in wrapper return old_api(self, *args, **kwargs) File "/opt/odoo/openerp/addons/base/module/module.py", line 450, in button_immediate_install return self._button_immediate_function(cr, uid, ids, self.button_install, context=context) File "/opt/odoo/openerp/api.py", line 237, in wrapper return old_api(self, *args, **kwargs) File "/opt/odoo/openerp/addons/base/module/module.py", line 498, in _button_immediate_function registry = openerp.modules.registry.RegistryManager.new(cr.dbname, update_module=True) File "/opt/odoo/openerp/modules/registry.py", line 341, in new openerp.modules.load_modules(registry._db, force_demo, status, update_module) File "/opt/odoo/openerp/modules/loading.py", line 358, in load_modules loaded_modules, update_module) File "/opt/odoo/openerp/modules/loading.py", line 263, in load_marked_modules loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks) File "/opt/odoo/openerp/modules/loading.py", line 182, in load_module_graph _load_data(cr, module_name, idref, mode, kind='data') File "/opt/odoo/openerp/modules/loading.py", line 118, in _load_data tools.convert_file(cr, module_name, filename, idref, mode, noupdate, kind, report) File "/opt/odoo/openerp/tools/convert.py", line 890, in convert_file fp = misc.file_open(pathname) File "/opt/odoo/openerp/tools/misc.py", line 181, in file_open return _fileopen(name, mode=mode, basedir=rtp, pathinfo=pathinfo, basename=basename) File "/opt/odoo/openerp/tools/misc.py", line 228, in _fileopen raise IOError('File not found: %s' % basename) IOError: File not found: myModule/view/menu.xml

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

I'm assuming you already checked the file location and made sure that the __openerp__.py file is up to date and correct? Did you supply the right tag for the XML file (i.e. in the "data" tag )?

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

I am updating my answer

i quite new to odoo and want to learn how to "build the theme" with odoo .,thus i follow there instructions from the below link

https://www.odoo.com/documentation/8.0/howtos/themes.html

which clearly instruct at above link ,i put that line in terminal 

$ ./odoo.py scaffold -t theme "Dummy Theme" addons

then i follow the below instructions .

finally when i got the module and try to install in settings it gives above error .

 

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

To be very specific,

In __openerp__.py "data" tag should be as follow .

'data': [
               'viewfile.xml'
    ],

if your view file is in sub folder then

'data': [
               'sub_folder_name/viewfile.xml'
    ],

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 3 15
3084
2
thg 4 17
8635
2
thg 3 15
5759
1
thg 3 15
5587
3
thg 3 15
3975