translation name in product.form after duplication

Bug #734191 reported by Steffi Frank (Bremskerl, DE)
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Committed
Low
OpenERP R&D Addons Team 2
6.0
Fix Committed
Low
OpenERP Publisher's Warranty Team

Bug Description

V6, trunk

steps to reproduce:

install any language (I tested with German de_DE)
create a new product: name = mix 1234, code = 1234
duplicate the new product through product.tree/form/duplicate
open the copy
change name in mix 2345 and code in 2345
save
open the translation for name: in language English you still find the name mix 1234

This does not happen when you're logged in with English (and German is installed as well). Even the translation from English to German changed to mix 2345

Related branches

Revision history for this message
Steffi Frank (Bremskerl, DE) (steffi-frank) wrote :

Note: we are implementing OpenERP V6 in one of our companies, starting 1st of April.... The colleagues are working hard on entering all master data - in German..... So copying a product means extra work :(

hence it would be nice to get this bug solved quiet soon
Thanks!

Revision history for this message
Steffi Frank (Bremskerl, DE) (steffi-frank) wrote :

correction: V6 series 6.0

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

Hello Steffi frank,

The products name are not automatically changed It contains only those name which you have written.

If you want to change the name of product for particular language please see the video which I have attached.
So this is not a bug and I am closing this issue.

Thanks.

Revision history for this message
Amit Parik (amit-parik) wrote :
Changed in openobject-addons:
status: New → Invalid
Revision history for this message
Steffi Frank (Bremskerl, DE) (steffi-frank) wrote :
Revision history for this message
Steffi Frank (Bremskerl, DE) (steffi-frank) wrote :

IT WORKS if you do it it users language = English!

affects: openobject-addons → openobject-server
affects: openobject-server → openobject-addons
Changed in openobject-addons:
status: Invalid → New
Revision history for this message
Jacques-Etienne Baudoux (jbaudoux) wrote :

The issue in in product/product.py method copy.
Not clear why you use create instead of copy. If you use create, you must do:
> context_wo_lang = context.copy()
> if 'lang' in context:
> del context_wo_lang['lang']

< product = self.read(cr, uid, id, ['name'], context=context)
> product = self.read(cr, uid, id, ['name'], context=context_wo_lang)

< data = self.read(cr, uid, id, fields=fields, context=context)
> data = self.read(cr, uid, id, fields=fields, context=context_wo_lang)

and then manage the translation like done by copy_translations.

Maybe, this method should simply be rewritten to use super(product_product, self).copy instead of self.create

Changed in openobject-addons:
importance: Undecided → Low
status: New → Confirmed
Amit Parik (amit-parik)
Changed in openobject-addons:
assignee: nobody → OpenERP R&D Addons Team 2 (openerp-dev-addons2)
Changed in openobject-addons:
status: Confirmed → In Progress
Changed in openobject-addons:
status: In Progress → Confirmed
Changed in openobject-addons:
status: Confirmed → In Progress
Revision history for this message
Rohan Nayani(Open ERP) (ron-tinyerp) wrote :

Hello,

Thanks for Reporting.
It has been fixed in lp:~openerp-dev/openobject-addons/trunk-bug-734191-ron
Revision ID: <email address hidden>
Revision num:4572.

It will be available in trunk soon,

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

Hello Steffi,

    When you Copy a product from English language it copies the orignal value of the product name that is stored in the product_product table. So when you change the value it is again stored in the db and searches translations for it and if not found returns the same english value. But when you copy the data from other languages it just modifies the translation not the orignal value so it remains the same as it was copied from and only the translation changes. This is a usual flow and there is no problem in that. If you want to change the name in English you'll have to do it manually.

    There were some other issue with the translation while copying from another language. Copying product was copying german name in english data. Which was wrong.

  It has been fixed by revision 4502 <email address hidden> in the branch lp:~openerp-dev/openobject-addons/6.0-opw_bug-734191-ach

Thanks.

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.