(self)
return {
            "name": _("DHL Parcel End Day"),
            "type": "ir.actions.act_window",
            "view_mode": "form",
            "res_model": "dhl.parcel.endday.wizard",
            "view_id": view_id,
            "views": [(view_id, "form")],
            "target": "new",
            "res_id": wizard.id,
            "context": self.env.context,
        }
Action to launch the end day wizard
Action to launch the end day wizard
Action to launch the end day wizard
def action_open_end_day(self):
        """Action to launch the end day wizard"""
        self.ensure_one()
        wizard = self.env["dhl.parcel.endday.wizard"].create({"carrier_id": self.id})
        view_id = self.env.ref("delivery_dhl_parcel.delivery_endday_wizard_form").id
        return {
            "name": _("DHL Parcel End Day"),
            "type": "ir.actions.act_window",
            "view_mode": "form",
            "res_model": "dhl.parcel.endday.wizard",
            "view_id": view_id,
            "views": [(view_id, "form")],
            "target": "new",
            "res_id": wizard.id,
            "context": self.env.context,
        }
def action_open_end_day ( self ) : self . ensure_one ( ) wizard = self . env [ "dhl.parcel.endday.wizard" ] . create ( { "carrier_id" : self . id } ) view_id = self . env . ref ( "delivery_dhl_parcel.delivery_endday_wizard_form" ) . id return { "name" : _ ( "DHL Parcel End Day" ) , "type" : "ir.actions.act_window" , "view_mode" : "form" , "res_model" : "dhl.parcel.endday.wizard" , "view_id" : view_id , "views" : [ ( view_id , "form" ) ] , "target" : "new" , "res_id" : wizard . id , "context" : self . env . context , }