improvement
parent
91836fc86c
commit
44afe08d55
|
@ -6,6 +6,7 @@
|
||||||
<field name="date"/>
|
<field name="date"/>
|
||||||
<field name="department_id"/>
|
<field name="department_id"/>
|
||||||
<field name="branch_id"/>
|
<field name="branch_id"/>
|
||||||
|
<field name="nurse_total"/>
|
||||||
<field name="user_id"/>
|
<field name="user_id"/>
|
||||||
<field name="state"/>
|
<field name="state"/>
|
||||||
</list>
|
</list>
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<item string="Labor Cost" action="clinic_labor_cost"/>
|
<item string="Labor Cost" action="clinic_labor_cost"/>
|
||||||
<item string="Labor Cost Items" action="clinic_labor_cost_item"/>
|
<item string="Labor Cost Items" action="clinic_labor_cost_item"/>
|
||||||
<item string="Labor Cost Entries" action="clinic_labor_cost_entry"/>
|
<item string="Labor Cost Entries" action="clinic_labor_cost_entry"/>
|
||||||
<!--<item string="Matching Invoices" action="clinic_report_payment_matching"/>-->
|
<item string="Matching Payment(Old)" action="clinic_report_payment_matching"/>
|
||||||
<item string="Matching Payment" action="clinic_matching_payment"/>
|
<item string="Matching Payment" action="clinic_matching_payment"/>
|
||||||
<item string="HD Case Expenses" action="clinic_hd_case_expense"/>
|
<item string="HD Case Expenses" action="clinic_hd_case_expense"/>
|
||||||
<divider/>
|
<divider/>
|
||||||
|
|
|
@ -3,10 +3,6 @@
|
||||||
<field name="type_id" onchange="onchange_type" span="3"/>
|
<field name="type_id" onchange="onchange_type" span="3"/>
|
||||||
<field name="hcode_id" span="3" attrs='{"invisible":[["show_hcode","=",0]]}'/>
|
<field name="hcode_id" span="3" attrs='{"invisible":[["show_hcode","=",0]]}'/>
|
||||||
<field name="show_hcode" invisible="1" span="3"/>
|
<field name="show_hcode" invisible="1" span="3"/>
|
||||||
<group span="6" columns="1">
|
<button string='Match' type="success" icon="ok" size="small" method="match_invoice"/>
|
||||||
<button string='Match' type="success" icon="ok" method="match_invoice"/>
|
<button string='Make A Payment' method="make_payment" size="small" type="default" icon="arrow-right"/>
|
||||||
<button string='Make A Payment' method="make_payment" type="default" icon="arrow-right"/>
|
|
||||||
</group>
|
|
||||||
<group span="6" columns="1">
|
|
||||||
</group>
|
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -4,6 +4,7 @@ class AccountInvoice(Model):
|
||||||
_inherit="account.invoice"
|
_inherit="account.invoice"
|
||||||
_fields={
|
_fields={
|
||||||
'clinic_expense_id': fields.Many2One("clinic.hd.case.expense","Expense"),
|
'clinic_expense_id': fields.Many2One("clinic.hd.case.expense","Expense"),
|
||||||
|
'department_id': fields.Many2One("clinic.department","Department",search=True),
|
||||||
}
|
}
|
||||||
|
|
||||||
AccountInvoice.register()
|
AccountInvoice.register()
|
||||||
|
|
|
@ -10,7 +10,7 @@ class CycleItem(Model):
|
||||||
_name_field="name"
|
_name_field="name"
|
||||||
_multi_company=True
|
_multi_company=True
|
||||||
|
|
||||||
def _get_all(self,ids,context={}):
|
def _get_store(self,ids,context={}):
|
||||||
res={}
|
res={}
|
||||||
for obj in self.browse(ids):
|
for obj in self.browse(ids):
|
||||||
cycle=obj.cycle_id
|
cycle=obj.cycle_id
|
||||||
|
@ -25,20 +25,29 @@ class CycleItem(Model):
|
||||||
}
|
}
|
||||||
return res
|
return res
|
||||||
|
|
||||||
|
def _get_all(self,ids,context={}):
|
||||||
|
res={}
|
||||||
|
for obj in self.browse(ids):
|
||||||
|
res[obj.id]={
|
||||||
|
'nurse_total': len(obj.lines),
|
||||||
|
}
|
||||||
|
return res
|
||||||
|
|
||||||
_fields={
|
_fields={
|
||||||
'name': fields.Char("Name",function="_get_all",function_multi=True,store=True),
|
'name': fields.Char("Name",function="_get_store",function_multi=True,store=True),
|
||||||
'date': fields.Date("Date",search=True),
|
'date': fields.Date("Date",search=True),
|
||||||
'cycle_id': fields.Many2One("clinic.cycle", "Cycle",search=True),
|
'cycle_id': fields.Many2One("clinic.cycle", "Cycle",search=True),
|
||||||
'visits': fields.One2Many("clinic.visit","cycle_item_id", "Visits"),
|
'visits': fields.One2Many("clinic.visit","cycle_item_id", "Visits"),
|
||||||
'hd_cases': fields.One2Many("clinic.hd.case","cycle_item_id", "HD Cases"),
|
'hd_cases': fields.One2Many("clinic.hd.case","cycle_item_id", "HD Cases"),
|
||||||
'lines': fields.One2Many("clinic.cycle.item.line",'cycle_item_id','Nurses'),
|
'lines': fields.One2Many("clinic.cycle.item.line",'cycle_item_id','Nurses'),
|
||||||
'sequence': fields.Char("Sequence",function="_get_all",function_multi=True,store=True),
|
'sequence': fields.Char("Sequence",function="_get_store",function_multi=True,store=True),
|
||||||
'user_id': fields.Many2One("base.user","Validator"),
|
'user_id': fields.Many2One("base.user","Validator"),
|
||||||
'company_id': fields.Many2One("company", "Company"),
|
'company_id': fields.Many2One("company", "Company"),
|
||||||
'branch_id': fields.Many2One("clinic.branch", "Branch",search=True),
|
'branch_id': fields.Many2One("clinic.branch", "Branch",search=True),
|
||||||
'department_id': fields.Many2One("clinic.department", "Department",search=True),
|
'department_id': fields.Many2One("clinic.department", "Department",search=True),
|
||||||
"comments": fields.One2Many("message","related_id","Comments"), "company_id": fields.Many2One("company","Company"),
|
"comments": fields.One2Many("message","related_id","Comments"), "company_id": fields.Many2One("company","Company"),
|
||||||
"state": fields.Selection([("draft","Draft"),("validated","Validated")],"Status",required=True),
|
"state": fields.Selection([("draft","Draft"),("validated","Validated")],"Status",required=True),
|
||||||
|
'nurse_total': fields.Integer("Total (Nurse)",function="_get_all",function_multi=True),
|
||||||
}
|
}
|
||||||
|
|
||||||
def _get_branch(self,context={}):
|
def _get_branch(self,context={}):
|
||||||
|
|
|
@ -25,9 +25,9 @@ class Dialyzer(Model):
|
||||||
"company_id": fields.Many2One("company","Company"),
|
"company_id": fields.Many2One("company","Company"),
|
||||||
'product_id': fields.Many2One("product", "Product",required=True),
|
'product_id': fields.Many2One("product", "Product",required=True),
|
||||||
"pickings": fields.One2Many("stock.picking","related_id","Pickings"),
|
"pickings": fields.One2Many("stock.picking","related_id","Pickings"),
|
||||||
"patient_id": fields.Many2One("clinic.patient","Patient"),
|
"patient_id": fields.Many2One("clinic.patient","Patient",search=True),
|
||||||
"visit_id": fields.Many2One("clinic.visit","Visit"),
|
"visit_id": fields.Many2One("clinic.visit","Visit",search=True),
|
||||||
"hd_case_id": fields.Many2One("clinic.hd.case","HD Case"),
|
"hd_case_id": fields.Many2One("clinic.hd.case","HD Case",search=True),
|
||||||
"hd_cases": fields.One2Many("clinic.hd.case","dlz_id","HD Case"), #TODO funtion to get hd case
|
"hd_cases": fields.One2Many("clinic.hd.case","dlz_id","HD Case"), #TODO funtion to get hd case
|
||||||
'department_id': fields.Many2One("clinic.department","Department",search=True),
|
'department_id': fields.Many2One("clinic.department","Department",search=True),
|
||||||
}
|
}
|
||||||
|
|
|
@ -435,7 +435,8 @@ class HDCase(Model):
|
||||||
"inv_type": "invoice",
|
"inv_type": "invoice",
|
||||||
"tax_type": "tax_in",
|
"tax_type": "tax_in",
|
||||||
'due_date': due_date,
|
'due_date': due_date,
|
||||||
"ref": obj.number,
|
"ref": '%s (%s)'%(patient.name or '',patient.number or ''),
|
||||||
|
'department_id': obj.department_id.id,
|
||||||
"related_id": "clinic.hd.case,%s"%obj.id,
|
"related_id": "clinic.hd.case,%s"%obj.id,
|
||||||
"currency_id": currency_id,
|
"currency_id": currency_id,
|
||||||
"company_id": company_id,
|
"company_id": company_id,
|
||||||
|
|
|
@ -161,7 +161,7 @@ class VisitBoard(Model):
|
||||||
department=visit.department_id
|
department=visit.department_id
|
||||||
if not branch:
|
if not branch:
|
||||||
branch=department.branch_id
|
branch=department.branch_id
|
||||||
|
|
||||||
hn_name=patient.hn_no or '-'
|
hn_name=patient.hn_no or '-'
|
||||||
|
|
||||||
visit_date=visit.visit_date
|
visit_date=visit.visit_date
|
||||||
|
@ -183,8 +183,8 @@ class VisitBoard(Model):
|
||||||
'cycle_color': cycle.color,
|
'cycle_color': cycle.color,
|
||||||
'department_id': department.id,
|
'department_id': department.id,
|
||||||
'department_name': department.name or '',
|
'department_name': department.name or '',
|
||||||
'branch_id': branch.id,
|
'branch_id': branch and branch.id or None,
|
||||||
'branch_name': branch.name or '',
|
'branch_name': branch and branch.name or '',
|
||||||
'patient_name': patient.name,
|
'patient_name': patient.name,
|
||||||
'patient_id': patient.id,
|
'patient_id': patient.id,
|
||||||
'patient_type': patient.type_id.name or "",
|
'patient_type': patient.type_id.name or "",
|
||||||
|
|
Loading…
Reference in New Issue