Nicolas Lempereur 65808bbb2e [FIX] models.py: less botched copy for callable translate
Fields translated with function such as `xml_translate` or
`html_translate` have translations such as:

  lang=fr_FR, src="Tree", value="Arbre"

when the value directly stored in the table could be:

 <strong>Tree</strong>

The code to copy translations when duplicating a record did not take
this into account and when not in english, would add previously not
existing translations such as:

 lang=fr_FR, src="<strong>Tree</strong>", value="<strong>Arbre</strong>"

This is wrong since for example after a copy in french, what is in the
database is:

 <strong>Arbre</strong>

This commit change this so that the translation in the database stay the
same:

  lang=fr_FR, src="Tree", value="Arbre"

This translation will still not apply (if the base language is different
and a translation different than the source exists) but it is more
logical to have this.

This change also magnify an issue that was that if a translation was:

  Tree -> Arbre

and the content `<strong>Arbre</strong>`. The translation doesn't happen
in one way, but does when doing the reverse translation.

So:

 translation (Tree -> Arbre):
  `<strong>Arbre</strong>` -> `<strong>Arbre</strong>` <= FAIL
 reverse translation (Arbre -> Tree):
  `<strong>Arbre</strong>` -> `<strong>Tree</strong>` <= WORKS

this broke the test that something reverse translation of a translation
got the original. But testing this if the translation did not work seems
to make little sense.

opw-740213
closes #16984
2017-05-16 18:05:49 +02:00
2016-09-22 15:42:02 +02:00
…
…
…
…
2016-12-09 12:02:31 +01:00
…
…

Build Status Tech Doc Help Nightly Builds

Odoo

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, Purchase Management, ...

Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.

Getting started with Odoo

For a standard installation please follow the Setup instructions from the documentation.

If you are a developer you may type the following command at your terminal:

wget -O- https://raw.githubusercontent.com/odoo/odoo/9.0/odoo.py | python

Then follow the developer tutorials

For Odoo employees

To add the odoo-dev remote use this command:

$ ./odoo.py setup_git_dev

To fetch odoo merge pull requests refs use this command:

$ ./odoo.py setup_git_review
S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%