path_list = [q.PATH for q in portal.Base_getHostingSubscriptionForOpenSaleOrderLine(hosting_subscription_validation_state=\'validated\', open_sale_order_line_validation_state=\'validated\')]\n
path_list.extend([q.PATH for q in portal.Base_getHostingSubscriptionForOpenSaleOrderLine(hosting_subscription_validation_state=\'archived\', open_sale_order_line_validation_state=\'invalidated\')])\n
LEFT JOIN category ON category.category_uid=catalog.uid AND category.base_category_uid=<dtml-var "portal_categories.aggregate.getUid()">\n
LEFT JOIN catalog AS order_catalog ON order_catalog.uid=category.uid AND order_catalog.portal_type=\'Open Sale Order Line\' AND order_catalog.validation_state=<dtml-sqlvaropen_sale_order_line_validation_statetype="string">\n
WHERE catalog.portal_type=\'Hosting Subscription\' and catalog.validation_state=<dtml-sqlvarhosting_subscription_validation_statetype="string">\n