From 1acd299934b31be9fa1780fbf0536a0037be0743 Mon Sep 17 00:00:00 2001 From: Victor Feyens Date: Thu, 5 May 2022 13:52:28 +0000 Subject: [PATCH] [IMP] core: mark fields_view_get deprecated in its docstring Now that the method is deprecated, we think it's better to keep showing it in the doc, but with a clear deprecation notice in the docstring (instead of hiding it). closes odoo/odoo#90634 Related: odoo/documentation#1908 Signed-off-by: Victor Feyens (vfe) --- odoo/models.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/odoo/models.py b/odoo/models.py index 4e4ea1675cd..7c822036658 100644 --- a/odoo/models.py +++ b/odoo/models.py @@ -1793,6 +1793,11 @@ class BaseModel(metaclass=MetaModel): @api.model def fields_view_get(self, view_id=None, view_type='form', toolbar=False, submenu=False): + """ + .. deprecated:: saas-15.4 + + Use :meth:`~odoo.models.Model.get_view()` instead. + """ warnings.warn('Method `fields_view_get` is deprecated, use `get_view` instead', DeprecationWarning) result = self.get_view(view_id, view_type, toolbar=toolbar, submenu=submenu) node = etree.fromstring(result['arch'])