Commit Graph
164380 Commits
Author SHA1 Message Date
Yannick Tivisse 9aa04f18d9 [FIX] base: Make user apikeys ondelete cascade on user_id
This could prevent the user deletion if linked to a record of this
type, like a auth_totp.device which inherits from this model.

Part-of: odoo/odoo#114656
2023-03-13 13:13:48 +01:00
Yannick Tivisse 4518a768eb [IMP] website_forum: Allow user deletion if linked to post vote
Purpose
=======

Currently the on_delete='restrict' implicit constraint prevents
the user deletion in case it's linked to a forum post vote.

Set the on_delete attribute to 'cascade' as the record is not
really a critical data.

Taskid: 3222941
Part-of: odoo/odoo#114656
2023-03-13 13:13:48 +01:00
Yannick Tivisse 1223705bbc [IMP] calendar,hr_work_entry: Allow user deletion if linked to filter
Purpose
=======

Currently the on_delete='restrict' implicit constraint prevents
the user deletion in case it's linked to a personal calendar filter
record.

Set the on_delete attribute to 'cascade' as the record is not
of any usage without the user anyway.

Taskid: 3222941
Part-of: odoo/odoo#114656
2023-03-13 13:13:48 +01:00
Yannick Tivisse 2e51c2b5f4 [IMP] mail: Allow user deletion if linked to mail.activity
Purpose
=======

Currently the on_delete='restrict' implicit constraint prevents
the user deletion in case it's linked to a mail.activity record.

Set the on_delete attribute to 'cascade' as the record is not
of any usage without the user anyway.

Taskid: 3222941
Part-of: odoo/odoo#114656
2023-03-13 13:13:48 +01:00
Yannick Tivisse d8c9c8d10b [FIX] base: Handle portal user deletion separately
Purpose
=======

Improve the portal user deletion by preventing timeouts and
avoiding several rollbacks causes.

Specifications
==============

- Move the portal users deletions from autovacuum to its own cron.
  On big databases such as odoo.com, deleting a res.users takes
  more than 1 minute. Move the whole process into its own scheduled
  tasks.
- Commit the deletion at each user. As said previously the deletion
  can be expensive, so commit what has been done to avoid having to
  delete the same user again in case of rollbacks or timeout.
- Delete the user and the partner separately. If the partner is used
  in a sales order for instance, the unlink is possible for the user
  and not the parner. It allows to unlink the user and keep the
  partner in case it cannot be deleted.
- Re-call the cron into another transaction in case there are too many
  users to delete, instead of waiting next call, that is supposed
  to occur the day after.

Taskid: 3222941
Part-of: odoo/odoo#114656
2023-03-13 13:13:47 +01:00
fdardenne e390cc8e23 [FIX] web: popover service: prevent the crash when undefined target
This commit fixes the same problem as the commit #113284

The previous commits partially fixed the solution, but the target can
still disappear between the moment where the `popover_service` adds the
popover and the moment where the setup of `PopoverController` is called.

The solution of this commit is the last defence against the undefined
target, #113284 will be kept as it prevent some owl computation if the
target is undefined at this state.

closes odoo/odoo#115032

X-original-commit: f6c309e595bf76d8ed8bb8c19228795572a8760c
Signed-off-by: Géry Debongnie <ged@odoo.com>
Signed-off-by: Dardenne Florent (dafl) <dafl@odoo.com>
2023-03-13 12:02:04 +01:00
Martin Maes a9ac6d6235 [FIX] stock: picking filters
The 'To do' picking filter made no sense as it used to check the pickings
that are not assigned or assigned to the user.
The new behavior corrects it by checking if the previously selected pickings
are not in a 'done' or 'cancel' state.

task id : 3087740

closes odoo/odoo#111648

Signed-off-by: Steve Van Essche <svs@odoo.com>
2023-03-13 12:01:52 +01:00
Arnold Moyaux fde450b599 [FIX] stock_account: reconcile kit
Kit were not reconcile because the `_stock_account_anglo_saxon_reconcile_valuation`
method try to match `account.move.line` and `stock.move` base on the
product field. However in kit case, the moves are exploded in mutliple
moves containing the kit's components. Due to that the matching is not
made.

To fix this issue we use the `purchase.order.line` that is share between
the `stock.move` and `account.move.line` to retrieve them.

closes odoo/odoo#114987

X-original-commit: f594c837c8a347abb48015d4e9bb0d5109228539
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-03-13 10:53:04 +01:00
Arnold Moyaux e19bbf8c89 [FIX] stock_account: reconcile same product only
-Create 3 products with different costing methods: AVCO, FIFO, Standard
-Create a PO for the 3 items (same quantity and unit price in every line)
-Receive
-Create Vendor Bill
-Check Journal items.

You will notice that the AVCO product is marked as partially matched. Please keep
in mind that this only happens when the 3 costings are used and the unit price
is the same.

It happes because `_get_all_related_aml` returns all the
`account.move.line` for the journal entry and invoice.
But not only for the current product. So if they share the same
price unit then it could reconcile lines for different products.

X-original-commit: 23ccf2c1bde84f03aaaedb206e37a35de701da5e
Part-of: odoo/odoo#114987
2023-03-13 10:53:03 +01:00
Petar Najman 62a08bfa0a [FIX] web: Quoted cookie values are not handled by cookie_utils.js
When we set a cookie value (i.e. 'frontend_lang') on backend which can contain "invalid" character like @ (i.e. Serbian lang code: sr@latin) that cookie value will be double-quoted by werkzeug, so our example cookie will end up like: frontend_lang="sr@latin" instead of what's expected on the front-end: frontend_lang=sr@latin.On the front-end side we need to remove that additional double-quote before returning the actual cookie value.

closes odoo/odoo#114565

X-original-commit: 2631c8a39ccb03f5a0f142e479e3264f8885c5d2
Signed-off-by: Géry Debongnie <ged@odoo.com>
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
2023-03-13 10:53:00 +01:00
Petar Najman fd5a082984 [FIX] base: Invalid flag image url computed for Serbian lang sr@latin
When computing flag_image_url field on res.lang model an invalid url is generated due to the peculiar format for serbian lang code sr@latin which has "@" sign instead of expected "_" sign and thus the unexisting url is computed, so we are forced to populate binary field flag_image instead.

X-original-commit: 85db3773ba475a143a99126c6c24b404bdd39d0b
Part-of: odoo/odoo#114565
2023-03-13 10:53:00 +01:00
Petar Najman e71fe9820a [FIX] web: Locale not loaded for Serbian lang
In Serbia there are two language codes and those are `sr_RS` (Cyrillic) and `sr@latin` (Latin). Inside of the `web/static/lib/moment/locale` folder, the two langs are registered as `sr-cyrl.js` and `sr.js` respectively. The `load_locale` controller wasn't loading the right langs for neither case.

X-original-commit: 65d5ab801f22b42a0f94fe4b86f68ace451ea184
Part-of: odoo/odoo#114565
2023-03-13 10:53:00 +01:00
William Henrotin 18e920831b [FIX] product_expiry: don't cast datetime in date
The `date` widget, when used with a datetime value, doesn't offset the
value relative to the session timezone. This can lead to strange issue
like this following one

date1 = 12/03/2023 05:34:12
date2 = 12/03/2023 18:34:12
in the deliveryslip report, the datetime are casted as date, they become

date1 = 12/03/2023
date2 = 13/03/2023

closes odoo/odoo#114983

Opw: 3199862
X-original-commit: b6757daac6272092c37024ac2bdd49747177d2bc
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-03-13 09:45:59 +01:00
Benoit Socias 80b85bf818 [FIX] website, *: unescape URL parameters when used in autocomplete
*: web_tour, website_blog

Since [1] when the search box autocomplete was introduced, the URL
parameters are implicitly included into the RPC that fetches the
autocompletion results.
Those parameters were not correctly unescaped before being sent to the
RPC call.
Because of this, a timestamp such as "2023-01-01 23:00:00" was sent as
"2023-01-01+23%3A00%3A00" to the server. If that string reached the SQL
layer, the "+" was interpreted as defining a timezone.

This commit unescapes the URL parameters before using them in the RPC.
Note that javascript's `decodeURIComponent` does not handle the '+'
encoding of spaces inside URL parameters.

For testing purpose, the following updates were needed to make it
possible to select the `<option>` within the Archive month `<select>`:
- because the `option`s are in a tree, the tool was adapted to take all
`option`s into consideration instead of only the direct children of the
`select`.
- because the `option` text is dynamically created from the date of the
test execution, the tool was adapted to allow targeting an `option`
based on its index by specifying the tour step's `run` as
`'text index N'`, `N` being the index of the `option`.

Steps to reproduce:
- Enable the sidebar of the `/blog` page.
- Select a month in the sidebar.
- Type something in the search box.

=> Did show an error popup while obtaining the autocompletion records.

[1]: https://github.com/odoo/odoo/commit/7559626c54e34b41e1549e28276a650accec6986

task-3213916

closes odoo/odoo#114913

X-original-commit: 115fc399461c37b57127684cf5c28f05443fbb54
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
2023-03-13 09:45:56 +01:00
bve-odoo 708f5997c5 [FIX] core: recycle more connections in multi-tenant servers
During revision 415525cecc
the code comparing the connections without password has been
dropped, for an unknown reason.

Because of the above, and the fact psycopg2 alter the password
with 'xxx' for security reasons, the connections recycling was
no longer working as expected, and was recycling less connections.

closes odoo/odoo#37005

Signed-off-by: Rémy Voet <ryv@odoo.com>
2023-02-20 12:19:19 +01:00
Paolo Gatti (pgi) fb2c1e8b26 [IMP] l10n_it_edi_sdicoop: Cannot delete already sent attached files
If an invoice is send to the Tax Agency, we should block the fact
that the user can delete it. In that case, we can have issues when
the tax agency sends back notifications.

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

closes odoo/odoo#114872

X-original-commit: c11a512af4e467068c6b228bf55225e5e43d7811
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Paolo Gatti (pgi) <pgi@odoo.com>
2023-03-12 21:46:07 +01:00
qsm-odoo ac2727d0e0 [FIX] website: fix wrapwrap overflow and animations (2)
This reviews [1] which solved the problem in most cases (hopefully) but
not in all cases. Animated elements which overflow the screen on the
right made an horizontal scrollbar appear on iPhone <= 8 using Safari,
even when they were not animating yet.

This was due to Safari ignoring the `transform: none` rule on inactive
elements, preferring to consider the animation transform. As a fix, we
forced no possible overflow of the page when we saw this safari bug on
the first animated element.

The problem here... is that this Safari bug does not occur in every
situation. For example, if the animated element is inside a column which
is marked as hidden in mobile, Safari actually understands the no
transform rule. So if the first animated element was in such a situation
but another element in the page had the safari bug... the problem was
there again.

As a fix, we now check all animated elements for the Safari bug, instead
of only the first one. That should do the trick.

This commit also reviews the comment: the problem is not confined to
old iPhones. This was reproduced on the latest iPhone with latest iOS
and up-to-date Safari.

opw-3204613
opw-3201937
Related to opw-3165651

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

closes odoo/odoo#114999

X-original-commit: 8fe2d91e05e85ae2e50f1066214d0af5796e5296
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-03-11 12:44:53 +01:00
Gorash 113d3d5b19 [FIX] base: display white-space before the t-if when display a content
Issue: when use t-if to display text and use mutli line, the white-space
are removed.
```
<div>
    <t t-out="nb"/>
    <t t-if="nb == 0 or nb == 1">product</t>
    <t t-else="">products</t>
</div>
```
is rendered:
```
<div>
    3products
</div>
```

closes odoo/odoo#114986

X-original-commit: 3150a3769ff4d762c0e52dab31a70b59292c1bcc
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-03-10 18:55:17 +01:00
luvi 1ee7bf5f20 [FIX] web: trigger onUpload when same file used in FileInput
This commit fixes the behavior of the FileInput component. Since the html
element of type input doesn't trigger its onChange when a file with the
same name is given twice to the input, we must first clear the input value,
which will cause the input to handle the file even if the input already
contains this file.

Even if that seems unnecessary, this is an easy way to fix issues in the
base_import action were data are not send back to the server when re-uploading
the same file to let the server process the data.

A test has been added to assert that the onUpload is effectively called twice
when uploading a file, even if it's the same exact file.

closes odoo/odoo#114978

X-original-commit: d4a23c521d0e15f893d74e3530bc68ef19641f48
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Signed-off-by: Luca Vitali <luvi@odoo.com>
2023-03-10 18:55:12 +01:00
Soukéina Bojabza d4eb485f86 [FIX] website: increase 'toggleDeviceVisibility' option breakpoint
When using the 'toggleDeviceVisibility' option, we can see that there is
a mismatch between the screen breakpoint at which the elements are
displayed like in mobile view (=> under 992px or `lg`) and the one that
is impacted by the 'Hide/Show' option (=> at 768px or `md`). This is
a problem because between these two breakpoints, the display is like in
mobile view but is not considered as such and so, hiding/showing an
element in the mobile/desktop view (for example, if it does not look
good in one of them) has no effect until the screen reaches 768px.

This commit increases the screen breakpoint at which the 'toggleDevice-
Visibility' option is applied, that is, at 992px instead of 768px, in
order to be consistent with the display.

task-3110770

closes odoo/odoo#114977

X-original-commit: b062b280fdadcde857fff4f7a57876da50542cb3
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
Signed-off-by: Bojabza Soukéina (sobo) <sobo@odoo.com>
2023-03-10 18:55:09 +01:00
FrancoisGe 88b148b66b [REF] web: model is no longer an event bus
In order to make the model reactive, it must not be an EventBus. An EventBus cannot be reactive. So we will add a key bus to the model that will always trigger all events that were triggered on the model before.

Part of task 3179751

closes odoo/odoo#114975

Related: odoo/enterprise#38032
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-03-10 18:55:03 +01:00
Stefan-Calin Crainiciuc (stcc) da9febc5c8 [FIX] web: signature widget works in mobile view
Steps to reproduce:

- Install stock
- Config > Shipping > enable Signature on delivery orders
- Create delivery order > Validate
- Switch to mobile view
- Action > Sign

Issue:

We get a traceback: `Uncaught Promise > Component is destroyed`.

This happens because the signature widget is destroyed when the Action
dropdown is folded.

Solution:

Use the orm service in `this.env.services` to perform the `write`.
We have to also update the view in order to see the new delivery slip.

opw-3133731

closes odoo/odoo#114954

X-original-commit: ad555010ea668324aeee21f8aabd41fe352eb0f5
Signed-off-by: Géry Debongnie <ged@odoo.com>
Signed-off-by: Stefan-Calin Crainiciuc (stcc) <stcc@odoo.com>
2023-03-10 18:55:00 +01:00
Adrien Guilliams (adgu) 53f9e5845f [IMP] point_of_sale, pos_restaurant: Add cross-orders feature for point_of_sale and pos_restaurant
Currently the below use-cases are hardly supportable, though quite common:

Retail: Sell product in one shop and return it in another one
Restaurant: Managing payment when having multiple checkout desks,
 and multiple waiters (only taking orders)

This because currently:

PoS orders are only known by the cashier desk (pos.config) they were created from
One floor map can only be linked to one cashier desk at a time

More over, with the Self-Service coming along the way
(where kiosk orders must be accessible from a cashier desk),
this need must be supported.

For restaurant, floor plans can be linked to multiple cashier desks,
ongoing orders are shared between trusted PoS config
(through floor plans for restaurant and according to
the setting "Trusted PoS config" for the retails),
and past orders can be accessible from any desks within a same DB.

closes odoo/odoo#109216

Related: odoo/upgrade#4393
Related: odoo/enterprise#37955
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2023-03-10 18:54:52 +01:00
Ivan Yelizariev ffbc3be76f [FIX] sale_stock: make Warehouse field readonly in locked state
State `done` means *Locked*, which means that most of the fields should not be
editable.

However, the behavior for the field `warehouse_id` was changed during refactoring in
https://github.com/odoo/odoo/commit/f9f68adb2cdfdfd16bc24c82acae015ddfb9b83a

This commit restores Odoo 15 behavior in Odoo 16+

opw-3204896

closes odoo/odoo#114973

X-original-commit: 9efc8190565db160615f8a3e92f2e7f89edfca8b
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-03-10 17:55:05 +01:00
Camille Spiritus abbdaf0562 [IMP] account: removed unused cash discount field in payment terms
The last_day_for_discount field was forgotten in the payment term/cash discount update : https://github.com/odoo/odoo/pull/110274

Fixed by removing the forgotten crumb.

closes odoo/odoo#114971

Signed-off-by: Laurent Smet <las@odoo.com>
2023-03-10 17:55:00 +01:00
Romain Estievenart a041a5f2ee [IMP] project: display the widget m2o/m_avatar_user on user_id (kanban)
Remove the existing t-if on m2o_avatar_user/m2m_avatar_user widget
on user_id field in"project.project.kanban" view to allow quick-assign.

closes odoo/odoo#114400

Task-id: 3121207
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-03-10 17:54:57 +01:00
Romain Estievenart 74f9119300 [FIX] crm: domain on kanban_m2o_avatar_user to allow quick-assign
The Many2OneAvatarUser field now allows the edition, in particular to
add new record to the relation. This commit adds a domain on nodes using
this field to filter out share users, like already done in a lot of
form/list views[1].

Links:
1. https://github.com/odoo/odoo/commit/0edc854a8494eb475087d011efddc7e15b262127#diff-62eff7f830df5fbafad68abd5de0373654a620f6685cbcf3a4b8c20db64f0b7cR341

Part-of: odoo/odoo#114400
2023-03-10 17:54:57 +01:00
Romain Estievenart 74c3104b4c [IMP] web: add the avatar icon on m2o/m2m_avatar_field autocomplete
The goal of this commit is to add the avatar when a user use the
autocomplete m2o/m2m_autocomplete liked to a m2o/m2m_avatar_field.

Task-id: 3121207
Part-of: odoo/odoo#114400
2023-03-10 17:54:56 +01:00
Romain Estievenart 501b442340 [IMP] web,mail: many2one avatar quick assign
Purpose:

Allow quick assignation of records in the kanban views (and other places
by extension).

Currently, if you want to work in a board-like env (e.g. tasks in
kanban, crm in pipeline, that kind of thing), having the possibility to
quickly assign/unassign records without having to open them fullscreen
can be really useful => it should be possible to "quick edit" these
fields in kanban views easily, without switching to form views.

If you want to keep the field readonly don't forget to add the readonly
attribute.

Task-id: 3121207
Part-of: odoo/odoo#114400
2023-03-10 17:54:56 +01:00
Romain Estievenart 66321f76aa [IMP] web,mail: many2many avatar quick assign
Purpose:

Allow quick assignation of records in the kanban views (and other places
by extension).
Currently, if you want to work in a board-like env (e.g. tasks in
kanban, crm in pipeline, that kind of thing), having the possibility to
quickly assign/unassign records without having to open them fullscreen
can be really useful => it should be possible to "quick edit" these
fields in kanban views easily, without switching to form views.

If you want to keep the field readonly don't forget to add the readonly
attribute.

Task-id: 3121207
Part-of: odoo/odoo#114400
2023-03-10 17:54:56 +01:00
John Laterre (jol) 7bd93cc64b [IMP] sale: add confirmed SO to reveivable
The goal is to take into account the confirmed
and un-invoiced sales orders in the total receivable of a client.
It will be useful in the scope of the credit limit trigger.

This is broken down in 3 steps:
1. Add the Remaining Amount to Invoice (RAI) in the
Invoice creation wizard of the Sales Order and store this data.
2. Add the RAI in the Total Receivable of the client.
3. The Remaining amount to invoice goes to optional="hide"
in the list view of "Orders to invoice" list view.

task-3122390

closes odoo/odoo#112905

Signed-off-by: William André (wan) <wan@odoo.com>
2023-03-10 17:54:51 +01:00
Michael (mcm) f18e11d177 [FIX] mail: prevent displaying attachment preview in dialog
Before this commit, attachment preview could be displayed
in x2m dialogs. Now, the compiler removes the attachment preview
from the arch so it is never displayed in renderer.

closes odoo/odoo#114967

X-original-commit: 4938d27da71da1e30899bad80c9cad3cb96aa417
Signed-off-by: Géry Debongnie <ged@odoo.com>
Signed-off-by: Michaël Mattiello <mcm@odoo.com>
2023-03-10 16:48:17 +01:00
Soukéina Bojabza 1dab4ffe28 [FIX] mass_mailing: fix wrong templates with shape images
Since [1], some mass_mailing snippet templates now have images with
shapes by default. However, the shapes were not added correctly:

- for the Blockquote snippet, the files specified are not correct (wrong
names and wrong extensions).
- for the Team snippet, the shapes are not present when dropping it.

This commit fixes that by properly adding the shape images as defined in
the commit [2]. It also removes the "circle images" files as they are
not necessary anymore. The basic shapes were also fixed by removing
their width and height, since the dropped snippets looked weird because
their images have a default width smaller than the shapes.

[1]: https://github.com/odoo/odoo/commit/f4995f560003c2180ad3cef50e1b172a151e50c8
[2]: https://github.com/odoo/odoo/commit/eb1262960f54fd81424a86ef4d6693a950e76cb4

opw-3137732

closes odoo/odoo#114966

X-original-commit: b1a3a3b18370ad76280726298602815769dce1c2
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-03-10 16:48:15 +01:00
Julien Van Roy 78bce8c069 [ADD] l10n_lu_peppol_id: add peppol_identifier for Luxembourg
Some Luxembourg public institution do not have a VAT number but have
been assigned an arbitrary number (see:
https://pch.gouvernement.lu/fr/peppol.html).

This requires a new field: `l10n_lu_peppol_identifier`. For Luxembourg,
the flow is then as follows: when exporting an electronic invoice, if
the field exists and is set, we read it. Otherwise, we read the VAT.

opw-3186147

closes odoo/odoo#114960

X-original-commit: 4b1b9b497931ae3c27a6a980a49107abec5650ec
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Julien Van Roy <juvr@odoo.com>
2023-03-10 16:48:12 +01:00
Anh Thao Pham (pta) 9be9407f3c [FIX] account: fix search on account for "=" and "!=" operators
Steps to reproduce:
- Create 2 accounts:
  1)
  * Code: 1000
  * Account Name: Test
  2)
  * Code 1000A
  * Account Name: TestA
- Create a journal item for each account
- Go to Accounting / Accounting / Journal Items (list view)
- Add custom filter: ("Account", "is equal to", "1000 Test")
Journal items from both the created accounts are retrieved.
As a strict equal is requested, it shouldn't find the journal item
linked to account "1000A TestA".

Cause:
When searching on an account, the first part of the search is used
to find a code that begins with that part (ilike operation), regardless
of the actual operator (i.e. "=" in this case).
It has been done that way because we suppose that most of the times
customer is starting his search with the beginning of the code of the
account he is searching, which is not incorrect.
But the case of the "=" operator has not been handled.

opw-3179681

closes odoo/odoo#114927

X-original-commit: dfd9bee8c07b927a97823eb8ede7dc2b2a4c435a
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Signed-off-by: Anh Thao PHAM <pta@odoo.com>
2023-03-10 15:40:45 +01:00
Antoine (ande) a46d798fdb [FIX] web: parse server version in url to doc
To reproduce the issue:
1. In settings, scroll to "Contacts"
2. Click on the "?" bubble next to "Send SMS"
3. The page that opens is 404

Error: In the url of the opened page, there is
"saas~16.1+e" instead of "saas-16.1"

Added parsing to the server version in url

OPW-3198672

closes odoo/odoo#114941

X-original-commit: 424ec17af513de0a55fd946e6494a425c9fff39e
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-03-10 14:39:13 +01:00
yhu-odoo b6dd4beea6 [FIX] mrp: cancelled workorder considered when plan workorder
when plan workorder, cancelled/done workorders are taken in to account
when they block current workorder. In this fix, we ignore then when plan
workorder.

Task-3126569

closes odoo/odoo#114940

X-original-commit: 1b629659cb651c62fdd2c880ae591f9a9bb2e1eb
Related: odoo/enterprise#38020
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-03-10 14:39:05 +01:00
clesgow c43e39ce92 [FIX] mrp: fix missing uom for operations/byproducts in BoM Overview
Wrong key was used to display the unit of measure in the BoM Overview,
leaving the cells empty.

closes odoo/odoo#114934

X-original-commit: a6eba909a8f2ab07ddb239b4b64e82d51f724e66
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Quentin Wolfs (quwo) <quwo@odoo.com>
2023-03-10 14:39:02 +01:00
Rahul Prajapati d8a18a9d16 [FIX] mail: channel partner avatar response for public user
This issue was caught in Sentry.
The return type of the partner avatar for public users is `odoo.http.Stream`,
but the `route_wrapper` expects it to be `Response streamed`.

sentry-3929988311

closes odoo/odoo#114933

X-original-commit: 62ddfe0badf54375bc458bdb50cbcdbe4da5bbcd
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-03-10 14:38:59 +01:00
Romain Derie c58f26f524 [FIX] website: rename the font "Muli" to "Mulish"
This commit will rename the font "Muli" to "Mulish" as it has been
renamed in Google Fonts.

closes odoo/odoo#114932

X-original-commit: c24602e882f87c361866a739459a9d6e3f4fc6ef
Related: odoo/design-themes#638
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-03-10 14:38:53 +01:00
gawa-odoo 66a4d0b4d5 [FIX] analytic: Add (copy) to name of analytic account's copy
When duplicating an analytic account, we want to make more explicit
which account is the duplicate and which one existed before.

task-3202027

closes odoo/odoo#114931

X-original-commit: d499b9da8ba1b46db0671f14658a55095c68921d
Signed-off-by: William André (wan) <wan@odoo.com>
2023-03-10 14:38:51 +01:00
William Henrotin 92a49e8aea [FIX] purchase: long product description
- Create a product with a very long product description
- Add in a PO and print the RFQ

The description overlaps with the table header on the second page.

This is a known issue of wkhtmltopdf (see issues 1770 and 1524 for
example), and there is no known workaround. It can be avoided by
preventing the repetition of the header.

closes odoo/odoo#114916

Opw: 3208347
X-original-commit: cc5be8a907b2c3f33c6a62c5693726d757ffd113
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-03-10 14:38:45 +01:00
Lucas Lefèvre 2a24e7ae52 [IMP] sale, spreadsheet_dashboard_sale: display amount currency
Amounts in the spredsheet Sales dashboards are displayed without their currency
even though the amounts are all correctly converted to the current
company's currency.

With this commit, amounts are displayed with their currency in the
dashboard, list view and default form view.

The hardcoded number format is removed on the dashboard cells to let
the automatic format do the job

Task 3167343

closes odoo/odoo#111702

Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2023-03-10 14:38:43 +01:00
Aaron Bohy 8fc4c6f2d8 [REF] *: remove legacy views support
The last view in the odoo codebase has just been converted to owl,
meaning that we no longer have legacy views. This allows us to
remove a lot of legacy view related code: the abstract elements on
which the legacy views were built, the compatibility layers that
allowed to deal with both owl and legacy views uniformly, legacy
widgets that were only used in those legacy views...

closes odoo/odoo#114893

Related: odoo/upgrade#4420
Related: odoo/enterprise#38005
Signed-off-by: Géry Debongnie <ged@odoo.com>
2023-03-10 13:33:04 +01:00
Jorge Pinna PuissantandAaron Bohy 59395d6d9a [REF] web: change function isInvisible visibility to private on the record
This commit changes the function isInvisible visibility to private on
the record, this means that outside the record, the modifiers need to be
evaluated.

Part-of task-id 3179751

closes odoo/odoo#114891

Related: odoo/enterprise#38009
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: Aaron Bohy <aab@odoo.com>
2023-03-10 13:32:56 +01:00
flvr-odoo 156ba71747 [FIX] survey: format description properly
This commit addresses a bug where the "description" field on the user
screen was not displaying properly. This fixes the formatting issue,
ensuring that the field is now properly displayed with appropriate line
breaks and spacing. Users can now view their description information as
intended.

closes odoo/odoo#114881

X-original-commit: 52858350a78856e7da444617dc2779a2f19688a0
Signed-off-by: Vranckx Florian (flvr) <flvr@odoo.com>
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-03-10 13:32:50 +01:00
paso-odoo 5a3a566034 [FIX] website_mass_mailing: 'list_ids' Keyrror in newsletter form
If applied, this commit will solve the KeyError of 'list_ids'.

Before this commit
=======================
When there are no Mailing Lists available and add the snippet 'Newsletter block'
in the website with the template 'Form Subscription' and any user tries to
Subscribe to that form. It will raise an error like KeyError: 'list_ids'.

After this commit
========================
In this commit, checking keyword arguments which have list_ids in this or not if
list_ids not in that returns the error like 'Mailing List(s) not found!'

see - https://tinyurl.com/2n3o7s58
sentry - 3949183926

closes odoo/odoo#114871

X-original-commit: 360579977634c38c1cd6287c03e7c06796b408b1
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-03-10 13:32:47 +01:00
bat-odoo 0fbf65c66d [IMP] account,l10n_*: added new field in UoM to hide/unhide fields in Localizations
Currently, all localizations of UoM fields are visible in all countries.

So in this commit, I have added a new compute field in UoM models, the field
contains comma-separated company's country codes, and I have used this field
for the hide/unhide fields.

closes odoo/odoo#112604

Related: odoo/enterprise#36572
Related: odoo/upgrade#4284
Signed-off-by: Josse Colpaert <jco@odoo.com>
2023-03-10 13:32:41 +01:00
william-andre 1d8be6517f [FIX] account: set payment sequence correctly
Before the fix, the compute function is set as a string in the `default`
parameter. Meaning that it will always be True because a non empty
string is truthy.
Fix by converting the field to be compute-editable, like the function
was designed to be.

closes odoo/odoo#114904

X-original-commit: 11121120b13fc7500ee720f10964de6b9a0373af
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: William André (wan) <wan@odoo.com>
2023-03-10 12:31:14 +01:00
Mathieu (mano) d8958a45ba [FIX] web: checkboxes design & consistency
The main objective of this commit is to make checkboxes consistent
and fix their spacing issues.

Prior to these changes, the checkboxes on the `product_view` were
too close to their neighboring option labels, making it difficult to
know which checkbox to tick.

The new changes fixes inconsistencies in general such as undesired
hovering effects and the cursor behaviors on disabled inputs.

This commit also removes the margin in the checkbox template since the
padding from the checkbox wrapper compensates for the spacing between
the checkboxes and their respective labels.

Tweaking the selector in `settings_form_view.scss` to ignore boolean
field inputs allows us to get rid of max-width and margin overrides
introduced in commit b90059e936.

Most checkboxes were already falling under their labels on mobile, but
this change impacted those that were not. To address this issue, we
decided to consistently change the position of the checkboxes left to
their labels for small devices in form view.
This required slight adjustments to the `form_group.xml` template.

Still in form_view, for some of the specific checkboxes such as
`o_checkbox_optional_field` the changes in `form_controller.scss` are
made to mimic the new behavior for mobile sized screen.

However, if they are using the form_group template, their behavior
is unchanged at the moment.

Finally, even if these changes makes it better for most of them, some
checkboxes in `settings` still require some minor adjustments and will
be addressed in task-3113372.

task-3094083

closes odoo/odoo#114612

X-original-commit: ddb7574f97f11e69f0304c8bd8d55c2c53ab53fd
Related: odoo/enterprise#37887
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2023-03-10 12:31:11 +01:00