Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
1 Відповісти
1248 Переглядів

  • Hi           
    I'm trying to get the field name via the tag "t-esc = 'doc._fields['movement'].string'"

and it works just fine but when I translated the module the fields names (doc._fields['movement'].string) stayed in the original language that I defined the field in .
can anybody tell me how can I get the fields names translated?? 


thanks

Аватар
Відмінити
Найкраща відповідь

Hi,

In qweb you can use the t-field attribute.

Suppose if your field name is movement, just add this code: t t-field="doc.movement"

Thanks

Аватар
Відмінити
Автор

hi
thanks for responding
when I use t-field attribute I cant access the field string value
I want to display the field name
the t-esc is working fine but it's not beeing translated

this will work with t-field, once you give t-field it will automatically bring the string value rather than key

Автор

I want to display the field name without it's value is that possible using t-field?

Автор

could you give an example please ?

< t t-field="doc.field_name"/ >

Автор

I've tried this but it gave me the fields value