Commit Graph
132565 Commits
Author SHA1 Message Date
Noe Antoine 2eedf2f6a5 [IMP] utm: add avatar widget to utm campaign
Add the widget to the kanban quick create view,
and to the form view, to the user_id field.

task-3113972

Part-of: odoo/odoo#109105
2023-01-19 17:48:56 +01:00
Andro Gvivradze 9b5173fd9c [IMP] survey: show images in result page
With this commit we add images to the answers in result page.
when clicking on the image, we open a survey_image_zoomer widget.
We also add "Responsible" filter on survey.survey view

task-3092439

closes odoo/odoo#108430

Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2023-01-19 17:48:50 +01:00
Adrien Widart (awt) e39af99476 [FIX] mrp_subcontracting_dropshipping,*: dropship valued product
*:purchase_stock,stock_account

To reproduce the issue:
1. In Settings, enable 'Multi-Step Routes'
2. Create a product category PC:
   - Method: FIFO
   - Valuation: Auto
3. Create two products P_compo, P_finished
   - Both:
     - Type: Storable
     - Category: PC
     - With a positive cost
   - P_finished:
     - Vendors: a new vendor V
4. Create and confirm a SO with one order line:
   - Product: P_finished
   - Route: Dropship
5. Confirm the PO and process the dropship
6. Accounting > Accounting > Miscellaneous > Journal Items

Error: There are a lot of lines and most are incorrect

When marking the dropship SM as done, we check how we should
value it:
https://github.com/odoo/odoo/blob/18450973eaf3ca048cdcd2046a8cba5f5c0f98b0/addons/stock_account/models/stock_move.py#L244-L252
Here is one issue: `_is_dropshipped` returns `True`, which is
correct because the source is the subcontractor location and the
destination a customer:
https://github.com/odoo/odoo/blob/8276a9b51b7c5fc0ae6dd557ae88a9c31f1d1962/addons/mrp_subcontracting_dropshipping/models/stock_move.py#L14-L20
However, `_is_out` will return `True` too. To get this value, we
check if the source and destination locations have to be valued:
https://github.com/odoo/odoo/blob/18450973eaf3ca048cdcd2046a8cba5f5c0f98b0/addons/stock_account/models/stock_move.py#L99-L100
Again, since the source location is the subcontractor one (which is
an internal one) and the destination location is the customer one,
we will consider that we have to value this SM. As a result, we will
apply `_create_out_svl` and `_create_dropshipped_svl` on the same SM
(this explains some incorrect AMLs are generated).

Then, there is another issue. In `_create_dropshipped_svl`, we
create an in-SVL and an out-SVL for P_finished. However, when
processing the MO, an in-SVL will also be generated for P_finished.
The issue comes from `_create_dropshipped_svl`: it creates an in-SVL
but the source location is not outside from the company, so it
should not create the incoming layer.

Finally, when creating the SVL in `_create_dropshipped_svl`, we use
the unit price of the SM to define the value of the SVL. This is an
issue: suppose the unit price of the POL is $10 and the costs of
P_compo is $1, the unit price of the SM is then $10 (and so does the
value of the SVL) but the actual value of the delivered P_finished
is $11. Howver, when calling `_action_done` on a SM, we first
process it and only then we will process the MO:
https://github.com/odoo/odoo/blob/829369d3ca0530f1aad0599fbb1598810a928cc3/addons/mrp_subcontracting/models/stock_picking.py#L33-L36
So, in `_create_dropshipped_svl`, we can't know the actual cost of
P_finished. This is the reason why we have to create a compensation
layer once the MO is processed (i.e. in the override from
`mrp_subcontracting_dropshipping`)

Similar issues will happen if we return the
dropshipped/subcontracted product.

OPW-3078499

closes odoo/odoo#110390

X-original-commit: 200aac56771fd1ef759f73b277a6808d96ee5f31
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
2023-01-19 14:01:27 +01:00
William Henrotin c1ff654875 [FIX] mrp: print “BOM structure & cost” with dynamic variants
Steps to reproduce the bug:
- Create an attribute with "Variant Creation Mode" = Dynamically
- In a product template, add the attributes and some values
- Create a new BoM for this product
- Click on "Stucture&Cost" smart button

Problem:
A traceback is raise, because the `_match_all_variant_values` function
is called but without the product, while it takes at least one:
https://github.com/odoo/odoo/blob/15.0/addons/mrp/models/mrp_bom.py# L456
https://github.com/odoo/odoo/blob/15.0/addons/mrp/models/product.py#L286

As the variant creation mode is set “dynamically”, the object must be a
`product.template` model and not `product.product` so the first
condition should be `True` and return a `false` value:
https://github.com/odoo/odoo/blob/5c16aa22c70f8a0a377a55b912307ab07222c643/addons/mrp/models/mrp_bom.py#L453-L454

Therefore, if the product has no variant, we have to use the
`product_template` and set it in the `_get_bom` function, but from this
commit:
odoo@ca3dfec

If there is no variant product, the template is no longer set:
odoo@ca3dfec#diff-e8f576a790cd7f3f0976358b9b07f63cee0c6f05b0ba6203fc7bcf91af3ad283L107

The change in this commit from line 107 to line 118 is useless because
it does not change any behavior and does not improve the code, the only
change is that the product_template is no longer set. So it makes sense
to revert this part of change

opw-3008838

closes odoo/odoo#110341

X-original-commit: 1d830b5080e4d05dc1ac6fbd4c435af532443f88
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-01-19 12:31:03 +01:00
niyasraphy 9a3a41202a [FIX] purchase_requisition, stock: improve usererror to show allowed stages
in purchase_requisition and stock module, when deleting a requisition and move, the raised warning says,the deletion can be done only in draft moves, where us the deletion is allowed for the cancelled records also.

improving the user error message to include the cancelled records in the message.

closes odoo/odoo#110340

X-original-commit: b71d298dabb4436182c0eb516d5a7b7e76fca437
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-01-19 12:30:59 +01:00
niyasraphy 81363f103b [FIX] stock: show uom only when multi uom is activated
before this commit, in the storage categories form view, the product uom is shown even if the multi uom feature is not activated in the settings.

  * from inventory settings, enable storage categories
  * inventory -> configuration -> warehouse management -> storage categories

after this commit, the uom will be shown only when multi uom is activated in storage categories view.

closes odoo/odoo#110327

X-original-commit: fa42ee1a161578028986caa2a60e0735d79b2734
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-01-19 12:30:56 +01:00
Katherine Zaoral 7c7ea74fcb [FIX] sale_stock: invoice reporte lot_values
Before this change, the lots info of the products that are shown in the
invoice report were always computed, no matter if they were printed or
not. It is always computing the lots information, no matter if it will
be printed or not

With this change, the lost info only is computed when is actually used
and will be printed: that is when the user has the
sale_stock.group_lot_on_invoice group.

closes odoo/odoo#110326

X-original-commit: 28778f93dd92d1e460f1d816323b57792907f7c3
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-01-19 12:30:53 +01:00
Arnold Moyaux fe03a58e62 [FIX] stock: be able to have infinite forecast in replenishment
Currently if you require internal transit pickings between warehouse,
it's not possible to use security days in order to plan them and
receive products on time (e.g the second warehouse need times to
manufacture them).

Also the deadline are impacted by security days, so it's hard to
do at the same time replenish on order an use the orderpoints.
(either you see them late in orderpoints or they are plan way to
early in replenish on order process)

To avoid this kind of issue this PR introduces a visibility days
global on the orderpoint. It's call `stock.visibility_days`.
It will add the number of days in the orderpoint forecast date but
it doesn't impact the documents (PO, MO) planned dates.

It could for example always show the quantity in 1 years if people
don't need the just in time feature and don't care to store for a
long period of time.

closes odoo/odoo#110303

X-original-commit: 24816bfee9825fecd60bd24a92d1496f30522b8e
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-01-19 12:30:50 +01:00
tsm-odoo c40320eb15 [IMP] bus, *: remove bus service legacy session dependency
*: calendar, im_livechat, mail.

Before this commit, the legacy session was a dependency for the bus
service. This was problematic since one would need to import a bunch
of legacy files to fulfill this dependency in order to use it.

This commit removes this dependency. In order to pass parameters to
the `bus_service`, the `bus_parameters` service is now used.

closes odoo/odoo#110247

Related: odoo/enterprise#35974
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-01-19 12:30:44 +01:00
fdardenne 82e47bc547 [REV] web: list view: make the scrollbar above the thead in safari
The purpose of #109773 was to fix the scrollbar that appeared behind
the sticky thead in Safari.
This commit introduced a bug where elements like the dropdown,
the draggable records, creation of reacord are misaligned.

As I don't find a quick fix for the scrollbar issue on Safari, this
commit reverts #109773 .

closes odoo/odoo#110367

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-01-19 11:21:55 +01:00
f1deb8a457 [FIX] web: switch view position on small screen
Before this commit, the switch view was in the middle of the CP instead
of the right. This was due to the customizations of the form control
panel, this commit scopes these customizations to the form only.

Steps to reproduce:

* On mobile device, open "Project"
* The view switch is not correctly aligned to the right and not all the
  views are visible in the popover

closes odoo/odoo#110343

X-original-commit: baddfad44c34d36f26defda8fb8378003d4de4a3
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: Romain Estievenart (res) <res@odoo.com>
Co-authored-by: Adrien Dieudonne <adr@odoo.com>
Co-authored-by: Romeo Fragomeli <rfr@odoo.com>
2023-01-19 10:15:34 +01:00
Adrien Guilliams (adgu) 38171c8aa1 [FIX] point_of_sale: Correct bad syntax in PaymentScreen.xml
This commit aims at correcting a syntax error in PaymentScreen.xml
of the point_of_sale module introducted by the "Ship Later" feature.
A closing tag "/span" was previously written "span/".

closes odoo/odoo#110320

X-original-commit: 4b5ac464cfbe10ee96ae15b91dac0b58de0cd7e0
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2023-01-19 10:15:31 +01:00
Aaron Bohy af948c6acf [FIX] board: better display graphs in dashboard
In the legacy implementation of the dashboard action, there was a
scss rule that set the height of the canvas of graph views inside
the dashboard to 300px. During the conversion to owl, this rule has
been lost. As a consequence, graphs in the dashboard look squashed.
This commit restores the scss rule to fix the issue.

Bug reported in the feedback pad after migrating odoo.com to 16.0.

closes odoo/odoo#110352

X-original-commit: 833f7394ecd88825990eb7d1b338e21bfbab55b5
Signed-off-by: Géry Debongnie <ged@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-01-19 09:13:17 +01:00
Aaron Bohy 942ef925b9 [FIX] web: list: display sort icon when grouped and sorted
In a grouped list view, click on the header of a column for a
sortable field. The record rows inside opened groups are correctly
sorted. However, before this commit, the icon indicating that the
column is sorted wasn't displayed. It worked fine if the list
wasn't grouped. This commit fixes that issue. It also adds a 1s
delay before opening the header tooltips (1s is the delay we have
for the other tooltips in the list view).

Issue reported in the feedback pad after migrating odoo.com to 16.0.

closes odoo/odoo#110351

X-original-commit: e68e13cfce8eb82248336361998b873f26096634
Signed-off-by: Georis François (fge) <fge@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-01-19 09:13:15 +01:00
Aaron Bohy 9b7fcb72d0 [FIX] mail: Schedule Activity: fix recommended activities layout
Before this commit, in the form view to schedule an activity, the
"Recommended Activities" were displayed as a column, one per line.
With this commit, recommended activities are displayed on the same
line.

To open the Schedule Activity form view, open a project task, and
click on the tab Activities in the chatter (for instance).

Bug reported on the feedback pad after migrating odoo.com to 16.0.

closes odoo/odoo#110350

X-original-commit: cc82ccb94a8b52f09e797fc0645da32bc7481126
Signed-off-by: Romeo Fragomeli (rfr) <rfr@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-01-19 09:13:12 +01:00
Aaron Bohy cd00f242c7 [FIX] web: list/kanban: remove count limit if total clicked
Commit [1] adds a limit on the search_count done to get the total
number of records matching the domain in a list or kanban view
(displayed in the pager).
When the limit is reached (10000), a `10000+` is displayed as
total. Clicking on it performs a search_count to get the actual
number of records.

Before this commit, from that point, the count limit was set to the
total number of records. It means that if a record was created or
modified to match the domain in the meantime, and the user clicked
on the pager to see the next page (for instance), a `+` was again
displayed next to the previously fetched search_count, which looks
like a bug.

To prevent this from happening, this commit simply removes the
count limit once the user has clicked on the total.

[1] 6acfad2651

closes odoo/odoo#110348

X-original-commit: 9aab36bcfb682865b615c8fbbc107afeee3a24f4
Related: odoo/enterprise#36001
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2023-01-19 09:13:09 +01:00
Julien Van Roy b5c0c48ad9 [FIX] l10n_mx: revert the account.tag names in Spanish
Since the account.tags names have been converted from Spanish to English
(see
https://github.com/odoo/odoo/commit/84be7372de41ba8bf9075f34cbd0b812eadbc2b3),
the function `get_tax_cfdi_name` is no longer able to deduce the tax
code (the 'Impuesto' field with possible values: 001, 002 or 003)
Revert the 3 important account.tags names in Spanish.

closes odoo/odoo#110322

X-original-commit: 1705f785091e8b80ea57da439befce4a041744e4
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Julien Van Roy <juvr@odoo.com>
2023-01-19 09:13:03 +01:00
Mathieu Duckerts-Antoine 9e3afe6d83 [REV] web: revert "[REF] web: sample server: _mockReadGroup"
This reverts commit 8d437bf.

Because of the above commit, the sample server did not correctly group
the records when a date/datetime field was used as a groupby.

We revert id and add a test.

closes odoo/odoo#110321

X-original-commit: 1a0c688aee7682919b66492636f46eff481abd29
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
2023-01-19 08:07:53 +01:00
Laurent Smet 88c5a37178 [FIX] account: Fix missing where clause on constraint
Introduced by: https://github.com/odoo/odoo/commit/f9500ca4c898cd86681cc2e48ec2c66cf5670917

closes odoo/odoo#110140

X-original-commit: ab8e35411789e0e49d2c194867120205ba96d3c6
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
2023-01-19 07:11:44 +01:00
Laurent Smet 32fd54f945 [FIX] account: Fix dashboard traceback with journal without account
Traceback when opening the accounting dashboard with a journal having no default_account_id.

default_account_id = false

...is not a valid sql where_clause

closes odoo/odoo#110098

X-original-commit: ae71a4c255e995b5d232cb837e2879454bf30a52
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
2023-01-19 07:11:42 +01:00
Habib (ayh) 280a43bf20 [FIX] account: reorder section and notes bug
With PR odoo/odoo#109461, the drag and drop of lines in a section_and_note field causes a traceback. This is because the cells and headers do not align perfectly for section and note lines. To solve this, an override of sortStart method is added which takes into account the colspan.

Additionally, the word-wrap of section and notes is enabled, and tests are improved.

fixes #109934
task-3136580

closes odoo/odoo#110349

X-original-commit: 4894f6eac7aead113049be99fcb1cad3d75c3325
Signed-off-by: William André (wan) <wan@odoo.com>
2023-01-18 23:02:14 +01:00
Demesmaeker 83c52575d0 [REF] product,repair,(*_)sale(_*): unrequired pricelist
Removes the constraint of using a pricelist and makes all sales flows
rely on the currency of the sale order (or repair order)

task-2735672

closes odoo/odoo#84920

Related: odoo/enterprise#24716
Related: odoo/upgrade#3642
Signed-off-by: Morgane Demesmaeker <edm@odoo.com>
2023-01-18 21:08:52 +01:00
Paolo Gatti 50f99e3617 [FIX] l10n_it_edi: fix buyers' codice fiscale in the template
Just like the seller's codice fiscale is always shown in the FatturaPA
XML if present on the partner, so should be the one from the buyer.

If it's not, then when a company is a part of a fiscal group sharing
the same VAT number and different Tax Codes, the SDI will reject the
XML because the VAT number won't be enough for the Tax Agency
to identify the company.

There is no damage in showing the Codice Fiscale when the VAT is also
there.

opw-3114115

closes odoo/odoo#110307

X-original-commit: db5ce853e15b5003771c4811302dbff6e3cc054b
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Paolo Gatti (pgi) <pgi@odoo.com>
2023-01-18 20:04:13 +01:00
Thibault Delavallée 6876a19cb9 [FIX] mail: fix 'composition_batch' composer triggers
'res_domain' field is used but was missing in triggers.

Followup of odoo/odoo#99482

closes odoo/odoo#110293

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-01-18 17:38:35 +01:00
Thibault Delavallée ec6635defe [FIX] account: fix composer res_ids field usage
A missing 'res_id' is still used where it should be 'res_ids'.

Followup of odoo/odoo#99482

Part-of: odoo/odoo#110293
2023-01-18 17:38:35 +01:00
Hubert Van de Walle (huvw) 38fbdec503 [FIX] web: restore drag&drop in Firefox
Steps to reproduce
==================

- Go to a kanban view
- Drag a card by the title to another column
-> The record is opened instead of being moved

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

The `.o_kanban_record_headings` elements have a `overflow: hidden` rule
There is a bug [0][1] in firefox from 17 years ago were the
mouse{enter,leave} events are not fired in that case.

Solution
========

The previous attempt [2] to fix the issue is not working (anymore ?)

Thanks to a comment in the issue, we know that we can call
`.preventDefault` on the mousedown event.

[0]: https://bugzilla.mozilla.org/show_bug.cgi?id=339293
[1]: https://bugzilla.mozilla.org/show_bug.cgi?id=1352061
[2]: https://github.com/odoo/odoo/pull/104128

opw-3120973
opw-3121312

closes odoo/odoo#110282

X-original-commit: 713026806fa712afd85cb2530006f0f880dfa240
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
2023-01-18 17:38:31 +01:00
Aaron Bohy 25d1209cf0 [FIX] web: pager: race condition when paging and fetching count
Have a list or kanban view with 10k+ records (or manually change
`WEB_SEARCH_READ_COUNT_LIMIT` in the code). On a slow network,
click on the pager to go to the next page and click on `10OOO+` to
fetch the total number of records.

Before this commit, this might lead to a race condition where the
total number of records displayed in the pager is incorrect (if the
search_count returned before the web_search_read).

This commit fixes the issue at the pager level. We already disabled
it when clicking on next/previous or editing it. However, this
didn't prevent from fetching the count. Moreover, fetching the
count didn't disable the other features either. With this commit,
the pager is fully disabled when the user interacted with it, until
the view is reloaded.

closes odoo/odoo#110265

X-original-commit: 0ac84bda8de0c1a620d05469562932c0d04e8c3f
Signed-off-by: Géry Debongnie <ged@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-01-18 17:38:29 +01:00
Michael (mcm) 28df053a51 [FIX] web: don't add hotkey if readonly statusbar
Before this commit, the statusbar added a hotkey even if
it was readonly or non clickable.
Because of this, the user could change the status with a hotkey.

Now, if the statusbar is readonly or non clickable then
the hotkey won't be available.

closes odoo/odoo#110262

X-original-commit: 9569b4f463b6e82df3c8eafb8bd4329faac871b1
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Michaël Mattiello <mcm@odoo.com>
2023-01-18 17:38:23 +01:00
Jorge Pinna Puissant 67c3a3ad9c [FIX] web: correctly center the no content helper in settings
Before this commit, the no content helper was not centered in the
settings view.

After this commit, the no content helper is centered in the settings

closes odoo/odoo#110261

X-original-commit: 7abf27a71d72dcece05a45345a81ce1dbece817e
Signed-off-by: Samuel Degueldre <sad@odoo.com>
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2023-01-18 17:38:20 +01:00
aliya efed212889 [FIX] account: fix name split
Currently, if someone tries to create an account with an account name that contains a number in the first word, it overwrites the account code if it's provided.

For example:
code: 123456
name: CO2-bijdragen

Would end up as:
code: CO2-bijdragen
name:

With this commit the account code won't be overwritten.
Also, tests are added to test different account creation scenarios.

closes odoo/odoo#110217

X-original-commit: d2342d81c305753ea1dd7dbaf43ff0c11df6ec4c
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Aliya Tastemirova (alta) <alta@odoo.com>
2023-01-18 17:38:14 +01:00
std-odoo 3140afff79 [FIX] web: fix the properties field in dark mode
Purpose
=======
Fix the properties types image that should be light and not dark
in dark mode. Fix the background color of the selection options.

Change the background image used for property types to a real image tag,
so we can apply a CSS filter on it for the dark mode (instead of
duplicating all images).

Task-3117416
See odoo/enterprise/pull/35408

closes odoo/odoo#110203

X-original-commit: 4982735c5a28b6f4a2d870eb679f9b8f2bfdb5d4
Related: odoo/enterprise#35941
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2023-01-18 17:38:09 +01:00
det c95011ce6d [IMP] account_edi_ubl_cii: l10n_fr requires delivery address if present
Update the logic so that if there is a delivery address present
we add it in EDI.

This is the behavior of ubl2 which was erased in ubl3 overwrite.

task-id: 3098587
[community](https://github.com/odoo/odoo/pull/110118)

closes odoo/odoo#110118

Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2023-01-18 17:38:01 +01:00
gawa-odoo 36d7d4b956 [IMP] l10n_pl: translation and clean tax tag name
Translated in English and added .po for Polish translation.
Cleaned tax names to make them more in line with new taxonomy.
Tax tag names have been changed to avoid long sentences as names.

closes odoo/odoo#109611

Related: odoo/enterprise#35651
Signed-off-by: Laurent Smet <las@odoo.com>
2023-01-18 17:37:44 +01:00
Aaron Bohy d0101c104a [FIX] mail,web: keep changes when changing followers/activities
Before this commit, all pending changes in a form view were lost
when the user added/removed/edited followers or created/edited
activities. In these cases, we want to reload the record, but we
also want to keep local changes. This commit restores the behavior
of previous versions.

Task 3132939

closes odoo/odoo#110246

X-original-commit: f3697e71c2d14e66509ab04bdccf3ef656cd9c8f
Signed-off-by: Géry Debongnie <ged@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-01-18 16:19:34 +01:00
Aaron Bohy 5dcd1db351 [FIX] web: list: correctly evaluate dynamic expand attribute
The `expand` attribute in list views can be dynamic (e.g.
`context.get("some_val_from_ctx", False)`). Before this commit, it
wasn't evaluated, so a dynamic value would always result as true,
as it isn't "O", "false" or "False". To instance, go to Invoices
and add a group by. This commit fixes that issue.

Task 3130159

closes odoo/odoo#110235

X-original-commit: 1072c4880fdd2835b0711869da06681dab20d33c
Signed-off-by: Michaël Mattiello <mcm@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-01-18 16:19:28 +01:00
Jorge Pinna PuissantandAaron Bohy f56a2b4129 [FIX] web: keep filter when leaving a kanban view and coming back
- Open a kanban view;
- Select a progress bar filter;
- Open a record;
- Came back to kanban using the breadcrumb.

Before this commit, the progress bar is selected, but the records aren't
filtered.

Now, the kanban is exactly the same as it was when we click on the
record, the progress bar is selected and the records filtered.

closes odoo/odoo#110224

X-original-commit: ca864d7e6d510ef6410898099364d854a15150d7
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Co-authored-by: Aaron Bohy <aab@odoo.com>
2023-01-18 16:19:25 +01:00
Walid HANNICHE (waha) 7f3a4fbb2d [FIX] board: dashboard darkmode
Steps to reproduce:
- add elements to dashboard
- enter dashboard and enable darkmode

Bug:
titles are unreadable because background is white

Fix:
remove CSS property

closes odoo/odoo#110201

X-original-commit: 5b56f1891d618008678d70ad125ad1393abe352b
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-01-18 13:25:51 +01:00
Benjamin Vray 70cafe7cca [FIX] web_editor: fix classes removed from selected links
Steps to reproduce the bug :
    - In website (edit mode), add a mega menu in the Header.
    - Choose the "Cards" template for the mega menu.
    - Click on a card of the mega menu.
    - Change the url of link in the editor panel toolbar.
    - The style of the card is broken.

The issue is that when the link of the card is changed, 2 classes are
removed from the link ('text-wrap' and 'text-center').

This is from code that removes all classes starting with "text-" and
"btn-" when updating the link in the DOM. This commit fixes that by
avoiding removing classes that should never be removed there.

Note that a previous commit ([1]) had already corrected this but only
for the "btn-block" class. This commit fixes the issue in a more generic
way.

[1]: https://github.com/odoo/odoo/commit/888687b487e95b4bf4fb080118b5eb945c8ab724

opw-2954714
task-3006845

closes odoo/odoo#110186

X-original-commit: 121af26cfee8a227ce5925d3a64a99c5bb63d35f
Signed-off-by: Arthur Detroux (ard) <ard@odoo.com>
2023-01-18 13:25:46 +01:00
Géry Debongnie 3a5060c691 [REM] mail: remove remaining form renderer override
The mail code had to override both new and old form views to add the
chatter feature.  Since we converted (almost) all uses of the legacy
form view to the new owl views, the old override is no longer necessary.

This commit removes it, and also removes the 'legacy_form' entry in the
registry so all screens should fall back to the new form view, which is
stable.

closes odoo/odoo#110168

Related: odoo/enterprise#35924
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-01-18 13:25:43 +01:00
Florian Damhaut 85fe1bc491 [FIX] calendar: fix no last call traceback
If there was an issue an the lastcall value for the calendar cron
the cron would raise an error. This commit give a default value to
the lastcall equal to one week ago.

task-id : 3102295

closes odoo/odoo#110154

X-original-commit: e0aa273104ce576cd2746340f0e2c5c4af4a86bd
Signed-off-by: Arnaud Joset <arj@odoo.com>
2023-01-18 13:25:38 +01:00
Martin Maes 5d69c69c57 [FIX] mrp: Workorder timer not updating on user input
This PR addresses a bug where the user tries to update the real duration of a work order in the list view.
The timer was updated in the backend (so the update was showing when refreshing the page) but not in the front
The problem was the following : the state was never updated in the widget

closes odoo/odoo#110132

X-original-commit: 42bb1ac5195b614de4de674c47864abab79a5082
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-01-18 13:25:35 +01:00
Andrea Grazioso (agr-odoo) be2cc1b18a [FIX] l10n_din5008_*: add missing translations
Set report layout to DIN5008
Activate French language
Have a customer C with language set to French
Create a sale order to C
Print quotation

Some terms in the resulting document are left in english

As this layout is specific to some localizations (Germany, Switzerland &
Austria) we have the translation for the languages of these countries.
(German, French and Italian).

opw-3103361
opw-3089274

closes odoo/odoo#110120

X-original-commit: 85389ca353c6dcc0b639299628c7c24f08c3e26e
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
2023-01-18 13:25:32 +01:00
Jorge Pinna Puissant 65244f2122 [FIX] web: settings_form_view - resIds should contains only one id
- Install two languages;
- Install Accounting;
- Active 'Default Terms & Conditions';
- Select 'Add a Note';
- Click on the translate button;
- Answer 'Ok' when asking for saving the settings before modify the
    translation;
- Save or Discard the translations;
- Save the settings.

Before this commit, a backtrace is raised. This issue raise because we
create twice the settings record. One before opening the translation and
the second time juste before saving the settings. This is a normal
behaviour in settings, as we consider the settings view as always new, a
new record is always created. But, only the last one should be sent to
the python code on the resId array.

opw-3109677

closes odoo/odoo#109803

X-original-commit: 5394f4c82829f8c7e6aaf73ddb1590f316f87ee3
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2023-01-18 13:25:27 +01:00
rhe-odoo a7d9d63c46 [FIX] point_of_sale: price list test
This commit fix the test when different localisation are used to make sure that the public pricelist is used.
Before, when pos_pricelist test was done and some localisation were installed, it could lead to test failure because the default pricelist wasn't correct on the partners.

closes odoo/odoo#109698

X-original-commit: 53e942fd84549a04af2f9257ec3e80633b4f59ea
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2023-01-18 13:25:24 +01:00
Michael (mcm) 153f143003 [FIX] web: fix dragged list view row size
Before this commit, the size of the dragged row was shrunk during
the drag and drop. Now, columns have correct width and the layout
is preserved.

closes odoo/odoo#110193

Task: 2731998
X-original-commit: 27d17c3a9ea241d05b2ffc468094117012bc0a27
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-01-18 12:13:18 +01:00
Pierre Rousseau 040410e5cc [FIX] spreadsheet: correctly migrate date offset field matching
Steps to reproduce:
- Edit CRM -> Leads dashboard
- Edit filter "Period"
=> There is no period offset for the pivot 2, 4 and 6, despite the
   fact that these pivots have a period offset defined in the json
   data

This is because the field matching migration was not correct. It did
not take "offset" field into account.

Task-id 3138590

closes odoo/odoo#110221

X-original-commit: 2217c10ba771ece4a4d0d0485ce2f24b13754244
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
2023-01-18 10:16:20 +01:00
Aaron Bohy 942fcbfb3a [FIX] *: views: add component instance to rendering context
Owl last update fixes the leaking `this` in rendering context of
templates called with `t-call-context` [1]. Since [2], we use the
`t-call-context` directive to control the rendering context of
templates compiled from an arch (e.g. in form and kanban views).
We can now better control what people use in archs, where we don't
want them to access js implementation details, as `this` is no
longer available.

However, the component instance still needs to be accessible in
the compiled template. We thus add the `__comp__` key in the
rendering context. Since we do not want people to access it in
archs, we add a check in the view validation that this string
isn't used in dynamic attributes.

[1] https://github.com/odoo/owl/commit/df59ec49aefce2e0913fdc1792d42b9680fb28b6
[2] https://github.com/odoo/odoo/commit/4c5b867ff6b0b674cb83d1a1262ae354ebaa6d57

X-original-commit: 264f313012aa99449d1576ae1110252c13755142
Part-of: odoo/odoo#110196
2023-01-18 10:16:12 +01:00
Aaron Bohy 020ef1a694 [FIX] web: update owl from 2.0.2 to 2.0.3
Release notes: https://github.com/odoo/owl/releases/tag/v2.0.3

- fix: compiler: correctly escape backslashes when emitting block string
- fix: reactivity: don't subscribe to keys when making reactive
- fix: t-call-context: fix capture making component available in ctx
- fix: t-call-context: make `this` unavailable in rendering context

X-original-commit: 90e913172053bdecc89aceced8c490eba2490013
Part-of: odoo/odoo#110196
2023-01-18 10:16:12 +01:00
Michael (mcm) 07f121faff [FIX] web: confirm to leave settings
Before this commit, the confirmation dialog was opened
only when the user clicked on an action button.
Now, the dialog is also shown when the user clicks a
menu item in the navbar.
Of course this dialog is shown only if the user has
changed a setting.

closes odoo/odoo#110194

Task: 3102800
X-original-commit: a180178bfd73d6e5f95ee5a9e9cdc1b0d64fc574
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-01-18 10:16:08 +01:00
Thomas Lefebvre (thle) 3b5c46d327 [FIX] website_sale: get fiscal position public user
Steps to reproduce:
- website settings, set "Display Product Prices" to "Tax Included";
- apply a tax A to a product;
- with Accounting app, create a fiscal position
which maps tax A to tax B;
- realize the ecommerce flow with a public user.

Issue:
We notice that the `/shop/product` page
does not have the correct fiscal position.

Cause:
We use the geoip in `/shop` but not in `/shop/product`.

opw-3078766

closes odoo/odoo#110197

X-original-commit: cb850a4ef8352a358b1c7d73a67e4e25ba0b4e38
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>
2023-01-18 07:54:16 +01:00