diff --git a/maintenance_request_stage_transition/__manifest__.py b/maintenance_request_stage_transition/__manifest__.py index 1348ee38a..143c56a4c 100644 --- a/maintenance_request_stage_transition/__manifest__.py +++ b/maintenance_request_stage_transition/__manifest__.py @@ -5,7 +5,7 @@ "name": "Maintenance Request Stage transition", "summary": """ Manage transition visibility and management between stages""", - "version": "15.0.1.0.0", + "version": "16.0.1.0.0", "license": "AGPL-3", "author": "Creu Blanca,Odoo Community Association (OCA)", "website": "https://github.com/OCA/maintenance", diff --git a/maintenance_request_stage_transition/models/maintenance_request.py b/maintenance_request_stage_transition/models/maintenance_request.py index 33bf4e686..997d39c9d 100644 --- a/maintenance_request_stage_transition/models/maintenance_request.py +++ b/maintenance_request_stage_transition/models/maintenance_request.py @@ -15,15 +15,8 @@ class MaintenanceRequest(models.Model): stage_id = fields.Many2one("maintenance.stage", readonly=True) @api.model - def fields_view_get( - self, view_id=None, view_type="form", toolbar=False, submenu=False - ): - res = super().fields_view_get( - view_id=view_id, - view_type=view_type, - toolbar=toolbar, - submenu=submenu, - ) + def get_view(self, view_id=None, view_type="form", **options): + res = super().get_view(view_id=view_id, view_type=view_type, **options) if view_type == "form": doc = etree.XML(res["arch"]) stages = self.env["maintenance.stage"].search([], order="sequence desc") diff --git a/maintenance_request_stage_transition/tests/test_flow.py b/maintenance_request_stage_transition/tests/test_flow.py index 547de1749..7c4b60103 100644 --- a/maintenance_request_stage_transition/tests/test_flow.py +++ b/maintenance_request_stage_transition/tests/test_flow.py @@ -23,7 +23,7 @@ def test_inverse(self): self.assertIn(self.original_stage, self.stage.previous_stage_ids) def get_button(self, stage): - data = self.request.fields_view_get(view_type="form") + data = self.request.get_view(view_type="form") form = etree.XML(data["arch"]) path = "//header/button[@name='set_maintenance_stage' and @id='%s']" button = form.xpath(path % stage.id)[0]