parameters: (self, views_or_xmlid, message_log=False, **kwargs)
docstring: Helper method to send a mail / post a message / log a note using
          a view_id to render using the ir.qweb engine. This method is stand
          alone, because there is nothing in template and composer that allows
          to handle views in batch. This method should probably disappear when
          templates handle ir ui views.
docstring_summary: Helper method to send a mail / post a message / log a note using
          a view_id to render using the ir.qweb engine. This method is stand
          alone, because there is nothing in template and composer that allows
          to handle views in batch. This method should probably disappear when
          templates handle ir ui views.
docstring_tokens: Helper method to send a mail / post a message / log a note using a view_id to render using the ir . qweb engine . This method is stand alone because there is nothing in template and composer that allows to handle views in batch . This method should probably disappear when templates handle ir ui views .
function: def _message_compose_with_view(self, views_or_xmlid, message_log=False, **kwargs):
          """ Helper method to send a mail / post a message / log a note using
          a view_id to render using the ir.qweb engine. This method is stand
          alone, because there is nothing in template and composer that allows
          to handle views in batch. This method should probably disappear when
          templates handle ir ui views. """
          values = kwargs.pop('values', None) or dict()
          try:
              from odoo.addons.http_routing.models.ir_http import slug
              values['slug'] = slug
          except ImportError:
              values['slug'] = lambda self: self.id
          if isinstance(views_or_xmlid, str):
              views = self.env.ref(views_or_xmlid, raise_if_not_found=False)
          else:
              views = views_or_xmlid
          if not views:
              return
          for record in self:
              values['object'] = record
              rendered_template = views._render(values, engine='ir.qweb', minimal_qcontext=True)
              if message_log:
                  return record._message_log(body=rendered_template, **kwargs)
              else:
                  kwargs['body'] = rendered_template
                  return record.message_post_with_template(False, **kwargs)
function_tokens: def _message_compose_with_view ( self , views_or_xmlid , message_log = False , * * kwargs ) : values = kwargs . pop ( 'values' , None ) or dict ( ) try : from odoo . addons . http_routing . models . ir_http import slug values [ 'slug' ] = slug except ImportError : values [ 'slug' ] = lambda self : self . id if isinstance ( views_or_xmlid , str ) : views = self . env . ref ( views_or_xmlid , raise_if_not_found = False ) else : views = views_or_xmlid if not views : return for record in self : values [ 'object' ] = record rendered_template = views . _render ( values , engine = 'ir.qweb' , minimal_qcontext = True ) if message_log : return record . _message_log ( body = rendered_template , * * kwargs ) else : kwargs [ 'body' ] = rendered_template return record . message_post_with_template ( False , * * kwargs )