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

How can i overwrite the value of "self._uid" based on special condition

Eg:- self._uid = int(my_userid) gives an error "AttributeError: can't set attribute"

Any thought on this is appreciated !..

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

 use self.sudo(my_userid), it will set the uid value in the self .

self.sudo(my_userid)
Ảnh đại diện
Huỷ bỏ
Tác giả

Hi Prakash , Thanks for your answer , but this is not compatible with version 7 . Am actually trying to implement this small fix in version 7 . Is there any alternatives or for this .. Thanks ..

Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 9 19
98
1
thg 7 17
4195
4
thg 8 16
8410
1
thg 3 16
5019
2
thg 3 16
7288