state labor cost entry
parent
9847749319
commit
d84c9ca9f8
|
@ -1,8 +0,0 @@
|
|||
<action>
|
||||
<field name="string">Doctors</field>
|
||||
<field name="view_cls">multi_view</field>
|
||||
<field name="model">clinic.doctor</field>
|
||||
<field name="tabs">[["All",[]],["Archived",[["active","=",false]]],["Temporaly",[["type","=","temporary"]]],["Permanent",[["type","=","permanent"]]]]</field>
|
||||
<field name="modes">list,page,form</field>
|
||||
<field name="menu">clinic_menu</field>
|
||||
</action>
|
|
@ -1,8 +0,0 @@
|
|||
<action>
|
||||
<field name="string">Nurses</field>
|
||||
<field name="view_cls">multi_view</field>
|
||||
<field name="model">clinic.nurse</field>
|
||||
<field name="tabs">[["All",[]],["Archived",[["active","=",false]]],["Temporaly",[["type","=","temporary"]]],["Permanent",[["type","=","permanent"]]]]</field>
|
||||
<field name="modes">list,page,form</field>
|
||||
<field name="menu">clinic_menu</field>
|
||||
</action>
|
|
@ -3,7 +3,7 @@
|
|||
<field name="state"/>
|
||||
<button string="Options" dropdown="1">
|
||||
<!--<item string="Create Journal Entry"/>-->
|
||||
<item string="TODO"/>
|
||||
<item string="To Draft" method="to_draft" states="approved"/>
|
||||
</button>
|
||||
</head>
|
||||
<group form_layout="stacked">
|
||||
|
@ -44,7 +44,7 @@
|
|||
<tab string="Approval">
|
||||
<group form_layout="stacked">
|
||||
<field name="user_id" span="3"/>
|
||||
<button string="Approve" icon="ok" size="small"/>
|
||||
<button string="Approve" icon="ok" size="small" method="approve" states="draft"/>
|
||||
</group>
|
||||
</tab>
|
||||
<tab string="Note">
|
||||
|
|
|
@ -4,7 +4,7 @@ class HDCaseDialyzerLine(Model):
|
|||
_name="clinic.hd.case.dialyzer"
|
||||
_fields={
|
||||
"hd_case_id": fields.Many2One("clinic.hd.case","HdCase",on_delete="cascade"),
|
||||
"dialyzer_type": fields.Selection([("low","low flux"),("high","high flux"),("dbl","dbl hifulx")],"Dialyzer Type"),
|
||||
"dialyzer_type": fields.Selection([("low","low flux"),("high","high flux"),("dbl","dbl hifulx")],"Type"),
|
||||
"dialyzer_id": fields.Many2One("clinic.dialyzer","Dialyzer",search=True),
|
||||
"description": fields.Char("Description",search=True),
|
||||
"use_time":fields.Integer("Use time"),
|
||||
|
|
|
@ -55,7 +55,6 @@ class LaborCostEntry(Model):
|
|||
'company_id': fields.Many2One("company","Company"),
|
||||
'department_id': fields.Many2One("clinic.department","Department",search=True),
|
||||
'branch_id': fields.Many2One("clinic.branch","Branch",search=True),
|
||||
"state": fields.Selection([["part_time","Part Time"],["full_time","Full Time"]],"Working Status",search=True),
|
||||
}
|
||||
|
||||
def _get_date_from(self,context={}):
|
||||
|
@ -192,5 +191,17 @@ class LaborCostEntry(Model):
|
|||
data=context['data']
|
||||
data['department_id']=None
|
||||
return data
|
||||
|
||||
def approve(self,ids,context={}):
|
||||
for obj in self.browse(ids):
|
||||
obj.write({
|
||||
'state': 'approved',
|
||||
})
|
||||
|
||||
def to_draft(self,ids,context={}):
|
||||
for obj in self.browse(ids):
|
||||
obj.write({
|
||||
'state': 'draft',
|
||||
})
|
||||
|
||||
LaborCostEntry.register()
|
||||
|
|
Loading…
Reference in New Issue