diff --git a/energy_communities_service_invoicing/wizards/service_invoicing_action_create.py b/energy_communities_service_invoicing/wizards/service_invoicing_action_create.py index 0f99cc40d35885cf01b6a7a96508973d97fb5d3e..f13cb08cab516dfca530dedd3586bed1921b79f5 100644 --- a/energy_communities_service_invoicing/wizards/service_invoicing_action_create.py +++ b/energy_communities_service_invoicing/wizards/service_invoicing_action_create.py @@ -191,13 +191,10 @@ class ServiceInvoicingActionCreateWizard(models.TransientModel): record.name ) ) - # Check current company has configuration payment mode for multicompany creation - if ( - self.community_company_mids - and not self.env.company.service_invoicing_payment_mode_id - ): - raise ValidationError( - _( - "Platform {} must have a service invoicing payment mode defined" - ).format(self.env.company.name) - ) + # Check current company has configuration payment mode for multicompany creation + if not self.env.company.service_invoicing_payment_mode_id: + raise ValidationError( + _( + "Platform {} must have a service invoicing payment mode defined" + ).format(self.env.company.name) + )