本文整理汇总了Python中webnotes.model.doc.Document.sample_no方法的典型用法代码示例。如果您正苦于以下问题:Python Document.sample_no方法的具体用法?Python Document.sample_no怎么用?Python Document.sample_no使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类webnotes.model.doc.Document
的用法示例。
在下文中一共展示了Document.sample_no方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: create_test
# 需要导入模块: from webnotes.model.doc import Document [as 别名]
# 或者: from webnotes.model.doc.Document import sample_no [as 别名]
def create_test(self, sample):
test = Document(sample.get("test"))
test.sample_no = sample.get("sample_no")
# test.tested_by = sample.get("tester")
test.shift_incharge_approval = sample.get("shift_incharge")
test.lab_incharge_approval = sample.get("lab_incharge")
test.save()
self.update_test_id(sample,test.name)
return test.name
示例2: create_test_results
# 需要导入模块: from webnotes.model.doc import Document [as 别名]
# 或者: from webnotes.model.doc.Document import sample_no [as 别名]
def create_test_results(test_detail):
d = Document("Test Results")
d.sample_no = test_detail.get("sample_no")
d.test_name = test_detail.get("test")
d.test_id= test_detail.get("name")
if test_detail.get("temperature"):
d.temperature=test_detail.get("temperature")
d.save()
return d.name
示例3: create_test_doc
# 需要导入模块: from webnotes.model.doc import Document [as 别名]
# 或者: from webnotes.model.doc.Document import sample_no [as 别名]
def create_test_doc(self, sample, test_name):
#webnotes.errprint("create test document")
test=Document(test_name)
test.sample_no=sample.sample_no
if test_name == "Test Of Extract":
test.total_weight_of_oil = self.doc.total_weight_of_oil
test.tested_by=sample.tester
test.save()
#webnotes.errprint(test)
return {test_name: test.name}
示例4: create_doc
# 需要导入模块: from webnotes.model.doc import Document [as 别名]
# 或者: from webnotes.model.doc.Document import sample_no [as 别名]
def create_doc(self, test_name, sample):
test_method, specification = self.get_test_method(sample)
test = Document(test_name)
test.sample_no = sample.get("sample_no")
test.specification = specification
test.temperature = get_temp(sample.get("sample_no"))
test.tested_by = self.doc.tester
test.save()
self.update_test_id(sample,test.name)
return test.name
示例5: update_test_log
# 需要导入模块: from webnotes.model.doc import Document [as 别名]
# 或者: from webnotes.model.doc.Document import sample_no [as 别名]
def update_test_log(test_details):
#webnotes.errprint(emp)
d = Document('Test Log')
d.sample_no = test_details.get("sample_no")
d.test = test_details.get("test")
d.status = test_details.get("workflow_state")
#webnotes.errprint(d.status)
d.tester=test_details.get("tested_by")
d.shift_incharge=test_details.get("shift_incharge")
d.lab_incharge=test_details.get("lab_incharge")
d.save()
示例6: create_child_test_document
# 需要导入模块: from webnotes.model.doc import Document [as 别名]
# 或者: from webnotes.model.doc.Document import sample_no [as 别名]
def create_child_test_document(self, samples, parent, test_name, child_details):
for sample in samples:
ch = Document(child_details.get('child_mapper'))
ch.sample_no = sample[0]
ch.parent = parent
if test_name == "Test Preparation":
ch.tester = sample[1]
ch.specification = sample[2]
ch.save()
示例7: create_parent
# 需要导入模块: from webnotes.model.doc import Document [as 别名]
# 或者: from webnotes.model.doc.Document import sample_no [as 别名]
def create_parent(self, sample_dict):
d = Document('Test Allocation')
d.sample_no = sample_dict['sample_no']
d.bottle_no = sample_dict['bottle_no']
d.priority = sample_dict['priority']
d.specification = sample_dict['specification']
d.group_name = sample_dict['test_group']
d.docstatus = 1
d.save()
self.update_sample_master(sample_dict)
return d.name