Commit Graph
147054 Commits
Author SHA1 Message Date
Thibault Delavallée 48e92ac956 [FIX] website_event_questions: fix propagation from template
A wrong field is used to control propagation of questions from event template
to child events. Currently an event template must use automated emails to
propagate its questions, instead of correctly checking the question enabled
field ``use_questions``.

As most templates use automated email this was not seen before.

Task-2703285 (event performance)
Task-2703289 (event testing)

closes odoo/odoo#81098

X-original-commit: 10732e077d4bfc296ca59a9c3df613b9fd1cb275
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-12-09 07:23:20 +00:00
Joseph Caburnay b157c99d4a [FIX] pos_hr: cash opening is not triggered when logged in by scan
When logging in as employee using barcode scanner, the event to
show the opening cash control is not triggered, therefore, only the
first user to login using the selection popup that the cash opening
will be initiated. We fix this issue by lifting the event trigger
at the `back` method.

closes odoo/odoo#81085

X-original-commit: 992a0130ea802814279c62f28880ab2120d1ad3c
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2021-12-08 17:21:56 +00:00
Arnaud Baes 256264a999 [FIX] survey: Report style declaration
It seems the `.scss` weren't recognized when loaded via the bundle
`report_assets_pdf` when rendering certifications

p/feedback report

closes odoo/odoo#81081

X-original-commit: 925ee95b02b51e156b0848161f7716b982e47235
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-12-08 16:28:57 +00:00
John Laterre (jol) be762c8dd4 [FIX] l10n_nl_edi: fix traceback when posting an invoice
Steps to reproduce the error:

- Create a new company, set Netherlands as country and fill in the required info (street, zip, city, vat, kvk-number).
- Set a bank account on the company contact.
- Install NL chart of account on this company (Netherlands Accounting package).
- Create a test customer, and don't set any address or set a country not listed in EAS (https://docs.peppol.eu/poacc/billing/3.0/codelist/eas/).
- Create an invoice for this test customer and try to post it.

Before this commit, if a Dutch company had tried to create an invoice for a customer from a country not listed in the Electronic Address Scheme (EAS) codes, Odoo would have given them a traceback error.

Now the code checks if the customer is from an EAS country: if they are, the code renders the bis3 invoice template, if not a UserError is thrown explaining the problem.

closes odoo/odoo#81080

X-original-commit: b637a333450911002af3b755cd1450e9efdef9e4
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: John Laterre <jol@odoo.com>
2021-12-08 16:28:53 +00:00
Thibault Delavallée 76bf909c15 [FIX] website: correctly override _render
Oversight of odoo/odoo@aceb086854

closes odoo/odoo#81079

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-12-08 16:28:49 +00:00
Sébastien Theys e1d3815348 [FIX] mail: avoid costly debug operations
These errors should not happen in production, it is only helpful for debugging.

The opportunity is taken to limit our debug code to a messaging specific debug,
as debug '1' is used in production to see extra features, and debug 'assets' is
necessary to get decent stack trace.

The easiest way to enable this debug mode at the time of this commit is to
either manually set the value to true in the code, or to type the following line
in the browser console if editing the code is not an option:
`odoo.__DEBUG__.messaging.modelManager.isDebug = true;`

Part of task-2702450

closes odoo/odoo#81075

X-original-commit: f9ae7510c8adaa83379b90f798ee535ede99be25
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-12-08 16:28:45 +00:00
Daniel Blanco bdb9ae8648 [FIX] l10n_cl: fixx the sum for the subtotal in the invoice lines
closes odoo/odoo#80697

X-original-commit: f90d59cae43f170f2f0a76f96d41e5a99c9d2083
Signed-off-by: Josse Colpaert <jco@odoo.com>
2021-12-08 16:28:41 +00:00
Thibault Delavallée 7ef380fe34 [IMP] event: add precompute to remove create hook
On event model, seats_limited and date_tz are required but are editable stored
fields. An override of create has been added to ensure they have a value as
compute are called after creation which leads to required not being satisfied.

Now that precompute [1] is available this code can be safely replaced.

Performance tests (not yet merged [2]) indicate this has no impact on queries.
What was done manually before this commit is now done directly by the ORM.

[1] odoo/odoo@d04a5b5c8c
[2] odoo/odoo#81068

Task-2702872 (Event precompute)

closes odoo/odoo#80672

Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2021-12-08 15:36:51 +00:00
Thibault Delavallée 2ac230b25b [FIX] website_event_questions: fix propagation from template
A wrong field is used to control propagation of questions from event template
to child events. Currently an event template must use automated emails to
propagate its questions, instead of correctly checking the question enabled
field use_questions.

As most templates use automated email this was not seen before.

Task-2702872 (Event precompute)

Part-of: odoo/odoo#80672
2021-12-08 15:36:50 +00:00
Adrien Widart 2cc6ca6dd2 [FIX] purchase: compute the average of the delays in report
When consulting the Purchase Analysis, the measure "Days to Confirm" may
not be easily understandable

To reproduce the issue:
1. Create a purchase order PO:
    - Order Deadline: <today + 10 days>
    - Add 2 products
2. Confirm PO
3. Purchase > Reporting:
    - Measures: Days to Confirm
    - Group By: Order

Error: For PO, the value of "Days to Confirm" is -20, it should be -10

The report computes the sum of the delay (i.e., "Days to Confirm") of
each purchase order line. Computing an average seems more relevant

A similar flow could be reproduce with the measure "Days to Receive"
(i.e., the difference between the Order Deadline and the Receipt Date)

OPW-2678673

closes odoo/odoo#81053

X-original-commit: da3fa1f8887e06e7a86e761ef844f79cc0d06e6f
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
2021-12-08 14:31:44 +00:00
Pierrot (prro) b8d2663790 [FIX] website_sale: translate Pay Now and Confirm Order
How to reproduce the problem:
- Install the website_sale module and the German language (and
activate it for the website).
- Go to the website, and choose the German language.
- Add a product to your cart and checkout.
=> on the checkout page, the button "Pay Now" is not translated (
"Confirm Order", if the total amount = 0)

These terms are now added for translation.
The terms were incorreclty formatted in the xml and were not
picked up for translation export. Introduced by this commit:
https://github.com/odoo/odoo/commit/573ed74c121c1572b3fab6f9553ed7f93f7b3f99

opw-2686463

closes odoo/odoo#81056

X-original-commit: 166c19d5e9018332a63c1c82dd4268fd1224332b
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Roose Pierre-Rodéric ( prro) <prro@odoo.com>
2021-12-08 13:44:33 +00:00
Goffin Simon 5467389393 [FIX] account: Impossible to create account type
Steps to reproduce the bug:

- Go to Accounting>Journals and create new record
- In advanced settings tab, use 'Allowed Account Types' field to create a new one

Bug:

Form for account type does not have required internal_group

Introduced by https://github.com/odoo/odoo/commit/5aeec0c3dcd8aa20293167073f3f4f5cec323b74

opw:2497616

closes odoo/odoo#69455

X-original-commit: bacfea994ce7232af33d7e5525a5b56d5cba5871
Related: odoo/enterprise#22335
Signed-off-by: William André (wan) <wan@odoo.com>
2021-12-08 13:44:26 +00:00
Sébastien Theys e5ac55cc59 [FIX] mail: improve performance of ringing thread
Avoid iterating over all channels every time a new channel is added.

Part of task-2702450

closes odoo/odoo#81051

X-original-commit: 5359a8c354b0a6106d462fe8f047de946614b7b1
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-12-08 12:52:32 +00:00
Aaron Bohy c171ebb054 [FIX] web: send correct filter's context when saving filter
Before this commit, the context coming from the action was
merged with the context of the search items to generate the
context of the filter to save, when the user clicked on "Save
current search", whereas it should not.

There is an ActionService test attesting it, but it currently
uses a ListView, which is still legacy, so the new faulty code
wasn't tested.

closes odoo/odoo#81049

X-original-commit: 2d76b33142cf2bf451d4730c035af75c3243da6f
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-12-08 12:52:29 +00:00
Samuel Degueldre bfa7d28a8e [IMP] web: update owl to 1.4.10
Release notes: https://github.com/odoo/owl/releases/tag/v1.4.10

closes odoo/odoo#81048

X-original-commit: 462a58b9938f7601e9696c02d5fd4ded7c75cae0
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Samuel Degueldre <sad@odoo.com>
2021-12-08 12:52:25 +00:00
Hubert Van de Walle (huvw) f2050817d7 [FIX] sale: Add product link in sale.order.line
Steps to follow

  - Click on a product from a sale.order.line
  - The form is switched to edit mode
  -> We can't go to the product page

Cause of the issue

  The quick edit feature was introduced in saas-14.4

Solution

  - remove the 'no_open' attribute from the product

opw-2688863

closes odoo/odoo#81047

X-original-commit: 57d662c4817b83a8f166d11bf35b4b73206704b0
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
2021-12-08 12:52:21 +00:00
Adrien Minet e8c60ad132 [FIX] l10n_in: copying gst treatment from client
How to reproduce:

- Switch to an Indian-based company
- Create a non-Indian customer and set gst treatment
- Create a subscription for the new customer
- Generate an invoice for the subscription
- The gst-treatment field will be empty

Bug:

When creating a new account.move object, the gst treatment is not copied.

closes odoo/odoo#80966

Opw: 2662308
X-original-commit: a1f0ae25f8b96a5ff5691aa0b9ffeb62033932bf
Signed-off-by: Laurent Smet <las@odoo.com>
2021-12-08 12:52:18 +00:00
Julien Castiaux 42b522bd83 [FIX] *: cleanup manifest files
*: base_address_city, base_address_extended, bus, crm, im_livechat,
   l10n_ae_pos, lunch, pos_restaurant_adyen, test_assetsbundle,
   test_converter, test_lint.

It is spelled `auto_install`, the `complexity` key is long gone, `qweb`
has been moved to `assets: {'web.assets_qweb': []}`. `js` and `css` are
long gone too, `maintainer` is redundant with `author` which is
"Odoo S.A." by default already, the `certificate` key is long gone.

closes odoo/odoo#80988

Related: odoo/enterprise#22766
Signed-off-by: Julien Castiaux <juc@odoo.com>
2021-12-08 11:17:22 +00:00
Miquel Raïch 70ae1cf628 [FIX] hr: avoid <footer> not found error in view
closes odoo/odoo#80554

X-original-commit: fc5ae487fc178d43c487271d174e27d060b56d1d
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-12-08 11:17:15 +00:00
roen-odoo 341ad3f4dd [FIX] point_of_sale, pos_coupon, pos_hr, pos_restaurant : Check COA not used
Check COA parameter in the open_session_cb was actually never used

opw-2691615

closes odoo/odoo#80410

Related: odoo/enterprise#22522
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-12-08 11:17:11 +00:00
Sébastien Theys 8be118cf25 [FIX] mail: rename ambiguous get method in model manager
To ease debugging in general, avoid having multiple methods with the same name,
especially in the same file.

This is especially useful when the method name appears in a stack trace, for
example in the performance tool.

Part of task-2702450

closes odoo/odoo#81020

X-original-commit: c3673e63064c7f331754ef0e9d02cbbe7b1927f4
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-12-08 10:23:55 +00:00
Sébastien Theys 560523e817 [FIX] mail: improve performance of listener removal
Avoid iterating over all listeners that are observing a field, instead store
the fields observed by a listener and access it immediately.

Part of task-2702450

closes odoo/odoo#81019

X-original-commit: bf69834b933c54598bbd82d8fbfcac4a0393c067
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-12-08 10:23:50 +00:00
Thibault Delavallée 03004aa95d [FIX] sale: do not force order responsible
With recent update to computed fields [1] order responsible is now always
changed to the partner responsible, or its commercial entity responsible.

This cause issues, notably with ACLs 'own documents only'. Indeed a salesperson
could update or set a partner on an order that would change the responsible and
lead to ACLs issues. Moreover some functional flows automatically set a partner
(online registrations, ...) that would make the responsible change without a
clear notification or warning.

We prefer to keep a less intrusive behavior, aka setting a responsible when
no one is set.

Task-2703285 (event performance)
Task-2703289 (event testing)

[1] odoo/odoo@210c9daebc

closes odoo/odoo#81025

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-12-08 09:35:08 +00:00
Antoine Guenet e466fdbaf7 [FIX] web_editor: properly convert overflowing row
closes odoo/odoo#80621

X-original-commit: 5a1d94d29004f0f0ddd81c25020a90083d6b8bea
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-12-08 09:35:04 +00:00
Antoine Guenet 2750bfa97f [IMP] web_editor: no empty class on convert grid
X-original-commit: 731ffadb08961b6aada283f96d82c0a35726cffe
Part-of: odoo/odoo#80621
2021-12-08 09:35:04 +00:00
Antoine Guenet 848fecb003 [FIX] mass_mailing: restore missing space in template class name
mass_mailing_demo has a missing space separating two classes in its
mass_mail_1 template. This restores it.

X-original-commit: a104d4279b0438a05dc4b739fbc4e95e7038e6aa
Part-of: odoo/odoo#80621
2021-12-08 09:35:03 +00:00
Antoine Guenet aceb086854 [FIX] base, web_editor, mail, digest: preserve comments in sent e-mails
For email design in the context of Microsoft Outlook, we want to keep
some magic Microsoft comments (Outlook conditional comment), which -
until this commit - were skipped by QWeb. These allow us to change the
rendering exclusively for Outlook so as to overcome some of its
limitations. This commit introduces a qweb rendering option
(`preserve_comments`) for when - like in mass mailing and digest - we
want to keep comments.

Part-of: odoo/odoo#80621
2021-12-08 09:35:03 +00:00
Antoine Guenet 0ba08b558b [ADD] mail: test for mass_mail mode sending mail with comments
This adds a test sending a mail with comments (MSO conditionals) in
mass_mail mode.

X-original-commit: 8778c10bc1856e57216785a8332b90878ff1b5ef
Part-of: odoo/odoo#80621
2021-12-08 09:35:03 +00:00
Antoine Guenet e4641a8e38 [FIX] web_editor: ensure unstyled tbody in every table on convert inline
This ensures that every `table` element has its contents wrapped in a
`tbody` element, and that that element has its default vertical
alignment replaced with "top" to mimick the grid it's converted from.

X-original-commit: ddf047be9f49ac408c44de26b65ef50be88873b5
Part-of: odoo/odoo#80621
2021-12-08 09:35:02 +00:00
Antoine Guenet bd638117ae [FIX] mail: properly make urls absolute in escaped attributes
`_replace_local_links` ensures urls are given as absolute rather
relative paths, for link `href`, img `src` and within styles. This
failed when the style contained escaped single quotes (eg:
`background-image: url(&#34;/my_url/path&#34;);`). This commit adapts the
failing regex appropriately.

X-original-commit: 2af980e8cdc72d35729ef2fbaf5067fe7e72bbb8
Part-of: odoo/odoo#80621
2021-12-08 09:35:02 +00:00
Antoine Guenet b7e61e8c32 [ADD] mail: test for _replace_local_links in style urls
This adds a test for the _replace_local_links function of mail render
mixin, in the case of urls in style attributes.

X-original-commit: 199b45c7f6b0155d3828487b2f7771e1500820b1
Part-of: odoo/odoo#80621
2021-12-08 09:35:02 +00:00
Antoine Guenet 5c69d9e50a [FIX] web_editor: properly size masonry cells
On converting emails for mail client compatibility, masonry showed a few
sizing issues, which are fixed with this commit.

X-original-commit: cfcc498c828b542552b098d6f3a58924abddb091
Part-of: odoo/odoo#80621
2021-12-08 09:35:02 +00:00
Antoine Guenet 06225d8498 [FIX] web_editor: properly size media list images
When converting a mailing for mail client compatibility, we guarantee a
height for each image. When none can be found, or in the special case of
media_list, that height should however not be forced so the client can
make it take the full height of the cell automatically. This is what is
accomplished by this commit.

X-original-commit: e80433335020a52d8f683060e98047f5ce77b054
Part-of: odoo/odoo#80621
2021-12-08 09:35:01 +00:00
Antoine Guenet 9ae5e637e1 [FIX] web_editor: prevent several blocks in one column on convert grid
The following structure is not always properly rendered in mail clients:

```html
<table>
    <tbody>
        <tr>
            <td>
                <h1>Text</h1>
                <p>Text</p>
            </td>
        </tr>
    </tbody>
</table>
```

where the h1 and p can be any block-level element.

This prevents that from happening by wrapping each block in a separate
row/column combo like so:

```html
<table>
    <tbody>
        <tr>
            <td>
                <h1>Text</h1>
            </td>
        <tr>
            <td>
                <p>Text</p>
            </td>
        </tr>
    </tbody>
</table>
```

X-original-commit: 01404499277b63dc64a5a26a93bc419cca092440
Part-of: odoo/odoo#80621
2021-12-08 09:35:01 +00:00
Antoine Guenet d4b3daa871 [REF] web_editor: import odoo-editor utils into convertInline
Some code from odoo-editor utils is needed in convertInline. In order to
avoid duplication, we need to import that code. To that effect, we can't
have the utils being lazy loaded into mass mailing's iframe while
convertInline is loaded the usual way.
This loads the lightweight utils together with convertInline and turns
convertInline into an odoo-module, which makes it easier to simply
import the utils and delete duplicated code.

X-original-commit: 067c94b009609caa0bd78a75b826247e37557417
Part-of: odoo/odoo#80621
2021-12-08 09:35:00 +00:00
Antoine Guenet 54a0b8d853 [FIX] web_editor: properly apply table padding to columns
When converting bootstrap grids into tables, we have to move the
containers' paddings into the cells, otherwise they would not render
properly in all mail clients. Before this fix, verical padding was moved
to each cell, which is wrong: it should be applied to the first (top)
and last cell (bottom) only, which it now is.

X-original-commit: 43112d417f70ac0086fbed2a704f208530d31f87
Part-of: odoo/odoo#80621
2021-12-08 09:35:00 +00:00
Antoine Guenet 23df5ab4ed [FIX] web_editor: keep div inline styles on convert to table
When converting a div to a table, we apply some styles to undo the
table's default styles. This makes sure these styles don't override any
inline styles the div might have been holding.

X-original-commit: 0fad86b330a0e1a3228bbbe76fd2b7370cff3eb0
Part-of: odoo/odoo#80621
2021-12-08 09:35:00 +00:00
Adrien Widart b0278a0221 [FIX] sale_mrp: not include consu components in kit's COGS
When selling a storable kits, the consumable components should be
ignored in account lines

To reproduce the issue:
(Need account_accountant,sale_management,mrp)
1. Create a product category PC:
    - Costing Method: FIFO
    - Inventory Valuation: Automated
2. Create 3 products P_kit, P_compo01, P_compo02
    - P_kit:
        - Type: Storable
        - Category: PC
    - P_compo01
        - Type: Storable
        - Category: PC
        - Cost: 5
    - P_compo02:
        - Type: Consumable
        - Category: PC
        - Cost: 6
3. Update P_compo02's on hand qty: 1
4. Create a bill of materials:
    - Product: P_kit
    - Type: Kit
    - Components:
        - 1 x P_compo01
        - 1 x P_compo02
5. Create & Confirm a sale order SO with 1 x P_kit
6. Process the related delivery
7. Create & Post the related invoice

Error: The journal items of the invoice are incorrect, the value of
Expenses and Stock Interim (Delivered) are $11 instead of $5. The
consumable components should be excluded from this value

OPW-2604084

closes odoo/odoo#81015

X-original-commit: 5de451008552ef9b9c675b34178482d81ff42b89
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
2021-12-08 08:47:01 +00:00
Arnaud Joset b4233a930b [FIX] sale_management: prevent crash when sale order template lines are mixed with rental product
Before this commit, the following traceback would appears when a sale order template was used in rental with rental products.

 ```py
    super()._compute_name()
  File "/home/arj/PycharmProjects/odoo/addons/sale_management/models/sale_order.py", line 187, in _compute_name
    line.name = line.with_context(lang=line.order_id.partner_id.lang).name + line._get_sale_order_line_multiline_description_variants()
Exception

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/arj/PycharmProjects/odoo/odoo/http.py", line 643, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/home/arj/PycharmProjects/odoo/odoo/http.py", line 301, in _handle_exception
    raise exception.with_traceback(None) from new_cause
AttributeError: 'sale.order.template.line' object has no attribute 'order_id'
2021-12-07 14:27:34,267 95502 INFO subscription werkzeug: 127.0.0.1 - - [07/Dec/2021 14:27:34] "POST /web/dataset/call_kw/sale.order.line/onchange HTTP/1.1" 200 - 16 0.009 0.025
 ```

closes odoo/odoo#80979

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-12-08 07:57:06 +00:00
Leo Tran b38845c94f [CLA] Viindoo signs Odoo's CLA
closes odoo/odoo#81012

X-original-commit: 567a83806db0e39403edd669940dbe077c04df41
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-12-07 20:23:46 +00:00
Joseph Caburnay 123b705677 [FIX] pos_discount: pos app is stuck when changing the discount
To reproduce:
1. Install pos_discount and pos_coupon.
2. Start a session and add item to the order.
3. Add global discount.
4. Change global discount. Stuck.

This is because in some modules, get_orderlines is overridden. Instead
of returning the original object containing the orderlines, it returns
a different array instance containing the lines. This is the reason the
while loop is stuck. With this change, whether get_orderlines return the
container or a copy, we are sure that it won't be stuck in the for loop.

closes odoo/odoo#81011

Task-id: 2697861
X-original-commit: 6d78748794a2db3f324312fc773f7a48fd0ffba4
Signed-off-by: Masereel Pierre <pim@odoo.com>
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2021-12-07 19:27:40 +00:00
Kartik Chavda 7ca2c8e6e7 [FIX] project: fix default assigned to for rating in task
Before this commit, the default assignee set to a rating in a task is
always empty because we check if the `project.task` has a `user_id`
field to give the partner of this user.
Since it is no longer the case because we can recently assign many users
to a task. That is, it is `user_ids` field and no longer `user_id`
field.

This commit overwrites `rating_get_rated_partner_id` method to set by
default the partner of the user contained in `user_ids` field if this
field contains at most one user. Otherwise, we set no partner. We choose
to not select the first user in the user_ids field because we cannot
consider it is the responsible of the task and not another one.
We cannot create a rating per user because the rating average will no
longer right because at the beginning of the task we could have 5 users
and after we could have more users or less users and so the number of
ratings for this task could be different each time we send a rating
review to the customer.

Part of task-2696911

closes odoo/odoo#81009

X-original-commit: 88e7d270bee962d6e4d40f6b62d25a9519abfcf2
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Signed-off-by: Xavier <xbo@odoo.com>
2021-12-07 18:40:46 +00:00
Didier (did) 060096b872 [FIX] mail: make the delete button more visible
Before this PR, the delete button was completely invisible on image with white
background.

task-2709788

closes odoo/odoo#81000

X-original-commit: fd1e05cd131273504e7e6cd4f64f6ea63514b6b7
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-12-07 17:55:43 +00:00
Raphael Collet 6af689fd0a [FIX] base: fix search on company depend fields
This is a bunch of fixes (65 corner cases) for the search on
company-dependent fields:

Without a default value:
- `char` fields:
    - operators `not like`/`not ilike` don't return records with unset value
    - `(..., '=', False)` doesn't return records with unset value
    - `(..., '!=', '<string>')` doesn't return records with unset value
    - `(..., 'in', [..., False])` doesn't return records with unset value
    - `(..., 'not in', value)` without `False` inside `value` doesn't return records with unset value
- `date` and `datetime` fields:
    - `(..., '!=', <Date/datetime>)` doesn't return records with unset value
    - `(..., '=', False)` doesn't return records with unset value
- `many2one` fields:
    - operators `not like`/`not ilike` don't return records with unset value
    - `(..., 'in', [..., False])` doesn't return records with unset value
    - `(..., 'not in', value)` without `False` inside `value` doesn't return records with unset value
- `boolean` fields:
    - `(..., '=', False)` and `(..., '!=', True)` don't return records with unset and `False` values
- `integer`/`float` fields:
    - `(..., '!=', <number>)` doesn't return records with unset value

With a truthy default value:
- `many2one` fields:
    - operators `not like`/`not ilike` don't return records with unset value
    - `(..., '=', False)` returns the record with the default value (which isn't `False`)
- `boolean` fields:
    - `(..., '=', False)` doesn't return records with unset and `False` value
    - `(..., '!=', False)` returns records with unset and `False` value
- `integer`/`float` fields:
    - all `(..., operator, value)` which include value 0, return all records with unset value, even if the default value does not satisfy the domain

closes odoo/odoo#80994

X-original-commit: 3e3be652ece83420782070bdb13da2c3a4930046
Signed-off-by: Raphael Collet <rco@odoo.com>
2021-12-07 17:10:48 +00:00
thcl-odoo 9f7c17e018 [FIX] hr_timesheet: authorize project_manager to update task's project
Expected behavior :
Project manager can change task's project of any task including timesheets

Current behavior :
When Project manager with `Timesheets : See own timesheets` permission is updating task's project, an Access Error exception is raised `Only a Timesheets Approver or Manager is allowed to modify a validated entry.`

Steps to reproduce :
*Use demo data to make steps easier*
- Install Project and Timesheets
- Go to Project and select one
- Select any Task
- Edit it and try to change the Project

Reason :
When a user is a project administrator, he can still have basic permissions in Timesheets (`Timesheets : See own timesheets`), which prevents him from modifying the task's project if the task has some validated timesheet

OPW-2646233

closes odoo/odoo#80973

X-original-commit: 41907c6722da5b4777cc3b8065f4057b0a5f0801
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Simon Goffin <sig@odoo.com>
Signed-off-by: Claude Thibault (thcl) <thcl@odoo.com>
2021-12-07 17:10:41 +00:00
William Henrotin 9bb5c31a92 [IMP] stock,mrp: add indexes on picking type
This commit adds an index on picking_type_id for models stock.picking
and mrp.production.

Filtering on picking_type_id is often done via the Inventory Overview.
This should speed up the list render in case of many object.

Task : 2648449

closes odoo/odoo#80434

Related: odoo/upgrade#3068
Related: odoo/enterprise#22535
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2021-12-07 16:20:07 +00:00
William Henrotin 56e7bcf0cb [REF] *{stock,mrp}*: rename reserved fields
This commit rename product_uom_qty into reserved_uom_qty and product_qty
into reserved_qty on stock move line to stop mistake them with the stock
move quantities fields.

Task: 2648449
Part-of: odoo/odoo#80434
2021-12-07 16:20:06 +00:00
William Henrotin cd9833e4ad [REF] *stock*: rename location destination fields
The stock convention on location name is always to name the destination
`location_dest_id`. It was not the
case on the stock rule model

Task: 2648449
Part-of: odoo/odoo#80434
2021-12-07 16:20:06 +00:00
William Henrotin c146c7d16f [REF] *stock*: rename model stock.location.route into stock.route
Task: 2648449
Part-of: odoo/odoo#80434
2021-12-07 16:20:06 +00:00
William Henrotin 6a23b9bcd6 [REF] *stock*: rename model stock.production.lot into stock.lot
Task: 2648449
Part-of: odoo/odoo#80434
2021-12-07 16:20:05 +00:00