Since this commit, https://github.com/odoo/odoo/commit/32ada4a415a14052d780f351edb82a0011561451,
when adding a new rate from the tree view,
if the `name` field is emptied (despite having a default value),
the `_onchange_rate_warning()` method will generate a traceback
because it will call `_get_latest_rate()` that relies on the `name`
field to order the company rates.
Steps to reproduce:
- Go to the Accounting App.
- Click on Configuration > Currencies.
- Select any currency and click on "Add a line" in the Rates tab.
- Remove the default value from the "Date" field and leave it empty.
- Now try to change "Unit per USD". A traceback should be triggered.
New behavior:
With this fix, an error message will now invite the user to set the `name`
(a.k.a. 'Date') correctly.
closesodoo/odoo#100874
X-original-commit: ddced61ca27f96b89af32f0b99e225321f966681
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: John Laterre (jol) <jol@odoo.com>
Suppose a product P with an available quantity equal to 1. Suppose a
user writes on an existing SML for that product and sets the reserved
quantity to 2. When writing on such a field, `StockMoveLine.write` tries
to reserve the same quantity on the quants. If it fails (which would be
the case here because there is only one P available), the reserved
quantity of the SML is reset to 0 (and so does the reserved quantity of
the quant).
https://github.com/odoo/odoo/blob/b8423ba218e0736593c3329d7438ca09112a735f/addons/stock/models/stock_move_line.py#L301-L313
However, there is an issue: the incorrect reserved quantity is still in
`vals`. As a result, later on in the method, this incorrect value is
written on the SML:
https://github.com/odoo/odoo/blob/b8423ba218e0736593c3329d7438ca09112a735f/addons/stock/models/stock_move_line.py#L362
This creates an inconsistency: a SML affirms that 2 x P are reserved
while the reserved quantity of the quant is 0. Moreover, when marking
the SML as done, it will lead to a "unreserve more than..." issue.
OPW-2936689
closesodoo/odoo#100858
X-original-commit: 2ea52bbcdbc2beaac916fa5f127ffc0ab2650708
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
No need for the view. Replace with simple button widget.
closesodoo/odoo#100808
X-original-commit: 3a02a438c2228e78c93e363351297e0c3548e865
Signed-off-by: Antony Lesuisse <al@odoo.com>
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
*: hr, im_livechat, snailmail, website_livechat
This commit introduces the public livechat bundle, which
contains the models that are specifically used in public livechat.
Doing so reduces the amount of model and data in frontend and
external lib, which makes the page load faster.
Task-2990182
Task-2990191
closesodoo/odoo#100768
Related: odoo/enterprise#31608
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This PR fixes the offset that happened when clicking
on a category in the emoji picker
Task-2991668
closesodoo/odoo#100769
X-original-commit: 299e74b2510b94a4dea526080d48b7563190a097
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This PR fixes a bug where, while in search mode,
clicking an emoji category would not scroll
to the specified category.
Task-2978040
X-original-commit: 2f6cd3b51d2e2c991ee610cc90bf1882bb3a114a
Part-of: odoo/odoo#100769
Prefer using hooks instead.
Makes use of the new open_chat_hook from mail when possible.
closesodoo/odoo#100764
X-original-commit: d058734cf55f2c3f46f2f23e0bbbfc54f2f0da15
Related: odoo/enterprise#31605
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Those fields may be used in the new views.
Some of the legacy fields had to be kept because they are used
in some legacy views, more notably the gantt and activity views as well
as in the mrp work order tablet mode.
X-original-commit: 1c871ad9ea4a77468911ff6a5546688a26398a8b
Part-of: odoo/odoo#100764
In addition to the `displayBadge` option which is already present this
commit adds a new option `displayText` which dictates whether we want
any text at all on our tags list.
This is useful for kanban view where we only want to display the avatar.
X-original-commit: 7930865f0514092960acb0f76532e794f35882a3
Part-of: odoo/odoo#100764
The `TagsList` component may be provided with a list of tags and a
number of tags that should be visible.
In the case where there are more tags then there are tags that should be
visible a ball with the number of remaining records is added with a
popover containing the names of the records.
However the popover contained plain text resulting in
`record1<br/>record2` instead of marked up html.
It will now use a tooltip template and more info.
X-original-commit: baf9711407a01ec196bf7de191372056aa4cab6e
Part-of: odoo/odoo#100764
It seems that the css rule was copied from the legacy version of the
kanban view however the dom related to those rules changed with the new
fields and thus the rule was never applied.
X-original-commit: dbb10524b2d97a0004e4e998e4f2252c1e46982a
Part-of: odoo/odoo#100764
`additionalClasses` can now be set on field components to add certain
classes the wrapper should have.
This is useful in case css rules have been defined on a field widget
that we want to inherit from.
X-original-commit: e882c892ad2bf476a6d25cbd90e72974c5453a38
Part-of: odoo/odoo#100764
The `leave_stats` widget would crash if there was no department attached
to the employee/leave request.
closesodoo/odoo#100775
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Members of the `base_erp_manager` group are allowed to create new users
but don't necessarily have access to `hr.employee` records, making the
`read_group()` fail in those instances.
Part-of: odoo/odoo#100775
Commit [1] changed the way QWeb templates are loaded for public widgets,
removing the xmlDependencies attribute.
Most of the public widgets' templates were therefore defined in
assets_wysiwyg. This is wrong however, as those assets are only loaded
in specific situations.
This commit removes the templates definitions from the assets_wysiwyg
into specific records defined alongside the snippet templates.
Steps to reproduce:
- Drop the "Image Wall" snippet
- Save
- Visit as a public user (logged out)
- Click on an image from the image wall
- TB
[1]: https://github.com/odoo/odoo/commit/f05adbc8b59c67cbec4847687a1ee07e620c2a7a
task-2984724
closesodoo/odoo#100766
X-original-commit: 39dcd15833afc3860b9c4012a9a4c9da76844a07
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Arthur Detroux (ard) <ard@odoo.com>
Since [1], as part of the new translation system made with [2], saving
multiple elements in a website page was only saving the first one. E.g.
- Enter edit mode of your homepage
- Add something in the main area of the page
- Add something in the footer
- Save
=> Only the main area is saved, not the footer.
This was actually the same in translate mode... only translation of the
first edited area could be saved.
At least, with the bug fixed version of [1] comes the small advantage
of not saving multiple times the same field (except for view parts).
E.g.: an event's dates are displayed multiple times in different formats
-> in 15.0, 3 RPC were made by date changed, now only one is made.
[1]: https://github.com/odoo/odoo/commit/1b473cf0db4d85c2b523ac87fbab533bce5f3e21
[2]: https://github.com/odoo/odoo/commit/4e82c45abdb0b420edead2bd1d0ba9ff4bb4a224closesodoo/odoo#100762
X-original-commit: c834d151afed0ca633ffb6bcba2f45b544689e74
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Improve the CSS of the global filters in dashboards
Odoo task 2988046
closesodoo/odoo#100749
X-original-commit: 629c36f9763669e500c2664ad44037d915c29b10
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
use a python test to walk throuhg jsons instead of tours
Tours:
- you need to add one for each dashboard. It's a PITA and it doesn't scale
- they only check visible formulas since formulas are loaded only if they are in the viewport (I'm not even sure what is "visible" in chrome headless)
- they are slow
- can't check fields defined in global filters, links to odoo menu/views
`./odoo-bin --addons-path=../enterprise,./addons -d odoo-db -u --test-enable`
before: `59,76s user 5,78s system 29% cpu 3:43,15 total`
after: `15,12s user 1,20s system 86% cpu 18,912 total`
The Expenses dashboard was broken by https://github.com/odoo/odoo/pull/98914
But I want to merge this test right now.
Task 2980180
closesodoo/odoo#100757
X-original-commit: 17afe2987e4146b85187b31a34caf7146d5a7cf2
Related: odoo/enterprise#31598
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
The chart is currently linked to a menu from the account_accountant module
which only exists in the Enterprise edition
X-original-commit: d7992d014d53c71e96857216d1131e49cc64eb1f
Part-of: odoo/odoo#100757
This commit moves the "Inventory Flow" dashboard from community
to enterprise.
The dashboards depends on "stock.report" model which is
only defined with `stock_enterprise`
X-original-commit: d001c8a23cee2c0353abaae862151a4b5fb85b6e
Part-of: odoo/odoo#100757
When an event is created in Outlook by an Outlook user (user A) who does not
exist in Odoo but who invites an Odoo user (user B) who syncs his calendar with
his Outlook calendar, the event will appear in the user B Odoo calendar.
If user A cancels this event in Outlook, then when user B syncs his Odoo calendar,
the event must be removed.
closesodoo/odoo#87844
Task-id: 2746046
X-original-commit: f54a56a91e75e3de8b54a7c6c76164929a11a431
Signed-off-by: Arnaud Joset <arj@odoo.com>
Before this PR, the `_mockIrWebsocket__updatePresence` route of the
bus mock server could lead to errors when no im status ids were
provided. This commit fixes this issue by ensuring im status ids
were passed before calling `_mockIrWebsocket__getImStatus` method.
Moreover, old longpolling routes were still present on the bus mock
server. This commit removes these routes.
closesodoo/odoo#100583
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit add tests that ensures that the toggling is working as expected
when a factor is used.
task-2990758
closesodoo/odoo#100626
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
When the ACE editor was introduced in [1], it relied on the already
existing `_views_get` to obtain the list of views that could be edited.
When the `mode` of `ir.ui.view` was introduced in [2], no mechanism was
introduced in `_views_get` to avoid fetching primary views that have
nothing in common with the current view.
This commit adds a parameter to `_views_get` to request the
exclusion of unrelated primary views.
Since even before it appeared in [3], `_views_get` relies on the
following approach:
- consider the top-most parent of the `t-call`ed views
- consider the views that inherit it
I.e.: reach each node of each view hierarchy tree by starting from its
root.
Because this starts from the top-most parent, simply preventing the
call to each primary child view is wrong, because any child on the
parent path must be considered - be it primary or not.
We therefore introduced a `skipped` list that keeps track of those
"later to be processed" views - so that the filtering of primary
children does not remove them.
[1]: https://github.com/odoo/odoo/commit/7c45e5976e6caf3d7b9eb508f728062704232261
[2]: https://github.com/odoo/odoo/commit/434be479f97a32987d0817bf329183fc2bbe3bf5
[3]: https://github.com/odoo/odoo/commit/bff6e04e9536d7b80916987eb123de98b1b689b1
task-2898555
closesodoo/odoo#100625
X-original-commit: 34ac97ce96019573a6a0af968d9c90b9d0d89ae8
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
The matrix configurators makes a rpc call to know if the edited line is
configurable through matrix or standard configurator.
This rpc can be avoided (and the logic simplified while converting the
widget to owl) with a related field on the lines.
closesodoo/odoo#100613
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Steps to reproduce the issue:
- Open an Automation Campaign
- Open a mailing
- Click edit
- Traceback: this.options.onIframeUpdated is not a function
closesodoo/odoo#100603
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Before this commit, when the user wants to delete a stage in the My
Tasks menu, he got a user error because the context in the action cannot
be converted from string to a dictionary with literal_eval function. The
reason is `uid` is not replaced by the current user id before using the
`literal_eval` function.
This commit replaces the uid by the current user id and then apply the
literal_eval function.
Steps to reproduce the issue:
1. Go to Project App
2. Click on `My Tasks` menu
3. Add a group by `Stage`
4. Try to remove a stage in which there is no recurrence task
Current Behavior:
A traceback is occurred because the literal_eval cannot convert the
context from the action.
Expected Behavior:
The stage should be archived and tasks contained in that stage.
Bug found task-2944742
closesodoo/odoo#100599
X-original-commit: f4198e497fba8d22231ce22ea148b73e6e207d4c
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
There is a not that simple logic involving column widths in list
views, in order to optimize the space available for columns with
arbitrary long content (e.g. char or many2one fields). For that
reason, some columns have a fixed width. Before this commit, the
first column, containing record selectors, had no fixed width,
whereas it should be set to 40px.
This commit also renames o_list_controller.scss into
o_list_renderer.scss as this file only contains renderer rules.
closesodoo/odoo#100522
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
1) conversion to owl
2) very small improvement:
- make the validation icon appears when starting edition
closesodoo/odoo#100435
Task-id: 2857743
Signed-off-by: William André (wan) <wan@odoo.com>
Chances are that Journal Entries are coming from previous migration and they
could trigger the creation of CABA Journal Entries even when the company at
stake is a non Cash Basis Company.
closesodoo/odoo#98954
X-original-commit: fcad4dbdbd65775b75aa94049da06bd0b07295d8
Related: odoo/enterprise#30763
Signed-off-by: Laurent Smet <las@odoo.com>
Purpose of the task is to be able to click on inventory adjustment
history and do a reverse adjustment by using `Revert Inventory` action.
`Revert Inventory` action is available in Inventory Adjustments > History
and Product Moves > select some lines > actions dropdown. This
method creates a new move that reverts the quantity (including negative
values) with prefix `[reverted]`.
TaskID - 2859490
closesodoo/odoo#95720
Signed-off-by: Tiffany Chang <tic@odoo.com>
Have a model with date(time) field with a group_operator (e.g.
"min"). Open a grouped list view of that model, containing that
field. Before this commit it crashed, because the aggregated
value of the date field, for each group, wasn't parsed (it was
still a string), whereas the code trying to display it expected
a luxon instance.
We could have easily fixed the issue by parsing the aggregated
values for date fields. However, it wasn't supported in legacy views,
and it would raise questions. For instance, views aren't designed
with this in mind (aggregated fields are often positioned to the
right, to leave enough space for the group's title). For that
reason, this commit simply restores the legacy behavior, that is,
we only consider aggregated values for "integer", "float" and
"monetary" fields.
The issue occurred in the Journal Items list view.
closesodoo/odoo#100595
Signed-off-by: Géry Debongnie <ged@odoo.com>
Inputting the cash details in the ClosePosPopup don't result to
changing difference. This is because of an oversight made in
2bc4560 where the initial state
is not properly assigned.
closesodoo/odoo#100589
X-original-commit: 00a10a469b8b2ecf3483bcaf31ab258b0753ea7a
Signed-off-by: Masereel Pierre <pim@odoo.com>
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Since cb5cca7, there are two "Dashboard" apps on the home screen.
The new one becomes the main Dashboard app.
The module `board` is not deprecated but it won't be advertised
as a full app anymore. It will continue to work on databases where it is
installed under a new menu item "My Dashboard" in the Dashboard app.
closesodoo/odoo#100260
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
This commits changes the onsite_payment_tour to public, this required to write some more steps to fill the adress form for instance.
task_id=2980494
closesodoo/odoo#100239
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
This handler was not properly guarded, and made
`.TestMailChannelExpand` fail on runbot.
closesodoo/odoo#100588
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
The previous FIX on this tour was using an hardcoded id to go to the product page. We now have a test product created and searched through the tour.
closesodoo/odoo#100575
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
In order to know whether or not the websocket session is up to date,
the session is saved when opening a websocket connection. Then, for
each incoming/outgoing message, we check if the session still exists
on the file system. When it does not exist anymore, the websocket
connection is refreshed. This ensures the session is always up to date.
Odoo sh proxies the websocket connection and needs a way to tell
when a websocket session is expired. This commit adds the same
check that is done for each incoming websocket message in the
websocket peek route in order to raise a `SessionExpiredException`
when the session is outdated.
This will allow odoo sh to catch this error and to refresh their
websocket connection accordingly.
closesodoo/odoo#100416
Signed-off-by: Julien Castiaux <juc@odoo.com>
Transform the /websocket/update_bus_presence route to type='json'
which makes more sense as a POST than a get, seeing it does things with
a parameter and doesn't return anything.
Also fixes the _update_bus_presence method that leads to access errors
when accessed from HTTP when the user is the public one (only portal/
internal users should update their presences).
Part-of: odoo/odoo#100416
The goal of this task is to review the copywriting of the tooltips
because some of them are not correct in English and others are not
valid anymore. This is also a good opportunity to make an inventory
of the tooltips we have and to add some that could be missing.
task-2862283
closesodoo/odoo#93261
Related: odoo/enterprise#28225
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Bank statements are now optional in accounting. The users add statements directly and can assign statements for control reasons.
The users can enter end date and end balance real for the statements and attach the bank statement scan.
The system checks if there is a gap (lines without statement) before current statement and warns the user
with decoration, also we check if the ending balance match the accumulated balance of the last line.
Bank statement lines now show an accumulated balance and can be sorted by drag and drop in the same date, if the user drags a line
to a position with lines of another date, it simply doesn't have any effect.
Rename accumulated balance to cumulative balance, a better name
closesodoo/odoo#99092
Task: 2879904
Related: odoo/upgrade#3906
Related: odoo/enterprise#30824
Signed-off-by: Laurent Smet <las@odoo.com>