parameters: (self)
docstring: Check that acquirer-specific required fields have been filled.
  
          The fields that have the `required_if_provider="<provider>"` attribute are made required
          for all payment.acquirer records with the `provider` field equal to <provider> and with the
          `state` field equal to 'enabled' or 'test'.
          Acquirer-specific views should make the form fields required under the same conditions.
  
          :return: None
          :raise ValidationError: if an acquirer-specific required field is empty
docstring_summary: Check that acquirer-specific required fields have been filled.
docstring_tokens: Check that acquirer - specific required fields have been filled .
function: def _check_required_if_provider(self):
          """ Check that acquirer-specific required fields have been filled.
  
          The fields that have the `required_if_provider="<provider>"` attribute are made required
          for all payment.acquirer records with the `provider` field equal to <provider> and with the
          `state` field equal to 'enabled' or 'test'.
          Acquirer-specific views should make the form fields required under the same conditions.
  
          :return: None
          :raise ValidationError: if an acquirer-specific required field is empty
          """
          field_names = []
          enabled_acquirers = self.filtered(lambda acq: acq.state in ['enabled', 'test'])
          for name, field in self._fields.items():
              required_provider = getattr(field, 'required_if_provider', None)
              if required_provider and any(
                  required_provider == acquirer.provider and not acquirer[name]
                  for acquirer in enabled_acquirers
              ):
                  ir_field = self.env['ir.model.fields']._get(self._name, name)
                  field_names.append(ir_field.field_description)
          if field_names:
              raise ValidationError(
                  _("The following fields must be filled: %s", ", ".join(field_names))
              )
function_tokens: def _check_required_if_provider ( self ) : field_names = [ ] enabled_acquirers = self . filtered ( lambda acq : acq . state in [ 'enabled' , 'test' ] ) for name , field in self . _fields . items ( ) : required_provider = getattr ( field , 'required_if_provider' , None ) if required_provider and any ( required_provider == acquirer . provider and not acquirer [ name ] for acquirer in enabled_acquirers ) : ir_field = self . env [ 'ir.model.fields' ] . _get ( self . _name , name ) field_names . append ( ir_field . field_description ) if field_names : raise ValidationError ( _ ( "The following fields must be filled: %s" , ", " . join ( field_names ) ) )