docs: def action_to_approve(self):
          """Set a change request as to approve"""
          template = self.env.ref(
              'document_page_approval.email_template_new_draft_need_approval')
          approver_gid = self.env.ref(
              'document_page_approval.group_document_approver_user')
          for rec in self:
              if rec.state != 'draft':
                  raise UserError(
                      _("Can't approve pages in '%s' state.") % rec.state)
              if not (rec.am_i_owner or rec.am_i_approver):
                  raise UserError(
                      _('You are not authorized to do this.\r\n'
                        'Only owners or approvers can request approval.'))
              # request approval
              if rec.is_approval_required:
                  rec.write({'state': 'to approve'})
                  guids = [g.id for g in rec.page_id.approver_group_ids]
                  users = self.env['res.users'].search([
                      ('groups_id', 'in', guids),
                      ('groups_id', 'in', approver_gid.id)])
                  rec.message_subscribe_users([u.id for u in users])
                  rec.message_post_with_template(template.id)
              else:
                  # auto-approve if approval is not required
                  rec.action_approve()