In the goal of simplify assets loading, in this commit we create a new
assets bundle for chartJS and its luxon adapter.
With this, we can now use loadBundle instead of load these two libraries
with loadJS.
task-3562357
closesodoo/odoo#139544
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
Fixes a large number of cases where strings are translated then
formatted, instead of letting `_()` do the formatting internally,
which allows it to recover from incorrect translations (missing,
broken, or extra placeholders).
Also
- removes translation markers entirely when there's nothing to
translate e.g. `_("%s - %s")` is not useful
- fixes a few messes which lead to only partial translatability
(DRY is generally a bad idea when translations are involved, even
more so when you don't make the variable part translatable)
- fixes a few nearby issues noticed at the same time
- replaces a few `"%s"` by `%r`, which should automatically quote
strings relatively appropriately
- fixes translated strings which use `\` to escape a newline (in order
to fill-paragraph): `\` escapes only the newline, if the
continuation string is indented this results in a bunch of spaces
ending in the string to translate, which is pretty garbage for the
translator, using implicit concatenation works much better
Note: some of the updates revert f-string parameters to %, because
babel (2.9) apparently has trouble with f-strings and blows up trying
to extract them.
Not in scope:
Helping translators fix translatable strings e.g. any translation
string with more than one placeholder probably should use keyword
placeholders
- Provides more context / data to the translator to make sense of the
sentence.
- Allows reordering the translated terms, which can be necessary
depending on the sentence and language.
closesodoo/odoo#139314
Related: odoo/enterprise#49311
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
The following summary view of the record in the activity views have been
improved:
- project_task: task state added
- project_project: project manager added
- event_event: responsible and the dates (date_begin_located and
date_end_located) added
- account_move: total amount, customer and state added
- sale_order: total amount and the state added
- purchase_order: total amount and the state added
- crm_lead: customer and stage added
- hr_applicant (hr_recruitment): recruiter added
- survey_survey: responsible added
- maintenance.request: added equipment and responsible
- stock.picking: added scheduled_date
- repair.order: responsible, schedule_date and product_id added
- mrp.production: added responsible
- hr_leave (hr_holidays): status is added and default deadline modified see
below
Ensures that "Schedule activity" is in one line by adding a colspan.
hr_leave activity: When a time off approval activity is created as a
consequence of the creation of a hr.leave, the deadline of the activity is set
to the date_from of the hr.leave minus activity type delay_count (default 15)
except if it leads to a date anterior to today. In that case it is set to
today. That way, in the activity view, the time off approval activities are
more or less sorted by related hr.leave date_from and the cell date is an
indication of when the time off is planned.
Technical note: on most activity view, the activity record was not occupying
all the horizontal space. To solve that problem the css has been modified and
the max-width (200) that was imposed on the sub div has been removed. And as
it was impossible to impose a max-width for a flex div (which is the common
case for the activity record), the max width is imposed on each text that might
be too long using the class o_text_block. That class has been modified to
impose a max-width. That's why that class has been added in most view.
Alternativly, we could have modified the activity compiler to add that class
when the attribute full was set (not done because not sure of the consequence).
Task-3300854
Part-of: odoo/odoo#138135
Because of the ´@extend´, the following rules has been created:
.o_form_view .o_survey_question_view_form .o_form_renderer .o_survey_question_validation_parameters
.o_survey_question_view_form .o_form_renderer .o_form_view .o_survey_question_validation_parameters
.o_form_view .o_survey_question_view_form .o_form_renderer .o_field_widget.o_survey_question_validation_parameters > *
.o_survey_question_view_form .o_form_renderer .o_form_view .o_field_widget.o_survey_question_validation_parameters > *
As you can see, no one match the selector where it should be applied;
.o_survey_question_view_form .o_form_renderer .o_survey_question_validation_parameters
This makes this ´@extend´ useless.
Steps to reproduce:
- Go to Survey
- Questions & Answers -> Questions
- In the form view, select "Date"
- Go to the "Options" notebook
- Check "Validate entry"
Part-of: odoo/odoo#139199
Purpose
=======
Add a scoring option displaying the correct
answers after each page when taking the survey.
Specifications
==============
When the user submits the page:
- highlight in green the correct answer(s)
- highlight in red the wrong answer(s)
When the correction is displayed, prevent
the user from changing their answers.
Handling all question types that can specify
a correct answer:
- Numerical box
- Date
- Datetime
- Simple choice
- Multiple choice
Task-3374998
closesodoo/odoo#129329
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
The aim of this commit is to improve the impact and rendering of app
icons in bright and dark mode. It also reduces the size of svg files.
To achieve that, this commit updates the colors to flat colors. This
change will make the icons stand out and improve their readability.
task-3072562
X-original-commit: 667a19162b74fb6554a2389ba9c6e69de4ff5113
Part-of: odoo/odoo#138279
We removed CSS styling for these classes in
854083f70a,
but these were only used in the survey tour, and not
instrumental, so we can remove them.
Task-3525225
closesodoo/odoo#138095
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit aims to simplify the evaluation context used to
evaluate expressions used in views (invisible, required, readonly,
domain and context attributes). For now, the evaluation context is
typically the current record (there's a key for each field in the
view). In addition to that, there're static keys (that may conflict
with field names): uid, allowed_company_ids, current_company_id,
active_id, active_ids and active_model.
The motivation of this commit is at some point to get rid of the
3 active_* keys, because they are misleading and basically useless.
The notion of active_* exists, but it is something else: when you
are in a form view (let's say the form of a partner) and you open
its opportunities (by clicking on the stat button), the list view
of opportunies shows up and in the context, there're 3 keys
active_*, referring to the record from which we came. One can
easily access those information with context.get("active_*"), in
python or in view archs.
However, almost all `active_id` found in archs were actually used
to refer to the id of the current record. Indeed, for now, in the
evaluation context of a record, the value of the `active_id` key is
always the id of the record. So this commit adapts them to
directly use `id` instead. There was no use of active_ids, and
a single use of active_model which was removed (active_model is
the res_model of the view, so it isn't really necessary).
This commit doesn't drop the support of those keys, it deprecates
them. They will be removed for v18. A warning will be displayed if
they are used.
closesodoo/odoo#136665
Related: odoo/enterprise#47917
Signed-off-by: Raphael Collet <rco@odoo.com>
Purpose
=======
Improve the overall look of the page for screen and print media.
Display/hide questions, and alternate between pagination and full
display of user responses.
Specifications
==============
= HEADER AND OVERVIEW =
- remove waste space between Edit Survey button and survey title
- remove trophy cup or any icon on the right of the title
- put filters on the right of the title
- remove background
- replace the `Results overview pie chart` by the survey KPI's
- add a print button
= QUESTIONS =
- add a button for each question to toggle their visibility
- avoid breaking question into multiple lines, use all space available
- change info badges design so they are not mistaken for buttons
- remove question type from the info badges
= USER RESPONSES =
- add a `show all` button per question to display all responses,
whitout pager and scrollbar.
- for each response, push the filter icon to right side of the row
- use regular font and color for responses, remove response text from
the anchor tag
= PRINT MODE =
- hide the `webeditor/ back to backend` button
- visible questions: display all responses (no pagination or scrollbar)
- user responses: hide filter icons
- make sure elements like tables are properly cut between pages
- resize graphs to ensure they fit into A4 paper page
task-3424235
closesodoo/odoo#135683
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Before this commit, owl was in the linter's accepted global variables.
This allowed direct access to owl global object.
For instance, to use xml from owl, you could do :
`const { xml } = owl;`
or you could use it directly:
`owl.xml`
Now, owl is not accepted on linter's global variables anymore, so to
import xml, now you need to use a proper import:
`import { xml } from "@odoo/owl";`
task-id 3498859
closesodoo/odoo#137517
Related: odoo/enterprise#48364
Related: odoo/design-themes#709
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
The cookie service was replaced by a utils file in core. This was done
to be able to use the cookies without the need of environment.
"Om Nom Nom Nom" - Cookie Monster
part-of task-id 3439226
closesodoo/odoo#136782
Related: odoo/enterprise#48005
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Currently, in the survey for single/multiple choice questions, the layout is
not consistent. For example, if there are four choices available, the
layout is 3-1 (3 small options in the first row, 1 full-width option in the last
row). Apart from that, if the string for options is long, the radio/check
box comes at the bottom right corner, which should always be at the
top right corner.
This commit does the following improvements:
1/ Improve the choices layout to make it beautiful. now there will be only one
answer per row similar to the 'One Page Per Question' layout.
2/ The radio / check-box icon will be displayed in the top right corner
regardless of the length of the option strings.
3/ If there is one or more image(s) in the answers then we will follow 2x2
layout instead of one row per answer.
TaskID-2712296
closesodoo/odoo#99229
Signed-off-by: Florian Charlier (flch) <flch@odoo.com>
The initial motivation of this commit was to ensure that the qunit
test suite doesn't stop when an error is thrown in a test, which
could happen if the error was thrown "sufficiently close to the
end of the test". Indeed, the "unhandledrejection" event being
async, it was sometimes triggered after the end of the test, when
the service registry was already reset, and the check of the
presence of the error service was wrong, so the error event wasn't
default prevented (e.g. await makeView(...) and the view crashes
at render time).
This led us to rework in more depth the way we deal with errors in
tests. Here are a few behaviors we want (probably not exhaustive):
- an error in a test must never end the suite (executed in py)
- an error in a test must always make the test fail, except if the
error is expected in the scenario, which one must be able to
state
- a test must always wait for potential unhandledrejection events
to be triggered before ending.
- ideally, we don't want to have to deal with unhandledrejection
in each test throwing an error (in order to prevent the suite to
stop)
To achieve this, we come with the following solution. We introduce
a new assertion method, "expectToThrow" which allows to state that
during the test, we expect errors to be thrown. It takes a list of
error messages that will be compared at the end of the test with
the errors that have been thrown during the test. If they differ,
a qunit failure is pushed and the test fails. If an error occurs
in a test and "expectToThrow" hasn't been called, qunit is directly
informed of the error and a failing assertion is done, make the
test fail as well.
If the error service isn't available in the test environment, we
apply the logic above when an "error" or and "unhandledrejection"
event is thrown. If the error service is available, we wrap the
default handler (typically the one that handles everything that
hasn't been handled by specific handlers, like tracebacks) and if
we get to it, we apply the logic above. This means that one must
call "expectToThrow" if
- the error service isn't deployed, or
- the thrown error is handled by the default handler, because
it is something like a traceback (errors like UserError,
ValidationError are graciously handled by the RPCErrorHandler)
and thus never reach the default handler.
In all cases, we prevent default the event such that the error
doesn't make the python test end.
Finally, to ensure that "undhandledrejection" events are handled
before the test ends, we wait, in the qunit lib, for a setTimeout
before ending the test, which ensures that all such events have
been dispatched.
closesodoo/odoo#137120
Related: odoo/enterprise#48211
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
This commit allows the user to navigate freely through a
survey with mandatory questions. He will be able to skip
questions and come back to them later. If he still hasn't
answered them at the final submit they will automatically
be displayed with an error message to invite the user to
answer them. The user can navigate through the skipped
questions with a button within the error box.
Task-2605657
closesodoo/odoo#119315
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit removes the files ajax.js and rpc.js then adapts all the
places where their exports were used. For most of the changes, it's a
replace of `this._rpc({...})` by a new `useService("rpc|orm")` like
pattern in the widgets.
closesodoo/odoo#136271
Task: 3439226
Related: odoo/enterprise#47775
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Before this commit:
In the survey, when you start a live session and click on the URL the `copied`
popover appears but doesn't go away.
After this commit:
Now that popover will close automatically.
Reason:
There was already a `tooltip` instance on the element and we try to add the
`popover` on that element which causes an issue.
Task- 3458901
closesodoo/odoo#136424
X-original-commit: 01dabbd207b230a3348aad0e48a208ba2f49d162
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
We here fix the `SurveyQuestionAnswer._compute_display_name`
method introduced in 55fa52be.
`survey.question.answers` used as matrix rows and columns
require different treatment as they are not used in triggers
but are both shown on the `survey.user.input.line` views,
where the display shouldn't change (nor cause a crash).
It also doesn't make much sense to create answers outside the
context of a question, so we remove the button that already
wasn't shown on the tree view.
As users may not fully upgrade their views or may wish to customize,
we add a fallback question title in `_compute_display_name`too.
Task-3495142
closesodoo/odoo#135853
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Co-authored-by: Vivek Pathak <vivp@odoo.com>
Steps to reproduce:
- Create a survey with matrix-type questions.
- Test the survey.
- Click on the given option it gives a trackback.
Issue:
- The issue occurs because the scope of `this` keyword is unavailable.
closesodoo/odoo#134671
Task: 3485467
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Before this commit, it was possible to have users fill-in
a scored survey with no way possible to pass it because no
answer had any positive score obtainable.
We keep here the check on sharing of the survey to avoid
errors while configuring the survey, the same way it is
already done when trying to share a survey without any
question at all.
Note that we are also adding this warning and the "This is a
test survey" notice for survey_user and not only managers
because users can also test their surveys...
Task-3374592
closesodoo/odoo#130553
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
Purpose
=======
Make it easy for users to differenciate bewteen
simple choice and multiple choice question types.
Specification
=============
Change the multiple choice question type checkboxes
icon from a circle to a square in the survey result page
and the survey template.
In the question form view, tick 2 checkboxes instead of
one for the multiple choice question type.
Task-3252870
closesodoo/odoo#129882
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
Allow users to subscribe to being notified when a new participation is
completed on a survey.
As surveys expecting hundreds of participants will not be followed in
such a way, we will only post these messages if there are any followers
on the survey.
We add a check on any subscriber belonging to group_survey_user
to further limit creating messages of which no one can make use.
A test of this feature is included.
Adding a `_sudo` for good measure while we're here, it does
not change anything.
Minor docstring change in `mail.followers` _get_recipient_data`.
Task-3389133
closesodoo/odoo#128922
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit reworks a little bit the backend assets to remove a
bundle and thus save a call at webclient startup. The bundle
"assets_backend_prod_only" existed only to allow to add files in
production, but not in the tests (typically, the file that spawns
the webclient).
This commit introduces a new bundle "web.assets_web" that contains
"assets_backend" and the few files that we only want in production.
In the /web page, we now load "assets_web" instead of
"assets_backend" and "assets_backend_prod_only". In the /web/tests
page, we keep loading "assets_backend", which is now directly
included into "web.tests_assets".
For the sake of consistency, this commit also renames the dark
mode bundle "dark_mode_assets_backend" into "assets_web_dark".
closesodoo/odoo#135204
Related: odoo/enterprise#47316
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
This commit fix a bug introduced by 910897fc97
which displayed two timers when starting a survey.
Task-3497526
closesodoo/odoo#134686
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit rewrite the module loader to simplify it and to improve error handling.
before this commit, you could have silent errors or "lucky" imports (import a module based on the fact that his asset will surely be load and if not, the error would be silent anyway).
e.g.: The tours cannot import modules extern to tours' bundle anymore. Or load module before your libs in assets.
TASK ID: 3266021
closesodoo/odoo#128502
Related: odoo/enterprise#44100
Signed-off-by: Bastien Pierre (ipb) <ipb@odoo.com>
When we haven't provided a custom action, the tour step runs the default
action. In the final step of the tour, when there is no `run` or
`isCheck` provided, It shows warnings of 'ignoring action (auto) of last
step' as it can lead to a race condition.
This commit resolves the warnings: `ignoring action (auto) of last step`
task-3429500
closesodoo/odoo#129239
Related: odoo/enterprise#46683
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
As tempusdominus relies on jQuery, we have written our own date(time)
picker in owl. This commit converts the remaining uses of the
tempusdominus date(time) picker and replaces them by our own.
closesodoo/odoo#133349
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
This commit, adds a new python method (`web_save`) to save a record, and
optionally read-it again in one rpc call. This optimizes the current
behavior that is to save a record in one rpc, and read-it in a second
rpc.
web_save, will receive the list of IDs of the records to save (if this
list is empty it will create the records, if not, it will write on the
existing records), the list of changed fields, and the unity
specification as optional argument to read the created/modified records
(if the specification is not set, the function will return a list of IDs
of the created/modified records).
closesodoo/odoo#133021
Task-id: 3453184
Related: odoo/enterprise#46559
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
luxon and moment are both used in the solution, but these two libraries
facilitate the manipulation of dates. It was decided to replace all uses of
moment with luxon so we can then remove moment.js from the code and lighten
the assets.
task-3391739
closesodoo/odoo#133144
Related: odoo/enterprise#46447
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
*: auth_password_policy, bus, event, im_livechat, mail, mass_mailing,
mrp_subcontracting, point_of_sale, pos_self_order, project, stock,
survey, web, web_editor, web_tour, website, website_event,
website_forum, website_sale, website_slides, base
Historically, the web.assets_common bundle was used to contain assets
that were needed by both the frontend and the backend. In practice, this
caused a bunch of issues where people would add things in assets common
that were not needed by both, and it was also abused as a way to get
bootstrap working in unrelated places by only using that bundle's css.
Because of this, as a first step, the assets_common stop being used in
the frontend, but was left everywhere else.
This commit removes the bundle completely, and moves the files that used
to be in that bundle in the other bundles that need them, this will
allow those bundles to evolve independently going forward.
in im_livechat and mail, some of the unneeded legacy code was removed, this
allows us to avoind including all of the legacy code from web in the
livechat embed bundle and in the dicuss public bundle respectively.
closesodoo/odoo#132190
Related: odoo/enterprise#45884
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
In this commit, all usages of env._t() are replaced by _t().
In templates files, env._t() didn't work because terms used
in attributes where not extracted into the translation files.
Only string are exported from .xml files to translation files.
So, to make it works, we set a variable that is then used
in attributes.
For example :
<t t-set="string_to_translate">String to translate</t>
<Dialog title="string_to_translate>...</Dialog>
task-3292454
closesodoo/odoo#131390
Related: odoo/enterprise#45631
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
Methods kept in the event handlers section for
traceability can now be moved with the tools, which we
reorder alphabetically.
Task-2937533
Part-of: odoo/odoo#109903
Purpose: allowing users to select multiple answers, even from
different questions, as triggers to display a subsequent question.
For example, we could ask the question
"What qualities do you look for in a desk?"
if the participant selected one of the following answers before:
"What furniture did you already buy from us?" - "A desk"
"What kind of furniture are you looking for?" - "Office furniture"
Demo data and tests are adapted and new ones are added.
We also take this opportunity to remove `is_conditional` because:
1. This field isn't useful anymore.
2. It could cause inconsistencies as it is not supported to check
with a sql constraint that `suggested_answer_ids` is set when this
flag is `True`.
Task-2937533
Part-of: odoo/odoo#109903
Co-authored-by: Pratik Raval <prra@odoo.com>
Goal:
* Simplified modifiers to only have one way to define modifiers;
* Remove states attributes on python field;
* Use python expression in view `required`, `readonly`, `invisible`;
* More accurate validation of xml views.
This commit change the syntax to python expression. The next commit
will update/convert all xml views.
Before this commit:
* the `required`, `readonly` and `invisible` attributes can only have
values of `True`, `False`, 1, 0 or a python expression to use the
context;
* the `attrs` attribute define a dict. The key of this dict was
`required`, `readonly` and `invisible` and the values are the domain or
a string representing a domain to be evaluate as python expression.
This python expressions was evaluate by the javascript with view fields
and other contextual values as: context, uid, parent, active_id,
active_ids, active_model, allowed_company_ids, current_company_id.
* the `states` attribute in the view was a comma separated list of the
state. This list was combined with the `invisible` attribute;
* the `invisible` attribute on python field is used as default value;
* the `states` attribute on python field was dictionnary with state as
key and list of tuple. This structure was combined with `readonly` view
attribute.
* After combining, the resulting domains of the different attributes
`required`, `readonly` and `invisible` are evaluated with the values of
the fields. The `invisible` attributes is splitted into two use:
`invisible` and `column_invisible`.
After this commit:
* The attributes `required`, `readonly`, `invisible` and
`column_invisible` define python expression. This python expressions
are evaluate by the javascript with view fields and other contextual
values as: context, uid, parent, active_id, active_ids, active_model,
allowed_company_ids, current_company_id.
The domains can contains contextual value and will be evaluate by the
javascript.
```xml
<field name="field_a" readonly="not context.get('show_a')" attrs="{'readonly': [('field_b', '!=', False), ('field_c', '=', parent.c)]}"/>
<field name="field_b" states="draft"/>
```
will be replaced by
```xml
<field name="field_a" readonly="not context.get('show_a') or field_b and field_c == parent.c"/>
<field name="field_b" invisible="state != 'draft'"/>
```
Some inherited views will be modified differently in order to maintain
the previous behavior:
```xml
<field name="field_a" readonly="not context.get('show_a')" attrs="{'invisible': [('field_b', '!=', False)]}">
```
```xml
<field name="field_a" position="attributes">
<attribute name="attrs">{'readonly': [('field_c', '=', False)], 'invisible': [('field_d', '!=', '3')]}<attribute>
</field>
```
will be replaced by
```xml
<field name="field_a" readonly="not context.get('show_a')" invisible="field_b">
```
```xml
<field name="field_a" position="attributes">
<attribute name="readonly" add="(not field_c)" separator=" or "/>
<attribute name="invisible">field_d != 3<attribute>
</field>
```
Validation:
A stricter control is made on the level of the attributes (modifiers)
and the fields necessary for these. The use of the previous attributes
'attr' and 'states' triggers an error (these no longer exist after the
application of the migration script)
task-2495504
Part-of: odoo/odoo#104741
The goal of this commit is to convert a bunch of legacy dialogs into owl dialogs.
closesodoo/odoo#131278
Task-id: 3453920
Related: odoo/enterprise#45484
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
Change version of Chart.js from V2.9.3 to V4.3.0
You can find changelog on
https://www.chartjs.org/docs/latest/migration/v4-migration.html
Version 4.3.0 of chart.js no longer uses moment.js. This task is a
prerequisite to completely remove the use of moment.js (task 3391739)
Why add aspectRatio : 2 ? => Canvas aspect ratio (i.e. width / height,
a value of 1 representing a square canvas). Note that this option
is ignored if the height is explicitly defined either as attribute
or via the style. The default value varies by chart type; Radial charts
(doughnut, pie, polarArea, radar) default to 1 and others default to 2.
Why no more Chart.animationService.advance(); ?
There is no longer an equivalent in this version.
However, we have verified that the problem is no longer present in this
version.
Why use now getElementsAtEventForMode ?
It's clearly noted in the changelog. follow the link above.
task-3392075
Part-of: odoo/odoo#127259
As all the templates are now imported in the owl app, there is not need
anymore to specify the owl="1" attribute in the templates.
Part of task~3443861
Part-of: odoo/odoo#130467
This commit removes the qweb.render method, instead it will use the owl
render engine (renderToString or renderToElement).
Part of task~3443861
Part-of: odoo/odoo#130467
As all the templates are now imported in the owl app, the templates must
comply to owl.
t-key is mandatory when using a t-foreach
Part of task~3443861
Part-of: odoo/odoo#130467
Before this commit, in a survey, opening a question, discarding it and then reopening it no longer displayed the content of the responses.
How to reproduce
In QuestionPageOneToManyField, we overwrite the behaviour of openRecord by reloading the record to be opened. This is no longer necessary since PR 129507 as the correct record is retrieved which already contains the updated values.
How to reproduce:
Go to a survey
Click on a question with answers
Click on discard
Click on the same question
Before this commit:
Response data not displayed
After this commit:
The answer data is displayed correctly
closesodoo/odoo#131662
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Improve gettext to directly handle value injection within translations,
removing the need for sprintf.
closesodoo/odoo#123932
Related: odoo/enterprise#45370
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
In this commit, _t import from import { _t } from
"@web/legacy/js/services/core" and from
web/static/src/legacy/js/core/translation.js are replaced by
@web/core/l10n/translation.js.
task-3292454
closesodoo/odoo#130865
Related: odoo/enterprise#45270
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
None of the main methods provided by this plugin were stil used; only
the internal method `enable()`.
This commit replaces these calls by toggling the `disabled` HTML
attribute.
closesodoo/odoo#130817
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Those fields are no longer used since all client actions and the
studio report editor have been converted to owl.
Part of task~3439226
closesodoo/odoo#130462
Related: odoo/enterprise#45015
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
In the commit [1], the patch has been refactored to support the
native keyword `super`. The current commit just adapts the codebase
to that change.
task 3410198
[1]: 19ea1ac08043e22a811630968e44715cc3bfc495
Part-of: odoo/odoo#125716