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

Hello,

I am trying to adapt my module to V8 by following the guide here https://www.odoo.com/documentation/8.0/howtos/backend.html#wizards, but when I try to import controllers, wizard, etc, I get the error.

ImportError: cannot import name controllers

 

The way I am using to import is:

from . import controllers

from . import models

from . import partner

from . import wizard

Any tip appreciated

Ảnh đại diện
Huỷ bỏ

Hello Yakito,

I have the same issue,have you found a solution for your issue?

P.S: Sorry I couldn't post this as a comment,my karma isn't enough to do that ^^;

Câu trả lời hay nhất

Hello Yakito,

in order to import the controllers in the main that is the root directory of ur module " __init__.py " you need to create another " __init__.py " which imports the controller.py inside the directory controllers, the syntax is " from.import controllers "

please note this has to be created inside the controllers directory.

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

Hello,

With the same issue, I have just restarted odoo and the problem has disappeared...

I hope that can help !


Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 5 15
7355
1
thg 3 15
3404
5
thg 7 20
6646
3
thg 12 19
8079
2
thg 8 17
5889