Cédric Krier pushed to branch branch/default at Tryton / Tryton


Commits:
a379ef0e by Cédric Krier at 2023-07-04T18:39:28+02:00
Document on_change methods under ModelView instead of Model
- - - - -


2 changed files:

- trytond/doc/ref/models.rst
- trytond/doc/ref/wizard.rst


Changes:

=====================================
trytond/doc/ref/models.rst
=====================================
@@ -106,24 +106,6 @@
 
 Instance methods:
 
-.. method:: Model.on_change(fieldnames)
-
-   Return the list of changes by calling ``on_change`` method of each field.
-
-.. method:: Model.on_change_with(fieldnames)
-
-   Return the new values of all fields by calling ``on_change_with`` method of
-   each field.
-
-.. method:: Model.on_change_notify(fieldnames)
-
-    Returns a list of type and message couple to display on the client side.
-    Available types are ``info``, ``warning`` and ``error``.
-
-    .. note::
-      To be called by the client, this method must be decorated
-      by :meth:`~trytond.model.fields.depends` with the fields needed.
-
 .. method:: Model.pre_validate()
 
    Validate the instance before being stored.
@@ -228,6 +210,26 @@
       This method is public mainly to allow modification the existing XML of
       the view by code.
 
+Instance methods:
+
+.. method:: ModelView.on_change(fieldnames)
+
+   Return the list of changes by calling ``on_change`` method of each field.
+
+.. method:: ModelView.on_change_with(fieldnames)
+
+   Return the new values of all fields by calling ``on_change_with`` method of
+   each field.
+
+.. method:: ModelView.on_change_notify(fieldnames)
+
+    Returns a list of type and message couple to display on the client side.
+    Available types are ``info``, ``warning`` and ``error``.
+
+    .. note::
+      To be called by the client, this method must be decorated
+      by :meth:`~trytond.model.fields.depends` with the fields needed.
+
 ModelStorage
 ============
 


=====================================
trytond/doc/ref/wizard.rst
=====================================
@@ -123,8 +123,8 @@
 
    .. note::
       The difference between default values and values is that the client calls
-      :meth:`~trytond.model.Model.on_change` and
-      :meth:`~trytond.model.Model.on_change_with` for the default values..
+      :meth:`~trytond.model.ModelView.on_change` and
+      :meth:`~trytond.model.ModelView.on_change_with` for the default values.
 
 Instance attributes are:
 



View it on Heptapod: 
https://foss.heptapod.net/tryton/tryton/-/commit/a379ef0e1567383579001994c4c11f9cd711ad62

-- 
View it on Heptapod: 
https://foss.heptapod.net/tryton/tryton/-/commit/a379ef0e1567383579001994c4c11f9cd711ad62
You're receiving this email because of your account on foss.heptapod.net.


Reply via email to