Commit Graph
155990 Commits
Author SHA1 Message Date
qsm-odoo 9cfdffdee3 [FIX] web: restore dialog callback calls (e.g. cloning a website page)
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

closes odoo/odoo#105081

X-original-commit: 90b280c221f3c0819cb0b291e102f161fc47507a
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-11-05 17:30:42 +01:00
Xavier BOL (xbo) 363403aea9 [FIX] project: change the default order used in project list/kanban view
Before this commit, the default order used in the project list/kanban
view is only `sequence` but if all projects have the same sequence.

This commit changes the default order to sort by `sequence`, `name` and
`id` as it is defined in the python model.

closes odoo/odoo#104986

X-original-commit: 25efb87f960380dac8093e018a3766bd5041cd0f
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2022-11-05 16:13:42 +01:00
Jensi Chovatiya 109515ee7f [FIX] project: fix the default user on task gantt view
Before this commit, when we create a new task in project gantt
view, the default current user is assigned to the task instead of
corresponding user.

So in this commit, assign the default user along with current user.

task-2920824

closes odoo/odoo#104967

X-original-commit: ab0e072fda7c2dff4ee7916496edfb6da11019ff
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2022-11-05 13:09:44 +01:00
Florian Damhaut 9e957e11e6 [FIX] mail: only hide rating in chatter and not in message
o_mail_notification should only be hidden when seen from the chatter.

At the moment, the notification is hidden everywhere in odoo and
after this PR the notification are only hidden in the chatter

opw-2720840

closes odoo/odoo#105075

X-original-commit: abddcf8bd4b0ba3d8d45ed1ba4e26c3e112b8edb
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-11-04 23:37:58 +01:00
Walid HANNICHE (waha) a961a52f88 [FIX] website_sale: display error if cart updated before payment
Steps to reproduce:
- on Ecommerce website Add an item to your cart.
- Billing/Shipping info > Stop on Payment page.
- Duplicate tab, On the duplicate, add more products to your cart.
- Go back to the original tab (Payment page) > Check out with Stripe.
- Stripe acquirer page does not reflect the updated cart amount.
- Complete payment > Website will say order is confirmed.
- Go to this SO in backend

Bug:
SO is not confirmed and Stripe status says there is a mismatch
because it did not take updated amount.

Fix:
double check the ammount before processing payment

opw-2978244

closes odoo/odoo#105060

X-original-commit: be9d2a57c4628fc867aefc932aaf8c503e76b60f
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2022-11-04 19:47:03 +01:00
Andrea Grazioso (agr-odoo) a04e1bf6e0 [FIX] website_sale: fiscal position application
Have the following taxes:
- Tax A: 15%, included in price
- Tax B: 21%, included in price

Create a product P with list price 115 and tax A

Have a fiscal positions FPOS configured with:
- Detect Automatically checked
- Country: Belgium
- Map tax on product: A -> B

Open a web shop session as guest, add P to cart
Go to checkout: Price total will be 115
Fill address details with Belgium address
Go to confirmation page

Error:
Price total will be 100. In the application of fiscal position the wrong
unit price is used

opw-2973879

closes odoo/odoo#105061

X-original-commit: 0a8394055221e48c610ad51eef21eb1a16f1e9f9
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
2022-11-04 18:53:01 +01:00
Thibault Delavallée cc0fd487d5 [FIX] event: fix report printable name
Name field can return False, which is not compatible with a replace. We
therefore fallback on a void string, as already done in various other
report names.

Related to Task-2868153 (Mail: Allow multi-reports mail templates)

closes odoo/odoo#105042

X-original-commit: 1e223619e466792c9b073b302ebc9d68cabb9aac
Related: odoo/enterprise#33652
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-11-04 17:56:45 +01:00
Victor Piryns (pivi) 282945a5a5 [IMP] product, sale: define product exclusions with their products
Following recent changes in stable deleting/archiving product variants forbidden by
attributes exclusions, installing some modules after the sale app failed because
the product `product_product_4d` specified in `product` was deleted by the attributes
exclusions of the `sale` module.

This has been fixed in stable by removing all references to this xml_id.

Nevertheless, this bug showed us that the definition of attributes exclusion
for a product in another module than the one creating it is a bad idea, as it
modifies what's allowed or not with that product, leading to potential database inconsistencies.

This commit moves the exclusions targeting products from the `product`
module to the `product` module, to reduce the risks of other modules using/referencing
the deleted/modified products in a way conflicting with the exclusions.

opw-3040916

closes odoo/odoo#104020

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-11-04 17:56:43 +01:00
Jairo Llopis abb708f7de [FIX] base: select appropriate address for SMTP connection check
Before this patch, when doing an SMTP connectivity check, Odoo always checked if the current user with their current email address could connect.

That was inaccurate because:
1. If the `ir.mail_server` were configured with an email address as `from_filter`, that's going to be the address used to connect with the server always; never your user email.
2. If it were configured with a domain as `from_filter` and your user had an email from another domain, your outgoing emails are going to get wrapped into that domain (SRS-like). Again, the connectivity check wouldn't be imitating real world connections.

After the patch, both situations are taken into account when deciding the outgoing address that's going to be used for testing the connection. This will reduce false negatives when testing connectivity.

@moduon MT-1064 OPW-2942814

closes odoo/odoo#105033

X-original-commit: f1e5e8ca42fbab77649b95fd0b2d09c46f6878fc
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
2022-11-04 16:59:59 +01:00
Christophe Simonis 417bcca00c [I18N] Remove zombie translation files
closes odoo/odoo#105029

X-original-commit: 858f9d2625b81b3efbd6dfe40360eea2d9aa75da
Related: odoo/enterprise#33642
Signed-off-by: Christophe Simonis <chs@odoo.com>
2022-11-04 16:59:54 +01:00
Claire Bretton (clbr) 7639990f93 [FIX] account: fix errors if formulas in reports are indented
Fixes parsing error that happened when formulas of reports contained indentation (white space, end of line, tabs).
The formula was then not computed correctly and an unclear error message was thrown.

closes odoo/odoo#105028

X-original-commit: 631c1292042083a566072462aa788c6fc410925a
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
2022-11-04 16:59:51 +01:00
Claire Bretton (clbr) 7a7497c48e [FIX] account: Fix syntactic sugar formulas of account.report.line not updated correctly
Fixes the problem that some syntactic sugar formulas were not updated correctly when changed in the xml of reports.
In particular, during upgrade of modules changes were not taken into account.
Concerned syntactic sugar formulas:
- <field name="account_codes_formula">
- <field name="aggregation_formula">
- <field name="domain_formula">

X-original-commit: de9bd10f6e49c529de0d9c835e7185ecb2e699e5
Part-of: odoo/odoo#105028
2022-11-04 16:59:51 +01:00
Lucas Perais 7c1cf4f683 [FIX] web: kanbanRenderer can choose if it supports Sortable
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.

closes odoo/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>
2022-11-04 16:59:45 +01:00
Alvaro Fuentes 70c41dafd4 [FIX] mrp: improve perf of _skip_bom_line
The main motivation for this change is to improve performance of BoM
`explode`, which heavily rely on checking the lines to skip. `explode`
is also called from product `compute_quantities_dict` which is called
multiple times during upgrades. With this fix we improved the running
time of an upgrade _test_ from 3h:30m to 2h:55m which gives a 16%
performance improvement.

The goal of `_skip_bom_line` is to check that for each attribute present
on the line, at least one value associated to that attribute must be in
the attribute values of the product(*). If none is found then we
consider that we can skip the line.

The previous implementation was inefficient. It grouped all values by
attribute, then checked one by one if at least one value is on the
product. In case one attribute does not have any value on the product it
skipped the line.

The implementation we propose here is to take the intersection of the
product and line values, then check that their attributes are the same.
The later can be done with a simple length check. In case they are
different the line must be skipped. Note that this works because only
one value is possible per attribute in a product.

Both implementations are equivalent. The second is more efficient
because does not branch and relies on (record)set operations.

For example, let's consider a product with two attribute values
`a` and `b`, and a line with multiple values `a`,`y` for
attribute 1, and `z` for attribute 2.
```
Product                      Line
+---+                      +-----+
| a | <- same attribute -> | a,y |
+---+                      +-----+
| b | <- same attribute -> |  z  |
+---+                      + ----+
```
This line must be skipped. The reason is that the value `b` is not
among the list `[z]` of values for attribute 2 on the line. The new
implementation would get the intersection of attribute values as `[a]`
from there the comparison of the attributes will fail because `[a]` has
only one attribute while the line has two.

Let's consider a second case, where there is no value on the line for
attribute 2.
```
Product                      Line
+---+                      +-----+
| a | <- same attribute -> | a,y |
+---+                      +-----+
| b | <- same attribute -> |     |
+---+                      + ----+
```
This line is not skipped because there is no value for attribute 2 on
the line. Therefore the condition(*) per attribute is not violated for
this product. The new implementation gets `[a]` as intersection of values,
but now the attributes coincide: they are both attribute 1 for the
intersection and the line.

Finally,
```
Product                      Line
+---+                      +-----+
| a | <- same attribute -> | a,y |
+---+                      +-----+
|   | <- same attribute -> | z,w |
+---+                      + ----+
```
This line is skipped because none of `[z,w]` are in the product. The new
implementation would get again `[a]` as intersection which does not
match the attributes on the line.

closes odoo/odoo#105019

X-original-commit: 47f4c3cc72ecb612ef4edd8c603e27b698187d8a
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2022-11-04 16:59:42 +01:00
Mahamadasif Ansari c91462f7c6 [FIX] hr_timesheet: fix warning message box width
Steps:

- Install hr_timesheet
- Enable Analytic Accounting 
- Create a project and create a task
- Archive the Project's Analytic Accounting
- Open the task and go to the Timesheets page

Issue:

- Warning message box width is small.

Fix:

- Provide the proper format of the warning message.

task-3010437

closes odoo/odoo#105013

X-original-commit: 61eb1a57fd195da1f0bc01886fa568e8e2eb2ee3
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-11-04 15:57:52 +01:00
Noe Antoine 5f4552ef5a [IMP] crm: hide phone and company in lead tree view.
At the moment, the tree view is quite dense. In order to ease its
use, make company and phone fields optional and hidden by default.
This is done for crm.leads as both leads and opportunities.

Task-3053159

closes odoo/odoo#104759

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-11-04 14:59:17 +01:00
niyasraphy fa2e34e1fc [FIX] project: prevent opening the form of report.project.task.user model
closes odoo/odoo#104506

X-original-commit: 910a0bda28c84e96a93430044f841b4f28055b3a
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-11-04 14:59:15 +01:00
Alexandre Kühn b3de4ee4bd [FIX] mail: no traceback when deleting a message
Before this commit, when deleting a message, there was a traceback.
This was caused by `MessageView/onComponentUpdate` wrongly assuming
`MessageView` from a single branching of identifying owner
(`messageListViewItemOwner`), when there is another one
(`deleteMessageConfirmViewOwner`), specific to when a message is
being deleted.

As a result, crash came from programming error of accessor on
undefined relational field.

Task-3055205

closes odoo/odoo#104995

X-original-commit: 1fbc125451c62b444ce49fa11c8216e52e299b64
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-11-04 14:00:42 +01:00
Joseph Caburnay da27a4d5f1 [IMP] web: show clipboard field even if it's empty
**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.

closes odoo/odoo#104248

Task-id: 2861388
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-11-04 14:00:27 +01:00
Pratik Raval efc666b241 [IMP] website_event_question: filter on provided answers
This commit adds the filter for users to see Selected answers given at the time
of registration.

taskID-2995250

closes odoo/odoo#101292

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-11-04 14:00:24 +01:00
Hubert Van de Walle (huvw) a11033d42c [FIX] mrp: division by 0 when computing the production capacity
Steps to reproduce
==================

- Create a BOM
- Add a line with a product of type product
- Set the quantity to 0
- Save and click on overview

-> ServerError: Division by 0

Cause of the issue
==================

Lines with a quantity of 0 should be excluded from the computation

opw-3053167

closes odoo/odoo#104980

X-original-commit: b0f5170252ed73d31543b8d1dcf114ae6f0b65bc
Signed-off-by: Adrien Widart <awt@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
2022-11-04 13:00:55 +01:00
Joseph Caburnay c144ac4cf0 [FIX] web: un-stored m2m field is not valid custom groupby
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.

closes odoo/odoo#104978

X-original-commit: 9ba52387481bb0720c5d4f5d8a86c3ad6e801137
Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2022-11-04 11:59:08 +01:00
Joseph Caburnay 80318050ef [FIX] web: take into account 0s when aggregating
**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.

closes odoo/odoo#104968

X-original-commit: 2dcb71aab911a47d8d3a5db6f68a28d1c6d8c9fb
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2022-11-04 11:59:05 +01:00
Paolo Gatti 7d61b12bc7 [FIX] l10n_it_edi: self-invoices require fiscal regime RF18
When the seller is foreign, the Fiscal Regime of the seller must
be set to 'RF18', as per:
https://www.fattura24.com/manuale/altri-documenti/autofattura-fornitori/

Task: https://www.odoo.com/web#id=3010849&model=project.task
opw-3010849

closes odoo/odoo#104903

X-original-commit: 07747178a230071f9ca3cd7202ad571f80a330c0
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Paolo Gatti (pgi) <pgi@odoo.com>
2022-11-04 11:59:03 +01:00
Guillaume (guva) 99a7a48b84 [FIX] account: add hook to get payment_mthod_code
Related to https://github.com/odoo/enterprise/pull/32020
Add a hook to return the account payment method code.

opw-2985984

closes odoo/odoo#104875

X-original-commit: 66be2aff7ae519725ce2e9f027cabc24c46d787a
Related: odoo/enterprise#33573
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
Signed-off-by: Guillaume Vanleynseele (guva) <guva@odoo.com>
2022-11-04 11:58:59 +01:00
Denis Roussel d81e83907d [IMP] stock: Add a void button box on Package Types form view
closes odoo/odoo#103979

X-original-commit: de87a78e0988cd7a1aa05f10ef7bc9170d9dad14
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2022-11-04 11:58:54 +01:00
gawa-odoo 2769d08b02 [IMP] project_purchase, project_hr_expense: change groupby of counts
We could do the Group By directly with sql instead of doing the computations by hand afterwards.
As we're already doing a sql query, we can include it here.

closes odoo/odoo#104933

X-original-commit: 3cec95d0a18f3c343db36bb0700936833e98f7fc
Related: odoo/enterprise#33594
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Wala Gauthier (gawa) <gawa@odoo.com>
2022-11-04 10:54:57 +01:00
gawa-odoo 972171968d [FIX] account: wrong computation smart button on analytic account
The smart buttons were computing the number of aml instead of the number
of invoices/bills with the account.

We now compute back the number of moves.
We also changed it so it is consistent with the view,
so it computes the number of moves with move lines that have the distribution
instead of the analytic lines with the account.

X-original-commit: 84f3ee28156721cea0b530b92ede36fad58c5db8
Part-of: odoo/odoo#104933
2022-11-04 10:54:56 +01:00
JordiMForgeFlow 2ad702f239 [FIX] mrp: ensure only active BoMs are considered on product2bom
When executing the product2bom method it is possible that an active_test
context is present in self. However, the method should not consider
archived BoMs.

closes odoo/odoo#104919

X-original-commit: a5f923859fad37e1fc52a3a4bcce5cce4cf69c87
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2022-11-04 09:53:02 +01:00
Andro Gvivradze 01703e3ac8 [FIX] base: send correct report paperformat to wkhtmltopdf
Prior to this commit get_paperformat function in ir_actions_report.py file
was trying to get a paperformat_id of an empty report and as there was none
was automatically returning company paperformat_id. After this commit said
function will try to get a paperformat_id of the report with specific
report_ref value.

Task-2980708 (Fix Ticket Reports)

Closes odoo/odoo#100199
Closes odoo/odoo#104561
Closes odoo/odoo#100715

closes odoo/odoo#104915

X-original-commit: 78e2c6456d2f9f06d42c18d7b1849d5fad4deb46
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-11-04 09:52:59 +01:00
niyasraphy 22a2847aec [FIX] account: invoice report duplicated values
closes odoo/odoo#104871

X-original-commit: 56d00814fed92782dca9425c4471382d26004198
Signed-off-by: Camille Spiritus (casp) <casp@odoo.com>
2022-11-04 09:52:57 +01:00
Tommy (tong) 74229f7d83 [ADD] l10n_my
- Create Malaysia Accounting localisation

task-2870449

closes odoo/odoo#104734

X-original-commit: de3b2f13eed4505efbb28e0b866494bf4fc50b63
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
2022-11-04 09:52:54 +01:00
Tommy (tong) 9ed41b2bd7 [IMP] base: add Malay language
Purpose
=======
Add Malay language for Malaysian Localisation.

X-original-commit: 9dcb35a62b7d23249442a9ab045e88cb57165208
Part-of: odoo/odoo#104734
2022-11-04 09:52:54 +01:00
Achraf a167b3e7b5 [FIX] web: Allow user to download binary file in always edit mode
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

closes odoo/odoo#104961

X-original-commit: 73a2329b8bf4e887890cae7669bc568ae0be7147
Signed-off-by: Luca Vitali <luvi@odoo.com>
2022-11-04 08:58:44 +01:00
Laurent Stukkens (LTU) 623ecff069 [FIX] {hr,sale}_timesheet: prevent default project_id on non timesheets
Prior to this commit and since odoo/odoo#94144, a default project_id is
provided event for non timesheets.

This commit fixes this issue by setting a context key in the `account.analytic.line`
actions that are related to timesheets and by setting the default project_id only
when this key is set to `True`.

This commit also removes `encoding_uom_id` from 'default_get' as it is any
computed as the field is compute (not stored).

closes odoo/odoo#104901

X-original-commit: 5768a5f25b62ce9f07212adbf6584e0b874c64ea
Related: odoo/enterprise#33581
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2022-11-04 01:57:13 +01:00
Xavier BOL (xbo) 8873581323 [FIX] project: add default project when user wants to add subtask
Before this commit, the f3974bea4b adds
the project as filter in the search view when the user wants to add a
subtask on a task in the form view. This feature has been broken due to
a change on the search view. The main search has no longer the
display_project_id field, only the one inherited the main one has that
field. (commit da868d28e2)

This commit changes the search view to use to correctly have the project
of the parent task as default project when the user wants to search a
subtask to add on the task displayed in the form view.

closes odoo/odoo#104878

X-original-commit: 4e1ee0f9ae6f39154a528fec2c16943df807ab7f
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2022-11-04 01:57:05 +01:00
Eteil Djoumatchoua (etdj) 3c526229c6 [FIX] project: ensure cost are subtracted when calculating margin
steps to reproduce the bug:
- Create a service product with "invoicing policy" set to "Based on timesheet" and "create on order" set to "project and task"
- Create and invoice with the product and confirm it
- Type in some hours on timesheets for the invoice
- Go Project -> Project update of the project, The margin value is incorrect

Solution: As the cost are always negative, changed the operation of the calculation to have the good value.

opw-3029869

closes odoo/odoo#104474

X-original-commit: a39a1a6a3bc276177f9f4c95495153bbb5818ed5
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2022-11-04 01:04:45 +01:00
Xavier BOL (xbo) bea0a09e1d [FIX] sale_timesheet: adapt JS tour of sale_timesheet for always edit
Before this commit, the sale_timesheet tour sometimes fails because it
cannot click on the save button. Since the always edit feature, the form
view is automatically saved when the user leaves the view, so it is now
not necessary to click on the save button and then leave the form view.

This commit removes the steps in which they simulate the user clicks on the
save button to avoid any indeterminate errors when that tour is launched.

closes odoo/odoo#104305

X-original-commit: 14999db237e9f61474f9ba886182fdfda20864dc
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2022-11-04 01:04:43 +01:00
Soukéina Bojabza c75f5d11f0 [FIX] web_editor: reallow the grid images to be replaced
In commit [1], a check was added to see if a media is editable in order
to prevent its edition if it is not the case. However, this also had as
effect to block the edition of some grid images. Indeed, as the columns
in grid mode containing only an image have their `contenteditable`
property set to `false`, the images don't pass the check because their
parent is therefore not editable.

This commit removes the `contenteditable` property from these columns
in order to make their images pass the check and therefore allow their
edition.

Tests are also added, ensuring that these grid images can be correctly
replaced.

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

opw-3028116

Fixes #103234

closes odoo/odoo#104899

X-original-commit: d8c374e3e6b31bf88aa42952aadf3379936f7600
Related: odoo/design-themes#617
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-11-03 23:35:10 +01:00
Hoang The Vuong 9f49c5e8e0 [FIX] mail: Improved live chat feature when entering help command
closes odoo/odoo#104877

X-original-commit: 4bf6cd0cc26268442dfc5201eb8b49af98648c49
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-11-03 22:39:49 +01:00
vishal padhiyar e774cac767 [FIX] web_editor: fix attributes missing from cleanForSave
Before this commit:

When we try to add html data in translated email templates then it does not
remove those extra classes from the html code.

After this commit:

Now those extra classes will remove from the html code.

Task-2985072

closes odoo/odoo#104859

X-original-commit: 5e192a3ccd93c3aafda26abdcfae50ab8f0e053e
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-11-03 19:40:55 +01:00
Sébastien Theys 2994a3da0d [IMP] mail: give space to field list rather than their details
This allows to more easily browse and see all existing fields rather than
seeing a lot of details.

closes odoo/odoo#104839

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-11-03 18:12:16 +01:00
niyasraphy c48a211fb7 [FIX] website_event_track_quiz: field alignment
closes odoo/odoo#104874

X-original-commit: da4cc5ee525fb2e8cffd416b3783c2358b1064b8
Signed-off-by: John Laterre (jol) <jol@odoo.com>
2022-11-03 16:43:45 +01:00
Joseph Caburnay 6785784702 [FIX] web: allow custom grouping with a stored m2m field
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".

closes odoo/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>
2022-11-03 16:43:42 +01:00
Nicolas Bayet e3ed896fbd [FIX] web_editor: prevent some class to be used in history
When a change was added within a field like adding a class (eg. o_dirty,
o_transform_removal, or oe_edited_link), it triggered the
`_observeOdooFieldChanges` mechanism that replace all identical fields
from the first mutated field in the set of identical fields.

The bug appeared when there were two identical in the pages
- field A: first to appear in the document
- field B: second to appear in the document

When clicking on a link inside field B, multiples class could be added
(o_dirty, o_transform_removal, or oe_edited_link) within the fields.
Field A and field B were mutated. This activated the mechanism
`_observeOdooFieldChanges` and replaced the innerHTML of field B with
innerHTML of field A.
That replacement of innerHTML made the reference of the anchor node
in the link tool being outdated and changes made inside that link tool
ineffective.

Step to reproduce:

- Install website
- Go to any page and enter edit mode
- Click on the navbar and in the right panel select Vertical header
- Activate the CTA option in that navbar right panel (should already be)
- Click on the CTA button
- Try to edit the URL in the right panel or any link option (style etc)

The link will not update properly and the history undo create a new
link.

This commit add the ability in the editor to prevent classes from being
taken into consideration in the filterMutationRecords and in undo/redo
and when receiving external steps.

closes odoo/odoo#104872

X-original-commit: e07e149e01646cc2e59c8ac205a5047fd74ae0ba
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-11-03 16:43:39 +01:00
lejeune quentin f4a95639d4 [FIX] pos_stripe: Improves error handling
Currently if an error occurs on the server side it is not
reported to the POS interface and therefore to the user.

With this commit all responses to requests to the Stripe
server are managed in the POS so that the cashier is correctly
informed of any errors that may occur

closes odoo/odoo#104870

X-original-commit: a9c794ed31cfe1527f0e480729212859338bca60
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2022-11-03 16:43:36 +01:00
niyasraphy 3fbb79f62c [FIX] base: update app list wizard text alignment
closes odoo/odoo#104869

X-original-commit: cea6974f35289d1ed47dfcf822a4dc25b0e8494c
Signed-off-by: John Laterre (jol) <jol@odoo.com>
2022-11-03 16:43:34 +01:00
Adrien Schoffeniels 3bee8ae039 [FIX] mass_mailing: fix alert in full-width form view's header
Purpose:
--------
In the full-width form view of mailing, the alert-info message was not
displayed correctly: it did not fill the whole empty space in the header

This message is now always filling the gap between the buttons and the
status widget of the header.

Task-3010933

closes odoo/odoo#104868

X-original-commit: f216b7e6cf607e18fd54655aca1a0df5a951ce76
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
2022-11-03 16:43:29 +01:00
Solan Delvenne (sode) 9b0c42574c [FIX] snailmail: Fix name not appearing on snailmail cover
closes odoo/odoo#104556

X-original-commit: 1d35394f260e5ffa9fc6af834e9c429909ab29ae
Signed-off-by: Louis Baudoux (lba) <lba@odoo.com>
Signed-off-by: Solan Delvenne (sode) <sode@odoo.com>
2022-11-03 15:42:50 +01:00
Tom De Caluwé 1ab006ffcb [FIX] purchase_stock: ignore tax calculations in tests
The tests in the purchase_stock module include some tests that make sure or
depend on the fact that the price_unit from the generated move lines equals the
price_unit from the purchase order line from which they were created.

However, the price_unit in the move lines exclude taxes (at least those that
have an account set, it uses the total_void computed from the purchase order
line). This means some tests will fail if an installed localization defines
taxes that are included in the price.

The problem is resolved by explicitly creating the test product used in those
tests without supplier taxes.

opw-3033340

closes odoo/odoo#104825

X-original-commit: 70f7e2d70d04df989d3ff8039d3bae7ebdb73a6b
Signed-off-by: Adrien Widart <awt@odoo.com>
Signed-off-by: De Caluwé Tom (tdc) <tdc@odoo.com>
2022-11-03 14:11:32 +01:00