本文整理汇总了Python中corehq.apps.commtrack.models.RequisitionCase.user_id方法的典型用法代码示例。如果您正苦于以下问题:Python RequisitionCase.user_id方法的具体用法?Python RequisitionCase.user_id怎么用?Python RequisitionCase.user_id使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类corehq.apps.commtrack.models.RequisitionCase
的用法示例。
在下文中一共展示了RequisitionCase.user_id方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: to_requisition_case
# 需要导入模块: from corehq.apps.commtrack.models import RequisitionCase [as 别名]
# 或者: from corehq.apps.commtrack.models.RequisitionCase import user_id [as 别名]
def to_requisition_case(self, product_id):
req_case = RequisitionCase()
req_case.user_id = self.agent_code
req_case.set_case_property("program_id", self.program_id)
req_case.set_case_property("period_id", self.period_id)
req_case.product_id = product_id
req_case.external_id = self.id
req_case.requisition_status = self.requisition_status
req_case.set_case_property("order_id", self.order_id)
req_case.set_case_property("order_status", self.order_status)
req_case.set_case_property("emergency", self.emergency)
req_case.set_case_property("start_date", self.period_start_date)
req_case.set_case_peoperty("end_date", self.period_end_date)
return req_case
示例2: to_requisition_case
# 需要导入模块: from corehq.apps.commtrack.models import RequisitionCase [as 别名]
# 或者: from corehq.apps.commtrack.models.RequisitionCase import user_id [as 别名]
def to_requisition_case(self, product_id, case_id=None, case_rev=None):
req_case = RequisitionCase()
req_case.type = REQUISITION_CASE_TYPE
req_case.user_id = self.agent_code
req_case.set_case_property("program_id", self.program_id)
req_case.set_case_property("period_id", self.period_id)
req_case.product_id = product_id
req_case.external_id = self.id
req_case.requisition_status = self.requisition_status
req_case.set_case_property("order_id", self.order_id)
req_case.set_case_property("order_status", self.order_status)
req_case.set_case_property("emergency", self.emergency)
req_case.set_case_property("start_date", self.period_start_date)
req_case.set_case_property("end_date", self.period_end_date)
if case_id:
req_case._id = case_id
if case_rev:
req_case._rev = case_rev
return req_case