Commit Graph
161903 Commits
Author SHA1 Message Date
Sébastien Geelen (sge) dd7a50db06 [FIX] web_editor: ensure dynamic placeholder focus
When inserting a dynamic placeholder in the editable document
we need to ensure the said document currently hold the focus and
have an active selection range.

This was previously handle by the `onDynamicPlaceholderClose()` method
which used to be called before `onDynamicPlaceholderValidate()`.

This seems to have changed from 16.1 to 16.2.

In order to fix the problem and ensure the focus in any situation,
we add a `wysiwyg.focus()` call at the beginning of the validate method.

task-3222474

closes odoo/odoo#124149

X-original-commit: 51b992dec0bcdf09fde5e0811699235b590723ee
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-06-07 18:01:13 +02:00
Sébastien Theys 0dfed1b18b [REF] mail, im_livechat: move call files to discuss call folder
Part of task-3265211

closes odoo/odoo#124066

Related: odoo/enterprise#42093
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-06-07 18:01:04 +02:00
Sébastien Theys 227796c984 [REF] mail: move tests to core folder
Avoid having test floating in the root folder.

Part of task-3265211

Part-of: odoo/odoo#124066
2023-06-07 18:01:04 +02:00
Sébastien Theys 5dde72ace7 [REF] mail: move call tests to discuss call folder
Part of task-3265211

Part-of: odoo/odoo#124066
2023-06-07 18:01:03 +02:00
Sébastien Theys f9d0bef6b7 [REF] mail, im_livechat: make test setup methods patchables
Part of task-3265211

Part-of: odoo/odoo#124066
2023-06-07 18:01:03 +02:00
Simon Genin (ges) 02c20cb540 [FIX] web: CopyClipboard field css tweak
Remove overlapping bottom border of the input since the field is boxed.
Add 4px of left padding to the input not to have the cursor overlapping
the box and feel crowded.
Remove the "action" button left border radius.

closes odoo/odoo#124150

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-06-07 15:59:02 +02:00
lejeune quentin 041d4b538a [FIX] hw_xrivers: IOT_W check if file is a PDF before printing
When we send a report to the iot_w we use Ghostscript to print it. But if it is a ZPL report it crash.

So we need valid if the report sended is a PDF before print it

However if it is a different format, like ZPL, we use print_raw to send directly to the printer

closes odoo/odoo#124146

X-original-commit: a4c315ab657109f2ed69745207cd99ea978889b8
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2023-06-07 15:58:59 +02:00
Laurent Mignon (ACSONE) ab4d2451d2 [IMP] stock: Improves stock_quand_package.unpack performance
Before this change, when a package was unpacked the SQL query into the  method was looking up all the records into the stock_quant table to find duplicate entries. This could lead to severe performance issue on large database. With this change, if the  method is called on a recordset, the SQL query will only try to find duplicate records for records with the same product's ids and location's ids than those in the recordset.

closes odoo/odoo#124143

X-original-commit: c261eb3820e7cbfc98de9c1bd0a79375e6f5d4f4
Signed-off-by: Tiffany Chang <tic@odoo.com>
2023-06-07 15:58:56 +02:00
tsm-odoo 70d318876e [FIX] website_livechat: fix non rounded website livechat button
Since [1] the origin livechat button has no border on the bottom.
This conflicts with the skin of the website livechat button
which is displayed as a circle. This commit solves this issue.

[1]: https://github.com/odoo/odoo/pull/123684

closes odoo/odoo#124126

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-06-07 15:58:54 +02:00
Yannick Tivisse 7fa78e68b0 [IMP] hr_work_entry_contract: Add index for performance improvement
From 7s to 2ms for this query with 2.6M records

explain (analyze, verbose, buffers)
SELECT "hr_work_entry"."id" FROM "hr_work_entry" WHERE
(
    ("hr_work_entry"."active" = true) AND
    (
    (
      ("hr_work_entry"."state" in ('validated', 'draft')) AND
      ("hr_work_entry"."contract_id" in (548259))
    )
    AND
    (
     (
      (
       (("hr_work_entry"."date_start" >= '2023-05-01 00:00:00') AND (
        "hr_work_entry"."date_start" < '2023-05-31 23:59:59.999999')
       ) AND
       ("hr_work_entry"."date_stop" > '2023-05-31 23:59:59.999999')
      )
         OR
       ((("hr_work_entry"."date_start" < '2023-05-01 00:00:00') AND
        ("hr_work_entry"."date_stop" <= '2023-05-31 23:59:59.999999')) AND
        ("hr_work_entry"."date_stop" > '2023-05-01 00:00:00'))
    ) OR
      (("hr_work_entry"."date_start" < '2023-05-01 00:00:00') AND
       ("hr_work_entry"."date_stop" > '2023-05-01 23:59:59.999999'))
    )
  )
)
ORDER BY COALESCE("hr_work_entry"."conflict", false) DESC,
         "hr_work_entry"."state" ,"hr_work_entry"."date_start"
;

closes odoo/odoo#124108

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2023-06-07 15:58:51 +02:00
Alexandre Kühn 04b45dc43c [FIX] mail: more friendly pin message dialog
Task-3347745

closes odoo/odoo#124032

X-original-commit: 860ce3a
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-06-07 15:58:48 +02:00
Jinane MaksoudandAlvaro Fuentes ff33fa9faf [FIX] base: fix read methods for reified fields in res.users
Before this patch it was impossible to add a reified field to a
res.users list view via Studio.
The internal methods used by search_read are overwritten in res.users
to ignore reified fields.

closes odoo/odoo#123994

X-original-commit: 11e791d68256a5411d727b031930471eceaafb3f
Signed-off-by: Rémy Voet <ryv@odoo.com>
Signed-off-by: Jinane Maksoud (maji) <maji@odoo.com>
Co-authored-by: Alvaro Fuentes <afu@odoo.com>
2023-06-07 15:58:45 +02:00
Guillaume (gdi) bc877cbf3f [FIX] website: prevent entering edit mode when the screen is too small
We don't want users to edit their websites on a too small screen. To do
this, we hide the edit button when the screen width is less than 768 px
(the MD breakpoint of Bootstrap). Unfortunately, when a user creates a
new website, they go through the website configurator and are then
redirected to their new website with the edit mode enabled. We don't
want that when the screen is small. This commit only opens edit mode
after a website is created if the screen is large enough. Note that this
commit will also prevent users from forcing edit mode with the url
(enable_editor=1) when their screen is too small.

task-3316267

closes odoo/odoo#123992

X-original-commit: 00ea187ce641013feea00650cb2cadab73ebe636
Signed-off-by: Colin Louis (loco) <loco@odoo.com>
2023-06-07 15:58:42 +02:00
tsm-odoo 1fed41319e [FIX] mail: wrong discuss subfolder import in tests
Since [1] the pyhton discuss tests have been splitted into a
subfolder. They are wrongly immported and cannot be run at the
moment. This commit solves this issue.

[1]: https://github.com/odoo/odoo/pull/120062

closes odoo/odoo#124114

X-original-commit: b796704408d0511af2c310fde5964003dc25190e
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-06-07 14:43:27 +02:00
Bruno Boi e68c1d7308 [FIX] web: account for popper margins from style
**Before this commit**
Since [1] poppers margins computed from the style are
not taken into account.

**Additional note**
The commit [1] has been backported to 16.0 branch
right in front of this commit.

**After this commit**
This commit fixes that by taking those margins into account.

[1] b9551a50

closes odoo/odoo#124113

X-original-commit: 453f38527d0d232c886daa9dc71717f678918064
Signed-off-by: Damien Abeloos (abd) <abd@odoo.com>
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
2023-06-07 14:43:24 +02:00
Mehdi Bendali Hacine 2a6696ce02 [ADD] base: Add country states for Saudi Arabia
closes odoo/odoo#124021

X-original-commit: d9cc09381156d3c54c875eccfc455ee53d532dcd
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Josse Colpaert <jco@odoo.com>
2023-06-07 14:43:22 +02:00
Thomas Lefebvre (thle) f38732a85d [FIX] web: add default title when quick create event
Steps to reproduce:
-------------------
- go to a task in a project;
- in the chatter, schedule an activity of type "Meeting";
- click on open calendar;
- click anywhere on the calendar view.

Issue:
------
The event title is not pre-filled.
The name of the task must be noted each time.

Solution:
---------
When it is possible to create a "Meeting" type activity,
it is sometimes useful to have the name of
the record pre-filled on the quick create dialog.

opw-3324920

closes odoo/odoo#123964

X-original-commit: 5c738ba5525833d3bd4e32f3e4e9cf00ea129427
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>
2023-06-07 14:43:19 +02:00
Vivek Pathak 94601f6ec4 [IMP] survey: graph conditions change for MCQs with one answer
This commit improves the behavior of MCQs with one answer. Previously, when
there were multiple correct answers and any one of them was selected,
a "partial" graph was displayed instead of a "correct" graph. With this commit,
the behavior has been modified as follows:

- If the selected option is correct and has any score, the "correct" graph will
be shown.
- If the selected option is incorrect but scores are above zero, the "partial"
graph will be shown.
- If the score is zero or less and the option is not correct, the "incorrect"
graph will be shown.

Task- 3252605.

closes odoo/odoo#120629

Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2023-06-07 14:43:16 +02:00
Prakash Prajapati f418002be0 [FIX] hr: remove the quick create on the many2one_avatar_employee and many2many_avatar_employee widget
In this commit we have removed quick create option from many2one_avatar_employee and many2many_avatar_employee
 widget. because of There are too many faulty employees records coming from a
 quick Enter press on a list. 

Example:
    According to my attention when we do quick create then partner is not created.

task-3343117

closes odoo/odoo#124071

X-original-commit: 001b9c8b075d012568f7ea0890ab23b6d46cbed2
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-06-07 12:02:22 +02:00
Christophe Monniez 50967f0486 [REM] packaging: remove windows 32 bit support
Since may 2020, M$ stopped to ship their 32 bits OS.
So, there is no need to distribute a 32 bit version anymore.

This will reduce the package size by 2.

The new package will use Python 3.10 by default, that's why the
local requirements were changed (a wheel package was missing for windows
in the previous version of PyKCS11).

closes odoo/odoo#124057

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2023-06-07 12:02:20 +02:00
Benoit Socias b7a4538c51 [FIX] website: avoid having to scroll to access sub-menu after rotation
When a sub-menu needs to be opened in the navbar, it sometimes gets
nested within the navbar itself, making a vertical scrollbar appear
instead of floating outside the navbar, above the top of the page.
This happens if the navbar was opened in small screen sizes using the
hamburger icon, then, after a rotation, the navbar is turned into its
fully expanded version.

This commit hides the hamburger menu if the collapse toggler becomes
`display: none`.

Steps to reproduce:
- Add a sub-menu nested under the "Home" menu.
- Open the developer tools, enable mobile view.
- Select "Surface Pro 7" (Vertical 912x1368 - use "Rotate" if needed).
- Open the menu with the hamburger icon.
- Click on the "Rotate" button.
- Open the sub-menu by clicking on "Home".

=> The menu was displayed within the navbar causing a vertical scrollbar
to appear.

task-3247552

closes odoo/odoo#124046

X-original-commit: 02603d6e9f98488369ff61d31aa7f47e1bd21e6e
Signed-off-by: Colin Louis (loco) <loco@odoo.com>
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
2023-06-07 12:02:17 +02:00
Maitri Patel be7bcdaf7e [FIX] purchase: prevent traceback when creating PO without company_id
when the user removes the company_id and add a line in the purchase order
then the issue is generated.

Steps to reproduce:

- Create a new purchase order.
- Remove the company_id in the Purchase order.
- Now add a line in PO. Select a product with the consumable product type.
- Traceback will be generated.

Applying these changes will resolve this issue.

Sentry-4215579151

closes odoo/odoo#124035

X-original-commit: 75edec6f73b70c4b9b86ad67bc838f468c2574b7
Signed-off-by: Tiffany Chang <tic@odoo.com>
2023-06-07 12:02:14 +02:00
Walid 35d84b0c27 [FIX] mrp_account: remove related analytic line when WO is deleted
Steps to reproduce:
* Create an analytic account
* Create MO with Analytic Account
* Create WO on MO
* Create Time Tracking on WO
* Delete the WO

Bug:
The analytic line related to the work duration remains on the Account

Fix:
Remove the lines when the WorkOrder is deleted

opw-3174736

closes odoo/odoo#124014

X-original-commit: 59ebf21d126d9d5c93e97e6b404b23270050aa6f
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-06-07 12:02:12 +02:00
Chrysanthe (chgo) 3f5d8128ac [FIX] lunch: removing kanban border-bottom
=== ISSUE ===

If you open the lunch module with the Kanban view activated, there is
a border at the bottom of the view, which was previously used to create
a separation between two elements of different colors.

Since Milk brings a fresh new design, this border was removed on other
kanbans but not this one which makes it not consistent.

=== AFTER ===

We remove that `border-bottom` class to make the view consistent with
other kanbans.

task-3328235
part of task-3326263

closes odoo/odoo#123946

X-original-commit: 4e4846ac9c78ce6775baebf1a073bdc67164b6bb
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2023-06-07 12:02:06 +02:00
Julien Mougenot b445c80c7d [FIX] hr_holidays: Fix tour daterange race condition
Before this commit, the `hr_holidays_tour` tour failed randomly because
a many2one was set just before a daterange, without any kind of safety
check to ensure that all values are input sequentially.

When an update occurs on a record in a form view, a daterange will force
its inputs to be set to the record values. This is done to keep track of
onchanges and to ensure that the field is displaying the proper values.

The issue arises when the tour inputs the daterange values JUST BEFORE
the many2one value is actually committed and updates the daterange
field, in which case the tour values are lost before the daterange could
send an update to the record.

This fix adds proper safety checks in that tour to properly await for
the many2one value to be set before setting the daterange values.

closes odoo/odoo#123852

X-original-commit: 4abb28fb29a9bda6727fb3d04d5b0a017b99e123
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
2023-06-07 12:02:03 +02:00
Arthur Detroux (ard) 294291511f [FIX] website: go to / when no URL is defined on a tour
Prior to this commit, when a tour uses `getClientActionUrl` or
`registerWebsitePreviewTour` (which uses `getClientActionUrl`) but would
not define a `path` or a `URL` parameter, the function would add an
"undefined" string as the value of the path parameter of the generated
URL.

It is obviously wrong as this would lead to a `/undefined` page in the
iframe which is, in most cases, a 404.

There is at least one instance of this causing the tour to go on a 404
page which was introduced by [1], however, fixing the util makes more
sense as website preview has a default path.

This commit fixes that by checking if a path is defined in the
`getClientActionUrl` function.

[1]: https://github.com/odoo/odoo/commit/9fd5d25f59578abc9c608578a7d2e2953880b582

closes odoo/odoo#124063

X-original-commit: d69fac674d128f8ef47c096d63db653012f2d1fa
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2023-06-07 10:45:41 +02:00
Bruno Boi e73c533c72 [FIX] web: fix ModelFieldSelectorPopover arrows
Since [1], the model field selector popover has some style in order to
give its pointing arrow a custom color.
But the style only takes into account the upside arrow.
It should also take into account the downside arrow as this popover does
have the ability to switch direction when it could clip outside of
the viewport.

**Before this commit**
![top before]
![bottom before]
![left before]

**After this commit**
![top after]
![bottom after]
![left after]

[1]: bd4862774264c5169aa2dcf4cd80908c2f4c71bb
[left before]: https://github.com/odoo/odoo/assets/1159815/68387876-8372-4f6a-8a53-1ce1132547a0
[left after]: https://github.com/odoo/odoo/assets/1159815/5c80b095-efdd-4927-86fb-887d0a18fc3e
[bottom before]: https://github.com/odoo/odoo/assets/1159815/2bc2b5b4-ec90-4e10-ba6e-173ebeba9815
[bottom after]: https://github.com/odoo/odoo/assets/1159815/284a4e3c-db41-4d3d-ba5e-e6522c641770
[top before]: https://github.com/odoo/odoo/assets/1159815/b43ad7a9-e02f-451b-9871-707e5abdd694
[top after]: https://github.com/odoo/odoo/assets/1159815/efce4370-bf27-4ea8-8d65-e8bb2e9d9909

closes odoo/odoo#124038

X-original-commit: 3d8c55ce62cd5f21c18c1a50820ac551e9d98855
Signed-off-by: Romeo Fragomeli (rfr) <rfr@odoo.com>
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
2023-06-07 10:45:39 +02:00
Atul Patel dc3fe1e07e [FIX] account: fix duplicate constraint for journal
During upgrading the chart template will try to create
xmlid to existing records to avoid duplicate journal codes.
but there are some existing code journal which was inactive
and it was not unlinked so need to search for archived journal
too.

```
psycopg2.errors.UniqueViolation: duplicate key value violates unique constraint "account_journal_code_company_uniq"
DETAIL:  Key (company_id, code)=(1, EXCH) already exists.
```

closes odoo/odoo#124022

X-original-commit: 7264e664f5a665cea3cd4e9d4f40214c51442080
Signed-off-by: William André (wan) <wan@odoo.com>
2023-06-07 10:45:36 +02:00
Joseph Caburnay 6d786f1b47 [FIX] barcodes_gs1_nomenclature,point_of_sale: pos should load gs1
After https://github.com/odoo/odoo/pull/120070, pos is no longer loading the
assets of `barcodes_gs1_nomenclature`. We should, however, load them because pos
is dependent on the said addon thru `stock`.

And since pos no longer loads the legacy `web.core` module, we also need to
adapt the barcode_parser.js override to use a more modern module in importing
`_lt`.

closes odoo/odoo#123977

X-original-commit: 00c5a3171bceed6f84e76ca4819d20d0ef61bcc1
Signed-off-by: Heinz Robin (rhe) <rhe@odoo.com>
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-06-07 10:45:34 +02:00
Viktors Lipskis (vili) 6c9c52b398 [IMP] calendar: add allday recurring event test
This commit adds a test to make sure allday recurring events have correct dates.

task-3327004

closes odoo/odoo#123442

X-original-commit: ad0c6052d87e35128aabc3a2716dbbae4bc4ce36
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
2023-06-07 10:45:28 +02:00
Viktors Lipskis (vili) 57a2549941 [FIX] calendar: fix start date when quick-creating events
Before this commit, all instantiated events were reset to the initial start date
when quick-creating an allday recurring event. Now, each instantiated event
keeps the correct start date.

The problem occurred because start_date and stop_date values are included in the
context when quick-creating an event.

task-3327004

X-original-commit: 393251bf2b20b3fd150e60726d455749a1b0af36
Part-of: odoo/odoo#123442
2023-06-07 10:45:28 +02:00
Aurélien Warnon 7fbdf2ae8d [FIX] website_slides: allow portal users to share slides by email
Sharing content by email as portal is not working and raises an AccessRecord
because we are trying to access the "email_formatted" field of the company.

This is solved by adding 'compute_sudo' to the computed field.

Indeed, we want portal users to be able to read the email address of the
company while they cannot access res.partner records.

A tour has been adapted to ensure this behavior.

Task-3349132

closes odoo/odoo#124036

X-original-commit: a37cea5af70728106445eac8dc0ccf7a95054501
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-06-07 08:59:18 +02:00
Sébastien Geelen (sge) 335dd9a1e4 [FIX] web_editor: delete comment nodes on sanitize
During `to_inline` process, the document will be transformed to be email friendly.
This can add some `<!-- mso -->` comment into the document.

These comments nodes will create issues during future edition,
if we keep them in the editable.

So we add a sanitize step to remove all comments nodes.

task-3222474

closes odoo/odoo#124020

X-original-commit: b85a29d9ba36aaaa90e514ba45d1054b693a26e2
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Geelen Sébastien (sge) <sge@odoo.com>
2023-06-07 08:59:10 +02:00
Sébastien Geelen (sge) 74dc80e796 [FIX] web_editor: better urgent save for to inline html field
Reorganize the urgent save steps to call `_toInline` before the urgent `updateValue`.
This will give a chance to the _toInline to finish before the `updateValue`
if no asynchronous process is triggered during the inlining process.

In case we have some async stuff that delay the `_toInline` completion,
we keep the second `updateValue` which will wait for the asynchronous completion, as before.

task-3222474

X-original-commit: 85540a58a58b5f60b587697490fe837b3e4a69ec
Part-of: odoo/odoo#124020
2023-06-07 08:59:09 +02:00
Sébastien Geelen (sge) 722d5fb225 [FIX] web_editor: remove column in inline html field
Column (from bootstrap css) are broken during toInline conversion,
so we remove them from the commands in inlineStyle context.

During inlining of the document,
the css of bootstrap columns ( width, margin, padding, ...) is embeded
and hadcoded in the `style=""` property of the column div element.

After such a process, the edition system cannot work with these column anymore :
It cannot, for example, affect the number of column or remove a column via the powerBox.

If we leave those commands available,
after inlining, the column commands will always work as if there is no column present
at the current location in the document.

For example : Instead of changing the number of column, the user will
create a new set of columns inside a previously inlined column.

task-3222474

X-original-commit: caf4bbe153557249679e0eab2cdb90f9e04708f3
Part-of: odoo/odoo#124020
2023-06-07 08:59:09 +02:00
Sébastien Geelen (sge) 57aaca7555 [FIX] web_editor: prevent inline content on blur
Avoid inlining the content of html_field during blur
to ensure we don't break edition.

Blur occurred when opening dynamic placeholder popup or media modal.

If, during those process, we inline the document content,
the Editor will lose the reference to the current caret position inside the document.
Because Elements where overridden or changed by the `toInline` function.

If the editor cannot put the caret back in the previous correct position,
it will put it back at the end of the document.
And thus inserting the dynamicPlaceholder or new media element
at the wrong place inside the document.

task-3222474

X-original-commit: 28efe94a08d2747936ac4aa78f1d9e53545ee8b2
Part-of: odoo/odoo#124020
2023-06-07 08:59:09 +02:00
Sébastien Geelen (sge) 044f1b2db0 [FIX] web_editor: ensure t-out are inline
Force the sanitization after a dynamic placeholder is inserted.
By default the `<t>` tags are styled as block element,
except if they have the `data-oe-t-inline` attribute set.
The sanitization process ensure the `<t>` tags have this attribute.

With this change the new `<t t-out >` tags added as dynamic placeholder visual
are properly styled as inline elements.

task-3222474

X-original-commit: 08558502ea0726a97c80aae7d1e2084b2bf3952a
Part-of: odoo/odoo#124020
2023-06-07 08:59:09 +02:00
Sébastien Geelen (sge) 623729832f [FIX] web_editor: fix inline html_field
Revert changes made in #101768.

Wrong assumption were made in #101768
regarding inline conversion of html field.
I though Inline HTML field always had two Field,
one for the raw content and one for the inlined content.

This is not correct.

Some only have one (i.e. email templates).
They override the raw version and save the inline version directly.
In those case the inlining was not saved and was always reverted before saving.
This error is corrected here.

task-3222474

X-original-commit: 578600c506fab1461863decdaecaa414f6530eab
Part-of: odoo/odoo#124020
2023-06-07 08:59:08 +02:00
Dylan Kiss (dyki) 094ed83d4a [FIX] l10n_*: add missing tax closing accounts
* l10n_ae, l10n_ar, l10n_at, l10n_au, l10n_bg, l10n_br, l10n_ch,
l10n_cl, l10n_dk, l10n_es, l10n_hu, l10n_in, l10n_mn, l10n_nl, l10n_no,
l10n_pt, l10n_sa, l10n_se, l10n_sg, l10n_si, l10n_uk

Some localizations do not have any default account for tax closing.
This leads to the opening of a RedirectWarning when trying to do a tax
closing.

task-3082332

closes odoo/odoo#124003

X-original-commit: 14abe7acb11d522fb2b4a274ac0eb06d41e637ed
Related: odoo/enterprise#42071
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Signed-off-by: Dylan Kiss (dyki) <dyki@odoo.com>
2023-06-07 08:59:00 +02:00
Astik Singh 93659629bd [FIX] mass_mailing: mail content not transferring to mail body
Prior this commit:
While sending mail through CRM, the mail body doesn't show message content
in the mass_mailing module.

After this commit:
User will be able to see the message content inside Mail Body.

Task-3245572

closes odoo/odoo#123963

X-original-commit: a4549981790a6aa85ff59ea5ec6157c3ec3cfda6
Signed-off-by: Antoine Guenet (age) <age@odoo.com>
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-06-07 08:58:57 +02:00
Thomas Lefebvre (thle) 856f0f481c [FIX] hr_employee: synchronise if user is removed
Steps to reproduce:
-------------------
- create two employees (A and B);
- create a user;
- add the user in Related User of employee A;
- remove the user;
- add the user in Related User of employee B;
- change the Work Email of the employee B.

Issue:
------
The Work Email of the employee A is also updated.

Cause:
------
When we add a `user_id` to an employee,
we update the `work_contact_id` field.
Fields `mobile_phone` and `work_email` are inverse fields.
When we modify them, the `_inverse_work_contact_details`
method is called.
We update the `work_contact_id` linked to the employee.

When we delete an employee's `user_id`,
we don't update the `work_contact_id`.
Therefore, when we update an employee's `work_contact_id`,
we call the `_compute_work_contact_details` method
method for all employees who have the same `work_contact_id`.

The result is that we modify the `mobile_phone` and `ẁork_email`
fields for all employees linked to the `work_contact_id`.

Solution:
---------
Differentiate the case where the `user_id` is `False` (>< `None`)
when it is modified and does not contain
a value to "synchronise" the `work_contact_id`.

opw-3338188

closes odoo/odoo#123965

X-original-commit: 85ab51c7cf7c8ee011a903a9460e2aff1296f215
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>
2023-06-07 07:55:45 +02:00
Romeo Fragomeli d8128cb881 [FIX] web,website: website filter doesn't appear anymore
Since commit [1], the custom filter for website was disabled.
This commit restores the filter and adapts it for "Milk" redesign.

Steps to reproduce:
* Open the Website app
* Select the menu "Site" -> "Pages"
* Open the "Dropdown" in the SearchBar
  => Bug there is no filter for website

[1]: odoo/odoo@caef16ee4e

closes odoo/odoo#124042

X-original-commit: 9237ca777fb9c5e9bda03c2d0dbe0deed8e1b2e5
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-06-06 22:54:44 +02:00
Hubert Van de Walle (huvw) cfc049c0a9 [FIX] web: indeterministic test fail
Apply the same solution used in other tests with "test:hashchange":

```js
await testUtils.nextTick();
await legacyExtraNextTick();
```

closes odoo/odoo#124041

X-original-commit: 8bd9809bc4700637ffb26bbcfbd00c62b0dbd220
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
2023-06-06 22:54:41 +02:00
Valentin Vallaeys (vava) 129618ae41 [FIX] (stock_)delivery: no stock.picking in delivery
In this commit
https://github.com/odoo/odoo/pull/121354/commits/7d1092ba0e970170ce66e77e6ddc4cab0e09563d
the forward-port automatically moved the test to `stock_delivery` but
the code change remained in `delivery`. Since it handles `stock.picking`
on a `sale.order`, and that `delivery` does not depend on `stock`
anymore, it should move to `stock_delivery` as well.

closes odoo/odoo#123993

X-original-commit: d5b64650d043f94f8e244c993eff36ed26a93a32
Signed-off-by: Vallaeys Valentin (vava) <vava@odoo.com>
2023-06-06 20:27:41 +02:00
roen-odoo ba8d431704 [FIX] point_of_sale: correctly link credit notes and invoice from PoS
Current behavior:
When creating a credit note from a PoS order, the credit note is not
linked to the invoice of the orginal order.

Steps to reproduce:
- Make an order in the PoS, validate it and invoice it
- Make a refund of this order and invoice it too.
- Go to the credit note, the original invoice is not mentionned in the
  reference field.

opw-3150637

closes odoo/odoo#123976

X-original-commit: d3ff97f498e0fcc97ec32194988268a7e2afc631
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2023-06-06 19:19:48 +02:00
Daniel Kosky (dako) 9f8d4dd12a [FIX] base_vat: fix VIES option tooltip
The tooltip for the VIES vat check option on the res_config settings is
no longer relevant or accurate. This commit adds a new tooltip and a
translation term for it in the pot file.

task-3218194

closes odoo/odoo#123928

X-original-commit: 83810d56765f7bc8d8e4ddfce10acc0462a317a4
Signed-off-by: William André (wan) <wan@odoo.com>
2023-06-06 18:10:56 +02:00
bve-odoo 6efb6eb504 [FIX] sale_timesheet: avoid warning on none existing SO record
This commit is avoiding the creation of the upselling
activity on the compute not yet saved,
on upselling a service product (increasing the qty_delivered)
and clicking outside of the list view containing the SOL(s)
on a SO, on a SO create before the install of sale_timesheet.

Steps to reproduce in 16.0:
1. Install sale_management,
2. Create product.template of type Service,
3. Sale & Invoice it,
4. Install sale_timesheet,
5. Come back on previous SO and modify
the qty_delivered of the SO of the product (increase it).
That will set the invoice_status of the SO to 'upselling'
and generating a next activity for the salesperson.
6. Clicking outside the SOL will pop a Warning saying:
"Activities have to be linked to records with a not null res_id"

Every SO pre-install of sale_timesheet that are in state Sale Order
allow the modification of the qty_delivered field due to the field
"qty_delivered_method" being set to "manual" instead of "timesheet".
Which is not the case in the SO created post-install of the
sale_timesheet module.

After the fix, the next activity will only be trigger when clicking
on the SAVE button of the SO.

PS: the steps and install of module make the test impossible.

opw-3293686

closes odoo/odoo#123877

X-original-commit: 448a261d21d0d8e12477d8efa2ba0dfbf29c4a56
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-06-06 18:10:51 +02:00
Mathias Mathy (MAMA) 42bbe463c0 [FIX] stock,mrp: Wrong forecasting on widget
**Summary :**
When using a great decimal precision, forecast_widget shows red
neverthless the available quantity is sufficient.

**Steps to reproduce :**
 - In Settings >> Technical >> Database Structure >> Decimal Accuracy
    - For usage __Product Unit of Measure__, set __Digits__ to **__6__**
 - Create products of type storable :
    - __Test Component__ with a __Qty on hand__ of **__76.6__** Units
    - __Test Product__
 - Create a BoM for __Test Product__, with Quantity set to **__1__** Units
    - Add component __Test Component__ with Quantity set to **__15.32__** Units
 - Create a MO for BoM __Test Product__ with a Quantity set to **__5__** Units
    - Confirm the MO.

**Before :**
Neverthless the __To Consume__ qty is set to 76.6, which is equal to the
__Qty on hand__ of the component, the forecast widget shows red as if
there's an insufficient quantity of the component

**After :**
With help of the Odoo's __formatFloat__ method, we round the data used
in the comparison defining the __willBeFulfilled__.
The forecast_widget now display properly, taking into account the digit
precision setup in the database.

opw-3281588

closes odoo/odoo#123388

X-original-commit: 0d4b95e9d9d2218d6d9165f082e9f59d5025262d
Signed-off-by: Tiffany Chang <tic@odoo.com>
2023-06-06 18:10:45 +02:00
Brice bib Bartoletti d8fe293c02 [FIX] account: TestAccountComposerPerformance ubl
The aim of this commit is to make `TestAccountComposerPerformance` more robust.

Context:
In `TestAccountComposerPerformance` (account module), we are writing
on the field `checkbox_ubl_cii_xml`.
This field is instantiate by the `account_edi_ubl_cii` module which
might not be present.
This module get installed when `account` and `base_vat` are installed but
`base_vat` is conditionally installed.
(see `account/__init__.py` for the details)

We used this opportunity to also remove the call to `Form` as it wasn't
usefull.

Before the commit:
`TestAccountComposerPerformance` could fail in "weird" circumstance.

After the commit:
`TestAccountComposerPerformance` is safer

closes odoo/odoo#123218

Task-id: None
Signed-off-by: Laurent Smet <las@odoo.com>
2023-06-06 18:10:42 +02:00
mehjabinfarsana 002823c89d [IMP] mail: email subject width
before this commit, subject field in
email form view was short
and user has to scroll through
the field to see the full subject

after this commit, subject field is long
enough to see the content without
scrolling

closes odoo/odoo#123909

X-original-commit: 7b1732f1e13239191fcc3b9c467d6d1c343aa6bc
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-06-06 16:22:50 +02:00