本文整理汇总了Python中trytond.pool.Pool.get_health_professional方法的典型用法代码示例。如果您正苦于以下问题:Python Pool.get_health_professional方法的具体用法?Python Pool.get_health_professional怎么用?Python Pool.get_health_professional使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类trytond.pool.Pool
的用法示例。
在下文中一共展示了Pool.get_health_professional方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: pre_sign
# 需要导入模块: from trytond.pool import Pool [as 别名]
# 或者: from trytond.pool.Pool import get_health_professional [as 别名]
def pre_sign(cls, components):
'''sets the healthprof and the sign_time for the current instance'''
health_prof_model = Pool().get('gnuhealth.healthprofessional')
signtime = datetime.now()
for comp in components:
comp.signed_by = health_prof_model.get_health_professional()
comp.sign_time = signtime
示例2: end_evaluation
# 需要导入模块: from trytond.pool import Pool [as 别名]
# 或者: from trytond.pool.Pool import get_health_professional [as 别名]
def end_evaluation(cls, evaluations):
evaluation_id = evaluations[0]
# Change the state of the evaluation to "Done"
HealthProf= Pool().get('gnuhealth.healthprofessional')
signing_hp = HealthProf.get_health_professional()
cls.write(evaluations, {
'state': 'done',
'signed_by': signing_hp,
})
示例3: end_assessment
# 需要导入模块: from trytond.pool import Pool [as 别名]
# 或者: from trytond.pool.Pool import get_health_professional [as 别名]
def end_assessment(cls, assessments):
assessment_id = assessments[0]
# Change the state of the assessment to "Done"
HealthProf= Pool().get('gnuhealth.healthprofessional')
signing_hp = HealthProf.get_health_professional()
cls.write(assessments, {
'state': 'done',
'signed_by': signing_hp,
})
示例4: generate_death_certificate
# 需要导入模块: from trytond.pool import Pool [as 别名]
# 或者: from trytond.pool.Pool import get_health_professional [as 别名]
def generate_death_certificate(cls, certificates):
certificate = certificates[0]
HealthProf = Pool().get('gnuhealth.healthprofessional')
# Change the state of the certificate to "Done"
serial_doc=cls.get_serial(certificate)
signing_hp = HealthProf.get_health_professional()
if not signing_hp:
cls.raise_user_error(
"No health professional associated to this user !")
cls.write(certificates, {
'serializer': serial_doc,
'document_digest': HealthCrypto().gen_hash(serial_doc),
'state': 'done',})
示例5: sign_evaluation
# 需要导入模块: from trytond.pool import Pool [as 别名]
# 或者: from trytond.pool.Pool import get_health_professional [as 别名]
def sign_evaluation(cls, evaluations):
evaluation = evaluations[0]
HealthProf= Pool().get('gnuhealth.healthprofessional')
# Change the state of the evaluation to "Signed"
# Include signing health professional
serial_doc=cls.get_serial(evaluation)
signing_hp = HealthProf.get_health_professional()
if not signing_hp:
cls.raise_user_error(
"No health professional associated to this user !")
cls.write(evaluations, {
'serializer': serial_doc,
'document_digest': HealthCrypto().gen_hash(serial_doc),
'state': 'signed',})
示例6: default_performed_by
# 需要导入模块: from trytond.pool import Pool [as 别名]
# 或者: from trytond.pool.Pool import get_health_professional [as 别名]
def default_performed_by():
HealthProfessional = Pool().get('gnuhealth.healthprofessional')
return HealthProfessional.get_health_professional()