select company

conv_bal
watcha.h 2015-03-17 11:01:06 +07:00
parent bed92ace1a
commit 7cb1e14c09
2 changed files with 17 additions and 47 deletions

View File

@ -141,8 +141,6 @@ class SelectCompany(Model):
def select(self,ids,context={}):
user_id=get_active_user()
if user_id==1:
return
user=get_model('base.user').browse(user_id)
obj=self.browse(ids)[0]
department_name=''
@ -185,6 +183,10 @@ class SelectCompany(Model):
branch_id=None
user=get_model("base.user").browse(user_id)
dpt=user.department_id
res={
'department_id': None,
'branch_id': None,
}
if not dpt:
dpts=user.department_profile_id.departments
if dpts:
@ -192,14 +194,13 @@ class SelectCompany(Model):
'department_ids': [dpt.id for dpt in dpts],
'branch_id': dpts[0].branch_id.id, #XXX
}
return res
else:
return {}
department_id=dpt.id
branch_id=dpt.branch_id.id
return {
res={
'department_id': department_id,
'branch_id': branch_id,
}
return res
SelectCompany.register()

View File

@ -1,37 +1,6 @@
- permission
- sickbed -> can not see sickbed because mix patient
- fixme:
- see deparment from sickbed => hd_case => and update department of patient (manymany)
- hd case => can not click next page
report cycle item :
- sunanna can not see
report:
- reciept:
- remove border line
- merge doctor: **
- ทวีชัย
- merge patient
- สมเศียร
- ***Sequence Number:
- Invoice
- LS, LK
- Extract number (Invoice) *
- wrong GI number
- *** update patient for K. Ekk
after training
- prevent douplicate
- visit
patient_id,date,cycle_id
- report
- walkin
- receipt
- merge data
- patient
-name
- staff
-name
- prevent to gen walk in -> ok
- report P. Moo -> ok
- receipt no
- doctor