list hd case in dialyzer
parent
18bf6dcf86
commit
fae65fe0fc
|
@ -28,5 +28,6 @@
|
|||
</foot>
|
||||
<related>
|
||||
<field name="pickings" click_action="view_picking"/>
|
||||
<field name="hd_cases" readonly="1"/>
|
||||
</related>
|
||||
</form>
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
<field name="expiry_card"/>
|
||||
<field name="birthday"/>
|
||||
<field name="department_id"/>
|
||||
<field name="categ_id"/>
|
||||
</group>
|
||||
<group span="6" columns="1">
|
||||
<field name="picture"/>
|
||||
|
|
|
@ -9,6 +9,7 @@ class Dialyzer(Model):
|
|||
_audit_log=True
|
||||
_name_field="number"
|
||||
_multi_company=True
|
||||
|
||||
_fields={
|
||||
"number": fields.Char("Number",required=True,search=True),
|
||||
"description": fields.Text("Description",search=True),
|
||||
|
@ -28,6 +29,7 @@ class Dialyzer(Model):
|
|||
"patient_id": fields.Many2One("clinic.patient","Patient"),
|
||||
"visit_id": fields.Many2One("clinic.visit","Visit"),
|
||||
"hd_case_id": fields.Many2One("clinic.hd.case","HD Case"),
|
||||
"hd_cases": fields.One2Many("clinic.hd.case","dlz_id","HD Case"), #TODO funtion to get hd case
|
||||
}
|
||||
|
||||
def _get_number(self,context={}):
|
||||
|
|
|
@ -72,6 +72,7 @@ class HDCase(Model):
|
|||
'pay_date': fields.Date("Pay Date"),
|
||||
'pay_account_id': fields.Many2One("account.account","Account"),
|
||||
'payment_id': fields.Many2One("account.payment","Payment"), # for print
|
||||
'dlz_id': fields.Many2One("clinic.dialyzer","Dialyzer"), # for link
|
||||
}
|
||||
|
||||
def _get_number(self,context={}):
|
||||
|
@ -134,6 +135,7 @@ class HDCase(Model):
|
|||
line["bid_flow_rate"]=dialyzer.bid_flow_rate
|
||||
line["ultrafittration"]=dialyzer.ultrafittration
|
||||
line["state"]=dialyzer.state
|
||||
data['dlz_id']=dialyzer.id
|
||||
return data
|
||||
|
||||
def onchange_patient(self,context={}):
|
||||
|
|
|
@ -10,7 +10,7 @@ class Hdcaseline(Model):
|
|||
"uom_id": fields.Many2One("uom","UOM",required=True,search=True),
|
||||
"price":fields.Float("Price"),
|
||||
"amount":fields.Float("Amount"),
|
||||
"type": fields.Selection([("fee","Fee"),("other","Other")],"Type",required=True),
|
||||
"type": fields.Selection([("fee","Fee"),("other","Other"),("service","Service")],"Type",required=True),
|
||||
}
|
||||
|
||||
_defaults={
|
||||
|
|
|
@ -44,6 +44,7 @@ class Nurse(Model):
|
|||
"user_id": fields.Many2One("base.user","User"),
|
||||
'picture': fields.File("Picture"),
|
||||
'note': fields.Text("Note"),
|
||||
'categ_id': fields.Many2One("product.categ","Category"),
|
||||
}
|
||||
|
||||
def _get_number(self,context={}):
|
||||
|
|
|
@ -90,9 +90,6 @@ class Visit(Model):
|
|||
}
|
||||
_order="id desc"
|
||||
|
||||
def get_dialyzer(self):
|
||||
return
|
||||
|
||||
def confirm(self,ids,context={}):
|
||||
obj=self.browse(ids[0])
|
||||
number=obj.number
|
||||
|
@ -120,6 +117,8 @@ class Visit(Model):
|
|||
'state': 'draft',
|
||||
}
|
||||
|
||||
# search dialyzer and count automatically
|
||||
# search Nurse with category
|
||||
products=get_model("product").search_browse([['code','=','FEE']])
|
||||
for product in products:
|
||||
vals['lines'].append(('create',{
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
===
|
||||
- skip holiday
|
||||
-> mum
|
||||
-
|
||||
====
|
||||
find dialyzer automatic after confirm visit
|
||||
====
|
||||
- import data
|
||||
- payment
|
||||
|
|
Loading…
Reference in New Issue