Purpose
=======
This is the first huge step to improve the test suite in several ways:
- Make them demo data independent, allowing to modify the demo data without having to adapt the tests depending on it. It also allows to have a beautiful + convenient demo dataset to make a demonstration, and to configure complex data in the tests to manage the corner cases.
- Improve the test performances by converting them into SavepointCase. Each test will be rollbacked to it's initial state, after the setUpClass call. That way the different data are not re-created at each test for nothing.
- Introduce several test classes in base/tests/common.py to launch a TransactionCase, HttpCase or SavepointCase test with an available demo user, portal user or a large set of partners.
- This is the first step to tend to a rolling release process, allowing to execute the tests (or a subset of the tests) on a migrated base, for example.
closesodoo/odoo#39868
Taskid: 2075739
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
This commit: https://github.com/odoo/odoo/commit/0eba50dd1c33a08f8862a5718149e61b822e1b5a
introduced a 'return' in the survey.js script: return load_chart(chartConfig, '#scoring_results_chart');
This makes the rest of the script completely skipped and bypasses all the filter features.
task-2116078
closesodoo/odoo#39898
X-original-commit: b7baaf4846ba9208aeba8ba4db7de4f142e147cc
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
When loading a page on an existing starting database, registry is not
fully loaded causing potential error when trying to access model
existing in database (views, menitem, ...) since model added in last
loaded module does not exist in registry.
Thus, executing browser js test may lead to errors when executed during
an update on a database with other modules installed.
HTTPCase should be executed post_install to ensure that registry is
fully loaded to avoid this problem.
Since HTTPCase are slower than other test, it is also a good idea to
execute them at the end, in order to prioritize fast fail.
With this commit, a warning is isued if such a test class is tagged to
run at install time.
While at it, remove deprecated at_install and post_install helpers and
remove the deprecated phantom_js alias.
closesodoo/odoo#39462
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
We can't edit the random question count field from the survey form (in
list widget). Change the function which compute the colspan
of a field (during edition).
TASK_ID : 2075216
closesodoo/odoo#39549
X-original-commit: 61d61348d3e5abf852edb692bb412f177ae5e167
Signed-off-by: ryv-odoo <ryv-odoo@users.noreply.github.com>
Co-authored-by: Michaël Mattiello <mcm@odoo.com>
Since commit https://github.com/odoo/odoo/commit/dba478332681dd21a39c4a183c002b1cf6e046d2, a survey can have questions with no section
associated, which means 'page_ids' field will be empty.
This prevents to display some questions of a survey, as we are
still expecting a structure page/questions. To solve it, we first
append questions with no sections, then all other questions.
closesodoo/odoo#39113
X-original-commit: 149657cfd696e5065b55519927973fa785cc0e22
Signed-off-by: Alex Tuyls <alt-odoo@users.noreply.github.com>
Since commit https://github.com/odoo/odoo/commit/dba478332681dd21a39c4a183c002b1cf6e046d2, a survey can have questions with no section
associated, which means 'page_ids' field will be empty.
This prevents to display the analysis results of a survey, as we are
still expecting a structure page/questions. To solve it, if a question
does not have a section associated, we use an empty page instead.
closesodoo/odoo#39087
X-original-commit: 45c2964c1cfd07cabfa6a1a1b8e796bea4c521d7
Signed-off-by: Alex Tuyls <alt-odoo@users.noreply.github.com>
*: account
crm
event
fleet
hr_expense
hr_holidays
hr_recruitment
mail
maintenance
mrp
note
project
purchase_requisition
repair
stock_landed_costs
stock_picking_batch
survey
website_event_track
This commit is making sure that the exception activities filters are
only defined where it make sense (i.e. where the system can actually
create an exception activity).
We have therefore removed 'exception activities' filters where the
system won't be creating any.
Task-2056425
closes odoo/odoo#36027
Closes: #36027
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
- Create a survey with one page per section.
- Go to the second section and select an answer.
- Go back to the first section using the breadcrums.
Before this commit:
if you go back again to the second section, you will see that your answer
wasn't saved.
After this commit:
answers are saved even when navigating with breadcrums.
closesodoo/odoo#37157
Opw: 2072948
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
When accessing answers (survey.user_input) through the survey form view, we used a separate action
to hide the test entries.
This could be confusing when you actually wanted to see the test entries for that survey.
This commit changes that to use a default filter instead, leading to the same visual behavior.
Task #2058598closesodoo/odoo#36835
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
When a user tests the Survey, he should not get a valid certification document when he succeeds.
To avoid that, we add a "specimen" watermark on the background when the user_input is a test_entry.
In addition, we also don't send the mail containing the certification for test entries.
Task#2058598
Otherwise public users cannot receive their certification. Indeed email_from
will be the one of public user which is probably not set.
Task 2067872 (eLearning internal testing)
Task 2058598 (survey internal testing)
PR #36756
Still due to some recent ORM changes: finding a real ID, assigning values
even in create mode with default values.
Task 2058598 (survey internal testing)
PR #36756
Before:
The method _get_mark called Model.exists() just after calling
Model.browse
This process makes 2 calls to database to do almost the same thing
Now:
Removed the method _get_mark and directly call Model.browse
FP feedback
Task 2066646
Slovenian language, as many others languages, is not present in the
beta/master projects in Transifex.
For some reason, Transiflex removed all current translations, this was
already fixed in 12, but as there are not automatic forward-port for
translations, this is a manual forward-port.
opw-2060055
closesodoo/odoo#36374
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
[PEP 594] is going to depreciate the legacy `email.message.Message` API
and its related modules. Among them the `email.utils.formataddr`
function, this function takes a `(name, email)` pair and returns a
string value suitable for From, To and Cc headers.
The stdlib function is capable of handling several character encoding
and two binary-to-ascii encoding. Odoo only uses `utf-8` which is
compatible with the base64 b2a encoding. The re-implementation of that
function has been simplified to only support base64-ed utf-8 and ascii.
[PEP 594]: https://www.python.org/dev/peps/pep-0594/\#email-lagacy-api
- Take a quizz survey, and fail it
- Go to Answers
- Print the Certification
Even if the quizz was failed, the certification can be printed.
There is no option to prevent printing a PDF, therefore we need to print
a different template.
opw-2049481
closesodoo/odoo#35769
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>