pending
							parent
							
								
									1c6275e72c
								
							
						
					
					
						commit
						5401f44a1c
					
				|  | @ -31,8 +31,9 @@ | |||
|         </tab> | ||||
|     </tabs> | ||||
|     <foot> | ||||
|         <button string="Confirm" type="success" method="confirm" states="draft" /> | ||||
|         <button string="Discard" type="danger" method="cancel" states="draft" /> | ||||
|         <button string="Pending" type="default" method="pending" states="draft" /> | ||||
|         <button string="Confirm" type="success" method="confirm" states="pending" /> | ||||
|         <button string="Discard" type="danger" method="cancel" states="pending" /> | ||||
|    </foot> | ||||
|     <related> | ||||
|         <field name="hd_cases" readonly="1"/> | ||||
|  |  | |||
|  | @ -30,6 +30,7 @@ class Migration(migration.Migration): | |||
|                         'patient_id': patient.id, | ||||
|                         'doctor_id': doctor.id, | ||||
|                         'department_id': department.id, | ||||
|                         'state': 'pending', | ||||
|                     } | ||||
|                     # find cycle | ||||
|                     dttran=line.get("dttran") | ||||
|  |  | |||
|  | @ -416,5 +416,11 @@ class Visit(Model): | |||
|         vals['sequence']='%s-%s'%(obj.time_start[0:10],cycle.sequence) #date-sequence | ||||
|         vals['visit_date']=obj.time_start[0:10] | ||||
|         super().write(ids,vals,**kw) | ||||
|      | ||||
|     def pending(self,ids,context={}): | ||||
|         obj=self.browse(ids)[0] | ||||
|         obj.write({ | ||||
|             'state': 'pending', | ||||
|         }) | ||||
| 
 | ||||
| Visit.register() | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue