Duplicate location creates new location with old location name

Asked by Aristóbulo Meneses

When duplicating a stock location, the new location is created with the duplicated location name.

If the name of the new location is changed and saved, the field name in table stock_location keeps the original name and
saves the new name in ir_translation.

Using openerp 6.0.3

addons - revno 4915
server - revno 3538

Pd. Tested duplicating products, works fine.

Question information

Language:
English Edit question
Status:
Answered
For:
Odoo Addons (MOVED TO GITHUB) Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Numérigraphe (numerigraphe) said :
#1

This behavior is "by design", so please let me turn this bug into a question.
Lionel.

Revision history for this message
Numérigraphe (numerigraphe) said :
#2

The location name is marked "translatable", so anything you enter in any locale but en_US will never hit the object's table, but ir_translation instead.
This makes duplication clumsy as was reported several times, but no clean solution has been found for the moment.
When you change users on the other hand, the changes hit res_ursers because the username is NOT translatable.
I hope this clarifies the matter.
Lionel.

Revision history for this message
Numérigraphe (numerigraphe) said :
#3

Please let me preach once again for a change I'd like to see: if you always use es_PE, and never en_US, you may wonder why OpenERP uses the translation table at all.
I personally find this quite annoying, and it has drags a history of subtle errors provoked by missing contexts.

So I proposed to let each administrator decide for the language that should go to the tables instead of ir_translation, rather than enforce en_US evry time.
But to this date, I have not yet been able to convince the core team that this change is functionally sensible, so please head to Bug #400256 and click "it affects me". You may subscribe to the bug too is you want to hear about any progress made.
Lionel Sausin.

Revision history for this message
Aristóbulo Meneses (aristobulo) said :
#4

Thanks Lionel,

Now i know the reason of that behavior, but why make it translatable by default?

still i don't see a good reason to make name translatable, by default this will affect to anyone that isn't using en_US.

Revision history for this message
Numérigraphe (numerigraphe) said :
#5

"bzr annotate" reveals that this was made by Fabien himself as a "Small improvement" in 2008. It sure makes sense in a multi-language company.
Lionel.

Revision history for this message
Nhomar - Vauxoo (nhomar) said :
#6

IMHO.

It make sence when you have a multi - language localization,

IE, our own implementation has 3 countries with different local Spanish Entries.

We with English overwrite original language for all pre-created data.

IOH, I propose verify all translatable name fields, you will see this problem on Product, Partner and other ones....

If you want to avoid this feature you can overwrite the "copy method" for this specific models and correct this feature with your own behaviour for them.

Regards.

Can you help with this problem?

Provide an answer of your own, or ask Aristóbulo Meneses for more information if necessary.

To post a message you must log in.