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)