Commit Graph
154453 Commits
Author SHA1 Message Date
Pierre Paridans 0573d9d6c2 [FIX] web: ActionMenu position on mobile
This commit fixes the ActionMenu's position on smaller screens by
pushing it to the bottom-right part of the ControlPanel (instead of the
bottom-left one on regular sizes).

It also adjusts its vertical alignment.

X-original-commit: 42966bc89f873032fa6bad41c2cfa7a001537f9b
Part-of: odoo/odoo#100759
2022-09-23 01:39:34 +02:00
Pierre Paridans 491385842d [FIX] web: FormView's label color
Before this commit, the contrast between the form fields' label
(specifically the one where the field is empty) was hard to read (light
gray on a white background).

This commit fixes it by differentiating the color used as main
background and the "secondary" one (which is used for labels, among
other things) and providing a better contrast.

X-original-commit: 8cd30bb4478d50d74ba5074d1b4a54b09daef369
Part-of: odoo/odoo#100759
2022-09-23 01:39:33 +02:00
Pierre Paridans f96c8821a0 [IMP] web: normalize FormView's layout
This commit normalizes the FormView's layout allowing to simplify it
and reduce disparities between community and enterprise.

It also allows to remove the `form_view_extra.scss` replacement.

X-original-commit: 9c2e851af3bfae8e6e6c11f061a8a5b952c54db9
Part-of: odoo/odoo#100759
2022-09-23 01:39:33 +02:00
Pierre Paridans d82ac0c351 [IMP] web: remove unused ui_extra.scss
Note: this file was only present to be overridden in enterprise.
X-original-commit: 7d73cd5ed4f59fdca1d94820757942a25ddc58fa
Part-of: odoo/odoo#100759
2022-09-23 01:39:33 +02:00
Pierre Paridans f437086285 [IMP] web: normalize ListView's layout
This commit normalizes the ListView's layout allowing to simplify it
and reduce disparities between community and enterprise.

It also allows to remove the `list_view_extra.scss` replacement.

X-original-commit: 40228334436fd03ee251bd89c794aa439bed5839
Part-of: odoo/odoo#100759
2022-09-23 01:39:33 +02:00
Pierre Paridans b222fc8059 [IMP] web,mail: normalize WebClient's layout
This commit normalizes the WebClient's layout allowing to simplify it
and reduce disparities between community and enterprise.

It also allows to remove the `webclient_extra.scss` replacement.

X-original-commit: d3d35397aeec18b54e342ef2d19749229d95c694
Part-of: odoo/odoo#100759
2022-09-23 01:39:32 +02:00
Pierre Paridans 062e7b1c21 [IMP] web,*: make ControlPanel, SearchView, SearchPanel responsive
This commit transfers responsive related customizations for
ControlPanel, SearchView and SearchPanel to community which allows them
to render properly on smaller devices.

Note: a page reload (aka. F5) is required to properly adapt the UI after
a resize to a mobile-like size.

X-original-commit: 26a755610da36b01ba07ca224cc5937a672eb6a8
Part-of: odoo/odoo#100759
2022-09-23 01:39:32 +02:00
Pierre Paridans 66517b0e0b [MOV] web: transfer touch customization to community
This commit moves and integrates the touch device detection and
customization (through the o_touch_device class).

X-original-commit: 60acbb73e16ca551dfbadb8b29b73637e39bf9a9
Part-of: odoo/odoo#100759
2022-09-23 01:39:32 +02:00
Pierre Paridans 2571f6d4bc [MOV] web: enable responsive mode
This commit enables the WebClient's "responsive" mode by setting up the
"viewport" meta tag to allow it to scale to the device's width (instead
of being desktop-like only).

X-original-commit: 4d6169000aad92bed68879d90c360cb5cd62b8eb
Part-of: odoo/odoo#100759
2022-09-23 01:39:32 +02:00
Touati Djamel (otd) 3e6af7434d [IMP] purchase: improve product purchase smart button view
Display the purchase order list instead of the analysis view

opw-2976152

closes odoo/odoo#100758

X-original-commit: be438c80aaceed80b808945cadcc30fd8aba3a86
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2022-09-23 01:39:24 +02:00
tsm-odoo 73381ac4b9 [FIX] bus: getItemFromStorage error when no dbuuid is provided
The `bus_service` uses the `dbuuid` key from session in order to
know when to drop the last notification id from the local storage:
when the db changes.

The issue is that public pages don't fetch the session, this results
in undefined being added into the local storage. The multi tab service
speculates on the fact that the value stored will always be json
parsable.

This commit fixes the issue by taking into account the fact that session
dbuuid can be undefined. Moreover, the multi tab service has been
updated to return the raw value if it is not parsable.

closes odoo/odoo#100897

X-original-commit: ed992ed03456eac6be5fb802578fcc1a0fc7a732
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Stockbauer Matthieu (tsm) <tsm@odoo.com>
2022-09-23 00:39:10 +02:00
Benjamin Vray 1b30189118 [IMP] web, website: adapt the header position in Website
Since _checkScrollbar, _setScrollbar and _resetScrollbar doesn't exist
anymore in BS5 and that these functions were removed during the
migration as you can see here: [1], compensateScrollbar is no longer
used for modals. That's why this commit removes the
'compensateScrollbar' function from 'jquery.js' and adds the code of
this function in the 'menu.js' file in Website because that's the only
place we need it now for the affixed header.

[1]: https://github.com/odoo/odoo/commit/0b94da214b7017e8580e671cbaa68ade6de2fbc7#

task-2985702

closes odoo/odoo#100894

X-original-commit: f3f45c93d3e942b224332924d66f2e48fc711002
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-09-23 00:39:04 +02:00
Benjamin Vray 9494c88e52 [REV] Revert "[REF] web, website: avoid compensateScrollbar JQuery override"
This reverts commit https://github.com/odoo/odoo/commit/51939d09f84579f61f1ff77aacd754beba036dc2.

This commit was added to no longer have to compensate the scrollbar
width to display the fixed header. To do this, this commit had changed
the 'fixed' CSS position of the affixed header to 'sticky'. But this
introduced several issues with header effects (the main problem with the
"sticky" position is that Chrome and Firefox don't handle it in exactly
the same way.). For his reasons, we decided to revert the commit and get
back to a situation where everything works correctly.

task-2985702

X-original-commit: ab9a4497c9ade5d91d7661bb3a4f47a683be1c32
Part-of: odoo/odoo#100894
2022-09-23 00:39:04 +02:00
Joseph Caburnay fa20b34d74 [IMP] pos_loyalty: loyalty, gift card and ewallet programs
* Allow multiple loyalty programs.
* Improve gift card workflow: https://app.excalidraw.com/l/65VNwvy7c4X/1Xt93llULvo
* Integration with the ewallet programs: https://app.excalidraw.com/l/65VNwvy7c4X/4B9AEOSbaku

Note that we prevent refunding eWallet and gift card top up and
reward products. If for instance the user wants to refund gift cards
they'll have to transfer the gift card to ewallet by topping up the
customer's ewallet and paying with the gift card to be refunded.

closes odoo/odoo#100891

Task-ids: 2959620, 2959661
X-original-commit: fa06e3225650ed9d1a96709b0398e7f33313acf5
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2022-09-23 00:39:01 +02:00
Joseph Caburnay 3f91a17f1c [FIX] point_of_sale: reuse empty order when refunding
X-original-commit: 2a633ee1035810f64a85360ff7559d9a219a8e52
Part-of: odoo/odoo#100891
2022-09-23 00:39:00 +02:00
alt-odoo 4bb41a7fbf [FIX] hr: incorrect reference used for work address of admin employee
Since commit [1], we use base.main_company as default value for the
address of the admin employee. This is not correct as base.main_company
is referring to res.company model while address_id is expecting a
res.partner id.

This works in most default situations as id = 1 is the same for both
res.company and res.partner, but not anymore in case we have merged
the initial partner with another one.

We should use base.main_partner instead of base.main_company.

[1]:https://github.com/odoo/odoo/commit/c0ca736193df42814389151956eb07c28c77d18e

closes odoo/odoo#100883

X-original-commit: 163167052cd904db2ca2ea4322469a066c095938
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Signed-off-by: Alex Thuyls (alt) <alt@odoo.com>
2022-09-23 00:38:57 +02:00
John Laterre (jol) 8d2eb9d869 [FIX] base: prevent tracebacks on rate creation
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.

closes odoo/odoo#100874

X-original-commit: ddced61ca27f96b89af32f0b99e225321f966681
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: John Laterre (jol) <jol@odoo.com>
2022-09-23 00:38:55 +02:00
Adrien Widart cb6e651081 [FIX] stock: edit reserved qty on SML
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

closes odoo/odoo#100858

X-original-commit: 2ea52bbcdbc2beaac916fa5f127ffc0ab2650708
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
2022-09-23 00:38:52 +02:00
Joseph Caburnay 7971b4ed4d [REF] im_livechat: im_livechat_channel_form_view wowl
No need for the view. Replace with simple button widget.

closes odoo/odoo#100808

X-original-commit: 3a02a438c2228e78c93e363351297e0c3548e865
Signed-off-by: Antony Lesuisse <al@odoo.com>
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2022-09-22 15:50:24 +02:00
Alexandre Kühn 5b59a07729 [IMP] mail, *: introduce public livechat bundle
*: 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

closes odoo/odoo#100768

Related: odoo/enterprise#31608
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-09-22 15:50:12 +02:00
Nemael 47541460f5 [FIX] mail: fix emoji offset when clicking on category
This PR fixes the offset that happened when clicking
on a category in the emoji picker

Task-2991668

closes odoo/odoo#100769

X-original-commit: 299e74b2510b94a4dea526080d48b7563190a097
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-09-22 12:23:34 +02:00
Nemael 7ffc505599 [FIX] mail: not scrolling to emoji category
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
2022-09-22 12:23:34 +02:00
William Braeckman ee951c945b [IMP] hr: remove mixins
Prefer using hooks instead.
Makes use of the new open_chat_hook from mail when possible.

closes odoo/odoo#100764

X-original-commit: d058734cf55f2c3f46f2f23e0bbbfc54f2f0da15
Related: odoo/enterprise#31605
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-09-22 12:23:27 +02:00
William Braeckman 18426a62eb [IMP] mail,hr: migrate m2x_avatar_user and m2x_avatar_employee to wowl2
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
2022-09-22 12:23:27 +02:00
William Braeckman 7909827571 [IMP] web: add displayText option to tags_list
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
2022-09-22 12:23:27 +02:00
William Braeckman d2dd9a2f45 [FIX] web: fix invalid popover for tags_list
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
2022-09-22 12:23:27 +02:00
William Braeckman f6a1f0dd28 [FIX] web: fix wrong css selector for many2one_avatar in kanban views
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
2022-09-22 12:23:26 +02:00
William Braeckman 55659d3f7b [IMP] web: expose ListKanbanMany2ManyTagsAvatarField
X-original-commit: fac4dbdce7f2c24ae3dd1f7cca0e9ccca00a14e9
Part-of: odoo/odoo#100764
2022-09-22 12:23:26 +02:00
William Braeckman 699994fccf [IMP] web: make it possible to add classes to fields
`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
2022-09-22 12:23:26 +02:00
Lucas Lefèvre 4c9de9b786 [IMP] spreadsheet: update o_spreadsheet to latest version
https://github.com/odoo/o-spreadsheet/commit/dbe36052 [FIX] find_and_replace: select first match automatically
https://github.com/odoo/o-spreadsheet/commit/28476c9d [FIX] ClearFormat: clear format actually clears the format
https://github.com/odoo/o-spreadsheet/commit/b4dbb747 [FIX] grid: handle selectionInput modes on click events
https://github.com/odoo/o-spreadsheet/commit/179ff66d [IMP] functions: make ISTEXT/ISNUMBER/... compatible with Excel/GSheet
https://github.com/odoo/o-spreadsheet/commit/ce32cd66 [FIX] scorecard: display percentage between 0 and 0
https://github.com/odoo/o-spreadsheet/commit/44266c5b [IMP] style: add text cell wrapping option
https://github.com/odoo/o-spreadsheet/commit/9b08e99a [REF] renderer: extract font size computation
https://github.com/odoo/o-spreadsheet/commit/ebff300d [IMP] clipboard: paste on merge consistency
https://github.com/odoo/o-spreadsheet/commit/246de550 [IMP] evaluation: add error "unknown function"

closes odoo/odoo#100740

Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
2022-09-22 09:49:51 +02:00
Kevin Baptiste 7abce800cb [FIX] hr_holidays: show widget when no department
The `leave_stats` widget would crash if there was no department attached
to the employee/leave request.

closes odoo/odoo#100775

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-09-22 08:46:50 +02:00
Kevin Baptiste afdecd5ab1 [FIX] hr_holidays: fix leave responsible cleanup
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
2022-09-22 08:46:50 +02:00
Arthur Detroux (ard) 4d2a6d8b19 [FIX] website, website_payment: correctly add frontend template
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

closes odoo/odoo#100766

X-original-commit: 39dcd15833afc3860b9c4012a9a4c9da76844a07
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Arthur Detroux (ard) <ard@odoo.com>
2022-09-22 08:46:47 +02:00
Alexandre Kühn 0ae4fadf08 [IMP] mail, *: convert all compute/sort method into inline field function
Task-2985304

closes odoo/odoo#100765

X-original-commit: e267d52cc4380c3acf7d2f9c9abf1acb59a598c1
Related: odoo/enterprise#31606
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-09-22 01:54:20 +02:00
qsm-odoo 28f0db302a [FIX] web_editor, website: fix saving multiple contents at once
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/4e82c45abdb0b420edead2bd1d0ba9ff4bb4a224

closes odoo/odoo#100762

X-original-commit: c834d151afed0ca633ffb6bcba2f45b544689e74
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-09-22 01:00:04 +02:00
Adrien Minne 4b06783080 [IMP] spreadsheet: dashboard filters finetuning
Improve the CSS of the global filters in dashboards

Odoo task 2988046

closes odoo/odoo#100749

X-original-commit: 629c36f9763669e500c2664ad44037d915c29b10
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2022-09-21 22:45:46 +02:00
Lucas Lefèvre d72fa35ced [IMP] spreadsheet_dashboard: use py test to validate dashboard data
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

closes odoo/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>
2022-09-21 21:41:48 +02:00
Lucas Lefèvre d9e1017c50 [FIX] spreadsheet_dashboard_account: correct link to top invoices
X-original-commit: b609a166220c31be8e85679593103be513e15933
Part-of: odoo/odoo#100757
2022-09-21 21:41:48 +02:00
Lucas Lefèvre daafe98acc [FIX] spreadsheet_dashboard_account: link chart to invoicing menu
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
2022-09-21 21:41:48 +02:00
Lucas Lefèvre 317699f3ea [MOV] spreadsheet_dashboard_stock: move to enterprise
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
2022-09-21 21:41:48 +02:00
Huy Le 58162aa290 [FIX] website_forum: fix wrong attribute
After commit [1], attribute `t-value` was replaced to `value` by mistake

Steps to reproduce:
- Go to a forum post
- Click on the author image, logged in as admin
- On the profile page, unpublish the user
- As public visitor go to the previous forum post
- See the avatar image url -> `href` is now `href="#"` with this PR.

[1]: https://github.com/odoo/odoo/commit/c8c8eb3d5652e9834d0ecd5aad907ee359edb657#diff-2a4205ad15bf7b1ef0d1361b1baec87ef8a6429de19f9e0e8afce4ca16be839d

closes odoo/odoo#100600

X-original-commit: 556ff721fb7f052bee004434029659d55ea00f21
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-09-21 18:58:56 +02:00
Rémy Baranx (bar) e00622efee [FIX] microsoft_calendar: cancelled event without Odoo organizer
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.

closes odoo/odoo#87844

Task-id: 2746046
X-original-commit: f54a56a91e75e3de8b54a7c6c76164929a11a431
Signed-off-by: Arnaud Joset <arj@odoo.com>
2022-09-21 18:02:38 +02:00
tsm-odoo 7422254b02 [FIX] bus: fix im_status during tests
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.

closes odoo/odoo#100583

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-09-21 16:02:41 +02:00
Christophe Monniez d7ec624d5a [IMP] core: bump master release to 16.1 alpha 2022-09-21 08:45:40 +02:00
Laurent Stukkens (LTU) 5a20b60234 [IMP] hr_timesheet: add tests on TimesheetFloatToggleField
This commit add tests that ensures that the toggling is working as expected
when a factor is used.

task-2990758

closes odoo/odoo#100626

Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-09-21 02:26:05 +02:00
Laurent Stukkens (LTU) 87fd81d7f9 [REF] web: ensure factor override is taken into account in FloatToggleField
Prior to this commit, the factor override, if any, was not taken into account
when toggle was performed.

task-2990758

Part-of: odoo/odoo#100626
2022-09-21 02:26:04 +02:00
Benoit Socias 37d8810235 [FIX] web_editor: filter ACE views that do not belong to page
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

closes odoo/odoo#100625

X-original-commit: 34ac97ce96019573a6a0af968d9c90b9d0d89ae8
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-09-21 02:26:01 +02:00
Victor Feyens 71b62dd148 [IMP] sale_product_matrix: add related field to reduce rpc calls
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.

closes odoo/odoo#100613

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-09-21 02:25:56 +02:00
David Monjoie f6e553438f [FIX] web_editor: fix wrong reference for onIframeUpdated
Steps to reproduce the issue:
- Open an Automation Campaign
- Open a mailing
- Click edit
- Traceback: this.options.onIframeUpdated is not a function

closes odoo/odoo#100603

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-09-21 02:25:53 +02:00
Xavier BOL (xbo) 6da71c3de2 [FIX] project: cannot remove stage in my tasks menu
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

closes odoo/odoo#100599

X-original-commit: f4198e497fba8d22231ce22ea148b73e6e207d4c
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-09-21 02:25:51 +02:00