can not access patient
parent
dab8603d7d
commit
c708149d54
|
@ -2,7 +2,7 @@ import time
|
||||||
from calendar import monthrange
|
from calendar import monthrange
|
||||||
|
|
||||||
from netforce.model import Model,fields,get_model
|
from netforce.model import Model,fields,get_model
|
||||||
from netforce.access import get_active_company
|
from netforce.access import get_active_company, set_active_user, get_active_user
|
||||||
|
|
||||||
from . import utils
|
from . import utils
|
||||||
|
|
||||||
|
@ -78,6 +78,9 @@ class ReportHDCaseDetail(Model):
|
||||||
return res
|
return res
|
||||||
|
|
||||||
def get_report_data(self,ids,context={}):
|
def get_report_data(self,ids,context={}):
|
||||||
|
user_id=get_active_user()
|
||||||
|
set_active_user(1)
|
||||||
|
|
||||||
company_id=get_active_company()
|
company_id=get_active_company()
|
||||||
company=get_model("company").browse(company_id)
|
company=get_model("company").browse(company_id)
|
||||||
defaults=self.default_get(context=context)
|
defaults=self.default_get(context=context)
|
||||||
|
@ -341,6 +344,7 @@ class ReportHDCaseDetail(Model):
|
||||||
'company_name': '%s %s'% (company.name or "", sub_name),
|
'company_name': '%s %s'% (company.name or "", sub_name),
|
||||||
'parent_company_name': company.parent_id.name or "",
|
'parent_company_name': company.parent_id.name or "",
|
||||||
}
|
}
|
||||||
|
set_active_user(user_id)
|
||||||
return data
|
return data
|
||||||
|
|
||||||
def onchange_date(self,context={}):
|
def onchange_date(self,context={}):
|
||||||
|
|
Loading…
Reference in New Issue