[6.0] cannot search partner by 'ref' code in custom filter when not using en_US

Bug #701100 reported by Raphaël Valyi - http://www.akretion.com
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Odoo GTK Client (MOVED TO GITHUB)
Fix Released
Medium
OpenERP sa GTK client R&D

Bug Description

Hello

I think lot's of companies, will have some 'ref' code for their partners and they need to use it as a search field.
So I think we would better have an index on it + have it in the default partner search view.

Any good reason not too?

Related branches

Revision history for this message
Fabien (Open ERP) (fp-tinyerp) wrote :

It's available in:
  - the tree view (only if you use the extended view).
  - the name_search (so selecting a partner from a many2one (SO, PO, ...) will search on ref=)

It's not in the search view because we tried to limit to search view to important fields, max 5 fields per width. (you can still on the "+" icon to add a filter on any field). The 5 fields are: name, contact, country, category, saleman. The ref is not as important as one of those.

I think that using code for partners is a bit "old school". Most of the customers will not use a code for each partners, that's why it's in extended view only. The customers that needs this are those that migrated from an old software that managed partners using codes in the many2one fields.

Changed in openobject-server:
status: New → Invalid
Revision history for this message
Fabien (Open ERP) (fp-tinyerp) wrote :

PS: having an index on it is a veyr good idea. I just "Fix Released" the index on ref.

Revision history for this message
Fabien (Open ERP) (fp-tinyerp) wrote :

I am not sure, I was clear: you can search on the code of each partner, using the "+" icon on the GTK client. We just decided to not put it as a default search criterion because we noticed that a lot of customers are not using it. What do you think ?

Revision history for this message
Raphaël Valyi - http://www.akretion.com (rvalyi) wrote : Re: [Bug 701100] Re: [6.0] cannot search partner by 'ref' code

Fabien,

we are exactly in such a case where my customer migrated from on old
software here, so indeed he has such codes and they are important.

OK, so yes, I've seen that you can use a custom filter. And tested in
English US and that works indeed.
But actually when using an other language (here pt_BR) , it doesn't work
anymore!
And since there were no index I believe it was on purpose.

So I confirm we are having a bug with that field at least (it's probably
more than just this one!, just tested with email field and I have strange
results too) but it shows up only when using non English US language on
custom search field in the GTK client at least.

Here is for instance the request my client sent:
DEBUG_RPC:rpc.request:('execute', 'prod', 1, '*', (u'res.partner', 'search',
[('customer', '=', 1)], 0, 80, False, {'lang': u'pt_BR', 'project_id':
False, 'tz': u'America/Sao_Paulo', 'active_model': 'ir.ui.menu',
'active_ids': [77], 'search_default_customer': 1, 'active_id': 77}))

while I put "ref" contains "90" in the filter

As for the web client, I have revision #4287 and it doesn't show all the
fields available in the custom filter list (similar regression the GTK
client had a few days back).

So For that one I'll change the title and pass it as a GTK client bug,
right?

On Mon, Jan 10, 2011 at 3:12 PM, Fabien (Open ERP) <email address hidden> wrote:

> I am not sure, I was clear: you can search on the code of each partner,
> using the "+" icon on the GTK client. We just decided to not put it as a
> default search criterion because we noticed that a lot of customers are
> not using it. What do you think ?
>
> --
> You received this bug notification because you are a direct subscriber
> of the bug.
> https://bugs.launchpad.net/bugs/701100
>
> Title:
> [6.0] cannot search partner by 'ref' code
>
> Status in OpenObject Server:
> Invalid
>
> Bug description:
> Hello
>
> I think lot's of companies, will have some 'ref' code for their partners
> and they need to use it as a search field.
> So I think we would better have an index on it + have it in the default
> partner search view.
>
> Any good reason not too?
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/openobject-server/+bug/701100/+subscribe
>

summary: - [6.0] cannot search partner by 'ref' code
+ [6.0] cannot search partner by 'ref' code in custom filter when not
+ using en_US
Changed in openobject-server:
status: Invalid → New
affects: openobject-server → openobject-client
Changed in openobject-client:
assignee: nobody → OpenERP sa GTK client R&D (openerp-dev-gtk)
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

hello,

I tested with the environment that is stated above with pt_BR installed. search by custom filter on 'ref' and here the output was as expected...

The request sent was this:

DEBUG_RPC:rpc.request:('execute', 'trunk', 1, '*', ('res.partner', 'search', [('ref', 'ilike', '%B\xc3\xa9lgica%')], 0, 80, False, {'lang': 'pt_BR', 'project_id': False, 'tz': False, 'active_model': 'ir.ui.menu', 'section_id': False, 'active_ids': [78], 'search_default_customer': 1, 'active_id': 78}))
DEBUG_RPC_ANSWER:rpc.result:[3]

Thanks,

Revision history for this message
Cristian Salamea (ovnicraft) wrote :

I get an error related, i create a new object with ref field (as char), this ref contains name field value from Purchase order, i create an action to launch Purchase but filter does not works in client see this :

ERROR:tools.expr_eval:[('name', '=', <function ref at 0xaae61ec>)]
Traceback (most recent call last):
  File "/home/ovnicraft/development/openerp/client/bin/tools/__init__.py", line 52, in expr_eval
    temp = eval(string, context)
  File "<string>", line 1
     [('name', '=', <function ref at 0xaae61ec>)]

    <act_window
       id="act_trade_purchase"
       name="Purchase Order"
       domain="[('name','=', ref )]"
       res_model="purchase.order"
       src_model="trade.import"/>

Regards,

PS: Sorry for paste ocde here

Revision history for this message
Raphaël Valyi - http://www.akretion.com (rvalyi) wrote :

Naresh,

are you sure you are testing with a recent version of the GTK client. I could reproduce the issue exactly as I described it today with GTK client rev #1767
See attached screenshot.

Cristian, I'm not sure your bug is the same, I don't have such an issue.

Revision history for this message
xrg (xrg) wrote : Re: [Bug 701100] Re: [6.0] cannot search partner by 'ref' code in custom filter when not using en_US

On Tuesday 11 January 2011, you wrote:

> <act_window
> domain="[('name','=', ref )]"

Well "ref()" is a special function, at the eval() of xml expressions, that
would resolve the xml ids. It is an unfortunate keyword conflict with the name
of the model column.

Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

hello Raphaël Valyi,

Yes, I am sure I am testing with the latest client. Infact these are the revision that my code has:

Server: 3247 launchpad_translations_on_behalf_of_openerp-20110112045344-jemp7jrhmcwjpewk

client(GTK): 1768 launchpad_translations_on_behalf_of_openerp-20110112045409-feaqjqg6vgcxa5b6

addons: 4221 <email address hidden>

Locale : pt_BR

I attach a screen shot too.

Thanks,

Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

hello Raphaël Valyi,

can you please provide the feedback ?

Thanks

Changed in openobject-client:
status: Confirmed → Incomplete
Revision history for this message
Raphaël Valyi - http://www.akretion.com (rvalyi) wrote :

Hello Naresh,

well, we still have the issue with the GTK client (as for the web client, we reported the other bug: https://bugs.launchpad.net/openobject-client-web/+bug/703963 that prevent us from testing).

I have no idea why we see that bug (in many different versions of the GTK clients, my customer just complained about that now while he uses RC2 GTK on windows while we are using bzr revision on Ubuntu) while you cannot reproduce it.

We will need to test further, might be due to our data, the Brazilian localization modules we are using... No idea so far. We would like to update to the last server code, but than are stuck into that other bug: https://bugs.launchpad.net/magentoerpconnect/+bug/701644

I'll let you know as soon as I know more.

Revision history for this message
Raphaël Valyi - http://www.akretion.com (rvalyi) wrote :

Hello, update:

on an other customer production installation with the Brazilian localization
module + Portuguese + up to date, we have the same issue, so I believe it's
not related to being up to date or not.

On Mon, Jan 17, 2011 at 12:11 PM, Raphaël Valyi - http://www.akretion.com <
<email address hidden>> wrote:

> Hello Naresh,
>
> well, we still have the issue with the GTK client (as for the web
> client, we reported the other bug: https://bugs.launchpad.net
> /openobject-client-web/+bug/703963 that prevent us from testing).
>
> I have no idea why we see that bug (in many different versions of the
> GTK clients, my customer just complained about that now while he uses
> RC2 GTK on windows while we are using bzr revision on Ubuntu) while you
> cannot reproduce it.
>
> We will need to test further, might be due to our data, the Brazilian
> localization modules we are using... No idea so far. We would like to
> update to the last server code, but than are stuck into that other bug:
> https://bugs.launchpad.net/magentoerpconnect/+bug/701644
>
> I'll let you know as soon as I know more.
>
> --
> You received this bug notification because you are a direct subscriber
> of the bug.
> https://bugs.launchpad.net/bugs/701100
>
> Title:
> [6.0] cannot search partner by 'ref' code in custom filter when not
> using en_US
>
> Status in OpenObject GTK Client:
> Incomplete
>
> Bug description:
> Hello
>
> I think lot's of companies, will have some 'ref' code for their partners
> and they need to use it as a search field.
> So I think we would better have an index on it + have it in the default
> partner search view.
>
> Any good reason not too?
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/openobject-client/+bug/701100/+subscribe
>

tfr (Openerp) (tfr)
Changed in openobject-client:
status: Incomplete → Confirmed
Revision history for this message
Raphaël Valyi - http://www.akretion.com (rvalyi) wrote :

@tfr, just curious, so you finally reproduced it? Do you know why you
couldn't reproduce it before? What did you do differently this time?

On Wed, Mar 9, 2011 at 8:42 AM, tfr (Openerp) <email address hidden>wrote:

> ** Changed in: openobject-client
> Status: Incomplete => Confirmed
>
> --
> You received this bug notification because you are a direct subscriber
> of the bug.
> https://bugs.launchpad.net/bugs/701100
>
> Title:
> [6.0] cannot search partner by 'ref' code in custom filter when not
> using en_US
>
> Status in OpenERP GTK Client:
> Confirmed
>
> Bug description:
> Hello
>
> I think lot's of companies, will have some 'ref' code for their partners
> and they need to use it as a search field.
> So I think we would better have an index on it + have it in the default
> partner search view.
>
> Any good reason not too?
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/openobject-client/+bug/701100/+subscribe
>

Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

@ Raphael Valyi

Good New ! I too reproduced it.

Thanks for all your good explanation that was required to reproduce it .
GTK Team Will patch it soon !

Thanks !

Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

Hello,

It has been improved @ lp~openerp-dev/openobject-client/trunk-bug-701100-nch/ with revision-info as 1832 nch@nch-laptop-20110311104013-n2l9o9kdxoe7r6u3 and will be merged soon to the trunk client.

Thanks again for reporting the issue !

Changed in openobject-client:
status: Confirmed → In Progress
status: In Progress → Fix Committed
tfr (Openerp) (tfr)
Changed in openobject-client:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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