def METHOD_NAME(self, **kwargs):
    self.ensure_one()
    template_id = kwargs.get("template_id", False)
    template_ids = kwargs.get("template_ids", [template_id])
    templates = self.env["fsm.template"].search([("id", "in", template_ids)])
    note = ""
    hours = 0.0
    categories = self.env["fsm.category"]
    for template in templates:
        note += template.instructions or ""
        hours += template.duration
        categories |= template.category_ids
    return {
        "location_id": self.fsm_location_id.id,
        "location_directions": self.fsm_location_id.direction,
        "request_early": self.expected_date,
        "scheduled_date_start": self.expected_date,
        "todo": note,
        "category_ids": [(6, 0, categories.ids)],
        "scheduled_duration": hours,
        "sale_id": kwargs.get("so_id", False),
        "sale_line_id": kwargs.get("sol_id", False),
        "template_id": template_id,
        "company_id": self.company_id.id,
    }