Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
4040 Lượt xem
#Global Variable
context_data = None # contains dictionary

@api.model
def fields_view_get(self, view_id=None, view_type='form', toolbar=False, submenu=False):
res = super(sales_dash_report, self).fields_view_get(
view_id=view_id, view_type=view_type, toolbar=toolbar, submenu=submenu)
global context_copy

if view_type == 'form' and context_copy.get('key'):

#some code to execute

return res


While execute on local machine it executing normal but while try to run on production server then it gives an error that context_data (None object) has no attribute get.

Please help to solve this issue.

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 8 15
3222
3
thg 6 22
14178
4
thg 9 16
3347
5
thg 4 16
4021
0
thg 5 15
73