Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
3 Ответы
5037 Представления

I' m newbie in odoo and have just created my first module with scaffold. I edit controller.py with


@http.route('/first_odoo_module/first_odoo_module/', auth='public') def index(self, **kw):

         return http.request.render('first_odoo_module.index', { 'teachers' : ['one', 'two', 'three'], })

and  in templates.xml  : <template id="index"> <ul> <li t-foreach="teachers" t-as="teachers"> <t t-esc="teacher"/> </li> </ul> </template>.
then run : "odoo.py -d Test -u first_oddo_module " and got error
QWebTemplateNotFound: External ID not found in the system: first_odoo_module.index
How can I resolve this ?

Аватар
Отменить
Лучший ответ

Check your __openerp__.py file whether the template residing file is included in data . If so change your template id as first_odoo_module.index

like <template id="first_odoo_module.index"> <ul> <li t-foreach="teachers" t-as="teachers"> <t t-esc="teacher"/> </li> </ul> </template>.


Аватар
Отменить
Лучший ответ

This is because first_odoo_module.index is not loaded in your database.

Аватар
Отменить
Автор Лучший ответ

@Ameera PP : How can I make first_odoo_module.index load in my database ? 
@Hilar: I 've tried but it 's not working

Аватар
Отменить