Windows GTK Client OpenERP 6.0.4 show the result bad

Bug #1078411 reported by Ignacio Ibeas (www.acysos.com)
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo GTK Client (MOVED TO GITHUB)
Expired
Undecided
Unassigned

Bug Description

Hello,

I use this class to search only the products of the supplier selected in the purchase order. In the Linux and Max OSX gtk clients work but in the windows gtk client show other result.

I have checked the server and return the same result.

class product_product(osv.osv):
    _name = 'product.product'
    _inherit = 'product.product'

    def name_search(self, cr, user, name='', args=None, operator='ilike', context=None, limit=80):
        ids=[]
        if not args:
            args=[]
        if not context:
            context={}
        if context and context.has_key('partner_id') and context['partner_id']:
            cr.execute('SELECT p.id ' \
                    'FROM product_product AS p ' \
                    'INNER JOIN product_template AS t ' \
                    'ON p.product_tmpl_id=t.id ' \
                    'INNER JOIN product_supplierinfo AS ps ' \
                    'ON ps.product_id=p.id ' \
                    'WHERE ps.name = '+str(context['partner_id'])+' ' \
                    'AND p.default_code = \''+str(name)+'\' ' \
                    'AND t.purchase_ok = True ' \
                    'ORDER BY p.id')
            res = cr.fetchall()
            ids = map(lambda x:x[0], res)
            if not len(ids):
                cr.execute('SELECT p.id ' \
                    'FROM product_product AS p ' \
                    'INNER JOIN product_template AS t ' \
                    'ON p.product_tmpl_id=t.id ' \
                    'INNER JOIN product_supplierinfo AS ps ' \
                    'ON ps.product_id=p.id ' \
                    'WHERE ps.name = '+str(context['partner_id'])+' ' \
                    'AND p.ean13 = \''+str(name)+'\' ' \
                    'AND t.purchase_ok = True ' \
                    'ORDER BY p.id')
                res = cr.fetchall()
                ids = map(lambda x:x[0], res)
            if not len(ids):
                if operator in ('like', 'ilike'):
                    name='%'+name+'%'
                cr.execute('SELECT p.id ' \
                    'FROM product_product AS p ' \
                    'INNER JOIN product_template AS t ' \
                    'ON p.product_tmpl_id=t.id ' \
                    'INNER JOIN product_supplierinfo AS ps ' \
                    'ON ps.product_id=p.id ' \
                    'WHERE ps.name = '+str(context['partner_id'])+' ' \
                    'AND p.default_code '+operator+' \''+str(name)+'\' ' \
                    'AND t.purchase_ok = True ' \
                    'ORDER BY p.id')
                res = cr.fetchall()
                ids = map(lambda x:x[0], res)
                cr.execute('SELECT p.id ' \
                    'FROM product_product AS p ' \
                    'INNER JOIN product_template AS t ' \
                    'ON p.product_tmpl_id=t.id ' \
                    'INNER JOIN product_supplierinfo AS ps ' \
                    'ON ps.product_id=p.id ' \
                    'WHERE ps.name = '+str(context['partner_id'])+' ' \
                    'AND t.name '+operator+' \''+str(name)+'\' ' \
                    'AND t.purchase_ok = True ' \
                    'ORDER BY p.id')
                res = cr.fetchall()
                ids += map(lambda x:x[0], res)
        if not len(ids):
            ids = self.search(cr, user, [('default_code','=',name)]+ args, limit=limit, context=context)
        if not len(ids):
            ids = self.search(cr, user, [('ean13','=',name)]+ args, limit=limit, context=context)
        if not len(ids):
            ids = self.search(cr, user, [('default_code',operator,name)]+ args, limit=limit, context=context)
            ids += self.search(cr, user, [('name',operator,name)]+ args, limit=limit, context=context)
        result = self.name_get(cr, user, ids, context)
        return result

product_product()

Greetings

Revision history for this message
Amit Parik (amit-parik) wrote :

Hello Ignacio,

We have plan to release the v7 soon which is totally web based, and we are not developed our gtk client any more. So this issue doesn't affect to our trunk version.

As well as our 6.1 version is already released with new web architecture, So you can try also it.

For this type of issue of stable version, If you have a support and maintenance contract with us then you can contact us our OPW team at <email address hidden>.

Thank you!

Changed in openobject-client:
status: New → Invalid
Revision history for this message
Ignacio Ibeas (www.acysos.com) (ignacio-acysos) wrote :

It's a big error remove the GTK client. OpenERP 6.1 is unstable so I can't use it.

I have check this issue in the web client and it has the same problem. So the issue is Windows GTK Client a Web Client.

Thank you

Changed in openobject-client:
status: Invalid → New
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for OpenERP GTK Client because there has been no activity for 60 days.]

Changed in openobject-client:
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.