Merge branch 'fix1' of https://dev.netforce.com/netforce-customized/clinic into fix1
commit
8f1edd7e5a
|
@ -39,6 +39,7 @@
|
|||
<item string="HD Cases" perm="clinic_hdcase">
|
||||
<item string="HD Cases" action="clinic_hd_case"/>
|
||||
<item string="RD Shop" action="clinic_shop" perm="clinic_shop"/>
|
||||
<item string="Sickbed" action="clinic_sickbed"/>
|
||||
</item>
|
||||
<item string="Reports" perm="clinic_report">
|
||||
<item string="HD Case Summary (Revise)" action="report_hdcase_summary"/>
|
||||
|
@ -53,7 +54,6 @@
|
|||
<item string="Settings" perm="clinic_settings">
|
||||
<item string="Clinic Settings" action="clinic_setting"/>
|
||||
<divider/>
|
||||
<item string="Sickbed" action="clinic_sickbed"/>
|
||||
<item string="Cycles" action="clinic_cycle"/>
|
||||
<item string="Hospitals" action="clinic_hospital"/>
|
||||
<item string="Nationalities" action="clinic_nation"/>
|
||||
|
|
|
@ -4,7 +4,7 @@ import urllib.parse as urllib
|
|||
from datetime import datetime
|
||||
from calendar import monthrange
|
||||
from netforce.model import Model, fields, get_model
|
||||
from netforce.access import get_active_company, get_active_user
|
||||
from netforce.access import get_active_company, get_active_user, set_active_user
|
||||
|
||||
from . import utils
|
||||
|
||||
|
@ -56,6 +56,7 @@ class ReportHDCaseSummary(Model):
|
|||
def get_report_data(self,ids,context={}):
|
||||
company_id=get_active_company()
|
||||
company=get_model("company").browse(company_id)
|
||||
user_id=get_active_user()
|
||||
date=datetime.now().strftime("%Y-%m-%d")
|
||||
year=int(date[0:4])
|
||||
crr_month=int(date[5:7])
|
||||
|
@ -271,8 +272,8 @@ class ReportHDCaseSummary(Model):
|
|||
plines=medicals['plines']
|
||||
prod_titles=medicals['prod_titles']
|
||||
date_print=time.strftime("%m/%d/%Y %H:%M:%S")
|
||||
user_id=get_active_user()
|
||||
user=get_model('base.user').browse(user_id)
|
||||
set_active_user(1)
|
||||
data={
|
||||
'user_name': user.name,
|
||||
'hdcase_type': hdcase_type,
|
||||
|
@ -294,6 +295,7 @@ class ReportHDCaseSummary(Model):
|
|||
'company_name': '%s %s'% (company.name or "", sub_name),
|
||||
'parent_company_name': company.parent_id.name or "",
|
||||
}
|
||||
set_active_user(user_id)
|
||||
return data
|
||||
|
||||
def onchange_date(self,context={}):
|
||||
|
|
Loading…
Reference in New Issue