From 207cf92a0c4120e561f5e2c28adff1b1ed7c10a5 Mon Sep 17 00:00:00 2001 From: Leonardo Donelli Date: Fri, 3 Jul 2015 16:41:41 +0200 Subject: [PATCH] [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 --- openerp/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openerp/models.py b/openerp/models.py index c72bdd1a0ea..5f218362d5e 100644 --- a/openerp/models.py +++ b/openerp/models.py @@ -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 `. @@ -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.