Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
44362 มุมมอง

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

อวตาร
ละทิ้ง

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 ^^;

คำตอบที่ดีที่สุด

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.

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hello,

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

I hope that can help !


อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
Write function not working แก้ไขแล้ว
2
พ.ค. 15
7508
Where are the rest of the records? แก้ไขแล้ว
1
มี.ค. 15
3503
5
ก.ค. 20
6812
3
ธ.ค. 19
8228
2
ส.ค. 17
6067