Commit Graph
155677 Commits
Author SHA1 Message Date
lejeune quentin 2ea245d11e [FIX] pos_six: Declare variable into minified timapi.js
In the new version of Odoo you have to declare the
variables in the minified files

closes odoo/odoo#103789

X-original-commit: e08858e5ed02fe74160dabd6a91e1de88640956f
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2022-10-25 11:07:08 +02:00
Adrien Widart (awt) ef775df746 [FIX] delivery: add a carrier on a delivery
It is not possible for a user to add a carrier directly on a picking if
the invoicing policy of that carrier is set to "Real Cost"

To reproduce the issue:
1. Enable a carrier C
2. Setup a shipping method SM:
    - Carrier: C
    - Invoicing Policy: Real Cost
3. Create and confirm a SO with a product
4. Edit the related picking P:
    - Carrier: SM
5. Validate P

Error: a Validation error is raised "The operation cannot be completed
[...] Model: Sales Order Line (sale.order.line), Field: Description
(name)"

When validating the delivery, we try to create a new SOL with the
shipping cost. We then update its description with the carrier name.
However, since the carrier has been directly added on the picking, the
sale order does not have that information. We should rather get this
information from the delivery.

OPW-2862306

closes odoo/odoo#103986

X-original-commit: 611bd008075f5b8f8080281ae877ada3076a9e7a
Signed-off-by: Adrien Widart <awt@odoo.com>
Signed-off-by: Tiffany Chang <tic@odoo.com>
2022-10-25 09:26:00 +02:00
Pratik Awasthi b2d7580cef [FIX] sale_project: fix selection description for product
Before this commit, while selecting the project and task and project only while
creating a product the description was interchanged

After this commit, the description is perfect

task-2969228

closes odoo/odoo#103985

X-original-commit: 6668d5e5e1111d105f549ae1264eaf34c965caa9
Signed-off-by: Xavier <xbo@odoo.com>
2022-10-25 08:29:48 +02:00
Alexandre Kühn ed6f8c2d57 [IMP] mail: move code from components to models (step 4)
This commit moves some code from components to models,
so that eventually all business code will be in the models.

[IMP] mail: Move code from components to models (DiscussMobileMailboxSelectionItem)
Task-3004221

[IMP] mail: Move code from components to models (ActivityMarkDonePopoverContent)
Task-3004282

[IMP] mail: move code to models (MessageComponent)
Task-3000365

closes odoo/odoo#104003

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-10-25 04:05:58 +02:00
Sarika Shekhada 25496bbe21 [FIX] sale_timesheet: fix traceback on project sharing
Before this commit, When we share project in read only access
at that time access error raised when we try to open the task
by shared link due to invalid access on account.move.

So in this commit, check the read access for the account.move and
if the public user has right to read the invoice then allow
to search on move.

task-2889455

closes odoo/odoo#104001

X-original-commit: 1d6474f58056be3515e5023c26dcef56b8dddc91
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-10-24 21:52:06 +02:00
FrancoisGe 7870375962 [FIX] web: wrong style for many2one_avatar external button
Before this commit, fields using Many2OneField in their template (for
example, the many2one_avatar field) had a wrong style for the external
button (the arrow on the right to open the record in form view).

closes odoo/odoo#103981

X-original-commit: c63493ab7b19a238304b2d7791c28bf1a52c0d2f
Signed-off-by: Luca Vitali <luvi@odoo.com>
2022-10-24 18:59:33 +02:00
aath-odoo 6ba30d46a4 [FIX] web_editor: text should not be wrapped in edit mode
Before this commit:

The behaviour of the text were not identical in edit mode and after save, the
word was wrapped in edit mode.

After this commit:

To make the behaviour identical by unsetting the default overflow property
in edit mode.

Task-2878307

closes odoo/odoo#103975

X-original-commit: 6177fac863a29c86ed4e5ede8d48aa31da3a8508
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-10-24 18:59:28 +02:00
Julien Alardot (jual) b30e4ef101 [FIX] account_report: fix IndentationError in formulas
As the shortcut formulas don't use the normal way of
defining expressions, some formulas may start with
characters that would be considered as indentation
by the literal_eval. This removes such characters

closes odoo/odoo#103968

X-original-commit: b39db297f25d71fdd7122e0d16bb92c7372f9617
Related: odoo/enterprise#33143
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: Julien Alardot (jual) <jual@odoo.com>
2022-10-24 18:03:51 +02:00
Thomas Lefebvre (thle) 652d9d503f [REV] sale_loyalty: check coupon partner
This reverts commit 092d652b1f38b804657b6e1d383a157615cf9487.

It was not a bug.
Because coupons should not be restricted to the partner assigned to them
anymore.

opw-3027251

closes odoo/odoo#103958

X-original-commit: 7804a7aeca78f9f9a49838c6a3621c766e5f5e55
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-10-24 17:07:10 +02:00
Nemael 4ec6116fb5 [FIX] mail: show spinner while emoji picker is loading
Before this commit, when opening emoji picker for the 1st
time, content was blank for a small time.

This happens because data of emoji picker is lazy loaded
until opening of emoji picker the 1st time. The problem
is that it gives the impression that emoji picker is not
working, but it's actually loading.

This commit fixes the issue by showing a "loading..." screen
while the emoji picker is loading data.

Task-3015932

closes odoo/odoo#103957

X-original-commit: 22472cd4d2681c07371c8515bb964553b7c2b700
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-10-24 17:07:05 +02:00
pedrambiria 66215fe9e7 [FIX] pos_restaurant: adaption set_table name
The `set_table` has been changed to `setTable`, but the previous name
was still used in `_onDoRefund`.

closes odoo/odoo#103948

Issue: https://github.com/odoo/odoo/issues/103866
X-original-commit: af5ca27a24ea4affa86206d8bad5e9da9707685c
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
2022-10-24 16:12:54 +02:00
Nicolas Bayet 0cab7bccb5 [FIX] web_editor: prevent reset editor
When a change was made on the same record, the editor could wrongly
be reset.

Step to reproduce:
- Go in knowledge app
- Click inside the editor outside a template block
- Click on inside a template block
- Click inside the editor outsie a template block
=> The editor is reset

closes odoo/odoo#103947

X-original-commit: d0a079a76c3f5078178717966e3d4caf0987ebf9
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-10-24 16:12:52 +02:00
gawa-odoo 4e796124c5 [FIX] analytic: change index name to remove warning
We had an index with the same name as would be generated by the ORM.
Instead of putting index=True as it is a bit of an hack, we just change the name of the index.

closes odoo/odoo#103945

Issue: https://github.com/odoo/odoo/issues/103473
X-original-commit: 819fa66546fbb53b808711b38c3296406c45c717
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Wala Gauthier (gawa) <gawa@odoo.com>
2022-10-24 16:12:47 +02:00
niyasraphy c19fa29b93 [IMP] account: remove redundant domain.
Linked to the changes made in https://github.com/odoo/odoo/commit/26b2472f4977ccedbb0b5ed5f08be2c04313fd21

closes odoo/odoo#103944

X-original-commit: a9ec1b746bbbda779323caf43cb8bea3bedb1ad7
Signed-off-by: William André (wan) <wan@odoo.com>
2022-10-24 16:12:44 +02:00
william 080768a546 [FIX] account: don't spam precision call for analytic widget
When a lot of components are trying to do the same `search_read`, they
are spamming calls to the server when they could be batched instead.
Instead of using `search_read`, we can also call `precision_get` which
is `orm_cache`d

To reproduce:
* Main settings: activate/check "Analytic Accounting"
* Menuitem: Accounting > Accounting > Journal Items

You should see a lot of calls of `search_read` to `decimal.precision`

closes odoo/odoo#103928

X-original-commit: 332a673b6b289761ae3c42d1bfa8effca475abf1
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: William André (wan) <wan@odoo.com>
2022-10-24 16:12:39 +02:00
Kevin Baptiste 2551efa736 [FIX] hr: remove t-on-* from views arch
Remove the call to `t-on-click` in the arch of form/kanban views as it
crashes when the view is opened in studio.

Instead use a dedicated `<widget>`.

closes odoo/odoo#103820

X-original-commit: 2a213a150b4421ce4da32db754651cfc41adbef4
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-10-24 16:12:36 +02:00
pedrambiria a9072210f2 [FIX] pos_restaurant: load the lot/serial number correctly
Before this commit: if you use the lot/serial number for the products, it
won't load correctly through the UI.

closes odoo/odoo#103940

Issue: https://github.com/odoo/odoo/issues/100888
X-original-commit: 0e2ea5ff786185a72916e5582fdbf45271819b8c
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2022-10-24 15:12:53 +02:00
MerlinGuillaume 4abe02f8fe [FIX] mrp: write one of start or end date on workorder
When writing a workorder start or end date from its manufacturing order
(and if the MO is unplanned), an error is thrown

Steps to reproduce:
1. Install Manufacturing
2. Go to Settings > Manufacturing > Operations and enable Work Orders
3. Open an MO with Work Orders
4. Unplan the MO
5. Add a Scheduled End Date to one of the Work Orders
6. Save
7. An error is thrown

Solution:
Compute the new duration only if both `start_date` and `end_date` are
set (and one of `date_planned_start` and `date_planned_finished` is
passed in values)

Problem:
When only one of `date_planned_start` or `date_planned_finished` is
written on an `mrp_workorder` (and the other is not set), the method
`_calculate_duration_expected` is called but it fails because it passes
a False value instead of a datetime which will raise the error `'bool'
object has no attribute 'tzinfo'`

opw-3004280

closes odoo/odoo#103927

X-original-commit: 35a596dbbc4e2e55461bf7e5e8ae12873249d4af
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
2022-10-24 15:12:50 +02:00
Adrien Minne 178f8666cf [IMP] srpeadsheet: make xlsx import verbose in debug mode
Make the xlsx import display warning for things that couldn't be imported,
but only if Odoo is in debug mode.

Odoo task 3035674

closes odoo/odoo#103671

Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2022-10-24 15:12:48 +02:00
frc-odoo f301e60eb1 [FIX] website_sale: messageEL not null check
closes odoo/odoo#103902

X-original-commit: d0cebcad89e4c578a04f50e17bf440dd668bcf82
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-10-24 14:12:34 +02:00
Brieuc-brd abd90e9917 [FIX] web_editor: add missing variables for dark mode
This commit adds missing colors for the Powerbox scrollbar in dark mode.

closes odoo/odoo#103893

Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2022-10-24 14:12:31 +02:00
Philippe Wauthy 6f71c43207 [FIX] hr_attendance: fix barcode layout
In the Odoo Community edition, the barcode picture to invite the user to scan his badge
in kiosk mode has no size restriction. This creates a layout issue when displaying the attendance
kiosk mode in community.

This commit fixes the layout by restricting the size of the picture to the size of the enterprise version.

task-3036986

closes odoo/odoo#103892

X-original-commit: 02ab64e110ae2cb8e0d2a304886147be9e450a87
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-10-24 14:12:28 +02:00
FrancoisGe e4862f26f4 [FIX] web: reload record when you click on attach_document
The goal of this commit is to restore the behaviour of the legacy
attach_document widget.

How to reproduce :
- clicking on the attach_document button and selecting a file

In legacy:
We have a full reload of the view (Render and reload the record).

Before this commit:
Render the view without reloading the record.

After this commit:
We reload the model which causes a rendering of the view and a reload of
the record.

Why do we have to reload the record ?
If the action linked to the attach_document button modifies the record,
we want this modification to be applied in the view and not only on the
server side. To do this, we need to reload the record data to ensure
that all the changes are displayed in the view.

closes odoo/odoo#103891

X-original-commit: 82d4f0cd2f0265393cf66cd7be1a0a714584400c
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Signed-off-by: Georis François (fge) <fge@odoo.com>
2022-10-24 14:12:26 +02:00
Louis Baudoux 7a33ec4165 [FIX] partner_autocomplete: Partner Autocomplete on res.company
Partner Autocomplete wasn't available anymore on the name/VAT of
`res.company` records since its Owl conversion.

closes odoo/odoo#103886

X-original-commit: f12176755a97bcee66722d9d9281ae7ac6424dbc
Signed-off-by: Georis François (fge) <fge@odoo.com>
Signed-off-by: Louis Baudoux (lba) <lba@odoo.com>
2022-10-24 14:12:23 +02:00
Denis Ledoux 6ad3d40172 [FIX] base: ensure the removal of <t groups="...">
See the explanation here:
https://github.com/odoo/odoo/blob/5069c8fd1cee063827873de0f6c2d9fe938337a9/odoo/addons/base/models/ir_ui_view.py#L1209-L1217

The strategy was to create a temporary
<t groups="..."> node which gets deleted after the postprocessing.
The deletion counted on the fact `groups` was the only attribute set
to delete this temporary technical node. In case
someone configured manually in a view architecture directly a t node
with a groups and something else.

But, studio adds another attribute to nodes with "groups=" in the
context of the studio edition (`studio=True` in the context)
https://github.com/odoo/enterprise/blob/7e66f89e1c85852908edc45e72706e51838960b0/web_studio/models/ir_ui_view.py#L53
and therefore another attribute was added on this temporary technical node,
which therefore didn't get deleted properly before being send to the
webclient.

So, we change the heuristic, instead of relying no the fact
`groups` was the only attribute, set a technical attribute on the node
to identify it comes directly from the postprocessing and it must
be deleted properly before being sent to the webclient.

closes odoo/odoo#103832

X-original-commit: 53c684a69bbe8894f05306631272bcf08c226f96
Related: odoo/enterprise#33096
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2022-10-24 14:12:17 +02:00
maximilien(malb) 9d24f5f481 [FIX] account: payment term visual improvement
The payment terms view needed a bit a change so this PR change a few things:

* Make the title of the payment terms bigger like the other view in odoo
* Group the company, note and display on invoice so that they are aligned
* removing the section Terms and the span

This PR also change the display of payment terms on invoice when printing or previewing them. Now :
* If there is one line (no cash discount) it's not displayed
* If there is one lone with cash discount) it's displayed
* If more than one line then displayed
Before this PR it was presented with a table but now the line are displayed like a list.

closes odoo/odoo#103778

Signed-off-by: Quentin De Paoli <qdp@odoo.com>
2022-10-24 14:12:14 +02:00
niyasraphy 46c54ee6cb [FIX] l10n_ae{_pos}: fix module names
closes odoo/odoo#103454

X-original-commit: be7907b37e398d5fd3e788e364c4953ee50e856d
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
2022-10-24 14:11:58 +02:00
roen-odoo 029fa85831 [FIX] point_of_sale: fix traceback in pos_order studio
Current behavior:
If you try to edit the form view of pos.order in studio, you get a
traceback.

Steps to reproduce:
- Install point_of_sale
- Go to PoS order
- Click on studio
- Click on the button to edit the form view
- You get a traceback

opw-3008565

closes odoo/odoo#103838

X-original-commit: b616cad62a66aaaf8bfc7c79dbafd87174b9a1f6
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2022-10-24 13:05:54 +02:00
Stefan-Calin Crainiciuc (stcc) 35a648d6df [FIX] l10n_sa: fix call to report_barcode route
Steps to reproduce:
- Install l10n_sa module
- Switch to SA company
- Accounting app > Config > Settings > Enable QR codes
- Create Invoice, add customer, add a line > Save > Confirm > Preview

Issue:
The QR code in the invoice is missing and instead there is an image
with a broken link.

This happens because the route called by the view is incorrect. The
`report_barcode` function has changed its parameter name from `type`
to `barcode_type`.

Fix:
Use the correct route.

opw-3034366

closes odoo/odoo#103831

X-original-commit: c4302bea7cfab35a95373c4232c3d1f87f01d163
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Stefan-Calin Crainiciuc (stcc) <stcc@odoo.com>
2022-10-24 13:05:52 +02:00
Ivan Yelizariev 5779e29f35 [FIX] web_tour: add sudo for record creation
Method `consume` is called at the end of a tour. Tour can be started via debug
menu by any admin with "Access rights", however the method requires `Settings`
access level.

Fix it by adding `sudo()`. This issue could be reviewed in master.

STEPS:

* change Administration access level to "Access rights"
* start tour `sale_quote_tour`
* follow the tour steps

opw-2965772

closes odoo/odoo#103801

X-original-commit: c96111bf1cc7611b3b3e0b9f210d50cff527cc91
Signed-off-by: Ivan Elizaryev (iel) <iel@odoo.com>
2022-10-24 10:54:23 +02:00
Philippe Wauthy 572027ab47 [IMP] hr_holidays: improve Time Off report colors
When printing the Time Off pdf report for Time Off summary from the employee form, the colors
of the Time Off are not related to the Time Off type but are defined as red by default and assigned
another color in the demo data.

This commit maps the colors of the Time Off Type to the colors available in the Chart.js library

task-2963752

closes odoo/odoo#99804

Related: odoo/enterprise#31154
Related: odoo/upgrade#3894
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-10-24 10:54:15 +02:00
William Henrotin 50dddf3aa0 [FIX] mrp: show slides in readonly
Ensure the google slide are displayed in both readonly and editable
mode. The slides should be hidden only if the url is wrong or empty.

closes odoo/odoo#103872

Task: 2991906
X-original-commit: bbf4f1e7b9cb456f2930c270f7e2b2c35cc9e80d
Related: odoo/enterprise#33100
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2022-10-24 09:16:55 +02:00
William Henrotin 3bc9d3dabe [FIX] mrp: make the timer editable
This commit makes the ongoing timer editable

Task: 2991906
X-original-commit: b2ce5adeead3255de765a6136116ffc7f36ea49e
Part-of: odoo/odoo#103872
2022-10-24 09:16:55 +02:00
William Henrotin 1ed423a181 [FIX] web: make pdf viewer expands on notebook
Similar to the html field widget, this commit add the display: block
class to the pdf viewer widget in order to make it use the whole area of
a notebook zone:

Task: 2991906
X-original-commit: a1407975c2fafedef5f5eb7d4597cfcd88117e49
Part-of: odoo/odoo#103872
2022-10-24 09:16:55 +02:00
pedrambiria 92e04dea0c [FIX] point_of_sale: reset number buffer when the select order line
Before this commit: if you add two products in PoS and try to change the quantity
for the first one, it works fine, but when you click on the other order line and try to
update the quantity, it uses the previous number buffer.

The solution is to reset the number buffer after selecting the order line.

closes odoo/odoo#103834

Issue: https://github.com/odoo/odoo/issues/103230
X-original-commit: 51f6a6798ce2cc3c23a2fc55280cbd1a80df6bec
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
2022-10-24 09:16:45 +02:00
Rémy Voet (ryv) 370cae07b8 [FIX] test_performance: adapt query count of one2many operations
Since https://github.com/odoo/odoo/pull/99415,
query count for one2many operation was too high, fix it.

closes odoo/odoo#103807

X-original-commit: 09acbbe9ca7cc524288589cb2f9dfcd30b244461
Signed-off-by: Vincent Schippefilt (vsc) <vsc@odoo.com>
Signed-off-by: Rémy Voet <ryv@odoo.com>
2022-10-24 08:22:45 +02:00
Thomas Lefebvre (thle) 6617defe53 [FIX] sale_loyalty: check coupon partner
Steps to reproduce:
    - create a "gift card" with a specific customer;
    - use gift card code with any customer (Sales and/or eCommerce app).

Issue:
    The coupon is validated.

Cause:
    There is no partner verification when applying a coupon.

opw-3027251

closes odoo/odoo#103673

X-original-commit: 092d652b1f38b804657b6e1d383a157615cf9487
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>
2022-10-24 07:29:48 +02:00
FrancoisGe 0055542952 [FIX] web: edit a required field in a list view in multi_edit
Before this commit, in a list view in multi_edit mode and editable="0",
it was possible to edit a required field with an invalid value.

Why:
In the PR 101924, we decided to no longer pass readonly/required of fields
in non-editable views (if no editable="1").

Solution:
To know if a view is editable, you should not only look if it is
editable="1" but also if it is multi_edit="1".
So we want to pass the readonly/required fields if the view is
editable="1" or multi_edit="1".

How to reproduce:
- Go to a multi_edit="1" and editable="0" list view with at least one
  required field on the server side
- Select the checkbox of the record you want to edit
- Edit that field with an invalid value (e.g. clearing a text field)
- Click outside the line being edited

Before this commit:
The record is saved with the invalid value

After this commit:
An alert dialog is displayed to warn us that the value is invalid.
The record returns to readonly mode with the old value.

closes odoo/odoo#103790

Related: odoo/enterprise#33066
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2022-10-23 12:30:03 +02:00
FrancoisGe c998fdd77b [FIX] base: consider multi_edit="1" views editable
Since odoo/odoo#95729

nodes with a `groups=` are completely removed from the views when
the user is not part of the group, instead of being made invisible.

In that PR, views have been adapted to add back fields, with invisible="1",
when they were required, for instance when they were used in a domain
of another field which was still there despite the user is not part
of the given group.

As `tree` views having `multi_edit="1"` where not considered
as editable views, the domain of fields in these views were not
validated:
- https://github.com/odoo/odoo/blob/1fb8fa16ab7dc298d54f089d7163fb556dbc5fcc/odoo/addons/base/models/ir_ui_view.py#L1460
- https://github.com/odoo/odoo/blob/1fb8fa16ab7dc298d54f089d7163fb556dbc5fcc/odoo/addons/base/models/ir_ui_view.py#L1321-L1322

while they are well required for the web client,
in `multi_edit="1"` this is possible to edit relational/many2one field,
and therefore it will do `name_search` calls using the domain of the
field, and therefore the fields used in these domains must always
be present in the views. Without it, a crash in the web client occurs
when attempting to edit the relational/many2one field.

This revision targets to consider the `multi_edit="1"` tree views
as editable, to make the field domains validated as they should be.

Hence, views are adapted to add back fields with `invisible="1"`
when they are required in domains of other fields.

Part-of: odoo/odoo#103790
2022-10-23 12:30:03 +02:00
Juan Daniel Alvarez f255306e56 [CLA] add new members to Trescloud CLA
closes odoo/odoo#103848

X-original-commit: 7683a4658a4d9893107d8d307486d36d5a762128
Signed-off-by: Josse Colpaert <jco@odoo.com>
2022-10-22 22:26:52 +02:00
Thanh Dodeur 3698a189c0 [FIX] mail: allows the callMainView to adapt its content on resize
Before this commit, only the window resize would trigger a rerender of
the mainCallView. This commit makes sure that any resize of the
component will trigger a recomputation of the content layout.

closes odoo/odoo#103818

X-original-commit: 0d95da350898b6555a59d379b03181f688456c9d
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-10-22 01:33:29 +02:00
Bruno Boi c964462774 [IMP] web: update owl from 2.0.0-beta-22 to 2.0.1
Release notes: https://github.com/odoo/owl/releases/tag/v2.0.1

- fix: runtime: correctly throw an error for duplicate object keys
- fix: parser: give t-set-slot="default" priority over the content
- fix: blockdom: correctly reorder children in heterogeneous t-foreach
- fix: portal: correctly move portal content when target is after it
- fix: blockdom: fix event_catcher traceback when a parent component has an empty child

closes odoo/odoo#103847

X-original-commit: be996cf423ce09be4e4661c0b42a97d92a4dcdb4
Related: odoo/enterprise#33097
Signed-off-by: Géry Debongnie <ged@odoo.com>
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
2022-10-21 23:13:48 +02:00
Du-ma c41228a27d [FIX] base: make data argument optional
It was not always set (e.g. in the generate_email call of
mail.template) and it executes methods like _render_qweb_html where
data was already optional.

closes odoo/odoo#103840

X-original-commit: ddb2bf9f9cb6ea3a4bbdc4fb68c7fbcb0e66aa43
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-10-21 22:18:52 +02:00
qsm-odoo 9f3463aad3 [FIX] web_editor: prevent crash when colorpickers receive split values
Steps to reproduce:
- Edit
- Add a snippet with columns
- Save
- HTML editor
- Set up a border on one column of the snippet with different colors for
  the top/right/bottom/left sides
- Edit
- Click on the column => crash

This is only an example, but if a colorpicker widget is linked to a
SnippetOption instance's `selectStyle` method designed to handle the
"border-color" property of an element, the value received can be split
if the item uses different colors for its top/right/bottom/left borders.
For instance, you could receive "red blue" if the item has red top and
bottom borders and blue left and right borders. In that case, the
colorpicker widget code would try to add the class "bg-red blue" on its
preview item which would crash because of the space inside).

After this commit, we simply do not show any color for this case.

opw-2803311

closes odoo/odoo#103842

X-original-commit: 484230481cd7195e2c992e673a2b6e627baf505d
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-10-21 21:21:47 +02:00
Raouf ead52d72a7 [FIX] project: add missing stage when import tasks
Before this commit:
Let's consider project P1 having no stages.
Let's consider project P2 having Stage 1, Stage 2
When importing tasks via csv file:
- Task 1 for project P1 and Stage 1
- Task 2 for project P1 and Stage 2

Stage 1 and Stage 2 are still assigned only to project P1.

After this commit:
Stage 1 and Stage 2 are now assigned to P1 and P2.

Task-2996393

closes odoo/odoo#103819

X-original-commit: 2e6a7741dd2c993daa1b1aafe4ebd422cd57235c
Signed-off-by: Xavier <xbo@odoo.com>
2022-10-21 18:10:59 +02:00
sofiagvaladze 470674ead4 [FIX] hr_holidays: correct the dashboard validity date
Prior to this fix, closest_allocation_to_expire was the upcoming allocation regardless
whether there were remaining leaves on it or not.

That lead to misleading information on the dashboard.
For example, let's say user has two allocations and used up the first allocation
and has X days left on the second allocation. Still, the user will see that they have
left X days (Valid until -- the first allocation expiration date --). Which is misleading,
Instead they should see X days (Valid until -- the second allocation expiration date --).

task - 2978789

closes odoo/odoo#103813

X-original-commit: dee3552659bec78fbbce4e8af155b3259e721dbd
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-10-21 18:10:54 +02:00
David Monjoie eb22913e20 [REV] web_editor: reactivate collaboration conflict detection
This reverts commit 77a8f7f9fded793948daf0ebef67c2674c7a79f8.

closes odoo/odoo#103809

X-original-commit: d3855e9852be6549b80c63fe6cf27ed647f74df1
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-10-21 17:17:21 +02:00
Hubert Van de Walle (huvw) 7b948a731f [FIX] web: discard rejected reloadProms in magicReload
Steps to reproduce:

  - Go to a list view with multiple items
  - Click on an item
  - Delete it
  - Go back in history twice (Using the browser navigation) to return to the list view
  -> We can't click on another record

opw-2854113

closes odoo/odoo#103808

X-original-commit: 92c90823139b413c8289d1c323ad694fc8220a61
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-10-21 17:17:19 +02:00
abd-msyukyu-odoo 495628336b [IMP] web_editor: prevent table handle in contentEditable false
When a table isContentEditable=false:
- Don't show the resize cursor
- Don't show the table ui menu (which allows to move columns/rows)

Currently in Knowledge, when an embedded view contains a `<table>` element, it
was possible to use the editor to edit rows and columns of the view and it is
not intended. Those table are not editable, and as such the menu to edit them
should not be shown.

Task-3000318

closes odoo/odoo#103805

X-original-commit: aec6b02dacf02f18b53cb8b31ffbb52772f5ac27
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-10-21 17:17:16 +02:00
Benjamin Vray 2c46e15198 [FIX] website: prevent animated navbar flicker
Before this commit there was an issue with the header effects (except
the 'Scroll') if the page did not have much scroll height when the
header decreases in height when scrolling down. When this issue appeared
it was impossible to reach the bottom of the page.

This was due to the fact that when the header size is smaller when
scrolled (e.g. height scrolled logo option), the padding-top of the
`main` is decreased and therefore the scroll height of the page too..
Which meant that, during the transition that changes the height of the
header, this decrease in scroll height immediately increase the height
of the header, then decrease, etc. in an endless loop.

This commit fixes that by no longer triggering an animation that changes
the height of the header if the scroll height is too short.

This commit also fixes an issue with the standard effect which was not
properly destroyed and left a 'translate transform -100%' on the header
when changing the "standard" effect to a "scroll" effect and the page
was scrolled.

opw-2812482

closes odoo/odoo#103804

X-original-commit: 46993910eb31e9cbaf60a7d4e4c3014d60e7bb2b
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-10-21 17:17:12 +02:00