This is a port of https://github.com/odoo/enterprise/pull/30046 for wowl
Steps to reproduce:
On a mobile device:
- Go to Inventory > Product Variants
- Switch to the list view
- Long press on a record
-> We can't scroll to select records below the current screen
closesodoo/odoo#105545
X-original-commit: cd874593b2390efba8e92228f85e9cf07c0e1a8c
Related: odoo/enterprise#33861
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Before, the `Layout` component was not friendly enough for
client action. There was no default component for `ControlPanel`
and `SearchPanel` in `Layout`, resulting in the fact that it had to be
defined manually in the client action environment:
```js
useSubEnv({
config: {
...getDefaultConfig(),
...this.env.config,
},
});
}
```
Now, the `Layout` component defines default component for `ControlPanel`
and `SearchPanel`. Making it easier to use for generic usage.
closesodoo/odoo#105413
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
... when re-opening the dropdown.
Before this commit, in an autocomplete component with an async
source, when:
- clicking on the input to open the dropdown,
- then typing something to filter the results
- then selecting one of them (which closes the dropdown)
- and finally re-opening the dropdown:
the previously displayed (and filtered) results were briefly
displayed, while the source was being fetched again. It thus
produced a weird and annoying flickering.
This commit fixes the issue by reseting the source before fetching
it.
closesodoo/odoo#105539
X-original-commit: 83769b00837f4eea29586f53709d65d3078ddce3
Signed-off-by: Michaël Mattiello <mcm@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
It is really annoying to have thousands of duplicate entries in that
dropdown menu. This commit hacks the problem away, but modifying QUnit
in place. Some day, we should modernize our testing infrastructure, but
this will do the trick in the mean time.
closesodoo/odoo#105483
Signed-off-by: Georis François (fge) <fge@odoo.com>
Before this commit, the drag & drop feature for the Project "Tasks"
kanban view did not work if the drag sequence was initiated from the
title of the card.
This was due to the "o_kanban_record_headings" class having the CSS rule
`overflow: hidden`, because of a well known 6 year-long-and-counting
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1352061
Namely: mouse enter|leave events won't fire on anything underneath
elements having `overflow: hidden`.
This commit solves this issue by introducing a dedicated class name
'o_dragged' to all elements dragged using the `draggable_hook_builder`,
and defining on it the CSS attributes that were assigned in JS before,
as well as `pointer-events: none` on itself and all its children to
avoid the issue mentioned above.
Also in this commit: fixed a syntax error in a CSS rule in project's
"task_name_with_subtask_count_char_field" widget.
closesodoo/odoo#105353
Related: odoo/enterprise#33774
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Before this commit, in a grouped list view, it was possible to have
empty groups when changing pages.
Why:
Before this commit, if a grouped list performs a load, then it is
checked if its previousParams are equal to the current one. If so, we
keep all the old groups empty. This requirement is related to the kanban
view, so we will move it to the kanban model.
The kanban view needs it when we archive data but don't want to delete
groups (colomns). So we perform a load but we don't want to delete the
empty columns.
How to reproduce:
- Go to a grouped list view
- Click on a record
- Return to the list view using the breadcrumb
- Go to the next page
Before this commit:
The groups on the first page are always present with those on the second
page. The groups on the first page are empty.
After this commit:
We only have the groups on the first page.
closesodoo/odoo#105488
X-original-commit: 04467197b9ec0851e3f9f7a74d1b97c5e27420bc
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Signed-off-by: Georis François (fge) <fge@odoo.com>
Before this commit, we had an issue with the width calculated
for data cell (see. sizeOfDataCell).
In some case, the width was 50% instead of taking 100% of the
available space.
This was because some elements of the inner groups that should not
have been visible were computed as if they were, taking an effective
slot in an innergroup's row.
E.g. with two labels:
Before:
"invisible label" and "label" on the same line with `style="width: infinite"`
"data field" on a second line with `style="width: 50%"`
After this commit:
"label" and "data field" on the same line with `style="width: 100%"`
Note that as `infinite` is not a valid value, this wasn't interpreted and
style attribute was empty.
Thanks to grid for still aligning elements even if they are technically
in different rows. It's why we only saw this issue because of the
width of the data cell.
Steps to reproduce:
- Go to Accounting
- Customer -> Invoice
- Create a new invoice
-> See Customer field
Thx to @kebeclibre
closesodoo/odoo#105489
X-original-commit: e177c63e3618e4b9e492a27d1301c098a0066cb6
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
When editing a m2m avatar field in the list view, keyboard navigation,
e.g. pressing arrow-left when the focus is on the right-most item,
results to a crash. Also, the "delete" button when in edit mode
is not there anymore so the user is unable to remove items.
This is because we are not building the proper list of tags. More
specifically, we fail to provide `onKeydown` and `onDelete` handler
to the tags, thus, it crashes and no delete button. This proposed
change fixes both issues.
closesodoo/odoo#105467
X-original-commit: 02a046708a96567a41b5f9aec0f71cefc92ab981
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Only server wide modules are being taken into account when calculating translations hash.
So user probably can't get translations of new installed modules unless it is forced by hard page reload (Ctrl+Shift+R).
Problem exists since https://github.com/odoo/odoo/commit/80d74e7ee0eab83dc5100e0776df09d04b882fec and the cause in that `mods = odoo.conf.server_wide_modules or []` string was unpaired with the following `if` statement during refactoring.
This commit restores computation of hash based on all loaded modules.
closesodoo/odoo#105466
X-original-commit: 859cd0463aec4533df30e4839367832fef0685fd
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Unused catch block arguments are now forbidden even when prefixed with an
underscore: if the argument on the catch block is not needed, the use of the
optional catch binding is enforced.
Part-of: odoo/odoo#105433
Before in a legacy client action, using a link to change view and
going back to the client action with breadcrumb does not restore the
scroll position.
Now with this commit, the scroll position is restored when going back to``
the client action.
Steps to reproduce:
- Install Accounting
- Go to `Accounting -> Reporting -> Balance Sheet`
- Unfold the tree to make the window scrollable
- Click on a link at the bottom of the window
- Go back to Balance Sheet
closesodoo/odoo#105443
X-original-commit: 225e809aa3ce1c506be69287e8084adf877547d7
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
**Issue:** When creating a custom filter for a selection field,
the selected value is not properly displayed. Note however that
applying the filter still works. The problem is only in the displayed
value.
This is caused by setting the "value" attribute of the selection
element which is always an empty string (because formatField doesn't
properly work for selection field). However, the empty string is not
the issue because it doesn't matter what "formatted value" is returned,
it is not needed. The selection field's value is based on the value
of the selected option.
**Solution:** To properly show the display text of the selection item,
we need to make sure that value of the selection field is not overridden
during its onChange event. As a result, the selected option will become
the value of the selection field, displaying the proper text.
Therefore, in the onValueChange event handler, if the field type is
selection, we don't reset the value of the the selection element.
closesodoo/odoo#105420
X-original-commit: afadac5e21e6af2111ef42852243e78bb085d7c3
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
The rpc service has a protection (when used via useService) that
prevents the returned promise from being resolved/rejected if the
component has been destroyed meanwhile.
However, as the FormView still uses the legacy BasicModel, all rpcs
done by its model do not go through our new rpc service. As a
consequence, before this commit, they did not benefit from the
protection. This caused a non deterministic issue in the main flow
tour.
This commit implements a similar protection as the rpc service, but
specialized for the BasicRelationalModel, which redirects all RPCs
done by the BasicModel.
This change highlighted two scenarios where we sometimes performed
RPCs (or could perform RPCs) on a destroyed component. This commit
fixes those as well.
X-original-commit: f613e916d5e8b465fc360e340094c09037450ff1
Part-of: odoo/odoo#105332
Before this commit, when compiling a form group, the scope class is
added to the elements of the outer group. It was added on the element
class attribute. The issue is that FormLabel don't have a class
attribute but a className attribute. So the class wasn't shown on the
DOM.
Now, the class is added on the FormLabel className attribute and shown
in the DOM.
closesodoo/odoo#105315
X-original-commit: 214beb39d7c1a315255f0a5a842e60f73e7900cc
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: Lucas Perais (lpe) <lpe@odoo.com>
Before this commit, the labels tags that were after the fields losses
their attributes (i.e. classes) after the compilation of the form view
arch.
Now, the attributes are correctly copied after the compilation.
similar to : 873790f802
X-original-commit: 395bdf8880c5929652838a93351596b045708905
Part-of: odoo/odoo#105315
Co-authored-by: Patrick Hoste <pko@odoo.com>
Steps to reproduce:
- select a language where thousands separator is not (e.g. portugese)
- try editing any number input field
Bug:
error when parsing the new value when thousands separator is not defined
Fix:
fixed default value (only fallback to commas if it's not the decimal
Point separator)
opw-3041135
closesodoo/odoo#105312
X-original-commit: 71712acdf259aca7745a8a0b41a022d3abdcb047
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Steps to reproduce:
1-set language to an LTR language (arabic / hebrew...)
2-select any field with the date-time range widget (eg: planning>add)
3-the hour and the minute selection is reversed.
Bug:
the hours and minutes order depends on the language orientation where
they should always follow this format HH:MM
Fix:
force the time to be displayed Left To Right regardless of language
opw-2953221
closesodoo/odoo#105255
X-original-commit: 8d396fd8800baf29a9242987b610e3bb7b9da265
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Before this commit, since there is a mildly transparent filter over the
entire view when the "no content" helper is displayed, the interactive
elements of the empty kanban view (namely: the title with the name and
"quick create" button) were slightly hidden.
This commit enforces a superior z-index on those elements s.t. they can
appear on top of the helper's filter.
closesodoo/odoo#105140
X-original-commit: cbefc9cd51b3c903a6c54d8e3f95bf2b592cf402
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Prior to this commit, some scss selectors where duplicated
(`.select2-results`) and where not targeting the right element.
This commit also changes the css variables name based on the right
structure : --component__childItem-property--state
task-2710677
closesodoo/odoo#105118
X-original-commit: 25a7ca929b4342fe7b2941f941a001e0dd0370e9
Related: odoo/enterprise#33689
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Reading only 'id' with `search_read` is equivalent to use `search` but
complexify the result usage. Fix all these bad usages.
Part-of: odoo/odoo#104838
Co-authored-by: Julien Castiaux <juc@odoo.com>
In c989ff339d, odoo module errors now
block the interface with an error message. Currenltly, in order to
support lazy-loading scenarios, the way that scss compilation errors are
displayed to the user is by attempting to import a module that may or
may not be present, and doing nothing when it's not present.
This commit fixes that by instead, writing the compilation error message
to a global variable, logging it in the console, and creating a service
that will display that error on start.
closesodoo/odoo#104671
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Commit [1] broke some confirm dialogs because the confirm and cancel
callbacks are not called with the same `this` anymore. Note that [1] was
actually not forward-ported here in 16.0 but now is via this fix.
E.g.:
- Install website
- Go to the page manager (/website/pages)
- Clone a page (choose a name and confirm)
=> Crash (this.$ does not exist).
Note that this flow was quickly fixed with [2] by changing the local
code instead of fixing the root cause (this commit here actually
technically reverts that change so it keeps working). This flow was
also not broken in 16.0 as the code was rewritten differently.
The work done at [1] actually needed some more rework than that to
handle two other potential usecases:
- If the confirm dialog handlers' promises are rejected, the dialog is
not closed (rightfully, like for example allowing to fill an empty
required input)... but [1] prevented to click on the button again
forever. With the same example as above, it can be reproduced: if the
RPC to clone the page fails, I cannot retry.
- If not both confirm_callback and cancel_callback were given, [1] only
prevented to multi-click on the related button (e.g. if you click on
"Ok", a RPC which takes 10 seconds is made, you click on cancel
immediately afterwards -> the dialog is closed while it should be
prevented (and would be if cancel_callback was given, following [1])).
That may not be entirely stable to make this change though but it
seems to make sense and be better (just keeping what [1] wanted here).
Note: this adds some more tests to check all of this + some more things
that were found during development. For example: [1] relied on the fact
that callbacks returned a Promise or nothing... while developers
actually were returning random things (for no reason as no way to get
the result anyway). Adding a test for this prevents to break that in
stable (the first iteration here crashed in such cases).
[1]: https://github.com/odoo/odoo/commit/4b8b079a7d9991a8dc481fe71a45185d672135c9
[2]: https://github.com/odoo/odoo/commit/8216341f5ad8d82ad0bcb0d1f01d874477d2de7b
Closes https://github.com/odoo/odoo/pull/103712
opw-3033878
opw-3043224
opw-3046485
opw-3042542
closesodoo/odoo#105081
X-original-commit: 90b280c221f3c0819cb0b291e102f161fc47507a
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Before this commit, there was no way to set a finer condition upon which
the KanbanRenderer enables its sortable feature, that is, the drag and drop
of kanban cards.
After this commit, a getter is used instead of the hardcoded condition which checked
whether the the screen was small in the env.
It makes the KanbanRenderer more extendable.
closesodoo/odoo#105026
X-original-commit: 731371320a441cc10b97b7f45b511298c45ae10a
Related: odoo/enterprise#33640
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
**Issue:**
When a copy clipboard field is empty, there is no way to edit it
because the Field component is not shown.
This issue can be reproduced using any type of copy clipboard field:
- CopyClipboardChar
- CopyClipboardText
- CopyClipboardURL
Check the following video for illustration:
https://youtu.be/CTzqJRtwqv0
**Solution:**
This PR proposes a fix of *always* showing the copy clipboard field
(together with the copy button) even if the content is empty.
For illustration, check: https://youtu.be/jMM7zn_mFCU
**Notable changes:**
- The modified tests were using a wrong class name. But since they were
asserting the "non-existence" of the copy button, they were working.
- We are casting null text field to empty string (just like char field)
so that we avoid crash (in dev mode) when passing a "boolean" as 'content'
props to the 'CopyButton' component. This is asserted in the augmented
test case where we also try to render an empty text field.
closesodoo/odoo#104248
Task-id: 2861388
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Even if a many2many field is forcely set to be sortable, it should
not be included in the list of custom groupby options if it's
an un-stored field.
closesodoo/odoo#104978
X-original-commit: 9ba52387481bb0720c5d4f5d8a86c3ad6e801137
Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
**Issue:** The aggregate row of the list renderer doesn't take into
account the fields with zero values. As a result, average values are
not correctly computed. E.g. average of [2, 0] => 2 instead of 1.
**Solution:** Make sure 0s are included in the valid values to
aggregate.
**Change note:** We took the opportunity to make a simple refactor
in the affected test. Instead of asserting contents of the row
with multiple strictEquals (one per cell), we use deepEqual to
check the cells in the aggregate row.
closesodoo/odoo#104968
X-original-commit: 2dcb71aab911a47d8d3a5db6f68a28d1c6d8c9fb
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Steps:
- Open studio in any form view
- Add Binary Field
- Close Studio
- Upload a file in the previously added binary field
- We can't download it because of always edit
This commit adds a new download button near edit and clear button
opw-3028094
closesodoo/odoo#104961
X-original-commit: 73a2329b8bf4e887890cae7669bc568ae0be7147
Signed-off-by: Luca Vitali <luvi@odoo.com>
Custom grouping by m2m field is introduced here: https://github.com/odoo/odoo/pull/74985.
However, after refactoring in https://github.com/odoo/odoo/pull/73311,
users are unable to add custom groups based on stored m2m fields.
This is because the stored m2m fields are not included in the list of
"Add Custom Group" options.
In this commit, we are now again including the stored m2m in the options
for "Add Custom Group".
closesodoo/odoo#104873
Task-id: 3046183
X-original-commit: 5087d9011be7f46a4a3e05b1e951f2556f254b4c
Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Before this commit, accessing parent in a button context broke the button
throwing `EvaluationError: Name 'parent' is not defined`.
to fix,the proxy object `params.evalContext` was passed to `evaluateExpr`
similar to examples seen in `list_renderer.js`
closesodoo/odoo#102293
X-original-commit: 90afb529969ce7de83a20060f5c35a64ce4cf971
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Ahmed Khalaf <ahkh@odoo.com>
The Race concurrency promise never settles if the first settled promise
rejects and therefore you can't catch the rejected promise.
closesodoo/odoo#104733
X-original-commit: 24cc8cdb440a5af944d82a25d98b0239e72e2625
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
As in odoo#97378, the css isn't correctly applied to the extended
`upgrade_boolean` field.
Since its class is automatically set to `o_field_upgrade_boolean`, it
doesn't take the modifications made to `o_field_boolean`.
So we add `o_field_boolean` to its additionnalClasses.
Part of task-2985735
closesodoo/odoo#104708
X-original-commit: 06b99fe293bf6d3c9cd902501d9e221dfd2a70e7
Signed-off-by: Samuel Degueldre <sad@odoo.com>
Signed-off-by: Quentin Wolfs (quwo) <quwo@odoo.com>
**Issue:**
When a group contains more than 10k items, its pager only shows
10k as limit, even if the group already knows it's total count.
**Solution:**
We now allow creation of `DynamicRecordList` with 'countLimit' as
one of the params. It will be used in the instantiation of the
class but will default to WEB_SEARCH_READ_COUNT_LIMIT if not
provided. This way, pager's limit will be properly set to the
group's count.
closesodoo/odoo#104698
X-original-commit: 4751f85ac9d430528106de05bcdc484ae0c7079b
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Purpose
=======
Some models might use the properties field in the kanban view, some
other no. For that purpose, we want to add an option in order to
hide the "View In Kanban" checkbox in the properties definition.
Task-3012780
X-original-commit: c6fcaa53683c470158e4661aec2575bd06ee3c1e
Part-of: odoo/odoo#104252
In the PR #97692, writing empty str `''` to a model term field no longer removes
all translations. Instead, only the translation for the current language is set
to empty str `''`.
Before this fix, if a web user sets a translation to emtpy str, and reopens
the translation dialog, the translation will be reverted to the 'en_US' value
which is wrong.
closesodoo/odoo#104181
X-original-commit: f97ff6308d472121e65a34d30b4dc5ab35065220
Signed-off-by: Samuel Degueldre <sad@odoo.com>
Signed-off-by: Wang Chong (cwg) <cwg@odoo.com>
Before this commit, the arrows in the daterange picker to switch months
wasn't correctly displayed in light mode.
This visual bug was introduced due to styling changes made for
the dark-mode.
This commit fixes this.
closesodoo/odoo#104151
X-original-commit: caa5604fbf99f6cba763109e7c26fed6e2042642
Signed-off-by: Samuel Degueldre <sad@odoo.com>
As of now, if a user clicks on the "Save & New" button while the form is
not valid, it will disable all buttons without any options to make them
enabled again. The only solution then is to close the form and re-open
it.
Steps to reproduce:
Inventory -> Configuration -> Route -> Select any route -> Add a line to
the rules.
As soon as you click on the "Save & New" button and the form isn't
valid, you can't use any buttons anymore.
Part of task-2985735
closesodoo/odoo#102315
X-original-commit: 6d63d1035b28f2004774a99a7be84b92a1cb1883
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Tiffany Chang <tic@odoo.com>
Before this commit, in the list view, clicking on the "export all"
button created an xslx file that did not reproduce the order of the
columns in the view.
Why is this?
The order used was based on the data fetched by a
rpc("/web/export/get_fields".
Solution:
Do not do a rpc("/web/export/get_fields") and use the order of the
columns in archInfo.
How to reproduce:
- Go to a list view
- Click on the "export all" button
Before this commit:
The order of the columns in the created file may be different from the
order in the list view.
After this commit:
The order of the columns in the created file is the same as in the
list view.
closesodoo/odoo#104541
X-original-commit: 734eee368d548fddc6c516ff559d09e853d1ab74
Signed-off-by: Luca Vitali <luvi@odoo.com>
Before this commit, if a translation dialog was open, and the view where
the button is unmounted, the dialog stays open.
Now, the dialog closes, when the view is unmounted.
closesodoo/odoo#104543
X-original-commit: 40596ed1eccdf0f37b4fa3a8a337e7a7cc3461ce
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Since commit, odoo/odoo@f2b71d51aa
the text ellipsis is working again with long breadcrumb.
But in form view when there is a long breadcrumb, the
'form status indicator' (save, discard) is not visible anymore.
In this commit, we move the 'form status indicator' outside the
breadcrumb, so it can't be hidden anymore.
Note: we also changed the `align-items` to `flex-start` to keep all
buttons aligned on the top ('form status indicator', action menu, pager,
create button, send message, ...).
Steps to reproduce:
* Go to Sales
* Select a Quotation
* Click on the customer (to go to customer form view)
* Change its name to have a long breadcrumb
* Go back to the home menu
* Go to Sales
* Select the same Quotation as before
* Click on the customer (to go to customer form view)
* Change some data in the customer form => BUG
'form status indicator' isn't visible
closesodoo/odoo#104476
X-original-commit: df41c270b2372cd28226a16e089b71db32307159
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: Romeo Fragomeli (rfr) <rfr@odoo.com>
"div" as a child of "tr" is not really allowed. Because of this,
custom widgets in a list_renderer are not properly styled resulting
to issue where a widget doesn't take the full height of the
parent "tr" element.
This was missed during initial wowl porting so in this commit,
we are putting the widget inside a "td" element.
closesodoo/odoo#104475
X-original-commit: 092b6b66d998795a03de82be4d33990a138396e1
Signed-off-by: Samuel Degueldre <sad@odoo.com>
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
removeContextUserInfo was a Spreadsheet asset, which is not a dependency of
Knowledge.
In order to make this feature available for all modules, it is moved in web as
an object util, that needs to be used alongside the user service in order to
dynamically remove user context information (no hardcoding).
Task-3017349
closesodoo/odoo#104304
X-original-commit: fd88fc1bbad4c0cdb44cf634b6a5621eb7597e0d
Related: odoo/enterprise#33322
Signed-off-by: David Beguin (dbe) <dbe@odoo.com>
Previously, if there were module loading errors, they would typically
happen before the error service was ready, and so there is almost always
no user-facing error that shows up even though the application state may
be severely corrupted. This can be very confusing for developers who are
not used to working with JS and might not check the devtools console.
This commit makes it so that the module system will replace the contents
of the body with an error when some modules were unable to be loaded,
with the list of modules and the reason, so that the developer is not
confused as to why things aren't working as expected.
closesodoo/odoo#104155
Signed-off-by: Samuel Degueldre <sad@odoo.com>
The previously created company_details field was introduced to allow
customers to manually edit part of their pdf headers. Only the bold
layout was not updated with this field.
closesodoo/odoo#104299
X-original-commit: 16ece79ea5305a2e427024a43313096fa200901f
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
This is done so that using owl features and functions is done using
the standard import syntax, instead of destructuring properties out
of the owl global object.
So instead of just:
`const { Component } = owl;`
inside an odoo-module, we now do:
`import { Component } from "@odoo/owl";`
Note that we haven't removed the global `owl` object so existing
code will work as is.
Furthermore, we also augmented the tsconfig.json that's generated
from the tsconfig subcommand to take into account the path
of owl.js.
Task-id: 3032274
Part-of: odoo/odoo#104260
ISSUE: When in debug mode, user have access to the "External
Identifiers" view. The search bar allows searching using "Record
ID" which is a `many2one_reference` field. When user inputs
a search query that can't be converted to number, "Record ID"
option is still available to the user. It results to traceback
when it's selected because the UI is creating an invalid "domain"
which makes the server search for a string on an integer
(many2one_reference) field.
Check the video for illustration: https://youtu.be/XEPUXHcjeRI
SOLUTION: We make sure that many2one_reference field is properly
converted when generating the domain from the search_bar by
using the integer parser. This basically excludes many2one_reference
field from the search options when the input query is not a valid
integer. See it in action: https://youtu.be/NQ-YrK6tDH0closesodoo/odoo#104183
Task-id: 3005837
X-original-commit: bc9e8709309379bdd9191323cb015c89be7da1f9
Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>