Commit Graph
153049 Commits
Author SHA1 Message Date
luvi c94e38ca16 [FIX] web: ImageField style
This commit fixes the style of the field broken
since the introduction of the "display: contents"
rule in css.

closes odoo/odoo#97906

Related: odoo/enterprise#30073
Signed-off-by: Samuel Degueldre <sad@odoo.com>
2022-08-17 11:21:08 +02:00
Nikunj Ladava c8cdd6f5a3 [IMP] mail,sms: reset template button
Before Commit :
- Sometimes user breaks their Mail/SMS templates and have no way to go back to the
original one easily. They don't have any option to reset the template.

After Commit :
- Added new "Reset Template" button
- now user can reset the Mail/SMS template to its first version.
- also it will update the translation of the template
- added New "Reset Mail Templates/Reset SMS Templates" action to edit multiple templates

task- 2231977

closes odoo/odoo#83759

Related: odoo/upgrade#3674
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-08-17 11:20:56 +02:00
Julien Van Roy 6285b69281 [IMP] account_edi: remove dead function _is_account_edi_ubl_cii_available
This function was used to check the presence of the new module
`account_edi_ubl_cii`. The purpose was to use this module to render the xmls
for the existing modules: l10n_be_edi, l10n_no_edi, l10n_nl_edi... which used
outdated qweb templates (see https://github.com/odoo/odoo/commit/72c4972efd3f31bd86d100f160a530cc70400617).

After version saas-15.4, these old modules were removed and `account_edi_ubl_cii`
is used instead. Thus, `_is_account_edi_ubl_cii_available` is no longer used.

closes odoo/odoo#98208

Signed-off-by: Laurent Smet <las@odoo.com>
2022-08-17 10:03:02 +02:00
luvi 731a85f80e [FIX] web, product: BooleanField style
The field style was broken in form views since it
uses the display: contents rule. This commit
fixes the style of the field as it is now correctly
displayed inline.

It also changes the css selector to set the
style appropriately inside product views.

closes odoo/odoo#98185

Signed-off-by: Samuel Degueldre <sad@odoo.com>
2022-08-17 10:02:59 +02:00
Achraf (abz) ecc4db1944 [FIX] web: format correctly aggregate values in grouped list views
Steps:
  - Go to Employees/Reporting/skills

The first group has a Level Progress of `0.84444` which is not a valid
percentage, it should be `84.44%`

This fix calls the correct format function to display correctly the
aggregate values depending on their widget or type instead of just
displaying the raw aggregate value.

(https://pad.odoo.com/p/wowl_views:
[GMF] Employee : Skills report, group sum should be % https://tinyurl.com/262ec37z)

closes odoo/odoo#98207

Signed-off-by: FrancoisGe <fge@odoo.com>
2022-08-16 20:47:01 +02:00
Louis Wicket (wil) e8681d7440 [IMP] mail: remove useless memberThreads field on Partner
closes odoo/odoo#98191

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-08-16 17:50:07 +02:00
Alexandre Kühn f2d3a5bbd4 [IMP] im_livechat, *: remove Promise.reject in LivechatButton
*: website_livechat

closes odoo/odoo#98160

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-08-16 17:50:03 +02:00
Antoine Guenet 737479b25b [ADD] web_editor, website: commands to convert text into columns
This adds commands to convert the current text into 2, 3 or 4 columns,
and to remove said columns.

task-2901585

closes odoo/odoo#95359

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-08-16 17:49:58 +02:00
Tom De Caluwé 8c534f8724 [IMP] website: add languages field in the website creation modal
Allow the user to select multiple languages in the website creation modal.

task-2745347

closes odoo/odoo#86541

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-08-16 17:49:46 +02:00
Samuel Degueldre 73ec881535 [FIX] web: fix layout of kanban record and vignette
With the new kanban view, we have altered the structure of the DOM
slightly, and the kanban record is now a wrapper around the kanban
vignette. To restore the previous layout, some css rules need to apply
to the vignette. This commit adds those rules.

closes odoo/odoo#98188

Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2022-08-16 16:28:48 +02:00
Julien Van Roy eadf2a709e [FIX] account: product category - limit income/expense accounts
For the product categories, the default income and expense accounts
should only contain the income/expense accounts.
Such that the dropdown menu in the product view only lists the possible
income or expense accounts.

task-2835541

closes odoo/odoo#98184

X-original-commit: 526f44f3d1c5eaa0484ca96e491b7746d384522b
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Julien Van Roy <juvr@odoo.com>
2022-08-16 16:28:45 +02:00
Romain Derie febc059807 [FIX] website_slides: fix typo on method call
Since [1], the call to the method was missing the `()`, thus always
being truthy.

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

closes odoo/odoo#98179

X-original-commit: 0ef2509d321423f8f8616790352b32da51c289ae
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-08-16 16:28:42 +02:00
Yannick Tivisse 3255f21ea8 [IMP] sale_expense: Add stat button from expense sheet to linked SO
Purpose
=======

Make it easier to navigate between an expense report and the sales orders it impacted.

closes odoo/odoo#98169

Taskid: 2948615
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-08-16 16:28:38 +02:00
Louis Wicket (wil) 83b307bb0e [IMP] mail, im_livechat: remove useless guards
Remove useless guards introduced in odoo/odoo#97996.

closes odoo/odoo#98147

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-08-16 16:28:35 +02:00
Lucas Perais 8ff00133a5 [FIX] web: settings: label with string taken into account
Inside a res.config.settings form view have a label with a string on it placed
before the field it is linked to.
i.e.:
```
<label for="myField" string="myString" />
<field name="myField" />
````

Before this commit, the string was not taken into account to build the HTML label.

After this commit, it is.

closes odoo/odoo#98109

Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2022-08-16 16:28:25 +02:00
Ahmed Khalaf (ahkh) 8b8eca55c6 [FIX] stock_picking_batch: add picks to batch
When adding list of transfers to batch from transfer tree view,
if transfers belong to two or more batches an error traceback pops.

To reproduce:

1-Create Transfer 1, go to Transfer list view and add it to batch under Action, choose
add to a new batch transfer and confirm.
2-Create Transfer 2 and do the same.
3-Now that we have two transfer belonging to two different batches,
Under Inventory->Operations->Transfers, select the two transfers
in the tree view and choose add to batch under Action, choose add to new batch
and confirm, error popsup

Bug originated from: #89815
Discovered while working on TaskId:2871679

closes odoo/odoo#97998

X-original-commit: 82580b0ba9dbbfb244ede233a251b059e2c233ba
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Ahmed Khalaf  <ahkh@odoo.com>
2022-08-16 16:28:22 +02:00
Ahmed Khalaf (ahkh) af6afc8053 [IMP] stock_picking_batch: remove ensure_one in action_cancel
This commit removes a needless `ensure_one` in batch `action_cancel`

X-original-commit: cf6013fff67441f67800df56349877c820873110
Part-of: odoo/odoo#97998
2022-08-16 16:28:22 +02:00
luvi a818a9b732 [FIX] web: ColorPickerField behavior/style
This commit fixes the recently converted color_picker field
widget. It is now always opened in a list as in legacy,
no longer togglable and many style issues have been fixed.

In form views, we still toggle the opened state because
always edit is coming and it would bloat the UI to
keep it always open.

Tests has been added/modified to assert those desired
behaviors.

closes odoo/odoo#97872

Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
2022-08-16 16:28:17 +02:00
Lucas Perais d9257d3aae [FIX] web: core: domain supports domain as tuples
Have a domain declared somewhere in the XML as:
`("&", ("field", "=", "value"), ("field2", "=", "value2"))`

Before this commit, that expression made the Domain algorithm crash, because tuples
were not allowed.

After this commit, only tuples containing at least one other tuple and some optional strings are accepted.

closes odoo/odoo#97850

Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2022-08-16 16:28:14 +02:00
Odoo's Mergebot eb05ce9111 [MERGE] website: use new OWL components for page properties
Follows the merge of the 'website in backend' task at [1] and the new
OWL views structure at [2].

See sub-commits for details.

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

task-2687506

closes odoo/odoo#97343

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-08-16 16:28:05 +02:00
xO-Tx 61a9d7bd2a [REF] website: adapt website page fields to OWL
Since updating page properties means updating fields on the
'website.page' record, a 'page form view' was used to replace the
frontend page properties dialog at [1].

The goal of this commit is to update the fields used for website page to
work with the new OWL form views.

Follows the merge of the "website in backend" task at [1].

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

task-2687506

Part-of: odoo/odoo#97343
2022-08-16 16:28:04 +02:00
xO-Tx bf34319005 [REF] website: use formViewDialog OWL component
After [1], the frontend 'page properties' dialog was replaced by a 'form
view dialog' of the current 'website.page'.

The dialog structure in [1] was based on a 'PagePropertiesDialogWrapper'
component that handles a 'legacy formViewDialog' widget of the page.

Since 'FormViewDialog' is available as OWL component (starting from [2]),
we can now simplify the current code from:

A- 'PagePropertiesDialogWrapper': creates & opens a legacy FormViewDialog.

to:

B- 'PagePropertiesDialog' (the page formViewDialog): can simply be added
using 'dialog service'.

Remark: a wrapper ('PagePropertiesDialogManager' component) is used
temporarily by the legacy 'website.page' listView to add
'PagePropertiesDialog','DuplicatePageDialog' & 'DeletePageDialog'.
This component should be removed after the update of the listView to OWL
and components will be added using 'dialog service' as in the website
navbar menu code.

Follows the merge of the 'website in backend' task at [1].

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

task-2687506

Part-of: odoo/odoo#97343
2022-08-16 16:28:04 +02:00
Umesh Gupta e8949d9f79 [IMP] event: prevent communication line duplication on an event
Currently, when we change the event template, all the communication
lines linked with are added to the event. That means, even if some of
the lines are sent, and if the new templates lines that has exact same
configuration than the sent ones, they are still added to the event,
which means the same mails will be sent again to the attendees.

With this commit, we check that the communication line being added
(as a result of template change) has the same configuration against
any of the already sent one, it is skipped. As a result, attendees
will not be spammed with the same emails.

taskID-2811310

closes odoo/odoo#89961

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-08-16 16:27:52 +02:00
Benoit Socias 98e00bdb58 [FIX] website: allow retrying if website configurator fails
Whenever an error happens during the website creation after the last
step of the website configurator, it is displayed as an notification
popup, but it keeps the UI blocked, preventing the user from retrying
the operation.
The usually observed error is about not being able to install the module
or theme because a cron is in progress. The message actually asks the
user to retry later.

This commit does the following upon errors happening during the website
creation:
- silently retry after 5 seconds, up to 3 times
- after all attempts failed, display the error and release the UI and
allow for manual retry.

task-2809434

closes odoo/odoo#98124

X-original-commit: 2afdbc7181de3c87c1021f1e06d059ffe059ede0
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
2022-08-16 15:06:52 +02:00
Tommy (tong) dcda0b8b56 [FIX] base: round TWD at unit's place
Issue:

 - Rounding should be done at the unit's place for New Taiwan dollar.

Solution:

 - Round TWD at unit's place

closes odoo/odoo#98116

X-origianl-commit: f9638a7
X-original-commit: b36689fea400f56f1c6a1b473ac9ceb793456f5b
Signed-off-by: Laurent Smet <las@odoo.com>
2022-08-16 13:52:18 +02:00
Daniel Blanco a542cb3b3d [FIX] l10n_cl: adjust domain for vendor bills to exclude credit notes from in_invoice type
this fixes the domain of document types for vendor bills, (was failing since it included
invoices as a document type as option for
credit notes in the wizard and also fixes the opposite (credit notes in invoices generation)

closes odoo/odoo#98002

X-original-commit: 1a8a6c369b257bef87bc3efe62fc9b764a02ebf1
Related: odoo/enterprise#30368
Signed-off-by: Josse Colpaert <jco@odoo.com>
2022-08-16 11:39:57 +02:00
Nshimiyimana Séna 3999d2055f [FIX] l10n_es_edi_sii: fix URL of a tax agency's test server
The URL to the Spanish tax agency Agencia Tributaria's test server was
changed. The one currently used does not exist anymore. This causes an
error when trying to access the server.

opw-2888531

closes odoo/odoo#98114

X-original-commit: 2d8407b0dae262199c1bea3a3437e1175f76a630
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Nshimiyimana Serge Séna (sesn) <sesn@odoo.com>
2022-08-16 09:19:31 +02:00
Touati Djamel (otd) f4e9e15618 [FIX] mrp: avoid a traceback when using SN in a transfer
Steps to reproduce the bug:
- Go to Inventory→ Configuration→ Warehouse Management →Operations Types
- Go inside “Receipts”, and enable the checkbox “Create New Lots/Serial
Numbers for Components” and `Use Existing Lots/Serial Numbers`under the
traceability section
- Create a receipt transfers with a traceable product
- Mark as to do the transfer
- Try to add a SN for the product

Problem:
Traceback is triggered: “key error: raw_material_production_id”
because we use this field to add it in the context from the parent in
the `stock.move.line` view:
https://github.com/odoo/odoo/blob/15.0/addons/mrp/views/stock_move_views .xml#L53

But this field is not present in all views of the `stock.move` model

Solution:
To avoid adding this field in all the `stock.move` views, it is better
to add it in the context from the `python` code

closes odoo/odoo#98110

X-original-commit: 545713ae0a559e7f2747dd3cb4211ab752e1ef0c
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
2022-08-16 09:19:28 +02:00
Yannick Tivisse d2291a4f90 [FIX] hr_work_entry_holidays: Fix work entry generation on company time off
closes odoo/odoo#98058

X-original-commit: 6fd3c6640c3bb15ce181b14119aec7c2d851cf1d
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-08-16 09:19:24 +02:00
Yannick Tivisse d2ad74f8bd [IMP] hr_work_entry_contract: Allow regenerating work entries for several employees
closes odoo/odoo#98036

Taskid: 2917741
Related: odoo/upgrade#3772
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-08-16 09:19:20 +02:00
Xavier Morel 5c5876d74f [REM] osutil: deprecated code
We deprecated all those in 14.0, so 16.0 seems like a good time to
remove them.

`getppid` was not deprecated but it doesn't seem useful to keep

closes odoo/odoo#97987

Around: windows support was added to getppid in Python 3.2.
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2022-08-16 09:19:14 +02:00
Romain Estievenart 0de5d77765 [IMP] website_*: uniformize pager position on center
Before this commit, the pager was on the left or centered.
Now, it is always centered regardless of the website pages (portal or
not).

closes odoo/odoo#97967

Related: odoo/enterprise#30343
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-08-16 09:19:08 +02:00
Romain Estievenart 36628c9b1c [FIX] *: removes .form-inline
this commit removes the usage of .form-inline class which is deprecated
since BS5.

here is the css rules that was used:
https://github.com/twbs/bootstrap/blob/8fa0d3010112dca5dd6dd501173415856001ba8b/dist/css/bootstrap.css#L2303

'''Breaking change: Dropped form-specific layout classes for our grid
system.
Use our grid and utilities instead of .form-group, .form-row, or
.form-inline.'''

https://getbootstrap.com/docs/5.0/migration/#forms

We also took the opportunity to remove some .input-group-append and
.form-group. We are currently working to remove all of them.

Part-of: odoo/odoo#97967
2022-08-16 09:19:08 +02:00
tronghung0398 f45d8ecde6 [FIX] hr_holidays: fix the error of displaying wrong timezone
closes odoo/odoo#97965

X-original-commit: 16ea6416d46b568541df4c1d76e0fa4f15dad06a
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-08-16 09:19:02 +02:00
Florian Charlier 6d28b10bb5 [IMP] crm: improve lead company computation performance
# Purpose
Avoid unnecessary steps to compute/assign lead company.

Task-2824913
See odoo/odoo#97136

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-08-16 09:18:56 +02:00
Florian CharlierandFabio Barbero 6f81b5e0a8 [FIX/IMP] crm: allow more specific lead default company
# Purpose

Take into account the current company when creating a new lead if not defined
earlier.

# Specifications

If there is no company provided by the sales team and the user belongs
to several companies and several companies are allowed by context,
we preferentially take the current company over the user's company if allowed.

# Additional considerations

This commit
* builds on the multi-company fix brought by e5f35a60 avoiding the restricted
access error when setting to the user's base company if not allowed by context,
but will also allow to first preferentially use the current company instead of None.
* Complete tests

Task-2824913

X-original-commit: ce62780153183545ba423a7a8d945d9665cdc50e
Part-of: odoo/odoo#97136
Co-authored-by: Florian Charlier <flch@odoo.com>
Co-authored-by: Fabio Barbero <faba@odoo.com>
2022-08-16 09:18:56 +02:00
Yannick Tivisse 61c9f6aec0 [IMP] (hr_)fleet: Improve vehicle search view
Purpose
=======

Avoid having too many search for, lead the end user to use the main one.

closes odoo/odoo#98096

Taskid: 2937036
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-08-16 08:07:13 +02:00
Giang Pham 23220de37e [FIX] hr_timesheet: Fix access error when delete tasks
- When trying to delete tasks with an user who does not have read access on model account.analytic.line,
an access error will be raised.

closes odoo/odoo#98123

X-original-commit: d849cc75844d8efd7bc78941b1a10e4dbf6e1c97
Signed-off-by: Xavier <xbo@odoo.com>
2022-08-13 16:25:04 +02:00
Nasreddin Boulif (bon) e756aa90e1 [FIX] l10n_latam_invoice_document: Allow digitalization
Steps to reproduce:

  - Install l10n_ar module (or any l10n_* module that depends on
    l10n_latam_invoice_document)
  - Go to Accounting -> Vendors -> Bills
  - Click on Upload and select a bill file
  - Open draft bill
  - Click on `Send For Digitalization`

Issue:

  Digitalization don't start and a warning message is diplayed saying
  that some required fields are invalid.

Cause:

  When clicking on the button to digitalize the invoice, we try
  to save the form first before executing the action.
  By doing so, if some fields are required and empty, a warning message
  will be displayed.

  In this case, the issue is with the fields `Document Type` and
  `Document Number`.

Solution:

  Set `Document Type` and `Document Number` to not required if there is
  no partner_id set on the bill.

opw-2797444

closes odoo/odoo#98115

X-original-commit: b95473e3edf79796c7915afcdec5b4aa9addf273
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Nasreddin Boulif (bon) <bon@odoo.com>
2022-08-13 15:10:47 +02:00
Nasreddin Boulif (bon) 7418cf5eac [FIX] l10n_ar_website_sale: display error message for required fields
Steps to reproduce:

  - Install l10n_ar_website_sale
  - Go to shop and add a product to cart
  - Go to cart and click on `Checkout`
  - Ensure `AFIP Responsibility` is not field
  - Click on `Next`

Issue:

  Traceback raised.

Cause:

  During the validation of the form, even if the pre-validation (by
  calling super) returns an error for the afip fields because there
  are empty while they are required, we still try to get the code
  of the afip responsibility.

Solution:

  Return errors (from pre-validation) if any of the required afip fields
  are in errors before continuing the validation.

opw-2941199

closes odoo/odoo#98097

X-original-commit: b692f6e442f03d118bbb88d28ea215283e455254
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Nasreddin Boulif (bon) <bon@odoo.com>
2022-08-13 13:56:19 +02:00
Antoine Guenet 12e2f2d852 [FIX] mass_mailing: ensure no lazy loaded images on edit start
If images are lazy loaded in mass_mailing they risk not being converted
properly. This removes the loading attribute from all previously added
images when the editor loads.

opw-2850967

closes odoo/odoo#98107

X-original-commit: 3cb0f466cfa982aeb802e08ded8bdbf7b8f01220
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Antoine Guenet (age) <age@odoo.com>
2022-08-12 23:37:59 +02:00
Antoine Guenet 22a413f868 [FIX] web_editor: preserve card alignment on mailing conversion
Card dimensions were not properly preserved on mailing conversion.

opw-2850967

X-original-commit: 1be80cc83bec6a08abf6a3e8493d22f44350d038
Part-of: odoo/odoo#98107
2022-08-12 23:37:58 +02:00
Jeremy Kersten f230de431c [FIX] website_blog: see blog post even if tag doesn't exist anymore
If you delete a tag, but still have some link to this one, you arrive on
a 404 /blog/tag/.
We decide to redirect to the blog post without tag instead.
What is probably the expected behaviour for most customers.

closes odoo/odoo#98087

X-original-commit: 041ad20824e57b0850d7c74ca2ddbeab7f38990b
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Jérémy Kersten <jke@odoo.com>
2022-08-12 23:37:51 +02:00
Julien Van Roy a25490a4aa [FIX] account_edi_ubl_cii: fix Bis 3 support for Australia and Singapore
Add Australia and Singapore codes in the EAS list, enabling
the UBL Bis 3 format on the journals of these companies.

Also map the EAS codes to the correct Odoo fields:
* Australia uses the ABN, corresponding to the Odoo vat field
* Singapore uses the UEN, which has a custom Odoo field 'l10n_sg_unique_entity_number'

Fix the missing tax category codes for suppliers not in the european
economic area (e.g. Australian company invoicing a Singaporian one)

closes odoo/odoo#98073

X-original-commit: 8c6ed9386f2c1d29c903fd45d7d716b45eb9d47b
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Julien Van Roy <juvr@odoo.com>
2022-08-12 23:37:45 +02:00
tsm-odoo 15eda2d7cf [IMP] bus: prepare bus tests for websocket introduction
The bus tests rely to heavily on the underlying technology (polling).
In order to keep the test intact in the PR introducing the websockets
in Odoo, let's convert the test to be less technical.

task-2053917

closes odoo/odoo#97975

Related: odoo/enterprise#30360
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-08-12 23:37:39 +02:00
tsm-odoo 9d86827840 [IMP] bus, *: only use one mock server during tests
*: mail, web.

The pyEnv used during tests is based on the mock server to provide
server like api. This issue is that when creating multiple environments
during tests, a new mock server is created each time. This is not realistic
since in a real world scenario, multiple tabs would share a single server.
In order to make pyEnv work with multiple tabs tests (e.g. multiple env tests),
let's create a single mock server shared between js environment during a test.

task-2053917

Part-of: odoo/odoo#97975
2022-08-12 23:37:38 +02:00
Luis González 12dc06ebef [FIX] base: don't lose sudo when searching partners
Currently, when searching a partner through a related record using
`sudo()`, the superuser privileges are used when searching the record,
but not when searching the related partner. That's because the su flag
is lost during the call to with_user, even if it was to keep the same
user.

For instance, a code like the following wouldn't work if the current
user has no enough rights (e.g. the public user):

    self.sudo().search([('partner_id', 'ilike', 'John Doe')])

To solve the above, the with_user is called only when a specific
name_get_uid is given, as done in the _search implementation.

closes odoo/odoo#97920

X-original-commit: e5e12681437ae562517cc058e4ce0fab90cd0ae7
Signed-off-by: Raphael Collet <rco@odoo.com>
2022-08-12 23:37:34 +02:00
Romain Derie 4dd344b1e6 [IMP] website: improve frontend mini UI navbar
- Make the animation smoother and less prompt to bad UX:
  1. The animation duration of the closing part is now slower. Somehow
     it looked like the closing animation was faster than the opening.
  2. The animation delay of the closing part is now bigger. It will
     prevent some weird UX issues when the cursor is moving out of
     the window by mistake (eg moving a bit too far in the bookmarks
     bar or the Ubuntu left panel for instance). In those case, despite
     the user wanting to open and click inside the navbar, it would
     directly close it.
- Make the edit button only visible for editors
- Make the go to backend button only visible for internal users (not
  portal anymore)
- Restore a behavior that was lost during the frontend > backend task
  [1]: clicking on the app switcher in community should show the list of
  apps so you can directly access where you want to go in the backend.
  It improves the usability in community where you otherwise have to
  click twice every time as the first click always brings you to the
  discuss module from where you have to click again on the app switcher
  to select the app you wanted to land on.

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

closes odoo/odoo#97745

Related: odoo/enterprise#30218
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-08-12 23:37:28 +02:00
Miquel Raïch a669992509 [FIX] project: use correct lang when creating personal stages
It's expected that the personal stage is in the lang of the user_id. This commit assures it happens.

closes odoo/odoo#97523

X-original-commit: 2ab1f055b77ab50b62245ab8e34de91500d0c423
Related: odoo/enterprise#30322
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Signed-off-by: Xavier <xbo@odoo.com>
2022-08-12 23:37:19 +02:00
Didier (did) a682b0349c [IMP] mail: disable chatter when the user has no write access
Before this PR a user that could not post on the chatter could still try. This
PR disable the chatter topbar menu if the user doesn't have the write access.

task-2693304

closes odoo/odoo#88531

Related: odoo/enterprise#30054
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-08-12 23:37:10 +02:00