diff options
| author | Pierre Masereel <pim@odoo.com> | 2018-09-11 14:01:57 +0200 |
|---|---|---|
| committer | Martin Trigaux <mat@odoo.com> | 2018-09-18 14:30:03 +0200 |
| commit | 7288b4779a83a04617d4f22a22bdd8edfd22e04f (patch) | |
| tree | a0747ad701df602aeb0a79b149e504260b29ce21 /addons/account_tax_python | |
| parent | 83e460b8daf4b3d0a9e05ba93aa57f32d74b5f4f (diff) | |
[IMP] base, tools, web_edeitor: improve ir_translation insertion
The ir_translations were pretty slow to load, this was mainly caused by
the condition in variable 'find_expr' and the import of po values in the
temporary table.
To improve the load performance, we made two improvement:
1. Insert the row in the temporary table by batch instead of making an
insertion for each record.
2. Replacing the condition in the variable 'find_expr' by partial unique
index. To perform such a thing, we had to separate the type model in
two types, 'model' and 'model_terms' because it wasn't possible to
create a partial unique index on type 'model' because the type was
used for two different use cases. The type model is now used for
fields that have have a value not callable for the attribute
translate, these field can only have one record for the same field,
model, res_id and language. And the type 'model_terms' is used for
the fields callable, because they can have multiple sources for the
same res_id.
We also removed the deprecated types 'report', 'help', 'view', 'field'.
Thanks to @rco-odoo for the improvement of the first point.
Diffstat (limited to 'addons/account_tax_python')
0 files changed, 0 insertions, 0 deletions
