When gevent is enabled, some arguments are stripped to avodi being retriggered
in the other workers (e.g. update of a module).
The `--i18n-overwrite` was not stripped and the other worker raised an error has
the `overwrite_existing_translations` argument requires the `update` argument
(which is stripped in the `stripped_sys_argv` method.
Fixes#12566Closes#12986
The field symbol is not required on a res.currency (it should and will be
changed in master). In case it is not set, do not display the currency in the
rapport.
Fixes#11346
When using the -i command line option without the --without-demo=all command
line option, demo data was installed even if the configuration file has
a line without_demo = all
This change is safe as just above, opt.without_demo is copied into
self.options['without_demo'] so we are sure to consider the 2 options.
Closes#12730Fixes#9293
If two addons path have a common part in the folder name (e.g. `/home/alice/dev`
and `/home/alice/devodoo`), the `get_module_from_path` method may match the
wrong folder.
A file `/home/alice/devodoo/bob/models.py` would wrongly match `/home/alice/dev`
path (due to the lack of separator) and the returned module would be `odoo`
(`"odoo/bob/models.py".split('/')[0]`).
In such scenario, the translations of files (code, static folder, report) would
not be included in the exported translation file.
Force the module path to ends with a folder separator to avoid wrong matching.
Closes#12757
When user reset master password from web database manager, the
config file is saved.
If server was started in dev_mode the param dev_mode was saved
in openerp_serverrc silently. (in 9 or always in trunk)
Remind: --dev_mode should be never used on a production server.
Avoid the DOCTYPE tranlation. If this tag is changed, the html rendering is altered. The other effet is that the web_editor wrap the content with <span> to translate, but some explorer eject tags (doctype, head content, script, style, meta) et insert this tags in the body.
NB: DOCTYPE is not a node but a text.
This reverts commit 44e8b92beb.
The condition is wrong as a view starting with DOCTYPE as top element will be
excluded, including its child (the whole page them).
Re-add the translatable title that was excluded by the condition.
The comments field was ignored (because reasons) when exporting terms in CSV.
This was an issue when using the wizard 'Synchronize Terms' as it first export
the terms of every module in CSV.
opw-673853
Otherwise recomputation may fail with "record does not exist or has been
deleted" when creating records with a value directly set for e.g.
'image_mediun' on a new product.
The issue comes from the storage of the images. When creating a product, the
creation of an attachment for storing the field `image_medium` triggers the
recomputation of that field before its dependency `image` is set. As `image`
is initially null, `image_medium` is recomputed as null, and this deletes the
attachment just created before the latter has completed its creation! As a
consequence, some code at the end of `create` for the attachment crashes
because the record has been deleted.
The following models have been fixed: `fleet.vehicle.model.brand`,
`hr.employee`, `im_livechat.channel`, `mail.channel`, `payment.acquirer`,
`pos.category`, `product.template`, `product.public.category`, `res.partner`.
opw 666330
Closes#11516
* move guess_mimetype from ir_attachment to a misc submodule so it can
be used outside of attachments (in base_import in this case)
* fix the broken detection of zip and OpenDocument files (would all be
detected as msword files)
* correctly implement detection of OOXML files (including returning the
right MIME type)
* attempt to correctly detect OLECF Excel files (.xls)
* add PPT detection (untested)
* remove duplicate patterns in GIF detection
Do not parse the translation of an attribute value. The content of a
translatable node attribute (such as 'string') should not be tested for
XML/HTML validity: the value can contain special chars such as `&` in its
source and should not be escaped when evaluated.
This fixes escaped page title in the partner form
`Sales & Purchases` => `Ventes & Achats`
The sanitizer escapes email addresses contained in its source html to
avoid having it being discarded. Indeed the lxml cleaner considers them
as invalid tags and remove them.
However this escaping does not take into account email-like patterns
contained in cite attribute present on blockquote, del, ins or q.
This could lead to blockquote tags being escaped and therefore wrongly
displayed. This is now fixed.
When a record is exported, an external ID, in the form of __export__.<model>_<id>
is created on this record.
When the translations are generated (e.g. "synchronise terms" wizard), the
translations may be duplicated for records that have been exported. If a
translation is submitted before the export (when the record had no external ID
yet), a new empty translation is created as the module differs in the import.
Creating a new translation may be a problem as the new term (equal to the source
term) will be used as the translation value.
Fixes 9480
During the construction a xml/html_translate content, in case of a wrongly
translated part (e.g. not correctly escaped char or bad xml tag), escape the
translation.
The verification is done during the rendering on the view which is not the most
optimal solution but has the advantage of working on system with some broken
translations and does not requires to reload the translations.
In master version, the verification could be done when loading the .po files.
Do not compute the partner default image when being in testing or install mode.
For example when importing a huge list of contacts there is no need to compute
a default image for every contact.
Moreover the random colorize is more limited. There is no need to explore the
whole space of rgb. It is now limited by steps in the rgb random, leading to
less different images being possible. There are currently 512 possible
combinaisons.
By default, Odoo support _ and % in domain to search like in pgsql.
But if you want to search something starting by _ or containing %
the developper need to escape these character.