From 4d5f770d89cf6dfff265745cdf3ee1824b6347b2 Mon Sep 17 00:00:00 2001 From: "watcha.h" Date: Wed, 22 Oct 2014 10:48:19 +0700 Subject: [PATCH] fix --- netforce_clinic/models/hd_case.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/netforce_clinic/models/hd_case.py b/netforce_clinic/models/hd_case.py index a05c526..7a615a4 100644 --- a/netforce_clinic/models/hd_case.py +++ b/netforce_clinic/models/hd_case.py @@ -293,7 +293,6 @@ class HDcase(Model): def make_invoices(self,ids,context={}): setting=get_model("settings").browse(1) currency_id=setting.currency_id.id - # account_receivable_id=setting.account_receivable_id.id company_id=get_active_company() uom=get_model("uom").search_browse([['name','ilike','%Unit%']]) @@ -353,8 +352,7 @@ class HDcase(Model): "company_id": company_id, } vals["partner_id"]=obj.fee_partner_id.id - # XXX - if obj.fee_partner_id.account_receivable_id: + if not obj.fee_partner_id.account_receivable_id: account_id=obj.fee_partner_id.account_receivable_id.id or account_receivable_id if not account_id: raise Exception("%s not found account recievable %s"%obj.fee_partner_id.name)