def parse(cls, report, objects, data, localcontext):
Company = Pool().get('company.company')
timezone = None
company_id = Transaction().context.get('company')
if company_id:
company = Company(company_id)
if company.timezone:
timezone = pytz.timezone(company.timezone)
dt = datetime.now()
localcontext['print_date'] = datetime.astimezone(dt.replace(
tzinfo=pytz.utc), timezone)
localcontext['print_time'] = localcontext['print_date'].time()
return super(PatientEvaluationReport, cls).parse(report, objects, data,
localcontext)
patient_evaluation_report.py 文件源码
python
阅读 33
收藏 0
点赞 0
评论 0
评论列表
文章目录