parameters: (self)
return_statement: return message
docstring: Return the message stating that the transaction has been received by the provider.
  
          Note: self.ensure_one()
docstring_summary: Return the message stating that the transaction has been received by the provider.
docstring_tokens: Return the message stating that the transaction has been received by the provider .
function: def _get_received_message(self):
          """ Return the message stating that the transaction has been received by the provider.
  
          Note: self.ensure_one()
          """
          self.ensure_one()
  
          formatted_amount = format_amount(self.env, self.amount, self.currency_id)
          if self.state == 'pending':
              message = _(
                  "The transaction with reference %(ref)s for %(amount)s is pending (%(acq_name)s).",
                  ref=self.reference, amount=formatted_amount, acq_name=self.acquirer_id.name
              )
          elif self.state == 'authorized':
              message = _(
                  "The transaction with reference %(ref)s for %(amount)s has been authorized "
                  "(%(acq_name)s).", ref=self.reference, amount=formatted_amount,
                  acq_name=self.acquirer_id.name
              )
          elif self.state == 'done':
              message = _(
                  "The transaction with reference %(ref)s for %(amount)s has been confirmed "
                  "(%(acq_name)s).", ref=self.reference, amount=formatted_amount,
                  acq_name=self.acquirer_id.name
              )
              if self.payment_id:
                  message += "<br />" + _(
                      "The related payment is posted: %s",
                      self.payment_id._get_payment_chatter_link()
                  )
          elif self.state == 'error':
              message = _(
                  "The transaction with reference %(ref)s for %(amount)s encountered an error"
                  " (%(acq_name)s).",
                  ref=self.reference, amount=formatted_amount, acq_name=self.acquirer_id.name
              )
              if self.state_message:
                  message += "<br />" + _("Error: %s", self.state_message)
          else:
              message = _(
                  "The transaction with reference %(ref)s for %(amount)s is canceled (%(acq_name)s).",
                  ref=self.reference, amount=formatted_amount, acq_name=self.acquirer_id.name
              )
              if self.state_message:
                  message += "<br />" + _("Reason: %s", self.state_message)
          return message
function_tokens: def _get_received_message ( self ) : self . ensure_one ( ) formatted_amount = format_amount ( self . env , self . amount , self . currency_id ) if self . state == 'pending' : message = _ ( "The transaction with reference %(ref)s for %(amount)s is pending (%(acq_name)s)." , ref = self . reference , amount = formatted_amount , acq_name = self . acquirer_id . name ) elif self . state == 'authorized' : message = _ ( "The transaction with reference %(ref)s for %(amount)s has been authorized " "(%(acq_name)s)." , ref = self . reference , amount = formatted_amount , acq_name = self . acquirer_id . name ) elif self . state == 'done' : message = _ ( "The transaction with reference %(ref)s for %(amount)s has been confirmed " "(%(acq_name)s)." , ref = self . reference , amount = formatted_amount , acq_name = self . acquirer_id . name ) if self . payment_id : message += "<br />" + _ ( "The related payment is posted: %s" , self . payment_id . _get_payment_chatter_link ( ) ) elif self . state == 'error' : message = _ ( "The transaction with reference %(ref)s for %(amount)s encountered an error" " (%(acq_name)s)." , ref = self . reference , amount = formatted_amount , acq_name = self . acquirer_id . name ) if self . state_message : message += "<br />" + _ ( "Error: %s" , self . state_message ) else : message = _ ( "The transaction with reference %(ref)s for %(amount)s is canceled (%(acq_name)s)." , ref = self . reference , amount = formatted_amount , acq_name = self . acquirer_id . name ) if self . state_message : message += "<br />" + _ ( "Reason: %s" , self . state_message ) return message