skip to check branch of user when compute cost

conv_bal
watcha.h 2015-02-17 15:37:30 +07:00
parent 178c1adcb9
commit 3874920314
1 changed files with 4 additions and 2 deletions

View File

@ -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',