Translation problem with 'Resynchronise Terms' Wizard +source stands with blank value + cache does not get updated with changes on translations

Bug #516030 reported by Dharmesh PATEL@Axelor SARL
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Odoo GTK Client (MOVED TO GITHUB)
Invalid
Undecided
Anup(SerpentCS)
Odoo Server (MOVED TO GITHUB)
Fix Released
High
Anup(SerpentCS)

Bug Description

I faced very critical problem with 'Resynchronise Terms' Wizard, when I run that wizard with 'english' language so it created translation for that language and then I again run that wizard by choosing 'french' language and its created problem some how french translation which I have already in database its overlaped by english terms and its happend on client's production database :(

so, I updated that database with --update=all and now its seems work fine but why 'Resynchronise Terms' Wizard overlaped translation terms with other language this is the problem.

I also attached screen shot for that and in this screen shot last record is generated after update=all so now its seems working fine but for above records its generated with 'english' and 'fnrech' language and 'french' translation is overlap with english terms.

so I am very afraid that client will run 'resynchronise' wizard in future also and again traslation problem will occur again :(

Revision history for this message
Dharmesh PATEL@Axelor SARL (dpa-axelor) wrote :
Changed in openobject-server:
status: New → Confirmed
assignee: nobody → Anup (Open ERP) (ach-openerp)
Changed in openobject-server:
importance: Undecided → High
milestone: none → 5.0.7
Changed in openobject-server:
status: Confirmed → In Progress
Changed in openobject-client:
status: New → In Progress
assignee: nobody → Anup (Open ERP) (ach-openerp)
Revision history for this message
Anup(SerpentCS) (anup-serpent) wrote :

Hello dpa,

        The Problems with Resynchronization and _translate_label problems can be solved by server side only and this bug does not affect GTK client.

Thank you.

Changed in openobject-client:
status: In Progress → Invalid
summary: - Translation problem with 'Resynchronise Terms' Wizard
+ Translation problem with 'Resynchronise Terms' Wizard +source stands
+ with blank value + cache does not get updated with changes on
+ translations
Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Thank you for pointing this out DPA-Axelor.

The problems have been resolved by revision 1979 <email address hidden>.

Kindly check it on various conditions and let us know the outcomes.

Thank you.

Changed in openobject-server:
status: In Progress → Fix Released
Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote :

The original fix has been improved, thanks to Numerigraphe who noticed something inconsistent there:

- 5.0: revno: 2077 revision-id: <email address hidden>
- 6.0: revno: 2410 revision-id: <email address hidden>

Revision history for this message
Numérigraphe (numerigraphe) wrote :

I think the way the cache is cleared is not correct when a single id is passed in create/write/unlink, because read() then returns a single tuple not a list.
Here's a patch for the trunk.
Lionel

Changed in openobject-server:
status: Fix Released → In Progress
Revision history for this message
Anup(SerpentCS) (anup-serpent) wrote :

Hello Lionel,

       I have checked the translations and have found that it always returns a list of dictionaries. Would you please give an example how can I get a tuple in place of list by read() method.

Thanks.

Revision history for this message
Numérigraphe (numerigraphe) wrote : Re: [Bug 516030] Re: Translation problem with 'Resynchronise Terms' Wizard +source stands with blank value + cache does not get updated with changes on translations

Dear Anup,
I guess you won't meet this with a standard install.
However, using custom code you just need to write a translations,
passing a single id.
This is allowed by the generic ORM, but broken for translations.

For a real context, you can check _change_object_original_language() on
my branch : without this fix, it would fail at line 117.
http://bazaar.launchpad.net/~numerigraphe/openobject-server/changeable-original-language-trunk/annotate/head:/bin/addons/base/ir/ir_translation.py#L75
Thanks for your dedication.
Lionel

Le mardi 27 juillet 2010 à 13:26 +0000, Anup (Open ERP) a écrit :
> Hello Lionel,
>
> I have checked the translations and have found that it always returns a list of dictionaries. Would you please give an example how can I get a tuple in place of list by read() method.
>
>
> Thanks.
>

Revision history for this message
Anup(SerpentCS) (anup-serpent) wrote :

Hello Lionel,

   I agree with you it causes an error but I have found an optimized solution for this problem. Would you please check it and notify us?

Thanks

Revision history for this message
Anup(SerpentCS) (anup-serpent) wrote :

Hello Lionel,

   It has been fixed by revision 2088 <email address hidden>

Thanks.

Changed in openobject-server:
milestone: 5.0.7 → 5.0.13
status: In Progress → Fix Released
Revision history for this message
Alberto Garcia (Factor Libre) (agarcia-flibre) wrote :

In server version 5.0.14 have similar error with resyncronize.

Environment Information :
System : Linux-2.6.31.12-0.2-default-x86_64-with-SuSE-11.2-x86_64
OS Name : posix
LSB Version: core-2.0-noarch:core-3.2-noarch:core-4.0-noarch:core-2.0-x86_64:core-3.2-x86_64:core-4.0-x86_64:desktop-4.0-amd64:desktop-4.0-noarch:graphics-2.0-amd64:graphics-2.0-noarch:graphics-3.2-amd64:graphics-3.2-noarch:graphics-4.0-amd64:graphics-4.0-noarch
Distributor ID: SUSE LINUX
Description: openSUSE 11.2 (x86_64)
Release: 11.2
Codename: n/a
Operating System Release : 2.6.31.12-0.2-default
Operating System Version : #1 SMP 2010-03-16 21:25:39 +0100
Operating System Architecture : 64bit
Operating System Locale : es_ES.UTF8
Python Version : 2.6.2
OpenERP-Client Version : 5.0.14
Last revision No. & ID :Bazaar Package not Found !Traceback (most recent call last):
  File "/home/agarcia/workspace/gsecrm/src/openerp-server-5.0.14/bin/netsvc.py", line 256, in dispatch
    result = LocalService(service_name)(method, *params)
  File "/home/agarcia/workspace/gsecrm/src/openerp-server-5.0.14/bin/netsvc.py", line 76, in __call__
    return getattr(self, method)(*params)
  File "/home/agarcia/workspace/gsecrm/src/openerp-server-5.0.14/bin/service/web_services.py", line 577, in execute
    res = service.execute(db, uid, object, method, *args)
  File "/home/agarcia/workspace/gsecrm/src/openerp-server-5.0.14/bin/osv/osv.py", line 58, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/home/agarcia/workspace/gsecrm/src/openerp-server-5.0.14/bin/osv/osv.py", line 119, in execute
    res = pool.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/home/agarcia/workspace/gsecrm/src/openerp-server-5.0.14/bin/osv/osv.py", line 111, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/home/agarcia/workspace/gsecrm/src/openerp-server-5.0.14/bin/addons/base/module/wizard/wizard_update_translations.py", line 50, in act_update
    tools.trans_load_data(cr.dbname, buf, 'csv', this.lang, lang_name=lang_name)
  File "/home/agarcia/workspace/gsecrm/src/openerp-server-5.0.14/bin/tools/translate.py", line 759, in trans_load_data
    trans_obj.write(cr, uid, ids, {'value': dic['value']})
  File "/home/agarcia/workspace/gsecrm/src/openerp-server-5.0.14/bin/addons/base/ir/ir_translation.py", line 165, in write
    self._get_source.clear_cache(cursor.dbname, user, trans_obj['name'], trans_obj['type'], trans_obj['lang'], source=trans_obj['src'])
  File "/home/agarcia/workspace/gsecrm/src/openerp-server-5.0.14/bin/tools/misc.py", line 643, in clear
    self.cache.pop(key)
KeyError: (('dbname', 'gsecrm'), ('lang', u'es_ES'), ('name', u'module.lang.install,init,lang'), ('source', u'Albanian / Shqip\xebri'), ('tt', u'selection'))

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.