Before this commit, the "click on save" in french step was checking for
the element containing the "Save" french translation term, which is
coming from Transifex.
It sometimes changes, making the tour fail.
It was "Sauver", then "Sauvegarder" and now "Enregistrer".
This was a well known issue as we already made a quick and dirty fix for
that with [1].
It was judged enough as we did not want to spend more time on this fix
as it was expected to not break anytime soon, and we needed a quick fix.
The chance is now taken to adapt the test to not rely anymore on the
.pot file.
We also take the chance to not use an existant translation but a fake
one as it will speed up the test (no need to actually read/parse .po
files are there is none for this lang).
[1]: https://github.com/odoo/odoo/commit/594ac2c9651f27cc1623fcd5b916cb191241651b
runbot-22946
runbot-22945
closesodoo/odoo#127493
X-original-commit: 6d9d4d1b43544ae98cc8037ba01c81b66ab9f0ee
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Previously, any call to `IapAccount.get` during testing would lead to
the creation of a new `iap.account` record as this was done in a
separate transaction which is commited.
As we don't want any database modification resulting from a test
execution, we will now check if we're in test mode or not.
During testing, a new account will be created in the current transaction
so that it can be properly rollbacked at the end of the tests.
This commit also modifies how the `iap_jsonrpc` function is disabled
during testing as the old implementation used some pretty obscure
manipulations of the `BaseCase` class.
The tests of the `website` module needed to be updated to take those
changes into account.
closesodoo/odoo#122663
Signed-off-by: Florian Daloze (fda) <fda@odoo.com>
Using patcher.start() can easily lead to incorrect cleanup.
-> after a copy paste, patcher is working, but stop is forgotten
-> stop is present, but won't be called if something fails during the
test
This commit add an utility `start(patcher)` to always have the add
cleanup.
Using a standard way to start the patcher with an automated addCleanup
should prevent this kind of mistake. This is why this commit also
replaces all valid patch.start() (followed immediately by a addCleanup)
closesodoo/odoo#102873
X-original-commit: 7d5a193d86316965a0908c65cfacfb607dc3f3ad
Related: odoo/enterprise#32618
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Website: the context install_filename='dummy' is used to prevent
arch_updated from becoming True while updating translations of
ir_ui_view.arch_db (if arch_update becomes True, test_inherit_specific
fails)
Fuzzy search for jsonb translated fields has been adapted in the case of
website. It may require some refactoring later.
*: website, website_blog, website_crm, website_event, website_forum,
website_hr_recruitment, website_mass_mailing, website_sale,
website_sale_loyalty, website_slides
This commit adds the current website displayed view xmlid outside of the
iframe, on its container, so that the tours registered with
registerThemeHomepageTour can continue to prepend their triggers with
the view xml id.
Introduce registerEditionTour: this function will allow tour maker to
more easily register a tour that needs to start in the iframe's backend
and go in edit mode.
See merge commit for more information.
task-2687506
Co-authored-by: Benjamin Vray <bvr@odoo.com>
Co-authored-by: Younn Olivier <yol@odoo.com>
Purpose
=======
Add "Activate" button when selecting multiple languages, select multiple
languages when clicking on "Add languages" in settings.
Specifications
=============
`lang` variable in `base.language.install` changed from Selection to
Many2many to allow multiple languages being activated at once.
Hide globe icon for language fields from view mode (only visible when
editing). Remove state in base.language.install since it's no longer
need to keep track of the installation step.
Task-2662548
closesodoo/odoo#78287
Related: odoo/upgrade#2921
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
The configurator introduced at [1] uses a frontend controller to
display its content. However this results in inconsistent language
translation as the python code uses the users's language but the
localization services uses the frontend's language when on a frontend
page.
Steps to reproduce:
- Create a database with the only language being french
- Install website
- In the configurator, all the pages will be in french except
"Pages and Features"
With this commit, the language for the configurator will always be
the language of the website it's configuring. A test also make sure
that this is the current behavior.
[1]: https://github.com/odoo/odoo/commit/e8a5af2e28a4724f86783746706cb59175f086bf
task-2687416
closesodoo/odoo#84810
X-original-commit: a0f8fdc65566fafe98dab21f5c2dbab9505c3d5c
Signed-off-by: Romain Derie (rde) <rde@odoo.com>