The information of the active model and record was not given in the context
Records created from the Manage Messages and Manage Attachements in the debug
menu were not linked to the current records
Add context in test too
closesodoo/odoo#27766
Some features are common to portal and backend, such as the sign modal in
enterprise.
This commit uniformize the width of the modal to make it more consistent between
the two by default. Of course themes can still customize this behavior.
closesodoo/odoo#29521
In some cases, the web client may receive a search view with invisible
filters. This is due to the way field_view_get works. For
example, if there is a group on a filter, then this will be transformed
into an invisible attribute.
In that case, the search view should simply ignore the filter and not
display it. This was broken in the recent control panel refactoring
(note that the search view lacked the possibility of testing that kind
of situation).
closesodoo/odoo#29430
The recent refactoring of the control panel moved the sidebar management
from the action manager to the view itself. However, the sidebar
parameter was forgotten, which resulted in the fact that it was no
longer created.
This fix was a little tricky, because the sidebar needs to be
instantiated in some tests, but not in most of them (in particular, the
document application changes its behaviour, which is annoying).
closesodoo/odoo#29389
There was a traceback when reloading the webclient with an act_window and an
empty id in the URL (ex: after saving Settings). A `read` without id was
peformed when loading data instead of a `default_get`.
Before rev. odoo/odoo@40dd121 the action environment was generated by the
ActionManagerActWindow, which was currently defaulting the `currentId`.
Now that this is not the case anymore, the `loadState` should have this responsability.
Task 1902826
closesodoo/odoo#29411
Since 4cd379cf6e the ControlPanel is now a child of the viewController.
This breaks the clickEveryWhere test.
With this commit, the view_controller selector is adapted in the clickEverywhere
test.
closesodoo/odoo#29383
This rev. moves the backbone library from web to pos, as one of its
two usecases (the search view) has just been removed. From now on,
it is only used in the pos.
Part of task 1893568
to ControlPanel/Search view refactoring.
The ControlPanel being now inside the DOM of client actions, those
existing widgets needed to be adapted (in the way they define if
and how they want a ControlPanel, and in the way the manipulate
their DOM as it slightly changed). Tests needed to be adapted as
well.
Part of task 1893568
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Martin Geubelle <mge@odoo.com>
This branch introduces a large-scale reorganization of the
component tree generated by the web client. The short version is
that now, the control panel is a child of the view controller and
no longer a sibling. Graphically (and simplified), we go from
this:
webClient
/ | \
... ... actionManager
/ \
controlPanel viewController
/ \
to this:
webClient
/ | \
... ... actionManager
|
viewController
/ | \
ControlPanelController
/ \
CPRenderer CPModel
The motivation is that this work moves the code where it should be.
Before this commit, it was kind of weird to have code in the
controllers to render buttons outside of their root node (in
renderButtons). Also, the action manager had to take care of
coordinating search view states between view transitions.
So, this work simplifies the code. It also makes it easier to
extend. We see day after day that Odoo needs to take care of more
complex UI needs, and in many cases, these needs were quite
difficult to implement (we prefer spaghettis in our plates, not in
our code). The changes in this branch should open the way to
implement these features.
For example,
- it will now be easy to add the possibility of views (for example,
the search view or a new ControlPanel view) to add custom buttons
(of type action or object) in the control panel.
- Another need will be to serialize/ restore the state of the
search view across action boundaries (needed by the dashboard).
- Another example is the possibility for views to customize easily
the presence/absence of sub menus (filters/groupbys/favorites/
time range/...)
- Another need is an easier way for views/client action to customize
their control panel.
This commit also contains a large rewrite of the search view (so it
is more inline with our architecture and easier to maintain).
Part of task 1893568
Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Martin Geubelle <mge@odoo.com>
This rev. adds a factory class to generate MVC components, to
properly standardize the way MVC components should behave (in the
odoo way). The most popular MVC of the webclient concerns views
(Model, Controller, Renderer, for each view type). However, we
wanted to generalize the notion of MVC (and extract it from the
views), as we will use it in a future commit for the ControlPanel.
Part of task 1893568
Co-authored-by: Aaron Bohy <aab@odoo.com>
*: hr_recruitment, web, website_sale_digital
This commit replaces the references to 'document' by 'attachment_indexation'
following the rename of the module.
Task #1908896
This reverts commit 1dbb555a
Bring the sidebar attachment dropdown feature back.
This feature was removed due to be considered as useless,
but since some models can have attachement without a mail_thread,
this feature is still necessary.
task: #1908896
*: tools, web, website, website_forum, mail, im_livechat
This commit refactors ir_http to make it more readable
and flexible.
Move the resize function of web/image to odoo.tools
Co-authored-by: XavierDo <xdo@odoo.com>
Co-authored-by: Antony Lesuisse <al@openerp.com>
closes: #28563
task: #1908896
When activating a filter on a list view,
the environment of the action contained a context with an orderedBy key
which was then used by every controller and model in the various
parallel flows, i.e. changing actions
After this commit, we prevent it by excluding the key when executing an action
OPW 1913190, 1914019
closes#29190
Following BS4 migration and adding sections and notes.
=====
Document templates:
- Remove margin from <p> in "informations" to allow them to be
correctly centered vertically on their container.
- Also add a mt- and mb- on their <div> to better handle them going to a new
line when there are too many of them.
- Add class for section and note to be able to customize them in layouts.
- Add class for price_total to be able to customize it in layouts instead
of relying on :last-child.
- Add "page-break-inside: avoid;" on the "total" table to not split it
between pages when it can be avoided.
- Fix sale report template "Informations" to use col-auto just like invoice
See 6b8d7bb6d6
=====
Boxed layout:
- fix section & note style
- fix borders in general
- fix the total table
Background layout:
- fix section style
- fix the total table
Clean layout:
- fix page number vertical align
task-1889346
closesodoo/odoo#27782
Support for string attribute on fields in pivot view was added in 24f7c7ce7f
In some cases, the field is not stored and read_group method is
overridden to allow its use in a pivot view. Such a field does not
appear in the measures dict trying to set the string attribute, leading
to a client crash.
With this commit, the string attribute is set after the non stored
fields were added to the dict.
closesodoo/odoo#29393
Recent works in the search view (in 12.0) on dynamic filters had an
unfortunate effect: when the user tries to input escaped strings (for
example "test" in custom filters, there was a crash.
The reason is that the JS python parser (or more specifically, the
tokenizer) was unable to parse that as a string. It worked before
because the web client sent the raw string to the server. However, with
dynamic filters, this is no longer the case, and we need to parse
domains to be able to combine them.
In this commit, we modify the tokenizer to be able to work with escaped
strings.
closesodoo/odoo#29324
Before this commit:
While user was opening first time line chart graph, at that time undefined
label values were not being converted into undefined string due to misplace
code. So it was giving traceback error
After this commit:
Code has been moved to proper place.
Joint work with msh-odoo
Issue-ID: 1882328
closesodoo/odoo#29306
The pivot view may sum fields that are not really summable:
unsigned values (e.g. in the case of refunds)
values in different UOM, currencies (any different units really)
Which causes confusion when these fields are displayed.
We add support for the string and invisible attributes in the pivot view,
so that a field can be given a more informative name or hidden altogether.
opw 1909046
closesodoo/odoo#29144
Have a one2many display records in a kanban subview,
which opens a form view when edited.
Edit a field displayed only on the form view.
A call to _applyX2ManyChange is done without giving it the viewtype argument,
therefore the fieldinfo is taken from the wrong view, traceback ensues.
opw 1914163
closesodoo/odoo#29607
On a form view of model A, if a many2one field (model B) has a [tree|form]_view_ref in the context
(to display a custom 'Search More...' tree view dialog for example),
when clicking on this field to display the model B form view, the context key *_view_ref is passed
when loading subviews (model C) making them crash because the view ref corresponds to the model B.
After this commit, '*_view_ref' keys in the context are dropped when loading subviews
closesodoo/odoo#29022
While dragging kanban record which have a cover image set, the kanban view
creates extra space, which makes it difficult to properly target a
position.
This is because of a jquery.ui issue for sortable when helper=clone is used.
In that case, then jquery.ui sortable will create a clone of current element
after hiding it. Note that jquery.ui tries to get height to current dragged
element after making it hidden(display: none) and display: none, so the element
does not return actual height and hence it gives innerHeight which considers
height of the image also and extra space is generated.
An alternative solution is to add start event in sortable option and
1) show ui.item
2) get height of the element and
3) hide ui.item, which gives proper height of the current dragged element
But removing helper=clone will also fix the issue and is not actually required.
Note that some special care had to be done to prevent the click from the
drag and drop operation to actually open the record.
Related to task: #1865788Closes: #25734closesodoo/odoo#29642
Before this commit, it was not possible to sort
the rows of a pivot view while in comparison
mode. This fix makes it now possible. Note that
in comparison mode, a click on a header of type
"measure" will sort the rows according to the
column values coming from the data of interest.
closesodoo/odoo#28411
Recent works in the orm (see [1] for example) changed the behaviour of
the server in the case of onchanges: it tries to optimize Odoo by
sending a minimal diff to the web client in onchanges.
Concretely, this means that the web client receives commands 4 (link to)
instead of command 1 (update + record data). It also sends a minimal
diff in that case. This is a big issue for the web client, because it relied
on the knowledge of the data from the command 1 to be able to evaluate some
modifiers.
The good news is that we can mitigate the issue in one case: we do not
actually need to evaluate the modifiers in the case of a command 4
(comming from the server), because we can assume that the record is
valid. So, we simply bypass the check in that case.
Note that this should fix most of the problem, but a deeper problem
still remains: a crash can still happen when an onchange modifies a
record in a one2many (but in a different page), and we also have a
modifier which needs to be evaluated.
opw: #1904514
[1] https://github.com/odoo/odoo/pull/29086closesodoo/odoo#29172closesodoo/odoo#29086
Survey has troubles displaying correctly the datetime picker widget
especially when more than one has to be instanciated. This merge fixes
several issues related to the datetime widget when displaying the survey
in customer (front-end like) view.
See sub-commits for more details about each change.
This merge is related to task ID 1912194.
closesodoo/odoo#28966
Recent works in the orm (see [1] for example) changed the behaviour of
the server in the case of onchanges: it tries to optimize Odoo by
sending a minimal diff to the web client in onchanges.
Concretely, this means that the web client receives commands 4 (link to)
instead of command 1 (update + record data). It also sends a minimal
diff in that case. This is a big issue for the web client, because it relied
on the knowledge of the data from the command 1 to be able to evaluate some
modifiers.
The good news is that we can mitigate the issue in one case: we do not
actually need to evaluate the modifiers in the case of a command 4
(comming from the server), because we can assume that the record is
valid. So, we simply bypass the check in that case.
Note that this should fix most of the problem, but a deeper problem
still remains: a crash can still happen when an onchange modifies a
record in a one2many (but in a different page), and we also have a
modifier which needs to be evaluated.
opw: #1904514
[1] https://github.com/odoo/odoo/pull/29086closesodoo/odoo#29172
Fix issue of %s or %(name)s present in source but not in translation
in language not available on transifex.com/odoo/
Also correct a account danish (da) translation that was reported to be
an issue.
closes#29100
* web
This commit introduces helpers for async handlers, especially for button
clicks. Those helpers are now used automatically for website widgets
(animations) if the 'async' word is placed in front of a handler name
in the `events` key definition.
From a standard view with the main menu (what is called a target=current action)
open a target=fullscreen action
Then, go back to the first action, with the breadcrumbs for example
Before this commit, the original view was displayed fullscreen,
which impaired business navigation because the main menu was not there anymore
After this commit, the original view has the main menu
OPW 1906373
closesodoo/odoo#29096
In case you are printing in html a report with minimal layout, you will have an error
since the function is not defined, but called by the onload of the body tag.
Now we don't call subst if it is not needed (and so not declared)
closesodoo/odoo#29341
This assets has a lot of JS that is loaded by wkhtmltopdf without any reasons.
Wkhtmltopdf don't like long js to load (it is why subst has been write inline)
This commit allow to print again (on slowly server) several documents in the
same pdf. Before this commit, the JS was not loaded before the default js-delay
and so the subst function never called with as result a pdf of only 1 page.
After this commit you can again print several documents in the same pdf and
subst function is applied.
opw-1909000
courtesy of @beledouxdenis that help to debug this error since it is only
reproductible on paas server.
This commit follow the same logic that commit odoo/odoo@3c61ee5
And issue wkhtmltopdf/wkhtmltopdf#2083 is not yet fixed
Again (and definitely?) completes https://github.com/odoo/odoo/pull/29253
As the mentioned PR forces a background on card bodies, that background
went over the card border corners as those are rounded. This commit
fixes that by adding the correct border radius on card bodies, the same
way bootstrap does it by default for card headers and card footers.
closesodoo/odoo#29325
* web_editor
Before this commit, the web_editor app defined gray utilities: bg-* and
text-* classes for gray colors (on top of theme colors). Those are now
defined for all bootstrap (note that this was already the case as the
web_editor file was put in the backend and in the frontend). The
difference is that now the gray utilities are defined just after
the standard bootstrap. This allows to complete and fix
https://github.com/odoo/odoo/pull/29253/files as text-muted in gray
card bodies were not using the correct color without this (see code
comments for details).
closesodoo/odoo#29290