diff --git a/models/acc_operation.py b/models/acc_operation.py index 9fb5a1530f6852e337e0a3c21566f31feb7d0884..fcbc99a743ee1af78f3a594545fe958328d0055e 100644 --- a/models/acc_operation.py +++ b/models/acc_operation.py @@ -91,19 +91,12 @@ class AccOperation(models.Model): :return: Vue Qweb """ self.ensure_one() - self.env["res.partner"].browse(self.env.context.get("default_partner_id")) - action = self.env["ir.actions.actions"]._for_xml_id( - "oacc_overview_cdc.acc_operation_action_client_courbes" - ) - action["params"] = { - "operation_ids": self.ids, - } - action["context"] = { - "active_id": self.id, - "active_ids": self.ids, - "search_default_name": self.name, - } - return action + if self.id: + return { + 'type': 'ir.actions.act_url', + 'url': '/operation/%s' % (self.id), + 'target': 'new', + } # ------------------------------------------------------ # Business methods