[FIX] doc: missing self params in examples
This commit is contained in:
parent
9831636ffb
commit
d87aedb731
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue