Commit Graph
151539 Commits
Author SHA1 Message Date
alt-odoo 1d3879b6df [FIX] account: allow billing user to register payment difference
Currently, the register payment button in the invoice form view is
accessible to any Accounting/Billing user. But in the payment register
wizard, the payment difference related fields are only visible for an
Accounting/Auditor user. This does not make sense as the auditor access
level is a read-only role, and there is no dependency between auditor
and billing rights. We should remove the group (as it is already
restricted in the access rights of the model) in the wizard to allow
billing users to use the functionality without the need for accountant
access rights.

closes odoo/odoo#94380

X-original-commit: 488bda480a38f9c09496f770be8a6f540c541044
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Alex Thuyls (alt) <alt@odoo.com>
2022-06-23 06:57:03 +02:00
Olivier Dony 038cdc66b9 [IMP] auth_totp: add trusted device method to validate user
Adds a variant `_check_credentials_for_uid()` for auth_totp.device's
`_check_credentials()`. The new method will directly verify the device
key matches the given uid.

This spares the redundant uid comparison on the caller side, and
allows extension modules to customise the user/device matching logic.

closes odoo/odoo#94365

X-original-commit: 0e266eb3c73409950d1eb160c41eb6668d439856
Signed-off-by: Olivier Dony <odo@odoo.com>
2022-06-23 02:05:42 +02:00
qsm-odoo b53feba3d0 [FIX] website: fix typo in snippets_all_drag_and_drop test
The test was introduced in [1] with a typo on the first step (which is
only there to ensure the test does contain steps).

Note: with the 15.1 forward-port, the "number of steps" check had to be
adapted because snippets were removed at [2]. This reveals however two
issues:
- Snippets which use the generic "Dynamic Snippet" as base are not
  tested by the test.
- [2] removed the s_speaker_bio snippet by mistake

Both those problems will be fixed in other PR alongside improving the
way the "number of steps" check works.

[1]: https://github.com/odoo/odoo/commit/460d5ecb926c13a79ba363f8f86442433d91bf6f
[2]: https://github.com/odoo/odoo/commit/b5c87d86cad1aa2b44f805da0b2d6635aeb85b96

closes odoo/odoo#94359

X-original-commit: 8e6a6ab532637ef9ef8d87ca4062e26b2852825a
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-06-23 00:57:46 +02:00
Alexandre Kühn a008d8c078 [IMP] im_livechat, *: Refactor JS Public Livechat (step 4)
*: website_livechat

This commit is a step towards refactoring the JS of public livechat,
so that it reuses the same architecture as the code of Discuss.
This implies code that uses JS models and OWL components.

Task-2892367

closes odoo/odoo#94347

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-06-22 19:33:01 +02:00
Piero (pca) b6c12771d9 [FIX] purchase_stock: restrict recomputation of qty_received_method to unconfirmed POs
This commit adds a search restriction on _compute_qty_received_method which will prevent the received method field from recomputing on orders that have already been finished.

This method is only called on the installation of this module and is used to update order lines of consumable products to use the standard computation of stock moves. In cases where purchase orders were completed ahead of this module's installation, this method effectively undoes all received quantities and resets them to zero. In orders that were already confirmed and billed, this displays the order lines with zero received quantities and no way to functionally change it.

opw-2854810

closes odoo/odoo#94325

X-original-commit: 849a561ebb26e7dca9018c6f81b8492ef21d7a7a
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2022-06-22 18:26:56 +02:00
tsm-odoo e97214ff4e [IMP] mail, *: remove createMessagingMenu during tests
*: im_livechat, test_mail, test_mail_full.

The createMessagingMenu helper was used during tests to mount
the messaging menu and test it. However, this approach is not
very realistic and blocks some waiting PRs. In order to get closer
from the reality, let's instanciate a webClient and a systrayService
for the messagingMenu to be present at all time.

closes odoo/odoo#94301

Related: odoo/enterprise#28747
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-06-22 16:32:42 +02:00
Benoit Socias 3fd430bf8e [FIX] web_editor: restore finding attachment image info
Since [1] the attachments are not found by `get_image_info` anymore
because the search based on the id only does not specify the model.
Because of this the mimetype of uploaded images is not put in the DOM
image's dataset. This lack of mimetype prevents the Shape, Filter, Width
and Quality image options from being used.

This commit defaults the model to `ir.attachment`.

Steps to reproduce:
- Drop a "Text - Image" snippet.
- Replace the image by uploading one.
=> The Shape, Filter, Width & Quality options did not appear anymore.

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

task-2883695

closes odoo/odoo#94288

X-original-commit: 99fda1024ff7d809f13523acd13770c02a49d1e1
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-06-22 14:28:56 +02:00
thcl-odoo 75416b03a7 [FIX] hr_expense: fix expense total computation
Current behavior :
The amount shown for an expense is equals to 0 instead of the real price.

Steps :
- Install Expenses, Accounting
- Create an expense and finish the flow (register payment included)
- In Accounting app, go to Vendors > Payments
- In this view, amount is equals to 0 but the amount is correct in individual view

Note :
Since this commit [1], `expense_id` is added on move.line so that
`_payment_state_matters` now returns True [2]. We are now entering this
condition [3].

This causes some issues when recording payments for our expense.
Indeed, the 2 lines (credit + debit) enter this condition [4] but debit line
should be treated by this block [5] otherwise the 2 lines cancel each other out.

Solution :
Add `exclude_from_invoice_tab = True` receivable/payable expense payment lines

[1] : odoo@1645995#diff-5bee371350ae80995abbea23e800bfb1c52f968db6c9dc59f2681ac415d34103R27-R28
[2] : https://github.com/odoo/odoo/blob/1e3a9c90908f37d19f4aa1bbcb81568dea9fd451/addons/hr_expense/models/account_move_line.py#L9-L13
[3] : https://github.com/odoo/odoo/blob/d6ca59ed9bf6877ee6b1b311223472adfa4db549/addons/account/models/account_move.py#L1419
[4] : https://github.com/odoo/odoo/blob/d6ca59ed9bf6877ee6b1b311223472adfa4db549/addons/account/models/account_move.py#L1422
[5] : https://github.com/odoo/odoo/blob/d6ca59ed9bf6877ee6b1b311223472adfa4db549/addons/account/models/account_move.py#L1434-L1438

OPW-2838105

closes odoo/odoo#94259

X-original-commit: a6b8feabcb2323edf7ca24d3e96e6cb7f420fcc9
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-06-22 14:28:49 +02:00
Lucas Perais (lpe) 2cafc7be88 [REF] web, base, website_sale_loyalty: remove unnecessary flags on action
action act_window can have a "flags" field which contains tweaking parameter for the views.
A little inventory:
- ation_buttons: if true displays on List and Kanban the buttons that trigger action
  in the control-panel bottom left area. It is true by default in JS.
- withControlPanel: whether to display the ControlPanel as a whole. True by default.
- search_view: not used or dealt with.
- mode ("readonly"|"edit") whether to initiate a form view in that mode.
  (used and practical -- but will be outdated when the edit mode by default is implemented)

This commit removes the occurences of those flags keys that are useless

closes odoo/odoo#94078

Related: odoo/enterprise#28620
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-06-22 14:28:43 +02:00
Aurélien Warnon 0532a00d94 [FIX] im_livechat: correctly handle closed conversations
Currently, when the visitor closes the chatbot conversation, the script keeps
running as there is nothing in the code to tell it to stop.

Which can cause issues, because the visitor is still able to "post" messages
through the rating, which will trigger the next step of the script.

Even though the user cannot see those messages and bot reactions, we should
still correctly end the script when the conversation is closed.

Especially since the visitor can ask to receive the conversation by email, and
we don't want him too see that the script wrongly continued.

Task-2882341

closes odoo/odoo#94234

Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-06-22 13:24:14 +02:00
Aurélien Warnon 623c8860f1 [FIX] im_livechat: fix chatbot edge case when talking to yourself
When testing the script and being logged in, a very edge case can happen when
we try to find a human operator and find "yourself" as a suitable operator.

In that case, act as if we did not find anyone.

Otherwise, the display gets strange as the bot adds "yourself" as an operator
but still acts as if he did not find anyone since there is only one person in
the conversation.

Task-2882341

Part-of: odoo/odoo#94234
2022-06-22 13:24:13 +02:00
Laurent Smet 38e4a5fbc3 [FIX] base: Fix PDF generation
Suppose we are printing a PDF on multiple records but having some of them excluded during the _prepare_html.
So, suppose these records are [20, 21].
If [21] is excluded during the rendering because nothing to render, the resulting html will contains only [20].
That is leading to a traceback when checking the outlines because of

assert len(outlines_pages) == len(res_ids)

This commit avoids to check the outlines if we don't care about generating attachments.
Then, we don't need to split the PDF in that case.

closes odoo/odoo#94204

X-original-commit: 210e63ab8b036bd20c68b1e03462c75af12aa326
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Signed-off-by: Laurent Smet <las@odoo.com>
2022-06-22 12:15:03 +02:00
Pierrot (prro) 9773469bb3 [IMP] account: improve Journal Items list UX
Some more iterations for improving the Journal Items list UX.
- Added a searchpanel on accounts
- Added the column Residual in Currency
- Dropdown list on account edit
- Added the Residual column

closes odoo/odoo#94076

Related: odoo/enterprise#28644
Related: odoo/upgrade#3612
Signed-off-by: Cedric Snauwaert <csn@odoo.com>
2022-06-22 12:14:52 +02:00
Odoo's Mergebot b725981505 [IMP] web,crm: revamp mobile kanban implementation
This PR main purpose is to revamp the grouped Kanban implementation on mobile to provide a more responsive, smoother and closer to the desktop functionalities experience for the user.

In a nutshell:
- columns are displayed individually ; an horizontal scroll allows to
  switch to the other ones, "snapping" to the column (aka. carroussel-like).
- each column takes 90% of the viewport's width to give a hint of its
  siblings.
- each column scrolls (vertically) individually to avoid being lost when
  switching from one column to another.
- folded columns are "virtually unfolded": they takes the same space as
  the other ones, but content is loaded on-demand.
- some configuration modals are fullscreen for ease of use.

Also, in this PR, the WebClient's layout has been standardized between Community and Enterprise to ease the maintenance and avoid redundancy.

Part of the SCSS revamp task-2704984

task-2883057

closes odoo/odoo#94134

Related: odoo/enterprise#28652
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-06-22 11:05:21 +02:00
Pierre Paridans 2dd37982e6 [IMP] web,crm: revamp grouped kanban mobile implementation
This commit revamps the grouped-kanban implementation for smaller
screens (aka. mobile) by making it more "responsive" and avoiding
mobile-specific variation. It makes the implementation simpler and
closer to what the user expects from the desktop version.

In a nutshell:
- columns are displayed individually ; an horizontal scroll allows to
  switch to the other ones, "snapping" to the column (aka. carroussel-like).
- each column takes 90% of the viewport's width to give a hint of its
  siblings.
- each column scrolls (vertically) individually to avoid being lost when
  switching from one column to another.
- folded columns are "virtually unfolded": they takes the same space as
  the other ones, but content is loaded on-demand.
- some configuration modals are fullscreen for ease of use.

Part of the SCSS revamp task-2704984

task-2883057

Part-of: odoo/odoo#94134
2022-06-22 11:05:20 +02:00
Pierre Paridans fbf7232edc [REF] web: standardize webclient layout
This commit refactors the WebClient's layout definition to avoid
differences and redundancy between Community & Enterprise editions.

This would ease the maintenance by streamlining both implementation,
keeping them closer. It also allows to have more similar scrolling
handling by default:
- on desktop: `o_content` is the action scroll container (no change)
- on mobile: `o_action` is the action scroll container (down from `html`
  node, to keep the navbar)

Part of the SCSS revamp task-2704984

task-2883057

Part-of: odoo/odoo#94134
2022-06-22 11:05:20 +02:00
Ivàn Todorovich 0822e8c867 [IMP] mrp: use prefetch for recursive quantities computation
This commit achieves two things:

1) Avoid calling super() on an empty recordset, in case all products
   are kits. Even on an empty recordset, some queries would be fired.
   This commit avoids them.

2) Use prefetch to read kit components quantity fields, to make use
   of the recorset optimizations that ends up saving sql queries.
   Otherwise, component quantities were computed on-demand one by one.

closes odoo/odoo#94225

X-original-commit: ef4ae7f62d6b690b4745b4145ce25ff02b6b29f6
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2022-06-22 09:58:40 +02:00
Kartik Chavda 2e14772036 [FIX] hr_timesheet_attendance: fix the timesheet attendance report
Attendance report is calculated from the timesheets of all the companies
when multi-company is enabled but only one company is allowed. This commit fixes it.

Steps to reproduce:
 - Create two companies
 - Create an employee with a user allowed in both companies
 - Create timesheets in both companies for that employee
 - Allow only one of the two companies
 - Check the Timesheet Attendance report -> timesheets from both companies are counted

This issue arrived from this commit:
https://github.com/odoo/odoo/commit/c69fe38b946089919c8939bbd9d1adc2602ddd2c

task-2782768

closes odoo/odoo#94232

X-original-commit: 0931807dab07e861e80cec3c802d4855097b0061
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-06-22 08:52:20 +02:00
Nguyen Hong Quang 209d888f62 [IMP] base: adding bank_id to Bank Accounts in
view `base.res_partner_view_form_private`.
Currently, when user setting data for accounting or payroll, the bank
had not set yet.
Therefore, they have to open Contacts to adding new bank, then back to
Employees to check if bank available.
This PR will adding bank_id to improve UX make fewer duplicate processes

closes odoo/odoo#94230

X-original-commit: 5ce0b0217b897ad49e03467c57a393f27067ac3a
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-06-22 08:52:17 +02:00
Jeremy Kersten 67b149fc3a [FIX] event_booth: mark data as non updatable
Start with 'demo' data is important for good onboarding.

But once we use the module in production, we don't want to reset price
with default one on each upgrade.

closes odoo/odoo#94218

X-original-commit: 03caf3eab8e5b612d1dbcad1b7e1e26212e9f53d
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-06-22 08:52:14 +02:00
Guillaume (guva) 2c3e4261b6 [FIX] l10n_au: don't duplicate tax repartit° lines when upgrade
We don't duplicate the tax repartition lines
when upgrading the account module

Steps:

- Create a company with l10n_au installed
- Upgrade account module
- Create a second company
- Try to link it with Australian accounting
-> ValidationError: Invoice and credit note repartition
should each contain exactly one line for the base.

We remove the records before creating them again,
like we do in l10n_be/data/account_tax_template_data.xml

opw-2862296

closes odoo/odoo#94213

X-original-commit: a33b7eea6222a89da9915d24a8122be7952182f5
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
Signed-off-by: Guillaume Vanleynseele (guva) <guva@odoo.com>
2022-06-22 08:52:10 +02:00
Alexandre Kühn 69cb3a2562 [IMP] im_livechat, *: Refactor JS Public Livechat (step 3)
*: website_livechat

This commit is a step towards refactoring the JS of public livechat,
so that it reuses the same architecture as the code of Discuss.
This implies code that uses JS models and OWL components.

Task-2890189

closes odoo/odoo#94190

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-06-22 02:15:51 +02:00
Sébastien Theys cb26712c52 [IMP] mail: move _updateChatterContainerTarget to _updateView
The call in `_renderNode` is too early and appears to do nothing. It has been
moved to `_updateView` (coming from enterprise).

Part of task-2871070

closes odoo/odoo#94188

Related: odoo/enterprise#28691
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-06-21 19:03:23 +02:00
Sébastien Theys 6f21575b18 [IMP] mail: move creation of _chatterContainerTarget in init
Part of task-2871070

Part-of: odoo/odoo#94188
2022-06-21 19:03:23 +02:00
Sébastien Theys 10d9c56f8d [IMP] mail: rename $chatterContainerHook and avoid jquery
Part of task-2871070

Part-of: odoo/odoo#94188
2022-06-21 19:03:22 +02:00
Sébastien Theys 8e08340ff2 [IMP] mail: use hasChatter instead of _chatterContainerTarget
This allows removing unnecessary method and removes coupling between concepts.

Part of task-2871070

Part-of: odoo/odoo#94188
2022-06-21 19:03:22 +02:00
Sébastien Theys 51e1f45313 [IMP] mail: move _isChatterAside definition to community
This allows removing overrides of other methods using it from enterprise code.

Part of task-2871070

Part-of: odoo/odoo#94188
2022-06-21 19:03:22 +02:00
Sébastien Theys ffcd256d50 [IMP] mail: move _makeChatterContainerTarget code into caller
Now that the method no longer requires an override in enterprise, it doesn't
need to exist as a separate method.

Part of task-2871070

Part-of: odoo/odoo#94188
2022-06-21 19:03:21 +02:00
Sébastien Theys 22293929c0 [IMP] mail: move _updateChatterContainerTarget in community
This allows reducing the complexity of overrides in enterprise.

Part of task-2871070

Part-of: odoo/odoo#94188
2022-06-21 19:03:21 +02:00
Jeremy Kersten a9b2ac0f06 [FIX] http_routing: add missing space in qweb template
Since last refactoring of qweb to replace postprocessing cleaning by
onEval cleaning, the space between xml node are now ignored.

It's not a bug, but a tradeoff of the new implementation to avoid empty
line with code like
```xml
    <t t-if="condition">
        <div>...</div>
    </t>
```

closes odoo/odoo#94170

X-original-commit: 18ae4d804064dab284dadf53eed0681b8c56a555
Signed-off-by: Jérémy Kersten <jke@odoo.com>
2022-06-21 17:58:10 +02:00
Huy Le 414d4f98a1 [FIX] website: og:url should be localized
Before this commit, with a website using multiple languages, when sharing
any links with a language other than the original language on Facebook,
the content of Optimize SEO always receives the value of the default
language.

The reason is that `og:url` does not change according to the
language of the website because it's using `http.httprequest.url`.

Note that `http.httprequest.url` doesn't contain the lang part since we
already went through the dispatch's rerouting.
So we need to localize `og:url` to fix this.

Steps to reproduce:
1. Set up 2 different languages for your website (e.g. English, Vietnamese).
 Set the default language for the website to English.
2. Create any page, promote seo page for both languages.
3. Share this link on Facebook with Vietnamese language, see the title
and description on preview are still in English.

closes odoo/odoo#93998

X-original-commit: d47a2e4d08110df380c0060eebb1e9c2924b523e
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-06-21 17:58:07 +02:00
Demesmaeker 25cb1542b9 [FIX] test_sale_product_configurators: error in matrix tour
Following the steps that changed every quantity in a matrix, the next
step was triggered after at least one sale order line's quantity was
changed. Due to the number of lines created, one of the so lines was
sometimes not updated before the next step, which produces an error in
the final sale_count.

In order to check the total and ensure every line was updated, we set
the partner sooner in the tour, which in turn sets the pricelist used to
get the price of each line. Thus allowing a check on the subtotal.

task-2886524

closes odoo/odoo#93892

Signed-off-by: Morgane Demesmaeker <edm@odoo.com>
2022-06-21 17:58:01 +02:00
Yannick Tivisse 86e7c7d8a6 [IMP] hr_recruitment: Scan CV on application forms
Purpose
=======

This commit add an option on the configuration to install the enterprise
module to scan and import CV information on the application form.

closes odoo/odoo#92019

Related: odoo/enterprise#26687
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-06-21 17:57:58 +02:00
William Braeckman f38ff9754d [FIX] hr_work_entry_holidays: prevent not being able to cancel time off
Prior to this commit if work entries/payroll was installed you could not
cancel a time off in the future if the work entries were generated for
that period, however you should still be able to cancel a time off as
long as the work entries have not been validated yet.

TaskId-2791386

closes odoo/odoo#94165

X-original-commit: 975ac8d2a1809bf7725d577b0fa9143a5b255e0d
Related: odoo/enterprise#28673
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-06-21 16:52:02 +02:00
Hardik Prajapati c5fa2e7e29 [IMP] project: improve user experience
This commit brings some user experience improvement:
- Add a line break between the content of the email and the
  'this customer survey has been sent...' indication in mail template
- Move the project_ids field out of the debug mode

task-2792027

closes odoo/odoo#92048

Related: odoo/upgrade#3579
Related: odoo/enterprise#27655
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-06-21 16:51:54 +02:00
Jeremy Kersten af8b192327 [FIX] website: fix twitter image format and use it
Twitter image was wrongly computed, appending /300x300 after the unique
parameters.

Twitter image was always overwrite by `website_meta_og_img` or
`opengraph_meta['og:image']`

closes odoo/odoo#94158

X-original-commit: 086724929bd8d21537b626a79d12f8739933f5a5
Signed-off-by: Jérémy Kersten <jke@odoo.com>
2022-06-21 15:41:53 +02:00
Thanh Dodeur 259cb3a9bd [REF] mail: cleanup the CallView template
part of task-2692836

closes odoo/odoo#94035

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-06-21 15:41:50 +02:00
Thanh Dodeur 8805558f0b [IMP] mail: reposition the CallActionList of the CallView
This commit moves the `CallActionList` of the `CallView` so that it sits
below the main card view but not below the sideBar.

part of task-2692836

Part-of: odoo/odoo#94035
2022-06-21 15:41:50 +02:00
Thanh Dodeur 12326de30f [REF] mail: create CallSidebarView component and model
Move the sideBar part of the `CallView` to its new model and component.

part of task-2692836

Part-of: odoo/odoo#94035
2022-06-21 15:41:49 +02:00
Sébastien Theys 19f48283d2 [IMP] mail: reorder methods in form renderer override
Overridden methods from Form view are separated from custom mail methods, and
are sorted according to their call in the lifecycle.

This will make it easier to understand the file, in preparation to clean it
further.

Part of task-2871070

closes odoo/odoo#94140

Related: odoo/enterprise#28655
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-06-21 14:33:37 +02:00
Rémy Voet (ryv) d2cb61dd84 [IMP] core: use faster count(*) instead of count(1)
Some article supports that count(*) is more efficient than count(1):
- https://blog.jooq.org/whats-faster-count-or-count1/
- https://www.citusdata.com/blog/2016/10/12/count-performance/ (sub menu Exact Counts)

In my own test (https://github.com/ryv-odoo/odoo_scripts/blob/master/test_count.py):
indeed, we can see a small performance gain with `count(*)` (between 2%
to 4% depending the number of row).  This isn't a big improvement but the
change is small and is now more consistent with the documentation of
postgresql (https://www.postgresql.org/docs/14/functions-aggregate.html).

closes odoo/odoo#94069

Signed-off-by: Raphael Collet <rco@odoo.com>
2022-06-21 14:33:32 +02:00
bat-odoo 4f6b9ab9d5 [IMP] l10n_in: update l10n_in_code in UOM
Purpose
=======
The Indian government updated its UOM code
https://einvoice1.gst.gov.in/Others/MasterCodes (select UQC Codes)

So In this commit, I have updated `l10n_in_code` in UOM Millimeter, Square Meter,
Litre, Cubic Meter, Yard, Square Foot, Cubic Inch and Cubic Foot.

closes odoo/odoo#93805

X-original-commit: 936bdc30c2837cfc79d1c8fce5c6cead16bb6020
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
2022-06-21 14:33:29 +02:00
Dossogne Bertrand 6cf977b078 [IMP] hr_contract: avoid screen shaking
On a contract view, if you hover the warning of a calendar mismatch,
the appearing warning text may lengthen the page, adding a scrollbar and
modifying the overhaul layout of the page on the chrome browser.
This commit keeps the text visible anyway so that no changes can cause
that screenshake.

Visual of the error:
https://watch.screencastify.com/v/MGPnCksg2eW49b7CoZc5

taskID 2878189

closes odoo/odoo#94142

X-original-commit: ddb4d6e463cbd410d59685effb189d654c581994
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-06-21 13:22:50 +02:00
Victor Feyens b6e2637fb1 [REF] sale: simplify price computation logic
* Make sure discount is correctly computed, while considering the
  attributes extra prices in the computation
* use available pricelist methods to compute base price
  (remove duplicated code)
* use the correct pricelist method to get only the needed rule wherever
  the price is not needed.
* reduce parameters exchange between SOL methods, use SOL fields
  instead when needed
* do not try to compute discount when no pricelist rule was found,
  there is no discount anyway
* Add docstrings, comments and use 'clear' methods name to ease
  the understanding of the logic.

closes odoo/odoo#88230

Related: odoo/enterprise#28552
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-06-21 13:22:38 +02:00
Vincent Larcin 55d8da526d [IMP] project: adjust portal visibility followers behavior
Currently, portal followers of a project and its tasks are removed when
the project visibility is changed to something else than portal.
=> We want to keep the behavior, but only when changing the visibility
from portal to something else.

When the project visibility is changed to portal, we currently add
its customer to its followers.
=> In that case, we also want to add the customer of the tasks to the
followers of the corresponding task.

When the customer of a project in portal visibility is changed, the
new customer is added to the followers of the project.
=> We want to remove this behavior.

When a project is created with a customer and the portal visibility,
the customer is added to the followers of the project.
=> We want to remove this behavior to avoid mistakenly showing a project
that is not ready yet to the customer.

This commit implements those changes, and also adds a warning when
changing the visibility of the project if that change will automatically
add/remove followers to the project and its tasks.

Related: https://github.com/odoo/enterprise/pull/25800

Task-2812551

closes odoo/odoo#87747

Related: odoo/enterprise#25800
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-06-21 13:22:32 +02:00
Barad Mahendra b5f8f2133b [IMP] project: unarchive tasks when unarchiving stages
Currently, all of the tasks contained in a stage are archived
when the stage is archived. However, the tasks remained archived
when the stage is unarchived.

So in this commit, If the user unarchives a stage, ask the user to
unarchive the tasks it contains in the process.

task-2835624

closes odoo/odoo#94008

Related: odoo/enterprise#28301
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-06-21 12:20:53 +02:00
Simon Genin (ges) c81c1ac6b1 [FIX] web: tooling -> cp -r doesn't copy symlink on macOS
closes odoo/odoo#94124

Signed-off-by: Samuel Degueldre <sad@odoo.com>
2022-06-21 11:20:26 +02:00
tsm-odoo b575fa53a7 [FIX] web, *: fix scroll tests
*: mail, point_of_sale, test_mail_full.

The alt of images can be displayed slightly after the programatic
scroll which means the scroll height we set and the one we assert
are slightly different (the client height have changed). In order
to solve this issue, all alt attributes are replaed by data-alt
during tests. The src attribute is removed as well to make sure
images won't trigger a GET request on the server.

closes odoo/odoo#94092

X-original-commit: 0446923db6b7376ee2c27e3f6e94b5f8e43a14fb
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Stockbauer Matthieu (tsm) <tsm@odoo.com>
2022-06-21 11:20:20 +02:00
Tommy (tong) fb43199c8b [FIX] base_import_module: fix imported static files cannot be replaced
Issue:

 Imported module is not able to search existing static files to replace them

Cause:

 After changing the new loc calculation, ir.attachment will link to the
 ir.model.data. However, those attachments will not able to search anymore
 without sudo. Therefore, the system will try to create the attachment again.
 It will return error because constraint "ir_model_data_module_name_uniq_index"
 will prevent ir.model.data to create again.

Solution:

 Use sudo to search the attachment.

closes odoo/odoo#93752

X-original-commit: 8f604847eb1ec96955ee724ad7b882c74160b9d7
Signed-off-by: Vincent Schippefilt (vsc) <vsc@odoo.com>
2022-06-21 11:20:17 +02:00
Rob Coekaerts a2ba3739b8 [IMP] hr_expense: disable quick creation of taxes
Disable the (quick) creation of taxes in places where
it is likely to result in faulty data entry. This forces
the user to fill in new tax records consciously.

task-2860025

closes odoo/odoo#93319

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-06-21 11:20:13 +02:00