fix access

conv_bal
watcha.h 2015-03-15 12:36:17 +07:00
parent a8826b9b8e
commit 2b1b63a2fc
3 changed files with 24 additions and 6 deletions

View File

@ -205,6 +205,12 @@ class Patient(Model):
if res:
return res['branch_id']
def _get_default_location(self,context={}):
res=get_model('select.company').get_select()
if res:
dpt=get_model("clinic.department").browse(res['department_id'])
return dpt.code
_defaults={
#"number": _get_number,
"number": "",
@ -218,6 +224,7 @@ class Patient(Model):
'state': 'admit',
'walkin': 'no',
'departments': _get_departments,
'location': _get_default_location,
}
_sql_constraints=("clinic_patient_key_uniq","unique(name_check,branch_id)","name should be unique"),

View File

@ -192,6 +192,12 @@ class Staff(Model):
return [res['department_id']]
return get_model("clinic.department").search([])
def _get_default_location(self,context={}):
res=get_model('select.company').get_select()
if res:
dpt=get_model("clinic.department").browse(res['department_id'])
return dpt.code
_defaults={
'active': True,
"state": "part_time",
@ -201,6 +207,7 @@ class Staff(Model):
"company_id": lambda *a: get_active_company(),
'branch_id': _get_branch,
'departments': _get_departments,
'location': _get_default_location,
}
#_key=["name_check","branch_id"] #not working

View File

@ -16,12 +16,14 @@ report:
- merge patient
- สมเศียร
- ** sequence invoice
- ***Sequence Number:
- Invoice
- LS, LK
- Extract number (Invoice) *
- wrong GI number
- *** update patient for K. Ekk
- prevent to gen walk in -> ok
- update patient for K. Ekk
after training
- prevent douplicate
- visit
patient_id,date,cycle_id
@ -29,5 +31,7 @@ report:
-name
- staff
-name
- prevent to gen walk in -> ok
- report P. Moo -> ok
- wrong GI number
- receipt no