improve
parent
f8d0f01cdc
commit
c48ad556bc
|
@ -76,7 +76,7 @@
|
|||
<template>
|
||||
<div>
|
||||
<p></p>
|
||||
<b>Note: </b><span style="color:green"><b>"Cycle"</b> ที่ระบุไว้ที่หน้านี้ จะเป็นข้อมูลต้นทางที่ระบบจะนำไปสร้าง Visit ล่วงหน้า</span></div>
|
||||
<b>Note: </b><span style="color:green"><b style="color:#3477b0">"Cycle"</b> ที่ระบุไว้ที่หน้านี้ จะเป็นข้อมูลต้นทางที่ระบบจะนำไปสร้าง Visit ล่วงหน้า</span></div>
|
||||
</template>
|
||||
</group>
|
||||
<group span="4" columns="1">
|
||||
|
@ -88,7 +88,7 @@
|
|||
<template>
|
||||
<div>
|
||||
<p></p>
|
||||
<b>Note: </b><span style="color:green"><b>"Location"</b> คือ สถานที่ที่ผู้ป่วยสามารถรับการรักษา ซึ่งระบุได้มากกว่า 1 ที่</span></div>
|
||||
<b>Note: </b><span style="color:green"><b style="color:#3477b0">"Location"</b> คือ สถานที่ที่ผู้ป่วยสามารถรับการรักษา ซึ่งระบุได้มากกว่า 1 ที่</span></div>
|
||||
</template>
|
||||
</group>
|
||||
<group span="4" columns="1">
|
||||
|
|
|
@ -49,7 +49,7 @@ class CycleItem(Model):
|
|||
"state": fields.Selection([("draft","Draft"),("validated","Validated")],"Status",required=True),
|
||||
'nurse_total': fields.Integer("Nurses",function="_get_all",function_multi=True),
|
||||
}
|
||||
|
||||
|
||||
def _get_branch(self,context={}):
|
||||
res=get_model('select.company').get_select()
|
||||
if res:
|
||||
|
@ -58,8 +58,10 @@ class CycleItem(Model):
|
|||
def _get_department(self,context={}):
|
||||
res=get_model('select.company').get_select()
|
||||
if res:
|
||||
return res['department_id']
|
||||
|
||||
if res.get("department_ids"):
|
||||
return res['department_ids'][0]
|
||||
else:
|
||||
return res['department_id']
|
||||
|
||||
_defaults={
|
||||
'state': 'draft',
|
||||
|
|
|
@ -55,15 +55,6 @@ class Shop(Model):
|
|||
'note': fields.Text("Note"),
|
||||
}
|
||||
|
||||
def _get_branch(self,context={}):
|
||||
b_ids=get_model('clinic.branch').search([])
|
||||
if b_ids:
|
||||
return b_ids[0]
|
||||
|
||||
def _get_department(self,context={}):
|
||||
dpt_ids=get_model('clinic.department').search([])
|
||||
if dpt_ids:
|
||||
return dpt_ids[0]
|
||||
|
||||
def _get_shop_categs(self,context={}):
|
||||
st=get_model("clinic.setting").browse(1)
|
||||
|
@ -114,6 +105,19 @@ class Shop(Model):
|
|||
return num
|
||||
get_model("sequence").increment_number(seq_id,context=context)
|
||||
|
||||
def _get_branch(self,context={}):
|
||||
res=get_model('select.company').get_select()
|
||||
if res:
|
||||
return res['branch_id']
|
||||
|
||||
def _get_department(self,context={}):
|
||||
res=get_model('select.company').get_select()
|
||||
if res:
|
||||
if res.get("department_ids"):
|
||||
return res['department_ids'][0]
|
||||
else:
|
||||
return res['department_id']
|
||||
|
||||
_defaults={
|
||||
'number': '/',
|
||||
'date': lambda *a: time.strftime("%Y-%m-%d"),
|
||||
|
@ -183,9 +187,8 @@ class Shop(Model):
|
|||
data=context['data']
|
||||
contact_id=data['contact_id']
|
||||
data['patient_id']=None
|
||||
data['department_id']=None
|
||||
data['branch_id']=None
|
||||
print("contact_id ", contact_id)
|
||||
#data['department_id']=None
|
||||
#data['branch_id']=None
|
||||
for patient in get_model("clinic.patient").search_browse([['partner_id','=',contact_id]]):
|
||||
dpt=patient.department_id
|
||||
branch=patient.branch_id
|
||||
|
|
Loading…
Reference in New Issue