cycle color
parent
3471f0b207
commit
b8fa64d373
|
@ -1,6 +1,6 @@
|
|||
from datetime import datetime
|
||||
|
||||
from netforce.model import Model, fields
|
||||
from netforce.model import Model, fields, get_model
|
||||
from netforce.access import get_active_company
|
||||
|
||||
class Cycle(Model):
|
||||
|
@ -56,5 +56,18 @@ class Cycle(Model):
|
|||
'company_id': lambda *a: get_active_company(),
|
||||
}
|
||||
|
||||
def write(self,ids,vals,**kw):
|
||||
obj=self.browse(ids)[0]
|
||||
super().write(ids,vals,**kw)
|
||||
if 'color' in vals.keys():
|
||||
color=vals['color']
|
||||
#old_color=obj.color
|
||||
dom=[]
|
||||
dom.append(['cycle_id','=',obj.id])
|
||||
#dom.append(['cycle_color','=',old_color])
|
||||
for vs in get_model('clinic.visit').search_browse(dom):
|
||||
vs.write({
|
||||
'cycle_color': color,
|
||||
})
|
||||
|
||||
Cycle.register()
|
||||
|
|
|
@ -147,7 +147,7 @@ class MakeAPT(Model):
|
|||
while wd != weekday-1:
|
||||
start_date+=timedelta(days=1)
|
||||
wd=start_date.weekday()
|
||||
#XXX should gen only in scope
|
||||
|
||||
if start_date.strftime(FMT_DATE) > date_to.strftime(FMT_DATE):
|
||||
continue
|
||||
count=0
|
||||
|
|
|
@ -9,7 +9,7 @@ class PatientCycle(Model):
|
|||
"patient_id": fields.Many2One('clinic.patient',"Patient",required=True,on_delete="cascade",search=True),
|
||||
"cycle_id": fields.Many2One('clinic.cycle',"Cycle",search=True),
|
||||
"department_id": fields.Many2One('clinic.department',"Department",search=True),
|
||||
'day': fields.Selection([('mon', 'Monday'), ('tue','Tuesday'), ('wed','Wedsday'),('thu','Thursday'),('fri','Friday'),('sat','Satherday'),('sun','Sunday')], 'Days',search=True),
|
||||
'day': fields.Selection([('mon', 'Monday'), ('tue','Tuesday'), ('wed','Wedsday'),('thu','Thursday'),('fri','Friday'),('sat','Satherday'),('sun','Sunday')], 'Day',search=True),
|
||||
}
|
||||
|
||||
PatientCycle.register()
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
<td style="background-color:#ddddff"><b>{{cycle_name}}</b></td>
|
||||
<td style="background-color:#ddddff" colspan="10"></td>
|
||||
{{else}}
|
||||
<td style="background-color:{{cycle_color}}">{{cycle_name}}</td>
|
||||
<td style="background-color:{{cycle_color}};color:white"><center>{{cycle_name}}</center></td>
|
||||
<td style="background-color:{{visit_color}}">{{no}}</td>
|
||||
<td style="background-color:{{visit_color}}"><a href="/ui#name=clinic_visit&active_id={{visit_id}}&mode=form">{{number}}</a></td>
|
||||
<td style="background-color:{{visit_color}}">{{hn_name}}</td>
|
||||
|
|
|
@ -1,17 +1,24 @@
|
|||
todo:
|
||||
- accounting
|
||||
- doctor detail
|
||||
- import
|
||||
- visit summary -> ok
|
||||
- calendar
|
||||
- search calendar
|
||||
- remove
|
||||
- multi company
|
||||
- running number for each branch
|
||||
|
||||
=======
|
||||
generate visit ใหม่
|
||||
popup select dyalyzer
|
||||
generate visit ใหม่ -> ok
|
||||
popup select dyalyzer -> ok
|
||||
- visit
|
||||
- confirm: if pt has dialyzer -> auto select else empty (need to select on hd case)
|
||||
|
||||
- click pay -> cash -> not update use time (dlz)
|
||||
- reset use time -> how ?
|
||||
- click pay -> cash -> not update use time (dlz) -> ok
|
||||
- reset use time after hd case is done! -> ok
|
||||
|
||||
=======
|
||||
report:
|
||||
- doctor detail (for accounting)
|
||||
- patient visit
|
||||
|
||||
sharing setting
|
||||
- filter by branch
|
||||
- patient -> ok
|
||||
|
@ -26,8 +33,6 @@ sharing setting
|
|||
- schedule -> ok
|
||||
- dialyser -> ok
|
||||
|
||||
- add popup to new dialyser -> not yet ****
|
||||
- running number
|
||||
|
||||
user:
|
||||
- update hd case
|
||||
|
|
Loading…
Reference in New Issue