FIX crash
PEP8
This commit is contained in:
@@ -22,17 +22,19 @@
|
||||
|
||||
from openerp.osv import orm
|
||||
|
||||
|
||||
# KEEP THIS IN OLD API for the moment
|
||||
# Otherwise, you will have trouble in the pagination of kanban view and
|
||||
# the counter for number of records in list view
|
||||
# Bug found at the Barroux Abbey on 29/5/2015
|
||||
|
||||
class ProductTemplate(orm.Model):
|
||||
_inherit = 'product.template'
|
||||
|
||||
def search(
|
||||
self, cr, uid, args, offset=0, limit=None, order=None,
|
||||
context=None, count=False):
|
||||
if context is None:
|
||||
context = {}
|
||||
seller_id = context.get('search_default_seller_id')
|
||||
if seller_id:
|
||||
seller_ids = self.pool['product.supplierinfo'].search(
|
||||
@@ -42,6 +44,6 @@ class ProductTemplate(orm.Model):
|
||||
args.remove(argument)
|
||||
args.append((('seller_ids', 'in', seller_ids)))
|
||||
res = super(ProductTemplate, self).search(
|
||||
cr, uid, args, offset=offset, limit=limit, order=order, count=count,
|
||||
context=context)
|
||||
cr, uid, args, offset=offset, limit=limit, order=order,
|
||||
count=count, context=context)
|
||||
return res
|
||||
|
||||
Reference in New Issue
Block a user