[DOC] openerp: add missing parameter for search method

The `search` method of models has an additional keyword parameter, `count`.

It not being specified in the docs could lead people to inherit `search`
without defining it, which would result in a `TypeError` when called with
`count=`.

Closes #7451
This commit is contained in:
Leonardo Donelli 2015-07-03 16:41:41 +02:00 committed by Nicolas Martinelli
parent b5d7e663b4
commit 207cf92a0c
1 changed files with 2 additions and 1 deletions

View File

@ -1625,7 +1625,7 @@ class BaseModel(object):
@api.returns('self')
def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False):
""" search(args[, offset=0][, limit=None][, order=None])
""" search(args[, offset=0][, limit=None][, order=None][, count=False])
Searches for records based on the ``args``
:ref:`search domain <reference/orm/domains>`.
@ -1635,6 +1635,7 @@ class BaseModel(object):
:param int offset: number of results to ignore (default: none)
:param int limit: maximum number of records to return (default: all)
:param str order: sort string
:param bool count: if True, only counts and returns the number of matching records (default: False)
:returns: at most ``limit`` records matching the search criteria
:raise AccessError: * if user tries to bypass access rules for read on the requested object.