Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
2370 Lượt xem

I try to change a base field attributes and follow that video youtube.com/watch?v=6bIgk4mtfQ4 it'is running well with required or readonly attributes to 1 but don't with the translate attribute to True or 1.

The idea is to use an external url from the website menu with different language like if one people visit my website in english, I wloud like to redirect it to an external page in reliability with his language then I need one url for each language but the base url field attribute language is not set. 


Rgds

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

Thanks, but it's an online version and I have no other choice to modify it directly from a personnalized view.

Rgds

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hi,

If you need to make field translatable, you can try via custom module, you can create a custom module, inheriting your model and add translate=True attribute for the field.

Sample:

class UtmTag(models.Model):
_inherit = 'utm.tag'

name = fields.Char(translate=True)


Thanks

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 7 23
2527
0
thg 7 23
2193
0
thg 7 23
1984
0
thg 1 21
3084
1
thg 7 19
5322