skip to check branch of user when compute cost
parent
178c1adcb9
commit
3874920314
|
@ -1,6 +1,6 @@
|
|||
from netforce.model import Model, fields, get_model
|
||||
from netforce.utils import get_data_path
|
||||
from netforce.access import get_active_company
|
||||
from netforce.access import get_active_company, get_active_user, set_active_user
|
||||
|
||||
class LaborCost(Model):
|
||||
_name="clinic.labor.cost"
|
||||
|
@ -98,6 +98,8 @@ class LaborCost(Model):
|
|||
|
||||
def compute(self,ids,context={}):
|
||||
obj=self.browse(ids)[0]
|
||||
user_id=get_active_user()
|
||||
set_active_user(1)
|
||||
if not obj.manual:
|
||||
for fline in obj.formulars:
|
||||
fline.delete()
|
||||
|
@ -370,7 +372,7 @@ class LaborCost(Model):
|
|||
'doctor_lines': doctor_lines,
|
||||
'nurse_lines': nurse_lines,
|
||||
})
|
||||
|
||||
set_active_user(user_id)
|
||||
return {
|
||||
'next': {
|
||||
'name': 'clinic_labor_cost',
|
||||
|
|
Loading…
Reference in New Issue