Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
2 Ответы
3239 Представления
<t t-foreach="project.responsibles_ids" t-as="responsible">
	<span t-field="responsible" t-field-options='{"widget": "contact", "fields": ["name", "phone"]}' />
</t>

The above code gives an error:

AssertionError: t-field must have at least a dot like 'record.field_name'

How do i fix this ? It is not possible to use t-field inside an iteration ?

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

t-field can only be use to print the data of the respected fields. Use t-esc and t-options in your case.

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

Hi,

Odoo qweb's t-field directive can only be used when performing field access (Only work on stored fields) or formatting data. Also, t-field-options can be used to customize fields. See below example.

<t-field="record.date" t-field-options='{"widget":"date"'}'/>


Regards

Аватар
Отменить
Related Posts Ответы Просмотры Активность
1
июл. 25
1870
1
мая 25
1950
1
апр. 25
2384
1
февр. 25
1677
0
окт. 24
1450