Commit Graph
160378 Commits
Author SHA1 Message Date
jobl db07dbdf32 [FIX] web: remove bg img when layout bg is Blank
Currently, the boxed and striped document layouts still pass in the
default background image when set to Blank. This image is mostly hidden, but
displays artifacts when printing or changing background color in program
like Paint. This fix removes the background image from these layouts when
"Layout Background" is set to "Blank".

In v15, Odoo changed the way that Document Layouts can be configured by
allowing the Geometric background image to be set on any of the base layouts.
A conditional was added to the standard and bold layouts to check the
selection for the "Layout Background" setting, and to set an empty string
for Blank. This conditional is missing for boxed and striped, causing
the artifacting issue. This fix adds in that conditional, which
removes the artifacting.

opw-3232991

closes odoo/odoo#118921

X-original-commit: 92f28da10e4fa3c80be0759c131febb5e6289e20
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
2023-04-19 07:40:24 +02:00
Mayurrajsinh Rathod 245e174eb6 [FIX] website_slides: public_views field is now readonly
Before this PR:

The 'public_views' field is editable by the user.

After this PR:

The 'public_views' field is not editable from now onwards.

Task-3262249

closes odoo/odoo#118989

X-original-commit: b9b133dab12db9ec3d7231ea8d50f5188e98b5a6
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-04-18 21:23:42 +02:00
Jigar Vaghela 6eb8213d0e [IMP] l10n_in: Audit Trail
In Indian government required audit trail report for private limited companies
So from this commit user can't delete journal entries after posting once.

Create an audit trail report from mail.message to show a full log of journal entries

task - 3239932

closes odoo/odoo#118945

X-original-commit: f4365ee1c6e979e352ece66b03f3c00e830f2117
Signed-off-by: Josse Colpaert <jco@odoo.com>
2023-04-18 19:29:12 +02:00
Antoine Dupuis (andu) 33a9db123a [FIX] tools: XSD: handle ZIP files with URL not ending in .zip
In the case of the Basque country EDI, the ZIP archive containing the
XSD files is located at
https://www.gipuzkoa.eus/documents/2456431/13761107/Esquemas+de+archivos+XSD+de+env%C3%ADo+y+anulaci%C3%B3n+de+factura_1_2.zip/2d116f8e-4d3a-bff0-7b03-df1cbb07ec52
which does not end in .zip due to the hash at the end.

The current mechanism for detecting whether the file is an XSD or a ZIP
does not handle this, so the ZIP can't be downloaded.

Instead of trying to guess the file type from the URL, we therefore try
to open the file as a ZIP, and if that fails, we assume it's an XSD.

closes odoo/odoo#118933

X-original-commit: 0f1b128a8bcb01ecd5ca8a8db1dfa41230ecadda
Signed-off-by: Josse Colpaert <jco@odoo.com>
2023-04-18 19:29:08 +02:00
Gaetan Vanden Bergh (gavb) ac93d84388 [FIX] website_sale_wishlist: show rentable product in wishlist
Customers can add rentable and not soldable product
to their wishlist but can't see it in the wishlist page.

opw-3252518

closes odoo/odoo#118931

X-original-commit: ea126a2bee271ae2d80814cdf081833015870229
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-04-18 19:29:06 +02:00
Ipsita Borisagar b2103b06f7 [FIX] base, web: allow reading property fields when no access to parent record
This commit fixes a use case where a user would not be able to access the
property field values of a record because he did not have access to that
record's parent (from the property field definition configuration).

In a concrete example:
- In the Knowledge App
- Marc Demo has access to the "Article B".
- The parent article of "Article B" is "Article A".
- Marc Demo does not have access to "Article A".
- Article B has some property fields values configured.
- If Marc Demo tries to open "Article B" -> crash

This is caused by the framework having to read the property definition from the
parent record, which we don't have access to.
A "sudo" was added to allow that use case (which is supported).

In addition, this commit also adds further checks on the web client side to
gracefully handle a special use case where the end-user could not write on the
parent record because of record rules.
(It only checked *access rules*).

To avoid making an extra RPC every time we load the record (to check if we can
write on the parent), we only make that check when the user tries to modify
(add/edit/remove) a property and show a proper error message.
(This also applies when creating new property field tags).

Task-3062064

closes odoo/odoo#118929

X-original-commit: bc538f6944461a642bac0f757ec96d7f8cc14c9a
Related: odoo/enterprise#39946
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2023-04-18 19:29:03 +02:00
Stanislas Gueniffey ca7bb3f8a7 [FIX] web_editor: fix powerbox search term split
Before this commit, the term used to filter the powerbox commands was
split with a simple .split('') call, separating each character. This was
erroneous as it disregarded the fact that special characters are first
escaped with a leading backslash (e.g. '\['), the combination actually
representing a single character '['. Separating those pairs would render
the constructed regex invalid when using such characters, resulting in a
traceback.

This commit replaces the use of split with a match, regognizing the use
of backslashes for escaping.

closes odoo/odoo#118922

X-original-commit: e34e908a06c18ecee5d762f6fca785b23977f47d
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-04-18 19:28:57 +02:00
tsm-odoo e55ba11a89 [FIX] mail: fix message separator appearing after showing composer
closes odoo/odoo#118875

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-04-18 19:28:50 +02:00
Renaud Thiry c5bb2d0838 [FIX] web_editor: prevent editing of header
The way the live HTML editor for html_field works means the header
(and other nodes that should only appear once) are removed
and the content inserted inside the body.
This results in values being edited without the user being aware.

For emails, this results in any email using 'style' in the header
to break on GMail and other clients that do not support 'style'
outside of the header.

When an html_field is passed a value containing a header
the html_field appears readonly and the user is able to toggle
the code view. Which enables them to edit the 'raw' HTML and see changes
while preventing the presentation view from affecting the database value

task - 3035163

closes odoo/odoo#118920

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Thiry Renaud (reth) <reth@odoo.com>
2023-04-18 18:29:08 +02:00
Christophe Monniez 76989ab5a7 [FIX] requirements: adapt leftovers packages for Jammy
As the original PR was forgotten, let's achieve the JCVD style big gap
beteween Ubuntu stable and Debian stable 11.6 Bullseye.

closes odoo/odoo#118889

X-original-commit: f21c159d9f0c1a3f3f1f3a013c7bf0fc8fa8b554
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2023-04-18 17:25:46 +02:00
niyasraphy bcb245e749 [FIX] web: traceback on accessing home page
before this commit, after running an older version,
 lets say odoo 14 and trying to access 16 in the
 same browser return traceback without redirecting
  to db selector page

 and this happens due to the missing env in request,
 which returns as None.

 after this commit, no traceback wont be shown and
 will open the db selector page

closes odoo/odoo#118851

X-original-commit: 900303c18243e3b97414b3dbf5eb7ee5b8c9c080
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
2023-04-18 17:25:43 +02:00
Pulinckx Pierre (PIPU) 800223ae7c [REF] *: Replace underscore _.each() by native JS
Replaced _.each() functions (average 235 occurences)

Description of the refactoring this PR addresses:

Current behavior before PR:

There are underscore.js function enumerated above used in odoo.

Desired behavior after PR is merged:

These functions has been replaced by native javascript
prototypes/methods/functions.

TaskId : 3246238

closes odoo/odoo#118565

Signed-off-by: Georis François (fge) <fge@odoo.com>
2023-04-18 15:38:54 +02:00
Louis Baudoux 1a965a8045 [IMP] mail: add the ability to set the author of the tracking message
A new `_track_set_author` method is now available to explicitly set the
author of the tracking messages.

Related Enterprise PR: odoo/enterprise#38986

closes odoo/odoo#117073

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-04-18 15:38:49 +02:00
xO-Tx 2ecf25daf8 [FIX] website: fix images loading on Images Wall masonry layout
On Chrome, and while adding a new image to Images Wall snippet (on
"masonry" layout), The layout adaptation method will remove the snippet
content to reinsert new images.

Sometimes, the appended images are invisible and not correctly loaded
(only when Chrome cache is enabled).

In this commit, we append a "clone" of each image to the snippet
container to prevent this behaviour.

opw-3240231

closes odoo/odoo#118658

X-original-commit: https://github.com/odoo/odoo/commit/0d43aec24baad6420e0fe150a9c19d33c0b74198
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-04-18 13:47:23 +02:00
xO-Tx 19624e51d1 [FIX] website: hide Layout options on Images Wall
In this commit, the "Layout" options are hidden for the "Images wall"
snippet, since it has its own options to handle the layout.

opw-3240231

X-original-commit: https://github.com/odoo/odoo/commit/eb9d84aacc863572c2c2181b9eabb260e9ecc2b5
Part-of: odoo/odoo#118658
2023-04-18 13:47:22 +02:00
xO-Tx 27922ed05f [FIX] website: fix images removal on images wall snippet
Steps to reproduce (the issue occurs only on Chrome):

- Go to website > Add an "Images Wall" block > Add images and save.
- Then try to add more images > new images are removed immediately.

Right after adding a new image to the snippet, the whole content will
be removed (see `registry.gallery` > `mode()`) and replaced with new
images in the current layout.

This adaptation will trigger a `historyStep()` on the editor side while
the "unbreakable protection mechanism" is detecting node changes inside
unbreakable ancestor and setting `_toRollback` to a truthy value,
leading to undo the last updates...

The goal of this commit is to fix this behaviour by preventing the
unbreakable protection code to be applied on image wall layout
adaptation.

opw-3240231

X-original-commit: https://github.com/odoo/odoo/commit/93b1751ff10374e21750da71ad84b7607f30371f
Part-of: odoo/odoo#118658
2023-04-18 13:47:22 +02:00
Mathieu Duckerts-Antoine d1c40391ac [FIX] web: clickbot: fail on Advanced Search
The commit https://github.com/odoo/odoo/commit/1c374b9b0509f7d39b9d02d2f3dd7f9728aeee28 has replaced the
old "Add Custom Filter" item of the menu "Filters" by a new item
"Advanced Search" that works differently. This made the test clickEverywhere
fail. We adapt that test.

closes odoo/odoo#118884

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2023-04-18 12:41:35 +02:00
tsm-odoo a2a4cd56ec [FIX] mail: fix reply to author avatar
This PR fixes a bug where the author avatar of the parent message of
a reply had the wrong avatar (the one of the  of the reply
author instead of the one of the parent message author).

closes odoo/odoo#118878

Signed-off-by: Debondt Didier (did) <did@odoo.com>
2023-04-18 11:33:48 +02:00
Benoit Socias 02ed9f5e66 [FIX] website, *: avoid using unescaped query parameters
*: google_recaptcha, web_editor, website_blog, website_event_booth,
   website_event_exhibitor, website_event_track, website_forum,
   website_jitsi, website_sale_comparison, website_slides,
   website_livechat, website_twitter

This commit fixes improperly escaped query parameters across javascripts
of website-related modules.

See https://github.com/odoo/enterprise/pull/31711

closes odoo/odoo#118599

X-original-commit: 89be076aa51b097ada48d0046006be4d9692ac1e
Related: odoo/enterprise#39783
Signed-off-by: Bojabza Soukéina (sobo) <sobo@odoo.com>
2023-04-18 11:33:46 +02:00
Carlos Serra-Toro 5f0663b522 [FIX] l10n_ch: Inconsistent return for _find_or_create_bank_account()
The method `_find_or_create_bank_account()` is defined for an
account.bank.statement.line so that it returns either the bank
account found or created. The extension made by l10n_ch does not
return the record found/created by a call to super(), which may
break reconciliations.

The code for the reconciliations in which a record is expected to
be returned can be seen at: https://github.com/odoo/odoo/blob/
c0eb0d41a3e6c1c766278884a745d45952799393/addons/account/models/
account_bank_statement.py#L1232.

The original implementation of `_find_or_create_bank_account()`,
where a record is returned always, is at: https://github.com/
odoo/odoo/blob/c0eb0d41a3e6c1c766278884a745d45952799393/addons/
account/models/account_bank_statement.py#L1282-L1291.

closes odoo/odoo#118451

X-original-commit: 6c7385c74fafbe84042261e29565a77e2ca0c03c
Signed-off-by: Laurent Smet <las@odoo.com>
2023-04-18 11:33:40 +02:00
Antoine Guenet b90b0904f0 [FIX] web_editor: properly undo unlink
When clicking on a button from the link popover, the popover gets
hidden, which pauses the editor's mutation observer until the popover is
fully faded out. This is problematic when the button in question calls
an editor command which we need to be able to undo, since the mutation
observer will still be paused during the command execution. This lets
the buttons' listeners handle the hiding of the popover themselves to
prevent this race condition.

closes odoo/odoo#118248

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-04-18 10:29:49 +02:00
Antoine GuenetandBenoît Socias bd21ea8323 [FIX] web_editor: implement unlink without relying on execCommand
Before this commit when a button containing a text then an icon was
unlinked in Chrome, all further buttons were also unlinked (see steps
below).

It turns out this bug is due to the browser's `execCommand`
implementation so this commit reimplements the feature without relying
on it.

Steps to reproduce (in website module):

* drop Text+Image snippet twice
* inside first button type /image and insert a pictogram after the text
* click on the text of the first button => the link popover appears
* click on the unlink button of the popover
=> both buttons become flat texts in Chrome
=> nothing happens visually in Firefox, but the <a> actually gets
turned into a <span>

task-2778912

Part-of: odoo/odoo#118248
Co-authored-by: Antoine Guenet <age@odoo.com>
Co-authored-by: Benoît Socias <bso@odoo.com>
2023-04-18 10:29:49 +02:00
pedrambiria 5632ad99e3 [FIX] pos_loyalty: use float_compare to compare points
After this commit, we will be using float_compare function to compare
points. This will ensure that any floating point errors are properly
handled and that we receive correct responses from the
`validate_coupon_programs` function.

opw-3264681

closes odoo/odoo#118829

X-original-commit: 48013733a6e8b655cbc81211b1010e76102b9c2a
Signed-off-by: Heinz Robin (rhe) <rhe@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
2023-04-18 09:24:39 +02:00
Lois Rilo 3296aee6cf [IMP] mrp: hook method to control auto confirmation of MOs
There is a bit of a dance on the lambda function to filter the MOs
that should be autoconfirmed out of a procurement. To the point
that the logic is different in v14 and v15/16.

Refs:

- v14: https://github.com/odoo/odoo/commit/5fd6c7251331de2600eaee76114b76f535652fec
- v16: https://github.com/odoo/odoo/commit/2ab878aecb67930a9a7cd35901cb6c4b98c7e442
- v16 previous: https://github.com/odoo/odoo/commit/2b003b8d3917b45772b5f16edf21292446e96601

It would be great for partners to be able to extend it and be able
to control the logic used even if the default behavior gets changed
again.

closes odoo/odoo#118761

X-original-commit: 3c5c00c6bf63a90d747ddc74b31cdced0116d74d
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2023-04-18 09:24:36 +02:00
niyasraphy fd9a4c2101 [FIX] repair: hide cancel button in done state
Before this commit, the cancel button is visible in the done state and
on clicking showing the validation that it cannot be cancelled.

by the commit:
https://github.com/odoo/odoo/commit/8d37cf462badc25d911d3fa6d3382c6f7418904f
one of the cancel button in the form is made hidden in the done state,
similarly applying for the other cancel button also.

also currently on trying to delete a done repair order, it says to
cancel first and then delete the order, from the commit:
https://github.com/odoo/odoo/commit/8d37cf462badc25d911d3fa6d3382c6f7418904f
cancelling a done record is prevented, thus modifying the warning
message and its related pot file

After this commit, the cancel button will not be visible in the done
state.

closes odoo/odoo#118726

X-original-commit: 981f804ff507f693a395bb1146a33eb5f06d84a3
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-04-18 09:24:33 +02:00
Wolfgang Taferner fcbf264d52 [FIX] mrp_subcontracting_dropshipping: technical fields should not trigger UserError
As a display line does not need to fulfill the dropship check, we skip those
and we do give the user a hint which lines are potentially not fulfilling
the check.

Reproduce:
- Create a purchases order with a picking type for dropshipping
- Add a different destination address (i.e. of another subcontractor to follow up the next manufacturing process)
- Add products with a defined BoM with type subcontractor and vendor
- Additionally add a section or a note
- Try to confirm the purchase order

Result:
- A user error will be triggered about a line which does not fit the current use case

Solution:
- as a section or a note should not be checked we do not trigger for those
- for other products which do not fit the use case we let the user know which lines are blocking

closes odoo/odoo#115044

X-original-commit: 5ba435d1ece208453fc73993b8018c68bb5f889d
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2023-04-18 09:24:31 +02:00
Thomas Lefebvre (thle) 4d07f55335 [FIX] hr: add private contact to employee's followers
When creating an employee with a private contact,
the contact will not be automatically added to the employee's followers.

The desired behavior is that the contact is added
to the followers even if it has a private address.
Commit: 8760a4d0575ecdb175f73a2f2674d93962fe905d

However, this behavior will not be possible because
adding a contact with a private address is forbidden.
Commit: 20536e1bbeb641539c0de44364f8376e7cef651b

Solution:
The solution is to use the private method `_message_subscribe`.
This is not a problem in the business case.
Indeed, the people who have access to the employee's file
also have access to the private contacts.
Moreover, the access rights of the public method `message_subscribe`
do not concern this business case.

opw-3249646

closes odoo/odoo#118843

X-original-commit: f53d4a28d46baaed4c862392b36bcaa73b642336
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>
2023-04-18 08:26:25 +02:00
pedrambiria 1b0f7fb06e [FIX] *_mail_plugin: create a record with the partner's company
Before this commit: if the partner belonged to "Company B" and the
default company was "Company A", it would cause an issue during
the creation of the record (opportunity, ticket, ...) from the mail plugin.

Community PR: https://github.com/odoo/odoo/pull/112088

The solution is to use the partner's company to create.

opw-3141578

closes odoo/odoo#118831

X-original-commit: 21dc6cd01d9262fdf0007249194857e4b75e695e
Related: odoo/enterprise#39903
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
2023-04-18 08:26:23 +02:00
Thomas Lefebvre (thle) 9b7c74cadc [FIX] hr_holidays: correct condition with requires allocation
The field `requires_allocation` is a selection field
that is required.
Using it in an if statement without a comparison
operation will always return true.

opw-3274826

closes odoo/odoo#118854

X-original-commit: 486498ddf1d29c7fc58107e83421686ace30ff4f
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>
2023-04-18 07:21:57 +02:00
Maruan Aguerdouh (magm) 5e637beeb9 [FIX] account: show suggestion only after second line and don't apply taxes from suggestions
Steps to reproduce:

- Go to accounting > journal entries > create a new journal entry.
- Add a line with an account.
- Add a second line.

Previous behavior:

We are going to get in the second line a suggestion of the first line
introduced, also even if we don't select the suggestion the taxes of
the suggestion will be applied.

Current behavior:

As discussed with the PO, we only want to get suggestions when we used 2
accounts in a row, so the 3rd line will be the one getting the
suggestion. And we also avoid seting the taxes of the suggestion if we
don't select it.

Related to #39784

opw-3098361

closes odoo/odoo#118865

X-original-commit: 927890d0178c361ef8d80fe6a1ec2ffaefaf73fd
Related: odoo/enterprise#39921
Signed-off-by: William André (wan) <wan@odoo.com>
2023-04-18 03:10:47 +02:00
Pratik Awasthi b20220cd4d [FIX] planning: fix project onboarding tour steps
Before this commit, the project onboarding tour: the step to create a new stage
get validated if the user clicks on the 'add' button without actually creating a
new stage

After this commit, it will point first to the text area for the name and then
add tooltip will be highlighted so tour does not consumed without adding the
stage.

task-3049636

closes odoo/odoo#118825

X-original-commit: 255fa6245114531d3a0fad4f4f0739e5ab57d3b8
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-04-17 19:07:48 +02:00
Pratik Awasthi 0ace060fc1 [FIX] base: display Other category in warning message if debug=false
Before this commit, when the user changes the access rights of another
user, he will see a warning message the other access rights will change
with his changes. In that warning message, `Other` category could be
displayed and that category is only displayed in the user form view if
the user is in debug mode since it is a Technical category.

This commit hides the `Other` category in the warning message when the
user is not in debug mode to be consistent with the visibility of that
category in the form view.

task-3049636

X-original-commit: 9998ec50652a0c9b66e5f2b2c0ef5ce30861b79f
Part-of: odoo/odoo#118825
2023-04-17 19:07:48 +02:00
MerlinGuillaume 00adcfa2fc [FIX] web: datepicker locale, warning and hide behaviour
An error is raised when trying to set the date of a note in the
activities

Steps to reproduce:
1. Install Notes
2. Click on the activities icon (top right of the screen)
3. Click on 'Add new note'
4. Set a date to the note
5. An error is raised

Solution:
Use the eventDate only if the input is set, get the locale from the
getOptions function and set the datepicker warning regardless of where
we get the date from

Problem:
`this.date` can be undefined

closes odoo/odoo#118824

X-original-commit: eeae6c92bf7343d046a81ef2ae8b80443b353ad0
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
2023-04-17 18:01:34 +02:00
sofiagvaladze faf0f0130b [FIX] hr_recruitment: correctly count the number of applications
Previously, the "Other applications" smartbutton was incorrectly
matching with the applicants with '' on the fields. We don't want
applicants to match if both of them has '' on the matching fields.
Moreover, record rules were not correctly applied for application_count
calculation, as current record will not match with similar record
which has no company defined on it.

This commit fixes the above mentioned issues.

task - 3266694

closes odoo/odoo#118805

X-original-commit: e8263e56423432e9465f70d26fce60c021eabaa2
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-04-17 18:01:26 +02:00
Alexandre Kühn 79b30f13b8 [FIX] mail: border style of composer in edit message
closes odoo/odoo#118802

Signed-off-by: Debondt Didier (did) <did@odoo.com>
2023-04-17 18:01:24 +02:00
Antoine Dupuis (andu) d1834758ea [IMP] tools, account: remove XSD crons; download XSD button
At the moment, XSD files are automatically downloaded at database
initialization, which is quite unnecessary.

The idea is to change Odoo's use of XSDs from being systematically
downloaded and used for validation to simply being available if desired
(e.g. for development or for customers who want them).

To achieve this, this commit does the following:

- remove the XSD download crons;
- provide a 'download XSDs' button in the Settings (next to the debug
  mode button) which is available in debug mode;
- skip XSD validation if any required XSD file is not present; and
- deprecate the 'force_reload' option.

Entreprise PR: odoo/enterprise#38350
Task id: 3010716

closes odoo/odoo#118790

X-original-commit: c8174c7914e567489de74b574b076467440bdb2d
Related: odoo/enterprise#39879
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Antoine Dupuis (andu) <andu@odoo.com>
2023-04-17 18:01:18 +02:00
Victor Feyens f2ce4b4d46 [FIX] account_payment: show payment link action to accounting users
The 'Generate payment link' action on account move records was only
shown to the users of the group 'Show Full Accounting Feature'
(and to salesman when sale is installed).

This means that if you only have invoicing app (`account` module) installed,
you don't see the action.

This commit makes sure the action is visible to all accounting users, like
the refund wizard.

closes odoo/odoo#118800

X-original-commit: 8cf2aebe9582a12b0f2309f25844e0b2d82ed3e2
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-04-17 16:35:11 +02:00
Géry Debongnie 9a1dd53f89 [IMP] web: update owl from 2.0.9 to 2.1.1
This update contains the following commits:

[FIX] components: solve missing update (concurrency issue)
[DOC] remove old references to comp for useRef hook
[FIX] devtools: Fix build commands for windows users
[FIX] devtools: Fix devtools in detached window
[IMP] devtools: Add a button to navigate to the doc
[IMP] devtools: Add devtools documentation
[IMP] Allow app to be mounted in shadow DOM
[IMP] playground: allow sharing playground links
[IMP] runtime: allow validating object values using a type description
[FIX] devtools: Increase vertical padding of the search bar
[FIX] devtools: Hide the collapse all button
[FIX] devtools: Fix bad computation of highlight boxes on the page
[FIX] package: Auto-update package-lock.json

closes odoo/odoo#118798

Notes: https://github.com/odoo/owl/releases/tag/v2.1.1
X-original-commit: a57cd7b2f84a4ebc06f93cabb903d1ff6f23e23c
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Géry Debongnie <ged@odoo.com>
2023-04-17 16:35:09 +02:00
Didier (did) f11ab40c3e [IMP] mail: rename update function and cleanup dead code
closes odoo/odoo#118793

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-04-17 16:35:06 +02:00
Hubert Van de Walle (huvw) a6d65cac43 [FIX] mass_mailing: unregister ResizeObserver on unmount
Steps to reproduce
==================

This only seem to happen on Firefox

- Go to Email Marketing
- Open a campaign
- Go back to the homepage by using the topleft square button

-> `$(...).offset() is undefined`

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

The ResizeObserver used in MassMailingFullWidthViewController is still
triggered, even though it shoudln't.

Solution
========

Disconnect the observer when the component is unmounted.

opw-3271101

closes odoo/odoo#118785

X-original-commit: d5f6bc2b33c3b83520ed2ed710610b69dbe67b75
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
2023-04-17 16:35:03 +02:00
Mahdi cheikh rouhou (macr) bce7da2a38 [FIX] account : forbid recipient bank update on posted bill
When updating the recipient bank on a posted vendor bill the chnages
will not be saved.

Steps to reproduce the error:
1-Go to accounting
2-Create a vendor bill and confirm it
3-Change the bank recipient and click manual save
4-Reload and you can see the changes disappeared

The error was happening because the recipient bank was not displayed as
readonly on a posted state of the account move.

opw-3247282

closes odoo/odoo#118783

X-original-commit: 7e7ca95080a601ccf5c0da679aae00a61a9f8ccf
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: Mahdi Cheikh Rouhou (macr) <macr@odoo.com>
2023-04-17 16:35:00 +02:00
Raphael Collet 4c5cdf5f09 [FIX] core: new() always rounds floats that are put in cache
When new records are used to precompute some fields, the computations
are expected to use the "right" values for floats, in particular float
fields are expected to be rounded.

closes odoo/odoo#118518

Signed-off-by: Raphael Collet <rco@odoo.com>
2023-04-17 16:34:47 +02:00
aliya 8590c6a929 [IMP] account_edi_proxy_client,l10n_it_edi: remove edi format dependency
Edi format is going to be removed eventually - `account_edi_proxy_client` should not depend on it and be more flexible in general.

This commit:
- Removes edi_format field from `account_edi_proxy_client.user` model. We still have to add them in `l10n_it_edi` as it still heavily relies on edi format for now.
- Adds a way to have a unique edi user per company, proxy user, edi mode combination.

This is a necessary step before adding peppol, which will also depend on the account_edi_proxy_client

closes odoo/odoo#116059

Related: odoo/upgrade#4458
Signed-off-by: Laurent Smet <las@odoo.com>
2023-04-17 16:34:44 +02:00
Louis Baudoux a7710b32ba [FIX] partner_autocomplete: fix search by VAT number on Many2one fields
Since the Owl conversion of the partner autocomplete widgets, the search
by VAT number on a `Many2one` field of `res.partner` wasn't working
anymore.

closes odoo/odoo#118784

X-original-commit: 6229674b1788b4e9b62ebc5393e2d09b68b4a56e
Signed-off-by: Florian Daloze (fda) <fda@odoo.com>
Signed-off-by: Louis Baudoux (lba) <lba@odoo.com>
2023-04-17 15:19:06 +02:00
luvi 99ac5eafc7 [FIX] web: improve search in ExportDialog
This commits aims to improve the search feature in the export dialog.
Now, the search isn't resetted when a field is added to the export list
anymore. It is also possible to search in the list of fields using the
technical name of the field.

A test has been added for the search feature in debug mode, and another
one has been adapted to verify that the search input still contains the
string previously entered.

task-3266632

closes odoo/odoo#118767

X-original-commit: 83e58a0e7e1a6f50ad03a098829946d56393d496
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-04-17 15:19:03 +02:00
luvi d5c38635ed [FIX] web: improve export dialog fields search
This commit fixes the search feature of the export dialog. Before this
commit, it was impossible to display subfields that would match the
search pattern, since the filter was only applied to look for fields
at the 'root' of the available fields.

Now, it is possible to search and find subfields that matches the
pattern, and they are displayed inside their expanded parent(s).

A test has been added and verify the search feature.

task-3245492

X-original-commit: cd581aa41874dadb5c87605ed49b105959f1b222
Part-of: odoo/odoo#118767
2023-04-17 15:19:03 +02:00
niyasraphy 26ad6704f9 [FIX] base: alignment of ir.actions.act_window.view form
before this commit, the form view of
ir.actions.act_window.view was not properly aligned.

* open any menu linked with type ir.actions.act_window
* click on Edit Action from debugger button
* click on Add a line from the View one2many field

after this commit, the view will be
aligned properly.

closes odoo/odoo#118764

X-original-commit: 369a8cfca3f8165d6a7b6849b65564e396de9e76
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
2023-04-17 15:19:00 +02:00
Bastien (bvdn) fd36b064e5 [FIX] project: change task sort > priority then state
closes odoo/odoo#118747

X-original-commit: 5ba3f75
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-04-17 15:18:57 +02:00
Nasreddin Boulif (bon) c78edec4d5 [FIX] mail_thread: save attachment from mail in same encoding
Steps to reproduce:

  - Configure incoming mail server and set it to create X record
    on incoming mails (X can be any model with a chatter)
  - Create a CSV file and set the encoding to UTF-16
  - Send the CSV file through Gmail to the Odoo instance
  - Go to model X and open the created record
  - In the chatter, click/download the CSV file
  - Open the downloaded file with Geany (or any file editor that can
    show the file encoding)

Issue:

  The file encoding is not the same as the original file (utf-8 instead
  of utf-16).
  Working with Outlook.

Cause:

  The difference between Outlook and Gmail is that Gmail provides the
  charset of the file.

  The content of the mail is retrieved using `email` python lib.
  The lib will try to retrieve the charset of the file and fallback
  on `ASCII` if not available, then return the decode content.

```python
  def get_text_content(msg, errors='replace'):
    content = msg.get_payload(decode=True)
    charset = msg.get_param('charset', 'ASCII')
    return content.decode(charset, errors=errors)
```

  Example:
  content = b'd\x00a\x00,\x00,\x00,\......'
  Outlook:
  charset = 'ASCII'
  return => 'd\x00a\x00,\x00,\x00...'
  Gmail:
  charset = 'UTF-16LE'
  return => 'da,,,,,\n,,,,,\....'

  In the post process of the attachment, the content is encoded in
  'utf-8' (to then encoded in base64) before creating the attachment
  record.

  Content encoded to 'utf-8':
  Outlook: b'd\x00a\x00,\x00,\x00...'
  Gmail:  b'da,,,,,\n,,,,,\n....'

  Therefore, when writing the file on the disk, the encoding is based
  on the binary content.

Solution:

  When parsing the mail, add the encoding charset to the `info` variable.
  Then, when creating the attachment, use the charset in `info` (or
  fallback on 'utf'8' if no charset set) to encode the content.

opw-3089009

closes odoo/odoo#118694

X-original-commit: 2d1b13e68d8bb204ecfe12a9d3db519c4264592c
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Nasreddin Boulif (bon) <bon@odoo.com>
2023-04-17 15:18:54 +02:00
Nemael f80e2aad37 [IMP] mail: add banner on archived channels
This PR adds a banner on archived channels in detailed view
It also adds a banner on archived channels in kaban view, and
reduces the space available for description in case of banner.

Task-2494469

closes odoo/odoo#117619

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-04-17 15:18:51 +02:00