* google_recaptcha, mail, partner_autocomplete, point_of_sale, website
Now, to read session information, the module "@web/session" must be
imported. Not that, there is also the user service with all the user
information.
closesodoo/odoo#73201
Related: odoo/enterprise#19434
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This commit is the first phase of the conversion of the web/ JS
codebase to the owl framework. The impact of this commit is two-fold.
First, it rewrites the framework part of web with a new system of
services and registries. Services allow to execute code (e.g. do rpcs,
setup things) before launching the application. They can also expose
an API to be used by other parts of the application (e.g. a notification
service would expose a function to display notifications). Services are
often a good extension point for external modules that want to execute
code at webclient startup. Registries offer another way to extend the
application. They provide well designed extension points to add
elements/behaviors from the outside (for instance, to add a systray item,
an error handler...).
Second, this commit initiates the conversion of the webclient to owl
with a top-down approach, around those notions of services and registries.
The root of the web application is now an owl application. Among others,
the WebClient, ActionManager, Navbar, UserMenu, DebugManager, Dialogs,
services (e.g. notification, ajax...) have been converted to the new
framework/architecture.
Legacy views and client actions are still supported (and used). They
will be converted in the next months, and at some point, the support
will be dropped.
Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Bruno Boi <boi@odoo.com>
Co-authored-by: Géry Debongnie <ged@odoo.com>
Co-authored-by: Samuel Degueldre <sad@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Simon Genin (ges) <ges@odoo.com>
Co-authored-by: Francois (fge) <fge@odoo.com>
Co-authored-by: Michael Mattiello (mcm) <mcm@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Lucas Perais (lpe) <lpe@odoo.com>
Co-authored-by: Jorge Pinna Puissant <jpp@odoo.com>
Before, the "Company name" placeholder was hardcoded in the frontend
layout template, and the user had to change it with his company name
from the website view, which was not user-friendly if the website module
was not installed.
Now, by default, the frontend layout template displays the user's
company name. If the website module is installed, it is editable.
task-2468472
closesodoo/odoo#71176
X-original-commit: 059804be90021559debee6f930462594a3ca8a97
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Done this way so `_message` can be overridden with custom
markup. Should now work properly ootb: `final_message` should be a
`Markup` from qweb rendering, if `_message` also is such, the merge
should happen without further escaping of either value.
Note: needed to convert the str.__mod__ call to a concatenation as
otherwise the markupness information is lost. That's probably a
recurring issue.
* QWeb bodies should be markup-safe so `0` should always be
markup-safe.
* `head` is qweb-rendered so the same.
* The `json` pseudo-module in qweb templates is `json.scriptsafe`,
which should be markup-safe.
Conversion of all modules to the new manifest assets declaration.
Part of task: 2352566
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Simon Genin <ges@odoo.com>
Before this commit, the asset bundle "_assets_helpers" was the only
bundle using a "t-raw" directive to insert assets in between other asset
calls.
Now _assets_helpers only contains the assets called before the t-raw
directive, and the second part (1 file actually) has been added after
every call of the bundle.
This has been done to improve consistency in asset bundles declarations
by reducing them to the simplest possible templates.
Part of task: 2352566
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Simon Genin <ges@odoo.com>
Before this commit, when a module wasn't correctly defined (e.g.
wrong format for dependencies, wrong format for module name, name
already defined...), an error was thrown but only in debug mode.
In non debug mode, the problem was simply ignored, which is wrong.
An example of harmful consequence would be the following: if
someone defines a new test file and uses an already used module
name, he won't be notified of his mistake unless he runs the suite
in debug mode. If he doesn't, the runbot won't detect it either as
it runs tests in non debug mode. It would then lead to one of the
two test suites not being executed.
Fun fact: a lazy loaded file was actually loaded twice, but we were
only notified in debug mode. With this change, it made the test
suite fail all the time, no matter the mode. We simply removed the
file from the page source, and let the first test needing it lazy
load it.
closesodoo/odoo#66918
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
With this commit we support adding FieldDependencies on custom widget, consider
FieldDependencies given on custom widget and add it to fieldInfo so that when
modal does calls to server to fetch data it consider those fields while reading
this will let us to design custom widget which may have some other fields in
dependency, say for example weekly recurrence widget which uses sun, mon etc.
fields, so with this we can fetch data of those dependent fields without adding
it to view.
task-2335399
closesodoo/odoo#60277
Related: odoo/upgrade#2021
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Co-authored-by: Mohammed Shekha <msh@odoo.com>
with this commit we adding weekly recurrent widget, currently proeject and
calendar shows boolean for each day vertically but with this widget we displays
week days and its boolean horizontally.
Here widget will display first day as per language's week_start field, also we
adds FieldDependencies on custom widget and consider those FieldDependencies
while processing view node in basic_view.js
We add support of registry to contain owl custom widgets and add support
of rendering owl custom widgets.
Also with this commit we removes fields like sun, mon, tue etc. from view and
instead use "web_weekly_recurrence" custom widget to display boolean for each
week day.
Co-authored-by: Mohammed Shekha <msh@odoo.com>
add support of <widget> tag for owl, In order to prepare the future,
we want to convert everything in Owl, in future widgets generated by
<widget> tag will also be converted to owl.
with this commit we support widget to instantiate using ComponentWrapper.
task-2337692
Co-authored-by: Aaron Bohy <aab@odoo.com>
* hr, hr_holidays, im_livechat, mail, snailmail, website,
website_livechat
This commit removes `patchMixin` and improve `utils.patch`.
`utils.patch` now supports native classes and has a new parameter
used to patch class members.
`utils.patch` is now used everywhere `patchMixin` was and it must
be used to patch classes.
closesodoo/odoo#65967
Related: odoo/enterprise#16278
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
Co-authored-by: ged-odoo <ged@odoo.com>
Before this commit, the 'mounted' method of the ControlPanel in
the client report action was called twice.
It happened because the client report action updated the ControlPanel
before being actually mounted, so mounted was called once when the
traceability report was mounted, and once when the update was applied.
Ideally, this should not be an issue (this isn't an issue with owl).
However, in Odoo, we mix layers of Owl Components and legacy
widgets. In these situations, the above scenario isn't properly
handled (and can't be).
As a consequence, in mobile (enterprise), it crashed because an
handler bound in mounted (thus twice) was only unbound once.
This commit avoids the issue as the update was actually useless.
Steps to reproduces (Mobile):
* Go to Inventory (Stock)
* Open the "burger menu"
* Select "Products" -> "Products"
* Select one product in the list
* Click on the "Forecasted" ("stat button")
* Select one "SO line" (sale order) to go to the form view
* Go back to the previous view using breadcrumb
* Optional: Go to another app if the screen can't scroll (e.g. go to Sales)
* Scroll the view => Bug
closesodoo/odoo#66497
X-original-commit: d3854dbf7a6e0c0f9ac00c11716908bc175808d7
Related: odoo/enterprise#16507
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
The recent change in the way debug=assets works (which now bundles all
files in a bundle instead of serving them statically) had a negative
impact on the stacktrace displayed in the error dialog in debug=assets:
it now display the bundle/linenumber instead of the actual file/line
number.
This is not a huge deal, most of the time, because the errors displayed
in the console display the correct information, and the debugging
process should work as before. But it can certainly be annoying in some
cases.
With this commit, we use the Stacktrace.js library to dynamically fetch
the sourcemaps and to decorate the displayed information with the
correct file and line numbers.
closesodoo/odoo#66318
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Impacted versions :
- 14.0 and higher
Steps to reproduce :
```
1. generate an odoo.exceptions.RedirectWarning
2. click on the primary button
```
Current behavior :
```
1. the action (argument of the RedirectWarning) is properly executed
2. the WarningDialog is not closed
```
Expected behavior :
```
1. the action should still be properly executed
2. the WarningDialog should be closed
```
Tests :
Added a test to ensure this behavior will not be overwritten in the future.
The test is for the CrashManager service, and evaluates the following sequence :
```
Entry: CrashManager receives a odoo.exceptions.RedirectWarning (code 200) via rpc_error
Asserts:
- The RedirectWarning modal (WarningDialog) should be opened
* Upon clicking on the primary button :
- The modal should be closed
- The action passed as an argument of the odoo.exceptions.RedirectWarning should be executed
```
Origin :
the incorrect behavior was introduced with :
https://github.com/odoo/odoo/commit/b3d9647695065ea582e4a6b0603f3ebf9fde6976
Task ID: 2430100
closesodoo/odoo#64553
X-original-commit: 892598cb0335926ece12789d81673f5b6370a1fd
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
*: barcodes, mail, mass_mailing, note, test_website, web, web_tour,
website, website_blog, website_event, website_form, website_forum,
website_mail_channel, website_mass_mailing, website_profile,
website_sale, website_twitter, doc
New solutions are being investigated in master. For the moment, it seems
better to remove Jabberwock to unlock difficult forward-port between
14.0 and 14.1/master, until we decide what to do once and for all in
a later master. We may un-revert this later but that would be way easier
than reverting Jabberwock in a few months.
This was done as safely as possible by removing any commit related to
Jabberwock, then resolving conflicts, then reforcing commits from 14.0
that were hugely adapted for 14.1/master, then forcing the whole diff
over a rebased 14.1/master. The only possible miss (other than me making
a mistake) would be commits that were not forward-ported to 14.1 thanks
to Jabberwock handling the issue on its own (I know we had such commits
in website, which I manually included in this revert, see below).
For reference:
Commits which were reforced to their 14.0 version:
- https://github.com/odoo/odoo/commit/1a916fc2362c0b006460d94a219366ade1cce058
- https://github.com/odoo/odoo/commit/fd9e58a675bb7ec1bf97cb77b21b3c65369d51fe
- https://github.com/odoo/odoo/commit/bdfddace29b16404c06a7ebfc0cc242463a0e768
- https://github.com/odoo/odoo/commit/42b3ad10e0b32b7fc72f801e2c67d6baf938c566
- https://github.com/odoo/odoo/commit/710784da1f02d45cbe898da426ba7e2ac63dc711
- https://github.com/odoo/odoo/commit/597585c9b8b1350bcfd84e8433ea6c82060bcc3d
- https://github.com/odoo/odoo/commit/333a9124608ff655bd9ad5e63044a5cb7ef9c636
Commits that were not forward-ported to 14.1/master and now are:
- https://github.com/odoo/odoo/commit/55ff2d971b672dec5f103215be39101c88856b6c
- https://github.com/odoo/odoo/commit/ebbb3de1e5f363689a5ba1647bb4c26416e42d5b
+ Adapt this forward-port: https://github.com/odoo/odoo/pull/60976 (as
it was simplified for non-stable master version relying to the
Jabberwock implementation and now needed to be adapted to the
summernote implementation).
See `!$el.data('oe-expression') && $el.data('oe-xpath')`
+ Revert https://github.com/odoo/odoo/pull/60477 and reforce original
14.0 fix https://github.com/odoo/odoo/commit/746bf53b4aecfc601f0581a948d7cb7153812c82
Note: this also means that any good refactoring that was done by the
Jabberwock-related commits is lost for now. Once the revert reaches
master, I'll try and restore what we want from those commits. Here
are their references (but obviously they have the opposite conflicts
than those resolved during this revert):
e766842a92b6 [REM] web_editor,website: empty summernote files
08c94c986e09 [REF] web_editor,web: adapt to new jabberwock editor
1546c1b74713 [REF] mass_mailing: adapt to new jabberwock editor
fd0b963c6028 [REF] website: adapt to new jabberwock editor
0113d05c6c94 [ADD] web_editor: add new Jabberwock editor lib
d0c88a396493 [FIX] web_editor: don't change background color out of the website editor
d52d3d67d4e1 [FIX] web_editor : better icon in text style dropdown
61cb2f0d21da [FIX] web_editor: should not ask if want to leave the page twice
c42012b863b5 [FIX] web_editor: trigger a resize when use the mobile preview
d934d05d6e39 [FIX] web_editor: need to build the snippet before commit it into vDom
495bea924745 [FIX] web_editor: remove box shadow on the #wrap container
bffb5612e689 [ADD] field_html: add resizer in most field_html
f3c94e40cccf [IMP] web_editor: update Jabberwock library to commit 41e4063
cc87dea3ef32 [FIX] web_editor: update header change position to work with JW
5d9b25f66704 [FIX] web_editor: do not insert chars around step icon on click
70d3f0e4630c [IMP] web_editor: update Jabberwock library to commit 0bd94881
a57f13891f82 [FIX] web_editor: open media modal in appropriate tab on dblclick media
5b7537397e08 [IMP] web_editor: update Jabberwock library to commit a7ba7c34
a8d7ec235eeb [FIX] web_editor: adapt iframe Qunit test to new editor
5f794eac7209 [FIX] mass_mailing: hide all panels on show themes
551d45641d19 [IMP] website: remove unused reference
10580e1c102f [IMP] wesbite: add comment in tour
c17049f6b764 [FIX] web_editor: Fix description toggle in pricelist snippet
18a428e854b1 [IMP] web_editor: update Jabberwock library to commit 43a10003
58a161c645a5 [REF] web_editor, website: use editor helper setClass
62dd0bd3bc66 [FIX] web_editor: properly deactivate snippets and reactivate the last
99eebcaa34cb [FIX] web_editor: disable snippet in preview mode on mouse leave options
a84216932958 [FIX] web_editor: fix the image gallery snippet
f8dd4ea3e7d5 [FIX] web_editor: fix shadow selector for Safari
e50a4f3a16de [IMP] web_editor: update Jabberwock library to commit de13ed7e
4a2718f7a5ba [FIX] web_editor: ensure dom is properly cleaned at end of save test
03684c004a4e [FIX] website: ensure reset of bg-image on add bg-video
d63397159708 [FIX] web_editor: fix image remove from images wall
82fa5142f1a5 [IMP] note: restyle note without sheet or resizer
8b9f1ce603d5 [FIX] web_editor: properly mock createWysiwygIntance (sic) in tests
fc2183b66305 [FIX] web_editor: image overlay did not update with changes
cd0d2f5791cd [FIX] web_editor: add color preview to color picker
28a168172454 [FIX] web_editor: restore removal of spinner
67c90dd3b946 [FIX] website_forum: properly initialize editor
920dfe2a430a [FIX] website_forum: better css in the JW toolbar
43f33fd651af [IMP] web_editor: update Jabberwock library to commit 6853b60
71246c92f8de [FIX] Web_editor: table options button should be inside the toolbar
12b9e5916692 [FIX] web_editor: properly update the image options on replace image
e889cf8583da [FIX] website, website_sale: properly save filter id of dynamic snippets
e0fd11e36e45 [IMP] web_editor: update Jabberwock library to commit 4b2c903b
8f2b7ba35614 [FIX] web_editor: properly stop snippet option changed event propagation
a30c2c4105c7 [FIX] website: fix megamenu snippet editor behavior
312091cf822b [FIX] web_editor: fix overlay that is not reappearing
9f1d03dda613 [FIX] web_editor: table picker not fully displayed
814ddada6124 [IMP] web_editor: remove message before leaving page if editor is destro
4f38e26af7da [FIX] web: allow saving copyright footer
01e947b6123b [FIX] web_editor: only save translations that changed
103676072c50 [FIX] web_editor: prevent traceback on open crop dialog
5844ff66d4a0 [FIX] web_editor: apply image crop in jw on save dialog
1b435652e4a0 [FIX] website_forum: ensure media modal opens on click button
4f4a6ca0b8ac [FIX] web_editor: ensure valid default html value
51e22026ac7b [IMP] web_editor: update Jabberwock library to commit ab1184f8
2413fa19be0e [FIX] web_editor: Qunit test properly wait for editor stop
aa89e1ea3e97 [FIX] web_editor: properly save view blocks with an id
e2e90b53992e [FIX] web_editor: ensure language selector is non editable
0efd72089d5c [IMP] web_editor: clean useless lines
f54dfc7631f9 [IMP] web_editor: remove useless comment
3995ab1b84f2 [IMP] web_editor: update Jabberwock library to commit b8d73691
0834b1e5740a [IMP] web_editor: withDomMutations
f1459fb7b45c [FIX] web_editor: fix non-deterministic error in QUnit wysiwyg tests
6e8acc6c8cc7 [IMP] web_editor: update Jabberwock library to commit 3bbb175c
18a0c95d51cb [FIX] website, web_editor: #wrapwrap in body
4686a92e742c [FIX] website_form: allow edition of success message
78cc4da075cc [FIX] web_editor: allow edition of branded nodes only
bcffa7353448 [FIX] web: dialog should not use field value footer items
67ff56e14746 [FIX] web_editor,website_mass_mailing: display the popup preview
3cb9bea50c20 [IMP] web_editor: update Jabberwock library to commit a20492ea
518f03e6f1c9 [FIX] web_editor: use withIntangibles to find ZoneNode
d0ad6a568f49 [FIX] website: move sidebar out of theme
d690f5da13ea [FIX] website: properly save popup id
43b3433df3e6 [FIX] web_editor: fix non-deterministic error in QUnit wysiwyg tests
4ee8f4dedc30 [FIX] web_editor: prevent deadlock when removing child snippet of popup
850be198ef6d [FIX] web_editor: prevent traceback on reposition background image
4c3eaba41f5d [FIX] mass_mailing: adapt tour to the new editor design.
496d3ea272ed [FIX] web_editor: properly position sidebar scrollbar
5be4de703074 [FIX] web_editor: Show the toolbar when select the text in forum edition
closesodoo/odoo#63768
Related: odoo/enterprise#15458
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
What are the steps to reproduce your issue ?
1. Install website
2. Connect on the website
3. Choose Customize > HTML/CSS/JS Editor
4. Choose "Web layout" (in "XML (HTML)" )
5. Modify the HTML code by adding any <script> before the existing <script> (console.log whatever)
6. Save
7. Refresh
What is currently happening ?
Traceback: TypeError: Cannot read property 'user_context' of undefined
How to fix the bug ?
Target the odoo script by id in the xpath.
opw-2375490
closesodoo/odoo#63360
X-original-commit: 0b7ba571431d694dea7db3ba1da4c7e86d1013e5
Signed-off-by: Achraf <abz-odoo@users.noreply.github.com>
The copyright part of the footer could be edited but not saved.
Now it can be saved.
closesodoo/odoo#62614
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
This commit adds an easy improvement fixing a page speed warning: the
font awesome font (declared in a font-face in assets_common) can be
preloaded.
The only problematic point was that font-awesome defines the font by
a series of URL using different font formats. Only one can be
preloaded (otherwise you would load files for no reason). As all Odoo
supported browsers use the woff2 format, we only preload that one. At
the cost of a warning for other browsers which use a different format.
task-2350647
closesodoo/odoo#60715
X-original-commit: 60c787679260a97c58f399af1a51d7549429f979
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
When opening a DropdownMenu OWL component (like the favorite menu, filter
menu) positioned to the right of the screen (left on RTL languages) on a
small screen, the content of the dropdown could easily overflow out of
the viewport, making hard to use or even unreachable.
This commit fixes it by using the middle of the screen as a threshold to
align the dropdown menu to the right (or left in RTL) of the triggering
button.
Note: this fix specifically targets mobile-like/small screens as bigger
one like on desktop would require much precise calculations (and are
not an issue at the time of this commit).
Task ID: 1879566
This reverts commit odoo/odoo@681306d4e7.
Adding groups on assets parts is not a good idea. Indeed as assets are
compiled and optimized we do not want to serve different assets to different
users.
For example if you have several users in parallel on several workers those
could try to regenerate assets for their users. As each user has different
assets this could lead to big performance issue.
As original commit tried to solve a race condition we can safely remove the
assets fix to avoid issues and work on a cleaner solution.
See original ref odoo/odoo#51804 and odoo/enterprise#10737
This also solves an issue notably in website_slides where access to pdfjs
library was depending on connected users, due to assets mismatch. See
task ID-2352391 .
closesodoo/odoo#59610
X-original-commit: 000af2688e32d19b1874df2e909ccf0ddf636b91
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit adds a test to save the effort of re-setting the tz
cookie when it is already set. We also merge the tz cookie script
with the one defining session_info.
Commit motivated by discussion on PR #55726closesodoo/odoo#57218
X-original-commit: 0a43d8040f0c5ec8e9728b2e9da8c7d46d7292bb
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
The document layout preview is a complete defferent simplified template
with its own css that replicates at best the different styles.
It does not have the external layout features and lack of fidelity.
The new preview actually use the real documents templates and put the
result in an iframe. It now has a high fidelity, though not perfect.
The goal is for a better onboarding, where clients see easely how
documents will look if they had an app to generate them. Of course, the
data on the document is a false invoice.
Refactor all this from base to web.
Task ID 2304177
closesodoo/odoo#56995
X-original-commit: c121a246f16899735306266a3a12b526e08e7620
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Before this commit, the files keyboard_navigation_mixin.js and browser_detection.js
were defined both in assets_backend and in assets_frontend
Obviously then, they should be defined in assets_common, as this commit intends.
X-original-commit: 42e7c01024dcc8f5d0d0ee13c120bd31374837cd
Add an option to display the language selection inline or with a
dropdown. Add an option to choose if language labels are flags, text
or both.
Part of https://github.com/odoo/odoo/pull/55300
task-2203383
Co-authored-by: qsm-odoo <qsm@odoo.com>
With this commit, the timezone (in the user's preferences) is
automatically set to the timezone of its browser the first time
this user logs in.
Task 2207715
closesodoo/odoo#55726
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
This commit adds a new year scale to the calendar view.
It comes with a new view in the calendar, this view displays a
4x3 grid which cells are month views.
Task: 2193921
Adaptation of the rest of the environment to the changes regarding the
refactored search panel and model.
This commit includes the following changes:
- Since the control panel model is now part of the search model, the
view widget is responsible of its instantiation with the appropriate
API; creating an ActionModel holding the required model extensions.
- The controller is now importing/exporting the state of the entire
search model as well as the current state of the search panel (given
throught its props). Changes have been made to adapt to this behaviour.
- The multiple components linked to the control panel model have been
adapted to reflect the changes brought to it (they will now listen to
the "searchModel" instead of the "controlPanelModel").
- The `test_utils_create` methods have also been adapted to properly
instantiate a searchModel
Part of task 2228968
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Refactoring of the search panel and its inner logic to Owl.
The previous search panel widget has been divided in 2 parts:
1. Component
The "Search Panel" component's responsibilities are now to render the
search panel data given by its model, display some rendering logic
(expanded categories, checked groups) and dispatch the events triggered
on it.
2. Model Extension
The "Search Panel Model Extension" holds all the search logic of the
search panel. Its responsibilities are calling the server to update its
data and to provide them to its component and other search extensions.
Part of task 2228968
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Refactoring of the Model class of `model.js` to support multiple
extensions.
The purpose is to build a model having the appropriate modules for a
given situation. For instance, we don't need the control panel model if
we don't have a control panel to start with.
Some logic of the control panel model (which was until now the "main"
search model) has been given to another model extension named
"Search Model Extension" which will synchronize the informations of all
models providing search data (domain, context, etc.).
The model instantiated in the actions/views is now an instance of the
"Action Model" (which directly extends the Model) and is meant to
replace the view model in the long term. It might however need some
improvements to hold such a role (partial interface rendering, etc.).
Part of task 2228968
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
The benchmark suite has been broken for a while, by several
refactorings (e.g. use of native Promise). This commit makes it
work again. We do not use it much, but maybe we should as it can
be useful to track changes (mostly in view renderers) that impact
performances.
*mail,point_of_sale,web_editor,website
In the tests, required services are deployed for each test
independently. There is no need to have, in additon, all services
deployed globally. Worse, it could conflict and lead to unexpected
results.
This commit ensures services are no longer deployed globally in
tests. It turns the module 'web.env' into a declarative module with
no side-effect, by moving the service deployment to main.js, which
isn't added to the tests page.
Task 2287397
closesodoo/odoo#53817
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Prior to this commit, the autoscroll on drag feature was accessible and only
used in the web_editor application.
After this commit, the autoscroll on drag feature will be available in the
web application and has been refactored in order to allow its usage
in other application (as for the sign application).
task-2280965
closesodoo/odoo#54072
Related: odoo/enterprise#11656
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
This error occurs for instance when your session expires and you
reload. At this point, the hash part of the url is duplicated and
an error is raised when the webclient tries to parse 'cids' part.
The hash part of the url should not be duplicated, but whatever the
url hash, the client should not crash either.
This commit prevents the hash part from being duplicated, and the
client from crashing when there are several occurrences of 'cids'.
closesodoo/odoo#52599
Task: 2267401
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
With this commit, it is now possible to display sample (fake)
data in empty views, in the hope of easing user onboarding.
This can be enabled (in list and kanban views) with attribute
sample="1" on the arch root element. In this case, if there is
no data to display, sample data will be generated based on
heuristics (depending on field types and names). This can be
used in addition to the no content helper.
Task 2232801
X-original-commit: 7c8e627ff5029cb539d702705e5ce53d658c76ed
Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Jérémy Hennecart <jeh@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
*bus,mail
This commit extracts the common basis of the env to use both in
the frontend and the backend. The public env now contains most of
the features that were previously (only) in the webclient env.
Moreover, the PublicRoot no longer uses the ServiceProviderMixin,
such that services are only deployed once, in the (public) env.
Owl components can now be defined in the website, and rely on a
properly built env. Legacy widgets still works as they access
services through the PublicRoot (via trigger_up) which redirects
those requests to the env.
Tests have been adapted accross all affected modules to support the new
"comparison" menu component.
Task ID: 2245719
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
This commit replaces the "time range menu" in the control panel by a new
component: the "comparison menu".
Its purpose is roughly the same: compare a period of data in a reporting
view with the previous period or the previous year.
Its implementation is a bit simpler: it will only appear if at least one
date filter is selected in the search view, and will suggest to compare
each selected date option with the previous period or the previous year.
Task ID: 2245719
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
This commit adds the `base.group_user` access group to the `pdf_js_lib`
template so it can be lazy loaded in the JS.
closesodoo/odoo#51804
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This lib is also used by the Gantt view, so we move it to the
common basis between web_editor and web_gantt, which is web.
Part of task 2205607
closesodoo/odoo#51606
Related: odoo/enterprise#9740
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
The ColorpickerDialog will become a widget, this commit is only about
renaming the related file.
Part of https://github.com/odoo/odoo/pull/46088
task-2195313