[6.1/trunk] Translations: creation of a record does not generate translation lines
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Server (MOVED TO GITHUB) |
Confirmed
|
Low
|
OpenERP's Framework R&D |
Bug Description
Hello,
Actually, the original behavior for the translations is quite strange.
Here it is:
I'm logged in with en_US language.
I create a record, with a (translatable) title 'My title'
I check the source in database (table of the object), that's 'My title'
I check the translation lines for the en_US language, no line
I write on my record the title 'My title updated'
I check the source in database, that's 'My title updated'
I check the translation lines for the en_US language, no line
I'm logged in with fr_FR language
I create a record, with a (translatable) title 'Mon titre'
I check the source in database (table of the object), that's 'Mon titre'
I check the translation lines for the fr_FR language, no line
I write on my record the title 'Mon titre mis à jour'
I check the source in database, that's 'Mon titre' (unchanged)
I check the translation lines for the fr_FR language, I have a line with 'Mon titre mis à jour'
OpenERP assumes that the en_US is the reference
language, so lets assume it completely, and generate the french
translation line directly when we enter the value.
As we can see, the write method creates translation lines for other
languages than en_US, that's correct.
The create method does not, it has to do it.
That's weird, because, if I create a record in french, the source
will be the french value (of course), but programmatically, we do not
have any means to know that someone entered a french translation.
A simple scenario where the bug will occurs:
User A is logged in with fr_FR
User A creates a product with a name 'Marteau'
User B is logged in with en_US
User B modifies the product 'Marteau' to be 'Hammer'
=> The french translation is lost.
It won't occurs in this slightly modified scenario:
User A is logged in with fr_FR
User A creates a product with a name 'Martea' (typo)
User A modifies the product 'Martea' to be 'Marteau'
User B is logged in with en_US
User B modifies the product 'Marteau' to be 'Hammer'
=> The french translation isn't lost, because the write has
correctly generated the french translation line
Related branches
- OpenERP Core Team: Pending requested
-
Diff: 24 lines (+8/-6)1 file modifiedaddons/web/static/src/js/views.js (+8/-6)
Changed in openobject-server: | |
assignee: | nobody → OpenERP Publisher's Warranty Team (openerp-opw) |
tags: | added: maintenance |
Screencast with a simple scenario