summaryrefslogtreecommitdiff
path: root/doc/reference
diff options
context:
space:
mode:
Diffstat (limited to 'doc/reference')
-rw-r--r--doc/reference/orm.rst6
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/reference/orm.rst b/doc/reference/orm.rst
index 6b609e52287..3f0da8b7b46 100644
--- a/doc/reference/orm.rst
+++ b/doc/reference/orm.rst
@@ -498,7 +498,7 @@ Two decorators can expose a new-style method to the old API:
empty. Its "old API" signature is ``cr, uid, *arguments, context``::
@api.model
- def some_method(foo):
+ def some_method(self, a_value):
pass
# can be called as
old_style_model.some_method(cr, uid, a_value, context=context)
@@ -508,7 +508,7 @@ Two decorators can expose a new-style method to the old API:
"old API" signature is ``cr, uid, ids, *arguments, context``::
@api.multi
- def some_method(foo):
+ def some_method(self, a_value):
pass
# can be called as
old_style_model.some_method(cr, uid, [id1, id2], a_value, context=context)
@@ -525,7 +525,7 @@ return lists of ids, there is also a decorator managing this:
>>> @api.multi
... @api.returns('self')
- ... def some_method():
+ ... def some_method(self):
... return self
>>> new_style_model = env['a.model'].browse(1, 2, 3)
>>> new_style_model.some_method()