Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
4122 Vizualizări
#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.

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
0
aug. 15
3298
3
iun. 22
14337
4
sept. 16
3444
5
apr. 16
4151
0
mai 15
73