From 8a0c430fee671b8a95c9abbb3b15dac7adf5f722 Mon Sep 17 00:00:00 2001 From: "watcha.h@almacom.co.th" Date: Mon, 11 May 2015 10:54:36 +0700 Subject: [PATCH] sequence --- netforce_clinic/models/hd_case.py | 2 +- netforce_clinic/models/sequence.py | 1 + netforce_clinic/models/shop.py | 4 ++-- netforce_clinic/templates/report_labor_cost_staff.hbs | 1 + netforce_clinic/todo.txt | 2 +- 5 files changed, 6 insertions(+), 4 deletions(-) diff --git a/netforce_clinic/models/hd_case.py b/netforce_clinic/models/hd_case.py index eb0fad4..ac0dbc6 100644 --- a/netforce_clinic/models/hd_case.py +++ b/netforce_clinic/models/hd_case.py @@ -302,7 +302,7 @@ class HDCase(Model): return None user_id=get_active_user() set_active_user(1) - res=self.search([["number","=",num]]) + res=get_model('account.invoice').search([["number","=",num]]) set_active_user(user_id) if not res: return num diff --git a/netforce_clinic/models/sequence.py b/netforce_clinic/models/sequence.py index a0d9a00..cdb61ae 100644 --- a/netforce_clinic/models/sequence.py +++ b/netforce_clinic/models/sequence.py @@ -56,6 +56,7 @@ class Sequence(Model): } def find_sequence(self,type=None,name=None,context={}): + print('name ', name, type, context) if type and name: dom=[["type","=",type],["name","=",name]] elif type: diff --git a/netforce_clinic/models/shop.py b/netforce_clinic/models/shop.py index 105a214..2088876 100644 --- a/netforce_clinic/models/shop.py +++ b/netforce_clinic/models/shop.py @@ -127,7 +127,7 @@ class Shop(Model): return None user_id=get_active_user() set_active_user(1) - res=self.search([["number","=",num]]) + res=get_model("account.invoice").search([["number","=",num]]) set_active_user(user_id) if not res: return num @@ -141,7 +141,7 @@ class Shop(Model): return None user_id=get_active_user() set_active_user(1) - res=self.search([["number","=",num]]) + res=get_model("account.payment").search([["number","=",num]]) set_active_user(user_id) if not res: return num diff --git a/netforce_clinic/templates/report_labor_cost_staff.hbs b/netforce_clinic/templates/report_labor_cost_staff.hbs index 4d21bb3..517a5d9 100644 --- a/netforce_clinic/templates/report_labor_cost_staff.hbs +++ b/netforce_clinic/templates/report_labor_cost_staff.hbs @@ -37,6 +37,7 @@ + diff --git a/netforce_clinic/todo.txt b/netforce_clinic/todo.txt index b3ad719..3ab75b6 100644 --- a/netforce_clinic/todo.txt +++ b/netforce_clinic/todo.txt @@ -10,4 +10,4 @@ แก้ไขยาก หากมาเจอข้อผิดพลาดบางครั้ง > report K. boy - - number of treatment is not correct + total qty of report_labor_cost_staff is not the same report_labor_cost