Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
2 Відповіді
3257 Переглядів
<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
1962
1
трав. 25
2050
1
квіт. 25
2481
1
лют. 25
1751
0
жовт. 24
1494