Commit Graph
155440 Commits
Author SHA1 Message Date
Demesmaeker 706b88397c [FIX] sale: fix sale_quote_tour
Tour failed due to the always edit feature

task-3012774

closes odoo/odoo#103103

X-original-commit: 20032c71fbeb44c1b8f0e00ac93c7804c1ec602d
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-10-11 20:25:36 +02:00
Anita (anko) ccea0de419 [FIX] website(_payment): show fees badge for tokens on payment forms
Fees charged by payment providers are shown when choosing a payment
option (provider or token) on a payment form.

Before this commit, the fees badge was not shown next to tokens, which
could be understood as fee-free.

With this commit, the fees badge will also appear next to tokens.

task-2854120

closes odoo/odoo#103100

X-original-commit: 9dded8b5fadf99379018446d9390e6f9510e8e80
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-10-11 20:25:34 +02:00
Pratik Awasthi 7915ed452e [FIX] sale_project: fix default billable for non fsm project
Before this commit, While creating project from configuration
billable was not set true after enabling all fields from
settings in project.

So in this commit, allow_billable should be True by default for
non FSM projects.

task-2995118

closes odoo/odoo#103079

X-original-commit: 49125d9ad4e7d750550afdb0f900331ceb0f3f4a
Related: odoo/enterprise#32717
Signed-off-by: Xavier <xbo@odoo.com>
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-10-11 20:25:26 +02:00
Kartik Chavda 28b58c9e90 [FIX] timesheet_grid: fix Time Rounding's fields width in setting
This commit fix Time Rounding's fields width.

task-2999323

closes odoo/odoo#103032

X-original-commit: 0c11794aecc37507c054f2c823dffef3139e1970
Related: odoo/enterprise#32685
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-10-11 20:25:20 +02:00
Kartik Chavda 85951d7974 [IMP] project: remove tooltip from stage_id field of project
This commit remove tooltip from stage_id field of project model
from project app.

task-2999323

X-original-commit: 1e81116ea28de33ac54b99601ef5dd6048cef378
Part-of: odoo/odoo#103032
2022-10-11 20:25:20 +02:00
Kartik Chavda 06e1072dae [FIX] project: fix company_id issue in multi edit
Before this commit when env is not in multi company and user
try set parnter of multiple project it show company_id is not
defined because of group multi company on company_id field.

This commit add company_id field as invisible in list view
of project to fix the issue.

task-2999323

X-original-commit: a365ba849208b531dec3a3ad05d2fd061906736d
Part-of: odoo/odoo#103032
2022-10-11 20:25:20 +02:00
Kartik Chavda b50182d5b1 [FIX] project: fix rating template button's action
Before this commit rating template button action to redirecting to
stage was wrong and because of this clicking on that button does
not showing any stages.

This commit change button's action from project stage action to all
stage action to fix issue.

task-2999323

X-original-commit: ac7e8e85214a75943a5467e2a2ae61d0d3f31dde
Part-of: odoo/odoo#103032
2022-10-11 20:25:19 +02:00
joanna350 469504ac0c [FIX] account_facturx: update reference link for unece code
The previous link was dead

closes odoo/odoo#103111

X-original-commit: 570fec0ae6f4441a6134c5b488d4b3c6b33f0466
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-10-11 18:56:25 +02:00
Soukéina Bojabza e53370e1b8 [IMP] website: add background option to Masonry and Big Boxes snippets
The Masonry and Big Boxes snippets don't have a background option
because their blocks are supposed to take the whole space, so a
background is not really necessary. But since the addition of the grid
mode, these blocks can be placed more freely and a background may
therefore be necessary.

This commit adds the background option to these snippets.

task-3014939

closes odoo/odoo#103109

X-original-commit: 019f6824caafdf2cdc79babcbe45af3db0df1550
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-10-11 18:56:22 +02:00
Soukéina Bojabza 54955603e6 [IMP] web_editor: prevent columns to be trapped in grids at drag start
When two building blocks are one above another, if there is no padding
between them, we notice that the move handle of the columns of the
lower block is located on the upper block. This is a problem when the
upper block is in grid mode because since the mouse is above it, the
drag is considered over this grid, instead of the block from which
the column comes from. The column is therefore "trapped" in the grid,
which is unconvenient.

This commit solves this issue by "canceling" the over if the start of
the drag falls in this situation. More precisely: if the first dropzone
to detect the "over" event when we start to drag a column is a grid
dropzone that is glued to this column, then the over is canceled.

task-3013882

closes odoo/odoo#103107

X-original-commit: 122eb3821a9294e4f6e2d346df942b394ca039dc
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-10-11 18:56:19 +02:00
Romain DerieandXavier-Do 6e21371c1c [FIX] test_assetsbundle: don't pregenerate assets outside test mode
Commit [1] and [2] introduced an assets pregeneration to speed up the
testing suite on runbot.

It seems like it was chosen to always pregenerate the assets when a
module was installed/upgraded. This was done in the `test_assetsbundle`
module to only impact the tests flows, but it was not correct as it was
not only impacting the tests flows but also regular runbot usage.
Indeed, any `all` runbot (the default one) will have that module
installed.
It means that any module operation through regular flow in those DB will
trigger the assets pregeneration.

One of the problem is then that during a theme switch through the
website builder (or configurator), assets would be pregenerated, adding
~40 seconds to the processing time.
Since that theme install was already taking ~30 seconds on `all` runbot,
it sometimes now total over 60 seconds, triggering the `CPU Time Limit`.
You can find some benchmark and metrics on this commit PR.

Obviously, that's not fine because runbot, despite being our testing
tool/platform, is also one of our main demo tool.
That's especially true around the OXP period, where people are recording
video on it but will also use it to show demo to the customers.

Finally, there is no reason to not limit this assets pregeneration to
the test mode anyway.

Note that sometimes, the theme install is failing and responding with a
502 error after a long time, this is yet unsure if this was the cause
but it was during this investigation that this commit fix was found.
It is probably the cause though.

[1]: https://github.com/odoo/odoo/commit/c764c38d7caf300dce7509e87d2bd268eee0161d
[2]: https://github.com/odoo/odoo/commit/d47cf37b688117d6b2514b9b620787aa66312c61

closes odoo/odoo#103105

X-original-commit: 5e77961e4768ef2d3d40f1600dd76a633a0e231b
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: Xavier-Do <xdo@odoo.com>
2022-10-11 18:56:16 +02:00
Pierre Paridans d98f4d2cf3 [FIX] web: add support for switch type in Burger's UserMenu
This commit adds an implementation of the UserMenu item's type 'switch'
for the BurgerMenu (used in smaller screen).

Note: this commit also adds unit tests for the BurgerUserMenu ; the
asserts are largely inspired by the regular UserMenu tests.

closes odoo/odoo#103102

X-original-commit: 0653ec8672e5878e40c804ea569dfccbd6105edc
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2022-10-11 18:56:14 +02:00
Pierre Paridans d2d7a280a7 [MOV] web: matching folder structure in web/tests/mobile as web/tests
X-original-commit: 6d12386ce2a82a4851d021194fa9326ff0f4b334
Part-of: odoo/odoo#103102
2022-10-11 18:56:13 +02:00
Pierre Paridans d616ade15c [MOV] web: BurgerUserMenu file should match class name
X-original-commit: 2cb344aad9f74b54cf8a125ab7ce0e41c56e44fa
Part-of: odoo/odoo#103102
2022-10-11 18:56:13 +02:00
Anita (anko) 7b7795195f [FIX] payment(_demo): fix tags display in payment forms
Due to migration from Bootstrap 4 to 5, rounded badges look bad. No
unification of badge styles, some are rounded and some are squared. Tags
style should be unified and adjusted for Bootstrap 5 with this commit.

task-3001057

closes odoo/odoo#103099

X-original-commit: 611e2f20f975c590eb75d64379be84dd4cc472ef
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-10-11 18:56:07 +02:00
Thanh Dodeur 4de6e78067 [FIX] mail: prevent traceback when trying to recover a rtc connection
Before this commit, trying recover a connection that didn't exist
anymore would cause a traceback. This commit fixes this issue.

closes odoo/odoo#103088

X-original-commit: 44973577e4bfc7b36b5d3aa356519a36fb6ecc78
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-10-11 18:56:01 +02:00
Damien Bouvy 6920143fd8 [IMP] product, delivery: inline fields display
View styling, no functional change

closes odoo/odoo#103087

X-original-commit: 4cb0d14f435e84db0f3c48556bd541a7497f24a6
Signed-off-by: Bouvy Damien (dbo) <dbo@odoo.com>
2022-10-11 18:55:59 +02:00
Valentin Vallaeys (vava) c2c6367623 [FIX] payment_authorize: align buttons with related fields
closes odoo/odoo#103085

X-original-commit: 94626d91442de5ee01915c36515819b2f3621ed2
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Vallaeys Valentin (vava) <vava@odoo.com>
2022-10-11 18:55:53 +02:00
Ahmed Khalaf ec53aa4d55 [FIX] stock_account: product revaluation form align
Before this commit product revaluation form has alignment issues

closes odoo/odoo#103082

X-original-commit: 107806e4e0d67d22e83a1b3ce5b9aa8418f5f95a
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2022-10-11 18:55:48 +02:00
Odoo's Mergebot eebb329fc8 [FW][MERGE] hr_timesheet,web: add owl tests and fix bugs
This PR purpose is to ensure that tests are created on OWL Components that have been created in the context of the OWL migration PR odoo/odoo#100729.

This PR also addresses some bugs that have been discovered during tests writings.

task-3001470

closes odoo/odoo#103033

Forward-port-of: odoo/odoo#101967
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-10-11 18:55:40 +02:00
qdp-odoo 7a6137347d [FIX] tests/common.py: fix context propagation in o2m onchanges in Form()
Previously, the context passed in onchanges calls after a o2m modification in the form view were the one of the parent object, whereas it should have been the context defined on the o2m field itself

closes odoo/odoo#103081

X-original-commit: 31ee570d17db2f5e3e2ff6877a7634ab9be12492
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: William André (wan) <wan@odoo.com>
2022-10-11 17:59:43 +02:00
william-andre ae2fcda9e8 [FIX] account: quick encoding
The computation of the taxes in the context of quick encoding wasn't
working properly.
* The value was not updated in the widget when it was updated
  programatically.
* The payment terms were created twice because of the `new` method on
  account.move.line
* The taxes should be updated both when we create a new line manually
  and when we update the quick encoding fields
* Generally speaking, it should be all controlled from the invoice, not
  from the lines

To test and reproduce: use a tax of 21% with an invoice line of 100.0

X-original-commit: 48c068a2d76c302fdddda7125b7244c670b4a77c
Part-of: odoo/odoo#103081
2022-10-11 17:59:43 +02:00
John Laterre (jol) 42cdd7f657 [FIX] account: include account changes in autosave triggers
Currently, when creating/editing Journal Entries, changing
taxes or balances (with taxes) triggers a save in order
to generate an automatic balancing line.

See this PR : https://github.com/odoo/odoo/pull/102040

But in some cases (like the non-deductible taxes in Belgium),
the tax line is linked to the base line account (or its partner).
Which is why we also need to trigger a save when changing the
account (or partner) on a line with taxes.

This also fixes a bug that prevented the Journal Entries from being posted.

closes odoo/odoo#103080

X-original-commit: beb49a83b5c0c1547122dd91582a6a2bd26a4cfc
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
2022-10-11 17:59:40 +02:00
Touati Djamel (otd) 4ef8307d5c [FIX] purchase_requisition: use the requisition currency in the report
Steps to reproduce:
- Connect with a company that uses the dollar as currency
- Go to invoicing → Configuration → accounting → currencies
- Enable euro currency
- Create a new Purchase Agreement:
     - Agreement type: “Blanket Order”
     - Currency: “euro”
     - Add any product:
         - Qty: 1
         - Price: 10
     - save
- Print → Call for tenders

Problem:
The price is displayed in the current company device instead of the
Purchase agreements currency

opw-2991156

closes odoo/odoo#103067

X-original-commit: 8103d501541db07d0b546d5729e66c9a9915a4d1
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2022-10-11 17:59:35 +02:00
mafo-odoo 4a636582a4 [FIX] payment_payulatam: cancel transaction can be set to done
Steps to reproduce:
A) Share a payment link and pay with PayU Latam (you'll be redirected
to their checkout page)
B) Make sure that your first payment attempt with Pay U Latam fails
(they provide the cards info to simulate successful and failed
payments)
C) After the first failed attempt, stay on the same checkout page and
do a second attempt (this time a successful attempt)
D) Click on 'Go back to the website of the shop' (still on the
checkout page).

Current behavior:
Odoo will show 'Your payment has been canceled'

Expected behvavior:
Odoo will show 'Your payment has been confirmed'

Explanation:
After the first payment failure payulatam calls the webhook to cancel the
transaction but after it lets the user the possibilty to retry the same
payment again and if the payment succeed it calls the webhook again to
confirm the transaction but it can not as the transaction is already in
a canceled state. To prevent this issue we allow the payulatam webhook
to set the transaction from canceled to done by adding canceled in the
allowed states of _set_done()

opw-2994527

closes odoo/odoo#103066

X-original-commit: 162b4a4fb958b8568a2d99625934b9b4f4dfa103
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-10-11 17:59:32 +02:00
tsm-odoo 1dea9e9900 [IMP] mail: improve kanban activity style after refactoring
This PR improves the style of the kanabn actiivty popover after the wowl
refactoring. It focuses on:
- Restoring button hover style
- Restoring scroll behavior for multiple activities
- Restoring text ellipsis on long activity summary/name
- Centering mark done buttons
task-2998139

closes odoo/odoo#102983

X-original-commit: 2cebfd9
Related: odoo/enterprise#32667
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-10-11 17:59:21 +02:00
Ahmed Khalaf (ahkh) dc0741427c [IMP] mrp{_account}: tooltip changes
This commit updates some tooltips in workcenters and operations forms

ENT PR: odoo/enterprise#32519

closes odoo/odoo#102936

X-original-commit: 817bf13160cbf06a574c2168d728ea04b10a99f7
Related: odoo/enterprise#32645
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2022-10-11 17:59:13 +02:00
Mathias Mathy (MAMA) b3196731e4 [FIX] purchase_stock: Adapt configuration's tooltips
Simplify the tooltips for 'Security Lead Time for Purchase'
and 'Days to Purchase'  in the 'Advanced Scheduling' part
of Inventory configuration.
Task : 2985735

closes odoo/odoo#102933

X-original-commit: cdeccd85d96a4be383d271d7219749541c1ee686
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2022-10-11 17:59:11 +02:00
Tiffany Chang (tic) 7e310e531e [IMP] stock{_account}: polish views
Followup to inventory back2basics task 2882539

- order stock.move.line tree (Moves History) view by "id desc" for
  better performance (prev: create_date is not indexed)
- order stock.valuation.layer tree (Valuation) view by "id desc" for
  better performance (prev: date is not indexed)
- hide "Moved Quantity" column when in current valuation (not at date)
- remove the action: "Set" and print: "Count Sheet" from
  stock.quant.view when not in "Inventory Adjustment" related view
- Fix "Inventory At Date"/"Valuation At Date" button visibility issue
  that came up due to OWL refactoring
- Don't show consumables in stock.valuation.layer (Valuation) report
  view action (forgot to include domain when creating new action)
- Add stock.move menuitem back in under "reporting" in debug mode since
  this view isn't accesible anywhere else and it is used a lot for qty
  forecasts by users
- Add "Created By" (as "Done By") to stock.move.line history view for
  easier tracking of inventory adjustments

closes odoo/odoo#102929

Task: 2965586
X-original-commit: 8904c3c4b709f94266a883bc734faad8b3b4ba3a
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2022-10-11 17:59:08 +02:00
Louis Wicket (wil) fa4c0103bd [IMP] website_livechat: move code to models (VisitorBanner)
- Create VisitorBannerView model
- Pass record as props
- Turn other props on component into fields on model
- Remove export default

Task-3004301

closes odoo/odoo#102387

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-10-11 17:59:02 +02:00
Thomas Beckers cd9eea7c9c [FIX] l10n_eg_edi_eta: send invoices with individual partner
Before the fix it was not possible to create an invoice with an individual partner
and send it to the government. The 'type' of the receiver is a required property
to send to the government. There is no mention of it being optional in the API
(https://sdk.invoicing.eta.gov.eg/documents/invoice-v1-0/#receiver).

Now it's possible to send such invoice and the 'type' of the receiver is always sent.

opw-2979515

closes odoo/odoo#103053

X-original-commit: 832fcfa708e014741fe244fd48a0c89f0a18863c
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Beckers Thomas (tbs) <tbs@odoo.com>
2022-10-11 16:57:11 +02:00
Nicolas Bayet ea9c886595 [FIX] mass_mailing: prevent theme picker to reload
Before this commit
The theme "Start From Scratch" could not be selected as the theme
picker was reloaded when clicking on that template.

closes odoo/odoo#103034

X-original-commit: 1a1d1c0f229aa0d29cf22806ffb1be04ab9cfa1c
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-10-11 16:57:02 +02:00
Nicolas Bayet 9a67b3874f [FIX] web_editor: update editor value when changing records
Before this commit
1) click on a record in a list view
2) change the html field of a record
3) click on the top right arrow to change the next record
4) click on the top right arrow to change the previous record
5) click on the top right arrow to change the previous record

The value is not updated corretly at step 4, retaining the value from the
previous record. The wrong value is then saved at step 5.

After this commit
Properly reset the HtmlField property `currentEditingValue` when
the update of props value does not comes from the editor.

X-original-commit: 39d02c3cdc2d4256b62cd6414369a8cf82efff48
Part-of: odoo/odoo#103034
2022-10-11 16:57:02 +02:00
xO-Tx 2dc82504e0 [FIX] website, *: use generic code for "edit event menu"
*: website_event

The 'website_event.menu_edit_menu' menuitem was added on 'website_event'
module to the 'custom menus' registry so it can be displayed by the
'website_custom_menus' service if the event page has menus to edit.

The goal of this commit is to move this code to 'website' by using a
generic 'custom_menu_edit_menu' menuitem that will be cloned to edit
every content menu on the current page with the corresponding
'EditMenuDialog'. This is needed as a fix as it would be a regression
to not have this in 16.0 since it was possible to edit any menu on a
page in previous versions.

task-2973149

closes odoo/odoo#102997

X-original-commit: 6af5ad67c9657c7dcaf4afa1ecb4561e9c72270a
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-10-11 16:56:58 +02:00
Mathias Mathy (MAMA) d4eb7afcf1 [FIX] stock: rename routes on warehouses' name change
When a warehouse is renamed, associated route's name shall be renamed accordingly.
As previously, the call to 'route.write()' in method '_update_name_and_code' was done after the 'super().write()',
there was no way to remember the old name of the warehouse, and the 'replace' was so uneffective.
The effectivenes of the replace is reestablished by doing the 'super().write' after the call to '_update_name_and_code',
however, it breaks the method '_get_sequence_values' because it expects the name and code to be already written.
That's why the optional parameters 'name' and 'code' are added to this last method.

Task : 2985735

closes odoo/odoo#102968

X-original-commit: 3ebb80828f2d0bc15dd53c594c07bc374cc5be8d
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2022-10-11 15:52:05 +02:00
yhu-odoo 70810919da [FIX] mrp_subcontracting: portal should be readonly
1. Except for registering components, the portal should be readonly
2. Don't open sm form when click it.

closes odoo/odoo#102935

X-original-commit: 4c5ba480e91b7e06c49b3683c36ff0a9aac9b60f
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Yuchen Huang (yhu) <yhu@odoo.com>
2022-10-11 15:52:02 +02:00
Fabien Pinckaers d9e753aa29 [IMP] missing d-flex to align star & name
closes odoo/odoo#102526

X-original-commit: fd8f15366f395aab0a0b6c453fb0ab3aad082b74
Signed-off-by: Fabien Pinckaers <fp@odoo.com>
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-10-11 15:51:59 +02:00
Renaud Thiry 96c8dd3ca8 [FIX] web_editor: onAttachmentChange only composer
Due to a previous fix, attachments uploaded through media dialog would appear in the attachments of mail marketting.
That fix prevents attachments from 'dangling' and being garbage collected later.

That fix is now limited to the mail composer in this commit as attachments are only garbage collected for that model, for now.

related commit: c112361bf9e2f5e7b087c5e5b9a31879856b1da4

task 3003939

closes odoo/odoo#103038

X-original-commit: 69fdca133b06eb66443635bc52d380233580ef51
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-10-11 14:10:25 +02:00
Demesmaeker 52d46e1e76 [IMP] sale: invite to complete address
task-3002442

closes odoo/odoo#103036

X-original-commit: 2618d1b740d5d291b29a96601f8af08ffc470473
Signed-off-by: Morgane Demesmaeker <edm@odoo.com>
2022-10-11 14:10:23 +02:00
Demesmaeker 95048fff04 [IMP] web_tour,*: add dynamic step skipper in tours
Some onboarding tours were conflicting between themselves, with some
common steps. This commit introduces the possibility to skip a step
depending on the current DOM, making dynamic tours and ensuring tours
compatibility

task-3002442

X-original-commit: 1e4fb74f2cb8d500effa54d548dc9c29f12b32c1
Part-of: odoo/odoo#103036
2022-10-11 14:10:23 +02:00
Antoine Guenet dc18de099e [FIX] web_editor: prevent editing non editable media
Prior to this fix it was possible to edit a media that was not editable
because no check existed for such a thing.

task-2962912

closes odoo/odoo#103035

X-original-commit: ddade4346347266b7f699d05865578dc96e2bf98
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Antoine Guenet (age) <age@odoo.com>
2022-10-11 14:10:19 +02:00
Chong Wang (cwg) 7718fe9508 [FIX] core: assert translated fields cannot have size
Translated fields are stored as jsonb columns. Since jsonb columns don't have
size, the size attribute for Char field doesn't work. Setting the size attribute
for a Char fild should raise an error

closes odoo/odoo#103031

X-original-commit: 763fbb1c68385f202f5118fac5bc8b23b8760220
Signed-off-by: Raphael Collet <rco@odoo.com>
2022-10-11 14:10:16 +02:00
Chong Wang (cwg) 25e4a53753 [FIX] core: fix search domain containing empty False None
For non-translated field, when search(['name', 'in', list_right])
The behavior of False and the behavior of None in list_right should be the same.

Translated fields need customized process for 'in' operator

X-original-commit: a9a3c666f08c5612432dba40a69c7cfdc54ba96e
Part-of: odoo/odoo#103031
2022-10-11 14:10:16 +02:00
Chong Wang (cwg) 105e0b9ef2 [FIX] core: search translated fields with characters needed to be escaped
The trigram index function jsonb_path_query_array("column_name", '$.*')::text
uses all translations' representations to build the indexed text. So the
original text needs to be JSON-escaped correctly to match it.

X-original-commit: 7547df664945dddcb839e4903068f7f25ecfc08c
Part-of: odoo/odoo#103031
2022-10-11 14:10:16 +02:00
Chong Wang (cwg) db8545eb5f [FIX] privacy_lookup: skip query translated fields
Usually, a user name is not translated, and will not be stored in another
translated field.

X-original-commit: 1c3d14a384d5e7b86c2304ee6061855c5f448048
Part-of: odoo/odoo#103031
2022-10-11 14:10:15 +02:00
Chong Wang (cwg) be1eed6cd7 [FIX] core: fix search for translated field
make searching translated field language dependent
add an extra filter using trigram index to speed up '=' and 'like' search

X-original-commit: 5b6f0a9e5f9d60735e306709a3e7d7ac46a586be
Part-of: odoo/odoo#103031
2022-10-11 14:10:15 +02:00
Chong Wang (cwg) bde30899a4 [FIX] core: new PO file overrides old ir_translation
Before: while upgrading to 16.0, the PO file is loaded before migrating
ir_translate. As a result, old translations from ir_translation
override the new translations imported by new PO files.

After: translations imported by the PO file take priority over the
translations migrated from the ir_translation table.

X-original-commit: 178270eff48221537a4efba1ad8fa0b53a1516f2
Part-of: odoo/odoo#103031
2022-10-11 14:10:15 +02:00
Younn Olivier d3a3397c4d [FIX] website: prefer requested action url over last url
Before this commit, there was a conflict between 2 of the ways to open
the WebsitePreview iframe.

First, introduced with [1], when a user click on the 'edit in backend'
systray button, the URL he was on is stored to be used later if the user
click on the "Website Preview" breadcrumb. When he will click on that
breadcrumb entry, we want him to go back to where he was, not on the
homepage.

Second, some records in form views have a "Go to website" stat button
that will go to the website preview action, loading the iframe with the
URL of the record from the form view.

Before this commit, the second flow was not working if the user
previously click on "Edit in backend" on a record (first flow
described).
Indeed, if that "last url" was set, it would always be used, ignoring
the requested one from the second flow.

Step to reproduce:
- Go to a record in the website preview, like a product
- Click on edit in backend
- You land on the product form view, and that url was saved in JS
- From there, navigate to another record through the form view, like a
  m2o relation or a stat button, or by whatever other mean, but don't
  hard reload the page (F5)
- For the example, let's say you landed on a blog post record
- Click on "Go to website" on that blog post form view
-> You land on the product page you were initially, not on the requested
   blog post page.

Courtesy of @rdeodoo

[1]: https://github.com/odoo/odoo/commit/31cc10b91dc7762e23b4bde9b945be0c4ce3fe3b

task-2687506

closes odoo/odoo#103010

X-original-commit: 7cd55e8a1d9516a6f457320064160328a49210f9
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-10-11 14:10:09 +02:00
Paolo Gatti 957b1b5ca0 [FIX] l10n_it_edi: demo data from US gets an Italian VAT number
Fixing some demo data from US having an Italian VAT.
Also, a partner's name and VAT has been changed not to be too similar
to one of our actual clients. Now the Engie Italia's VAT is used.

closes odoo/odoo#102989

X-original-commit: d169552778dff396ef28bd7b76500db8dca32879
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Paolo Gatti (pgi) <pgi@odoo.com>
2022-10-11 14:10:06 +02:00
Alexandre Kühn cf34560383 [FIX] im_livechat, *: Fix broken test page of chatbot
*: website_livechat

Task-3006246
Task-3010911

closes odoo/odoo#102985

X-original-commit: 59002571344405ce4fb691761f62d4fb909ffc17
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-10-11 14:10:02 +02:00