Commit 9a6019bf authored by Jérome Perrin's avatar Jérome Perrin

invoicing: use simpler condition for Invoice_isAdvanced

parent 50c2f333
......@@ -2,7 +2,5 @@
If the business template 'erp5_advanced_invoicing' is installed, returns True.
If it is not, returns False.
"""
for bt in context.portal_templates.getInstalledBusinessTemplateList():
if bt.getTitle() == "erp5_advanced_invoicing":
return True
return False
return context.getPortalObject().portal_templates.getInstalledBusinessTemplate(
'erp5_advanced_invoicing', strict=True) is not None
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment