Commit Graph
147686 Commits
Author SHA1 Message Date
Thanh Dodeur b04ddee589 [FIX] mail: prevent video auto fullScreen and adds autoplay on safari
Before this commit, safari mobile would immediately launch new videos
as fullScreen, while safari would prevent the autoplay of videos, as
the play request didn't originate from a user input.

This commit fixes those issues.

closes odoo/odoo#76316

X-original-commit: d1a74a1f180f5a6963355ae7e402d42351d1d16c
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-09-10 12:33:53 +00:00
Swapnesh Shah 655a863d6e [FIX] gamification: use context_today instead of today
`fields.Date.today` doesn't give date based on TZ which might be wrong
in some cases as it doesn't respect TZ.

With this commit, we are using `fields.Date.context_today` as default date.

closes odoo/odoo#76241

X-original-commit: addd4ae73ca4fa7a7046a88dd1310361dd895f15
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-09-10 12:33:49 +00:00
lejeune quentin 2dc7b1a3b2 [IMP] point_of_sale: Enable scanning of barcode packaging
Actually we can't gie more one barcode for a product
In inventory we can make "package" with various quantity

So with this commit we add the possibility to add a package
of product (1-n) with a specific barcode

closes odoo/odoo#76307

Task: 2610279
X-original-commit: e0021567403231684bc763c110c34366697a8613
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-09-10 09:58:17 +00:00
Anh Thao Pham (pta) 11eb4542ab [FIX] web: fix data in view graph for concurrent groupby
- Go to any graph view (i.e. in CRM)
- Change "Group By" 2 times very very quickly
(In Chrome, you can set Throttling to "Slow 3G" in Network tab of devtools)
Data from first groupby will be mixed with data from the second one.

A graph reload is performing the following steps:
  * clean previous data
  * fetch data
  * set data
The issue happens when a second reload is performed while the previous one
has not set its data yet and the cleaning step of the second one is performed
before the setting step of the first one.

The solution will be to ignore the setting step of all previous reloads if
there is a more recent one.

opw-2460145

closes odoo/odoo#76304

X-original-commit: 79335d298126b523f6ff9768e219822789d99620
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Anh Thao PHAM <kitan191@users.noreply.github.com>
2021-09-10 09:58:13 +00:00
William Henrotin 485273b914 [FIX] stock: open move lines with context
Calling the xml action directly in the view make it miss the filling
context done in _get_action().

closes odoo/odoo#76294

X-original-commit: b818927898e42e8837230b7d1f089d4d822d7d76
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2021-09-10 08:49:22 +00:00
William Henrotin 90beedf036 [FIX] stock_picking_batch: pass owner id to wave transfer.
X-original-commit: 03055045d227398e8cfda54ff9281319fc5e9e1d
Part-of: odoo/odoo#76294
2021-09-10 08:49:22 +00:00
William Henrotin bdcca63411 [FIX] stock,mrp: search on picking_type_id
Commit 04f3cac527 makes picking_type_id compute on stock_move_line to
get the picking type of either the picking or the manufacturing order.

Right after, commit dd53f5323f set picking_type_id related of the
picking one to be able to search on it. (in this later scope,
manufacturing part was not needed, hence the related instead of compute.

This commit mix the two idea by having a new search function on the
computed fields to filter stock move line depending on their picking
type.

X-original-commit: d535108f96d62f217dda7cbb676f9d60b7477f4f
Part-of: odoo/odoo#76294
2021-09-10 08:49:21 +00:00
William Henrotin a4c9f331f5 [IMP] stock_picking_batch: add tests on wave
Following dd53f5323f, this commit adds some test on waves .

X-original-commit: f0b2aec24c87945c7f30ff95ad2d20da27d8f0f4
Part-of: odoo/odoo#76294
2021-09-10 08:49:21 +00:00
Jeremy Kersten 914fe1085e [FIX] http_routing: avoid extra redirect on logout in multi lang
context:
Connected in /fr on a website with /en as default lang.

Before this commit,
  /web/session/logout?redirect=/
  /
  /fr_FR/
  /fr_FR

Now
  /web/session/logout?redirect=/
  /fr_FR

Part 1 -> to say that we are in multilang context and use url_lang.
   multilang=False to avoid /web/session -> /fr/web/session
   website=True to have url_lang done in the request.redirect.
Part 2 -> to remove the trailing '/' that will be only useful for '/'

closes odoo/odoo#76290

X-original-commit: ae35117ee1e019c3c0c333f291478825a5722706
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-09-10 08:49:13 +00:00
Jeremy Kersten 8e22acf5ba [FIX] website_sale: no has_discounted_price in sample
Be safe when we check if data have has_dicounted_price set or not.
In case of sample e.g. in product snippet, it could be missing.

task-2641360

X-original-commit: 0e1d1d519b962476113ae8553f10f85b22561824
Part-of: odoo/odoo#76290
2021-09-10 08:49:12 +00:00
Jeremy Kersten 7c9a040772 [FIX] website_sale_stock: fix typo in condition
This warning is never displayed due to typo in condition:
show_availibility vs show_availability

X-original-commit: f6bcd01fd34c3bdd3530afc1a0d5a557d45a8eac
Part-of: odoo/odoo#76290
2021-09-10 08:49:12 +00:00
Jeremy Kersten 523b52ebd4 [FIX] web: legacy load_transaction, use same convention than owl
Remove this code that seems useless.
opw-2244843 is no more present reverting this patch.

Now translations will be loaded with same url than owl i10n service
withtout url in lang, and using multilang redirect as 'distinct' key.

X-original-commit: 00e6b87c9d16af1bfb3e63b9b857fbaad90e620a
Part-of: odoo/odoo#76290
2021-09-10 08:49:12 +00:00
Jeremy Kersten 1ab3157370 [FIX] web: public_root, avoid load local en-US
Momentjs has no config for en_US so this rpc will return nothing in all case.
It avoid an (cached) rpc on first load.

X-original-commit: bf7456403634ce4c2eef07cc31e47c3c8a524c52
Part-of: odoo/odoo#76290
2021-09-10 08:49:11 +00:00
Laurent Smet 52ba7626ec [FIX] account_edi: Prevent opening the EDI documents in any case
Also, remove the duplicated 'edi_document_ids' field inside the view.
'edi_document_ids' is now in debug mode for payments.

closes odoo/odoo#76123

X-original-commit: ad346eec9fd06e430b9b5859578b00e0b28cc443
Signed-off-by: Florian Gilbert <FlorianGilbert@users.noreply.github.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-09-10 08:49:01 +00:00
Laurent Smet 7ba6caf8b8 [IMP] web: Manage 'no_open' options for x2many fields
options="{'no_open': '1'}" is managed for many2one fields.
This commit aims to do the same for x2many fields.

Note: A test will be added later
X-original-commit: dadaccbe6658d7f3c75db48d7961ff116b25dbc8
Part-of: odoo/odoo#76123
2021-09-10 08:49:00 +00:00
Aurélien Warnon 96feaf7190 [FIX] website_event_track_live: fix widescreen detection for YouTube tracks
Currently, when there is a YouTube URL configured on the track, we
automatically set the layout of the track page as "widescreen".

This implies that we hide some menus and adapt the layout to display the full
video player.

However, in the XML template of the track view, we only display the video
player if there is a YouTube URL configured AND one or more of those conditions
is respected:
- The track is configured as a "YouTube Replay"
- The track is "coming soon" (< 30 minutes)
- The track is live
- The track is done

This is done to match the two behaviors and get a consistent display.

Task-2643147

closes odoo/odoo#76296

X-original-commit: bfb692dd5c6480841d5c6fb1e54dba1b4bd928ab
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-09-10 07:40:37 +00:00
Anh Thao Pham (pta) 568dd76786 [FIX] stock_account: fix access error when computing average price
- Create a product with Category configured with:
  * Costing Method: First In First Out (FIFO)
  * Inventory Valuation: Automated
- Create a PO to buy 1 unit and receive the product
- Create a SO to sell 1 unit and deliver the product
- Return the product
- Re-deliver the product
- Create invoice for SO but don't post it
- Connect with an user with "Accounting: Accountant" rights only
- Post the invoice
An access error will be triggered when trying to access stock valuation layer.

opw-2623376

closes odoo/odoo#76289

X-original-commit: cc76e76ef2d1cc5a16778bd9440911fd6ec73c9b
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Signed-off-by: Anh Thao PHAM <kitan191@users.noreply.github.com>
2021-09-10 05:25:53 +00:00
Thibault Delavallée 262e45440b [REV] Revert "[FIX][IMP] web: fix ribbon CSS to allow its use on kanban"
This reverts commit odoo/odoo@3d72a6a4d2 . This code is not used
as finally Kanban ribbon as a widget has not been added after review. Moreover
current use of ribbon classes in kanban is broken.

closes odoo/odoo#76292

X-original-commit: 4b853ad321d89075ef6151c64160a6e9db15c2e6
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-09-09 20:19:16 +00:00
Lucas Perais (lpe) 11614b69cd [FIX] web: owl_compatibility: don't call mounted when a rendering is being done
Following commit 637684fb50 which improved
the conditions under which the ComponentWrapper compatibility layer
should trigger owl's `__callMounted` on all the owl children of a Legacy Widget.

One case was forgotten though: when the current component (wherever it is in the hierarchy)
is rendered BUT another rendering has been initiated meanwhile.

In that case, we shouldn't mark the component as mounted. The owl's fiber.complete algorithm
will take care of calling __callMounted when it finishes.

closes odoo/odoo#76281

X-original-commit: 7ca2adb1d946590df0caf3aea135601794851894
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
2021-09-09 17:05:56 +00:00
Louis Wicket (wil) e8d9f6b4ad [FIX] mail: show the name of the guest who started a meeting
The notification sent when starting a meeting used `partner.name` to
display the name of the one who started the meeting. Therefore, it
did not work properly with guests, for whom no partner is defined,
resulting in `False started a live conference` being displayed.

This commit fixes the issue by using `guest.name` instead of
`partner.name` when no partner is defined.

Also change some quotes to stick to the guidelines.

closes odoo/odoo#76264

X-original-commit: e00f30f8e0c9344bc81653357c16783f3e1d2511
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-09-09 15:53:40 +00:00
svs-odoo d885488ac8 [FIX] base: infos for act_window_close
Clientside, the only key got from an `ir.actions.act_window_close` type
action is 'infos'. But this key isn't a part of the  whitelisted
readable fields server side, which means you will get a warning if you
use it.

closes odoo/odoo#76109

Signed-off-by: Steve Van Essche <svs-odoo@users.noreply.github.com>
2021-09-09 15:53:34 +00:00
Swapnesh Shah e04f8bdecf [FIX] stock: allow to create new picking type to non-admin users
Before this commit, Inventory Admin was not able to create new /edit picking type
as Non-admin users doesn't have rights to create/edit sequence.

With this commit, we are creating/editing `sequence_id` with sudo

closes odoo/odoo#76258

X-original-commit: c5de12310be023e1048f8a1174f87582c13a9160
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-09-09 14:43:04 +00:00
Ivan Yelizariev 30230d9f4c [FIX] mrp: fix uom conversion in bom kit
no need to make rounding during computing qty_available

STEPS (see the test):

* create product with uom dozens
* create product with uom units
* create bom kit to convert one to another
* set qty on hand to 1 for product dozens
* check qty for product units

BEFORE: qty=11
AFTER:  qty=12

---

opw-2632782

closes odoo/odoo#76242

X-original-commit: 26b28408d8970baa8cbf59ffaff90cab1e579410
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-09-09 13:17:39 +00:00
Goffin Simon cd7aac0cdf [FIX] sale, sale_crm: Wrong salesperson when creating SO from lead
Steps to reproduce the issue:

- Let's log in Odoo with a user U1
- Create a lead with user U2 as salesperson
- Click on New quotation

Bug:

A SO was suggested with U1 as salesperson instead of U2

opw:2520827

closes odoo/odoo#76214

X-original-commit: a5e78d47ec475ec310573632f2b105b6247539d5
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-09-09 13:17:35 +00:00
qdp-odoo 97026f803d [IMP] account: accrued SO/PO tracability imp
* order lines are now not grouped anymore by account. That allows a more detailed label on the accrual entry line, as it's now directly related to a single order line
* we now create a single accrual entry counterpart, instead of one per order previously. That reduces the 'noise' in the accrual entry, at the cost of not having the sum per ordre anymore easilly but it doesn't seem to be important to audit that account

closes odoo/odoo#76037

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2021-09-09 13:17:28 +00:00
qdp-odoo 7b60ffaec4 [FIX] account: accrued SO/PO process
* the cache_invalidate() was invalidating the changes made in the wizard as well, make it impossible to set any value other than the default one, even though the preview entry was updated accordingly. That also prevented to simply validate the wizard as the accrual account was required but reset anytime we changed its value.
* the preview_data field was incorrectly set as Binary while the widget only supports Text

Part-of: odoo/odoo#76037
2021-09-09 13:17:27 +00:00
Anh Thao Pham (pta) f45a588438 [FIX] mass_mailing: fix assets call in layout
Some assets are missing from layout due to an incorrect namespace
since conversion to new assets system.

opw-2638542

closes odoo/odoo#76238

X-original-commit: b55cb521f9b0abc98877e9e57b81c2d6eb6ca35c
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-09-09 12:05:05 +00:00
Swapnesh Shah 5a6057e5fd [FIX] survey: do not always get answer_score
Calling `_get_answer_score_values` on each question creation or update is
not necessary if value is already provided.

Followup of odoo/odoo@0d32ed45ae

closes odoo/odoo#76223

X-original-commit: c6c7605cdae803aca4f441ef4e622a1b79f17019
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-09-09 12:05:00 +00:00
Florent de Labarre 1e0150fd64 [FIX] stock : wrong quantity with transit location
- create a second warehouse, resupply from the first
- create a product, replenish W2 from W1
- Goto Inventory Forecast

--> Issue value are wrong.

An OUT is when WH source is Set and WH dest is not set.
An IN is when WH dest is Set and WH source is not set.

closes odoo/odoo#76129

X-original-commit: ad7deb4cfced42f08733da5ed9c1233109900d87
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2021-09-09 06:45:52 +00:00
Adrien Widart 7f82ddabdc [FIX] point_of_sale: consider scanned price as manual price
In a POS session, when using the scanner, if the seller changes the
customer, the prices may become incorrect

To reproduce the issue
1. Create a product P:
    - Sales Price: 38
    - Barcode: 2312345000002
    - Available in POS: True
2. Start a POS session (with debug Window)
3. Scan 2312345010001
    - This is product P with price $10
4. Set a Customer

Error: The price is now $38

Because the price has not been set manually, when changing the customer,
the pricelist is updated and so does the price.

When scanning a barcode that includes a price, the latter should be
considered as manually set.

OPW-2618934

closes odoo/odoo#76096

X-original-commit: e66724272a5379c5d56f8fe48fa48ceac53cf12d
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Signed-off-by: Adrien Widart <adwid@users.noreply.github.com>
2021-09-08 13:53:44 +00:00
Kevin Baptiste 8c969fb980 [IMP] hr_holidays: improve views
- Hide transition mode if there is 0 or 1 level on accrual plan;
- Fix kanban card
- Reduce bottom padding on calendar view
- Log a message when an allocation linked to accrual runs for the first
time

closes odoo/odoo#75940

Taskid: 2636417
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-09-08 12:44:49 +00:00
Kevin Baptiste 09bd19d8b5 [FIX] web: unselect events on calendar form view
The days selected were still selected after the form view was closed.

Taskid: 2636417
Part-of: odoo/odoo#75940
2021-09-08 12:44:48 +00:00
Xavier-Do d5082ee00f [IMP] core: bump master release version to 15.1 alpha
closes odoo/odoo#76150

Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2021-09-08 11:35:58 +00:00
Nicolas Bayet 0a0a108969 [FIX] web_editor: use the proper serialize method
Use the method serializeNode of the editor rather than directly
the one from utils  in order to only serialize when the collaboration
is active.

closes odoo/odoo#76143

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-09-08 10:22:06 +00:00
Nicolas Bayet 4c03a56dab [FIX] web_editor: stop making snapshot when no collaboration
When the collaboration is not active, it is not necessary to create
snapshot as they will not be sent to anybody.

Part-of: odoo/odoo#76143
2021-09-08 10:22:06 +00:00
Rémy Voet (ryv) d23ec015c1 [FIX] (purchase_)stock,mrp: add indexes for orderpoint_id
Because the "Replenishment" can unlink a lot (thousand of
`stock.warehouse.orderpoint`).
and psql needs to check every Many2one `orderpoint_id` constraint
and without index it takes too much time.

opw-2637321

closes odoo/odoo#76116

X-original-commit: 864d90a064f093bd6ba24d8464ee491a443a320e
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
2021-09-08 10:21:49 +00:00
Gorash 4d0e111733 [IMP] profiling: Add profile qweb execution into the performance tools.
By activating the profiler debugger, the two qweb options is added. The
qweb templates that need to be rendered are compiled into a new function
to add instructions for saving data.

`Add qweb directive context`
It's a sub-option of "Record sql" or "Record traces", add some context on
thread at current call stack level.  This context stored by collector
beside stack and is used by  Speedscope to add a level to the stack with
this qweb directive information.
```
    directive=t-call='website.layout', xpath=/t/t
    t_call_content
    directive=t-foreach='5' t-as="'a', xpath=/t/t/div/div
    directive=t-esc='website.search([])', xpath=/t/t/div/div/t
    execute
```

`Record qweb`
Add profiling data used by ProfilingQwebView widget. In the `ir.profile`
form view, the widget display the duration and number of sql of every qweb
directives with the xml of templates. Every xml is recorded to be
consulted even if the user change the xml templates.
```xml
    <t t-call="website.layout">
       <div>
          <div t-foreach="5" t-as="a">
             <t t-esc="website.search([])"/> <!-- will display 5 separate requests -->
          </div>
       </div>
    </t>
```

closes odoo/odoo#74712

Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2021-09-08 10:21:42 +00:00
Gorash dc1e9e6b4f [FIX] web: ace mode-qweb should highlight the groups odoo attribute
Issue: the regexp does not parse the dot in groups.
For example: `groups="base.group"` is not parsed as odoo/qweb attribute

Part-of: odoo/odoo#74712
2021-09-08 10:21:42 +00:00
Gorash 8936c0b25a [IMP] qweb: cleanup, remove useless code, add doc
Part-of: odoo/odoo#74712
2021-09-08 10:21:42 +00:00
Nicolas Bayet cc66d73836 [FIX] web_editor: ensure editor history always has more than 0 steps
344d82c commit changed how the editor `_historySteps` should behave.
Before that commit, `_historySteps` could have 0 steps whereas after
that commit `_historySteps` should always have at least the first step
be a snapshot. When reseting the history, we should now add a snapshot
as a first step. This commit guarantees it.

closes odoo/odoo#75901

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-09-08 09:03:07 +00:00
Antoine Guenet 68d27ec73e [FIX] web_editor, mass_mailing: use new historyReset io/ resetHistory
344d82c renamed `resetHistory` into `historyReset` but failed to update
some calls to it and rename its equivalent in wysiwyg.js. This commit
corrects the discrepancy.

Part-of: odoo/odoo#75901
2021-09-08 09:03:07 +00:00
Antoine Guenet c0d6f1993d [IMP] mass_mailing: remove outdated and expensive from_inline conversion
When saving a mailing, we do some processing (converting classes to
inline styles mostly) in order for the mailing to display properly in
all email clients. Until we started saving the processed version
separately from the unprocessed version, we had to revert the process
whenever we would start editing the mailing. This was extremely
expensive and made the loading of a previously created email very, very
slow. This was kept so far for backward compatibility reasons 3 years
ago (see f296992). This commit removes the that unnecessary conversion.

Part-of: odoo/odoo#75901
2021-09-08 09:03:07 +00:00
Antoine Guenet 95754eb6a4 [FIX] mass_mailing: save transpiled html without affecting body_arch
Since the introduction of Odoo Editor, `field_html`'s `_getValue` uses
`wysiwyg.getValue`. This conflicts with the mechanism of `mass_mailing`
which modifies the html of the editable area in place to save an
"e-mailable" version on the `body_html` field, then relies on
`_getValue` to reset the original html (`body_arch`).
This ensures the field has a value before modifying the html in place,
so we can manually restore it instead of relying on a side effect of the
old behavior of `_getValue`.

Part-of: odoo/odoo#75901
2021-09-08 09:03:06 +00:00
Touati Djamel (otd) 3fa3676240 [FIX] product_expiry: set the expiration_date when creating the “stock_move_line”
Steps to reproduce the bug:
- Install inventory, purchase and product_expiry
- Create a new storable product that is tracked by lots or serial numbers and expiration date
- Go to inventory > configuration > Warehouse Management > Operations Types
- In “San Francisco: Receipts” > Enable "Create New Lots/Serial Numbers", “Pre-fill Detailed Operations”, and "Show Detailed Operations"
- Create a new RFQ > select the created product > Confirm the order
- Click on “Receipt”

Problem:
In the created “stock_move_line” the expiration date field is not set

Solution:
When we add a new "stock_move_line" and choose a product, an onchange is triggered in order to set
the expiration_date field even if we do not choose a "lot /serial number name".
So we can replace the onchange with a compute function to do the same thing in the creation.

opw-2634583

closes odoo/odoo#76130

X-original-commit: d1ccfdc4097debe63aa6c9d42965a7801c1331cd
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Signed-off-by: Djamel Touati <DjamelTouati@users.noreply.github.com>
2021-09-08 07:56:12 +00:00
Nathan Marotte (nama) c35d9cf196 [FIX] mrp: Scheduled date on empty workcenter cause traceback
Issue: When creating a manufacturing order and setting a scheduled date
when no workcenter is set, a traceback shows up

Steps to reproduce :
 1) Install Manufacturing
 2) Enable work centers
 3) Create a manufacturing order, in the work order tab, add a new line
 and set a Scheduled Start Date, confirm the date
 -> Traceback

opw-2633940

closes odoo/odoo#76117

X-original-commit: ebf54c802664e6c2143785b950667c136944fcbf
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
2021-09-08 07:56:08 +00:00
Odoo's Mergebot d65086bcb3 [MERGE] various: clean code in compute and searches
closes odoo/odoo#76005

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-09-08 09:56:05 +02:00
Victor FeyensandThibault Delavallée f85387ef33 [IMP] mail(_*): limit usage of search
Purpose of this commit is to globally improve code performance by limiting
search impact by

  * adding limits when only first found record id used;
  * avoid unnecessary searches when record set can be filtered instead;
  * using cache when accessing ir.model;

Task-2638444
PR odoo/odoo#76005

Co-Authored-By: Thibault Delavallée <tde@odoo.com>
Co-Authored-By: Victor Feyens <vfe@odoo.com>
2021-09-08 07:56:04 +00:00
Thibault DelavalléeandVictor Feyens 2f4d582a79 [IMP] event(_*): limit usage of search
Purpose of this commit is to globally improve code performance by limiting
search impact by

  * adding limits when only first found record id used;
  * avoid unnecessary searches when record set can be filtered instead;

Task-2638444
PR odoo/odoo#76005

Co-Authored-By: Thibault Delavallée <tde@odoo.com>
Co-Authored-By: Victor Feyens <vfe@odoo.com>
2021-09-08 07:56:03 +00:00
Thibault DelavalléeandVictor Feyens d875bcd79d [IMP] gamification, google_drive, project: limit usage of search on ir.model
Purpose of this commit is to globally improve code performance by limiting
search impact by using cache when accessing ir.model.

Note that tests are left untouched as they are generally done using admin
(or at least data preparation is done as admin). Diff is kept small currently.

Task-2638444
PR odoo/odoo#76005

Co-Authored-By: Thibault Delavallée <tde@odoo.com>
Co-Authored-By: Victor Feyens <vfe@odoo.com>
2021-09-08 07:56:03 +00:00
Thibault Delavallée 2625d92b8b [IMP] mail, note: correctly name thread compute methods
Just cleaning those method names and removing unnecessary definition override
in note.

Task-2638444
PR odoo/odoo#76005
2021-09-08 07:56:03 +00:00