Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

12.0 #32

Open
wants to merge 358 commits into
base: 12.0
Choose a base branch
from
Open

12.0 #32

wants to merge 358 commits into from

Conversation

erp27
Copy link
Owner

@erp27 erp27 commented Jan 22, 2022

Description of the issue/feature this PR addresses:

Current behavior before PR:

Desired behavior after PR is merged:

--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

adwid and others added 30 commits April 21, 2021 14:35
The IBAN template of Costa Rica is incorrect
Backport of #66730

OPW-2477541

closes #69620

Signed-off-by: Adrien Widart <adwid@users.noreply.github.com>
To reproduce the error:
(Need sale_management)
1. In Settings:
    - Line Subtotals Tax Display: Tax-Included
2. Create a tax T:
    - Included in Price: True
3. Create and save a SO
    - Add a line with T
4. Switch to mobile view

Error: The amount of the order line is incorrect, it does not consider
the option from step 1.

OPW-2484646

closes #69627

Signed-off-by: Adrien Widart <adwid@users.noreply.github.com>
Before this commit, it might happen that, in some situations,
with several tabs opened, the CrossTabBus called the longpolling
route repeatedly, thus slowing down the server, and freezing the
webclient.

The issue was tricky to reproduce. It was a race-condition that
could occur when several tabs performed simultanous calls to
addChannel, while being unloaded or becoming mastertab in the
meantime (e.g. when opening/closing/refreshing several tabs
simultaneously).

This issue has been introduced by [1] which by mistake (probably)
made each tab calling itself the localStorage to update the list
of channels when it was notified that the list of channels in
the localStorage just changed. So if several tabs had a slightly
different list of channels at a given moment (e.g. at startup),
it might happen that they in turn, undo what another tab just
put in the localStorage, and thus produced an infinite loop of
localStorage writes and longpolling request aborts/calls.

The issue could be reproduced with the OCA module [2], which
performs several addChannel at webclient startup.

This commit restores this part of the code as it was initially
written in [3].

Closes #69067

opw~2502799
maybe opw~2451865 as well

[1] 6448420
[2] https://odoo-community.org/shop/product/web-notify-2670#attr=10773
[3] 38581f6#diff-f6eccad21ae3543606ab8f97b8b097d015412caeaee2bf8cc928eb3ccabac9f5R149

closes #69383

Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
*: account_payment, payment, sale

Steps:
- Install eCommerce
- Go to Website / Configuration / eCommerce / Payment Acquirers
- Configure Stripe:
  - Save Cards: Always
  - Payment Flow: Redirection to the acquirer website
- Go to /shop
- Add a product to the cart
- Process Checkout
- Select Stripe
- Pay Now
- Enter test data in Stripe Checkout form (https://stripe.com/docs/testing#cards)
- Pay
- Go to /shop
- Add a product to the cart
- Process Checkout
- Select your saved card
- Pay Now

Bug:
Stripe Error:
The provided PaymentMethod was previously used with a PaymentIntent
without Customer attachment, shared with a connected account without
Customer attachment, or was detached from a Customer. It may not be used
again. To use a PaymentMethod multiple times, you must attach it to a
Customer first.

Explanation:
https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-setup_future_usage
> Indicates that you intend to make future payments with the payment
> method collected by this Checkout Session.

According to this doc, `setup_future_usage` must be set in order to use
the saved card afterwards.

opw:2452452
opw:2498571
opw:2509897

closes #69692

Signed-off-by: backspac <backspac@users.noreply.github.com>
… a user still linked to it

Description of the issue/feature this PR addresses and current behavior before PR:
There is a discrepancy in the wording of the error message provided. The error reads that an 'internal user' is linked but really its a 'portal user.'.

Desired behavior after PR is merged:
The wording of the error is clearer, and it now says 'portal user' instead of 'internal user'.

OPW: 2498139

I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

closes #69550

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
The changed test uses the drag&drop helper, and an operation does
not work as expected with the given params on chrome 90. The runbot
currently uses chrome 80, so it is not an issue, but if your chrome
is up-to-date, and you try to run the test suite, this test would
fail.

closes #69964

Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
Give a coherent group as otherwise we could have access errors. Simple
case: an Admin Rights user goes into a mail message form which is only
available in debug mode which sets `group.no_one` into such user. This
model is only readeable by `base.group_sytem` so an AccessError will
raise.

closes #67621

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Purpose
=======

When creating an attendee from frontend some fields may be added in
parameters, notably through inheritance (questions, ...). We want the
defaults values to have the priority on those parameters (e.g. barcode code).

Task ID-2322411
PR #68699

X-Original-Commit: 5391df9
A computed field on event may crash if current user is a portal user as it
tries to access registrations to know if current user is already participating
to the event.

We also fix ACL on the registrations as most code already use it as sudo and
do not access it directly. Only the event users or admins should access it
directly.

Task ID-2322411
PR #68699

closes #69939

closes #69965

X-original-commit: f7c95d9
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
…rtner

Display the default name (the one displayed in the kanban view) for followers replacing
the False value for "other address" partners, this way the user won't get
confused, furthermore, this fix won't require the name to be mandatory for this
type of contacts.

Task-2514244

closes #69739

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
In eg. 13.0 when refreshing sales analysis action of a product, we would
get an error because we have a single active_ids which is not expected
by the code.

With this commit, we use .toString() on the jQuery BBQ parsed active_ids
as it was done before 32b8cec refactoring (january 2018).

The added test with the fix fails with an error:

  TypeError: state.active_ids.split is not a function
  at Class.loadState (/web/static/src/js/chrome/action_manager_act_window.js)

opw-2471982

closes #68943

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Co-authored-by: Nicolas Lempereur <nle@odoo.com>
Make translation work for "Visitor" that was appearing in livechat
session to the visitor.

opw-2504461

closes #70123

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
When selling a tracked product that comes from a specific place in the
warehouse, the module will ignore this information and set the parent
warehouse as source location.

To reproduce the error:
(Use demo data)
1. In Settings, enable "Multi-Warehouses"
2. Create a product P:
    - Product Type: Storable Product
    - Available in Pos: True
    - Tracking: By Unique Serial Number
3. Update its quantity:
    - Location: WH/Stock/Shelf 1
    - Serial Number: USN01
    - Qty: 1
4. Start a POS session
5. Sell P
    - Enter the same serial number
6. Go back to quantity update page for product P

Error: The quantity for "WH/Stock/Shelf 1, USN01" is still 1, it should
be 0. Moreover, a new line appeared: "WH/Stock, USN01, -1" which is
incorrect. The POS module considered that the product sold came from
WH/Stock instead of WH/Stock/Shelf 1.

OPW-2473002

closes #69750

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
What are the steps to reproduce your issue ?

    1. Go to helpdesk/configuration/stages
    2. Add rating email template to Solved
    3. Change state of a ticket to Solved
    4. Go to Technical/messages and open the sent message

What is currently happening ?

    The template is not displayed correctly

opw-2476485

closes #70234

Signed-off-by: Achraf <abz-odoo@users.noreply.github.com>
In odoo/documentation#945, the developer documentation is merged
with the user documentation in a single repository and build config.

This commit then removes source files for the developer documentation
from the odoo/odoo repository.

DOC PR: odoo/documentation#945

task-2352371

Co-authored-by: Victor Feyens <vfe@odoo.com>
Co-authored-by: Antoine Vandevenne <anv@odoo.com>
The only purpose of the module `test_documentation_examples` is to test
a few of the code examples shown in the developer documentation.

As c99629b removes the documentation sources from the repository,
the test module is removed as well.

DOC PR: odoo/documentation#945

task-2352371

closes #70121

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Co-authored-by: Victor Feyens <vfe@odoo.com>
Co-authored-by: Antoine Vandevenne <anv@odoo.com>
When the user creates a new account analytic line, he should not be able
to create a new journal item.

To reproduce the error:
(Use demo data)
1. In Settings, enable "Analytic Accounting"
2. Accounting > Configuration > Analytic Accounts > Administrative >
Cost/Revenue
3. Create a new one
4. Click on "Journal Item" list

Error: the list contains the "Create and Edit..." option. Such an action
should not be possible.

OPW-2481197

closes #69881

closes #70325

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Have in a purchase order a first row with unit price 0
Export the PO adding unit price in the list of fields to export
The unit price is not reported

This occur because the first line of the order lines is meld with the
purchase order line but in the process the 0.0 values is discarded

opw-2510917

closes #70274

Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
… group (groupby:week)

* IMPACTED VERSIONS

  12.0+

* HOW TO REPRODUCE

locale :  Locale is en_US (or other SUNDAY based)
view:     CRM - My Pipeline - Kanban view
groupBy:  date_deadline:week (Expected closing)
records:  one record with a planned activity, on date_deadline = 2021-05-02 (SUNDAY)
          one record with no planned activity, on date_deadline = 2021-05-09 (SUNDAY)
remark:   don't keep any other record in MAY for better visibility

* PROBLEM

The progressbar of the week containing 2021-05-09 displays information about the record
from the week containing 2021-05-02

* CAUSE

1. PostgreSQL `date_trunc` function follows ISO8601 which essentially means that
  the start of a WEEK is always MONDAY. There is no argument to change this.

2. _read_group_format_result
  /~https://github.com/odoo/odoo/blob/27da86a138089c1838e4b94f8a6976995b9c1fff/odoo/models.py#L2210-L2219

  - Computes a label for a group of records.
  - Follows the locale for the label of the week, based on a date which is
    always a MONDAY because of `date_trunc`.

3. read_progress_bar
  /~https://github.com/odoo/odoo/blob/88957afca09662af7eaa19df1e40b3699e45e79e/addons/web/models/models.py#L167-L175

  - Associates a group label to a record.
  - Follows the locale for the label of the week, based on the date of a record
    which can be any day of the week. If the record is related to a SUNDAY and
    SUNDAY is the first day of the week, it would have been in a group with a
    different label in (2.) than in (3.) prior to this change.

* FIX

In 3., before associating a label to a record, we truncate the date to the
ISO start of the period, so that the label is determined for a record in the
same conditions than in 2. The locale is still used to get language-dependent
outputs with babel, but the grouping will always follows ISO8601 (date_trunc).

* TEST

Added a test for this problem case

TASK-ID : 2517848

closes #69946

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
BEFORE this commit query "invoices is not set" was tranformed to
query "order_line.invoice_lines.invoice_id is False", which doesn't make sense,
because invoice_id is required fields and hence always set. Hence, result of
the query was always empty.

AFTER: just check that there is no invoice_lines. Strictly speacking, is not the
same as checking result of compute method, but because invoice_lines are
supposed to be lines for invoices of out_* type, the result should be the same.

---

opw-2516124

closes #70343

Signed-off-by: Ivan Yelizariev // IEL <yelizariev@users.noreply.github.com>
closes #70517

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
If you modify an archived warehouse, it may happen that the associated operations get unarchived. Operations should be active only if their warehouse is active.

closes #70420

Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
The container size of a forum post was not correct when an image was
displayed with right or left alignment.

The css property clear was added at the end of the posts so that
floating elements do not float over the next section.

task-2469516

closes #70489

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Steps to reproduce the bug:

- Let's consider two companies C1 and C2 where C1 is the parent of C2
- Let's consider an expense product P with T1 as tax in C1 and T2 as tax in C2
- Let's consider an expense alias A defned for C1 and C2
- Let's consider an employee E in C2 with work email address W
- Send from W to A an email with subject [internal reference of P] Test Expense 1000€

Bug:

An expense is created in C2 with T1 and T2 as supplier taxes instead of only T2

Inspired from function _compute_tax_id defined in model sale.order and purchase.order

opw:2507162

closes #70370

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
To reproduce the error:
(Enable debug mode)
1. In Settings, enable "Multiple Sales Prices per Product - Prices
computed from formulas"
2. In Decimal Accuracy, edit Product Price:
    - Digits: 3
3. Open a pricelist, add a line:
    - Compute Price: Fix Price
    - Value: 0.889
Error: On pricelist form, the value is rounded (0.89)

Partial backport of #40777

OPW-2483262

closes #70537

Signed-off-by: Adrien Widart <adwid@users.noreply.github.com>
Following the recent reorganisation of the documentation in 12.0+, the majority
of the documents have been moved and their old links are no longer valid.

Some redirection rules will soon be deployed, but those rules might be dropped in some
years and we want the links to still work, which is why we still replace the links to the
new ones.

closes #70639

Related: odoo/enterprise#18259
Signed-off-by: Antoine Vandevenne (anv) <AntoineVDV@users.noreply.github.com>
When building a domain `(=|!=)` with
a Binary field stored in attachment and
the right part of the domain is not null,
the full binary content is logged, giving
the logs a huge size.

Now, the content of the binary is cropped to
20 chars as it is useless to log more.

opw-2527629

closes #70640

Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
std-odoo and others added 30 commits March 29, 2022 12:51
Purpose
=======
Do not auto install microsoft_outlook.

fetchmail_outlook is still auto installed because it
depends on microsoft_outlook.

Task-2751996

closes #87461

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
In this database, the custom `megaprint_fel` module add the
`pos_order.qty` field. Then, when executing this query [1],
the `AmbiguousColumn` error is raised.

(The fix has also been applied from 14.0)

[1] /~https://github.com/odoo/odoo/blob/12.0/addons/pos_sale/report/sale_report.py#L31-L32

```
arg_276911=> select id,module,name,model from ir_model_data where id = 23811;
  id   |    module     |        name         |      model
-------+---------------+---------------------+-----------------
 23811 | megaprint_fel | field_pos_order_qty | ir.model.fields
(1 row)
```

```
Traceback (most recent call last):
  File "/home/odoo/src/odoo/12.0/odoo/service/server.py", line 1164, in preload_registries
    registry = Registry.new(dbname, update_module=update_module)
  File "/home/odoo/src/odoo/12.0/odoo/modules/registry.py", line 86, in new
    odoo.modules.load_modules(registry._db, force_demo, status, update_module)
  File "/home/odoo/src/odoo/12.0/odoo/modules/loading.py", line 417, in load_modules
    force, status, report, loaded_modules, update_module, models_to_check)
  File "/home/odoo/src/odoo/12.0/odoo/modules/loading.py", line 313, in load_marked_modules
    perform_checks=perform_checks, models_to_check=models_to_check
  File "/home/odoo/src/odoo/12.0/odoo/modules/loading.py", line 195, in load_module_graph
    registry.init_models(cr, model_names, {'module': package.name})
  File "/home/odoo/src/odoo/12.0/odoo/modules/registry.py", line 313, in init_models
    model.init()
  File "/home/odoo/src/odoo/12.0/addons/sale/report/sale_report.py", line 139, in init
    self.env.cr.execute("""CREATE or REPLACE VIEW %s as (%s)""" % (self._table, self._query()))
  File "/home/odoo/src/odoo/12.0/odoo/sql_db.py", line 148, in wrapper
    return f(self, *args, **kwargs)
  File "/home/odoo/src/odoo/12.0/odoo/sql_db.py", line 225, in execute
    res = self._obj.execute(query, params)
psycopg2.errors.AmbiguousColumn: column reference "qty" is ambiguous
LINE 70: ...        CASE WHEN pos.state = 'invoiced' THEN sum(qty) ELSE ...
                                                              ^
```

closes #89218

Signed-off-by: Christophe Simonis <chs@odoo.com>
…tion

Purpose
=======
The flow where we copy / paste the authorization code will be
depreciated. Because of that, we know use the newest authentication
system which use redirect URI.

Technical
=========
Now, the user is redirected to an Odoo endpoint "google_gmail/confirm"
and the access token / refresh token are automatically fetched.

Documentation
https://developers.google.com/identity/protocols/oauth2/native-app

Task-2852560

closes #91282

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit fix 3 problem

Don't count studio field
------------------------

the commit 75b8c4e
was supposed to stop counting count field generate by addins a smart
button with studio.

It works fine when base import module is not installed which is never
the case.

When base_import_module the field is counted as a field that belong
to a imported module installed : studio_customization

studio_customization should not be counted as an imported module
installed

Count Field with standard xml_id
--------------------------------

With 9afce48
Each manual can end up with an xml_id from a standard module:
the original module of the model

A standard module should never create a manual field so we can consider
they should be counted unless they match the criteria of the first
problem

If a field has a standard module xml_id and no other the module
should be odoo/studio and not the name of the standard module

Make possible to exclude some db record from cloc
-------------------------------------------------
It's possible to exclude some file in python module
but it's not possible to exclude some field or SA in
the database from the count

Make it possible if they are link to an xml_id
from the module __cloc_exclude__

The exclude record will be shown in cloc report with
the verbose mode

closes #95046

Related: odoo/enterprise#29026
Signed-off-by: Christophe Simonis <chs@odoo.com>
When there are many `calendar.event`s (700K+), MemoryError happens when they are tried to be sorted
before returning them in `get_recurrent_ids` method.

[upg-377987](https://upgrade.odoo.com/web#action=150&cids=1&id=377987&menu_id=107&model=upgrade.request&view_type=form)
Traceback from the upgrade request:
```
Traceback (most recent call last):
  File "/home/odoo/src/odoo/12.0/odoo/addons/base/maintenance/migrations/base/tests/test_mock_crawl.py", line 220, in crawl_menu
    self.mock_action(action_vals)
  File "/home/odoo/src/odoo/12.0/odoo/addons/base/maintenance/migrations/base/tests/test_mock_crawl.py", line 347, in mock_action
    mock_method(model, view, fields_list, domain, group_by)
  File "/home/odoo/src/odoo/12.0/odoo/addons/base/maintenance/migrations/base/tests/test_mock_crawl.py", line 368, in mock_view_form
    records = model.search(domain, limit=3)
  File "/home/odoo/src/odoo/12.0/odoo/models.py", line 1581, in search
    res = self._search(args, offset=offset, limit=limit, order=order, count=count)
  File "/home/odoo/src/odoo/12.0/addons/calendar/models/calendar.py", line 1802, in _search
    events = self.browse(events.get_recurrent_ids(args, order=order))
  File "/home/odoo/src/odoo/12.0/addons/calendar/models/calendar.py", line 1261, in get_recurrent_ids
    return [r['id'] for r in sorted(result_data, key=key)]
  File "/home/odoo/src/odoo/12.0/addons/calendar/models/calendar.py", line 1259, in key
    for v, desc in vals_spec
  File "/home/odoo/src/odoo/12.0/addons/calendar/models/calendar.py", line 1259, in <listcomp>
    for v, desc in vals_spec
MemoryError

The issue is happening in the `key` function when data is being sorted before returning it. In this function to compare events for every key a list is returned.
Returning a list for every element leads to a memory error because lists over allocate memory when they are created to make Time complexity of [appending to a list O(1) in amortized time](https://stackoverflow.com/questions/46664007/why-do-tuples-take-less-space-in-memory-than-lists)
Over allocating memory a few times would not be a problem but given that this db has 700K+ `calendar.events`, over allocation causes a memory error. That's why it is better
to return tuples instead of lists, which do not over allocate because they are immutable, which will resolve the MemoryError.

closes #102198

Signed-off-by: Christophe Simonis <chs@odoo.com>
…version change

closes #117765

X-original-commit: c38b5ba
Signed-off-by: Christophe Simonis <chs@odoo.com>
When we compare majorless scripts we must ignore the Odoo version.
Otherwise a module upgrade without major Odoo upgrade would fail to run
local scripts majorless scripts. That's what happens for example when
users click the upgrade button of a module.

Example: upgrade from `11.0.1.0` to `11.0.2.0`, with a local `2.0` folder
for upgrades.
```
11.0.1.0 < 11.0.2.0 < 11.0.2.0 -> False (check before this patch)
     1.0 <      2.0 <=     2.0 -> True  (check with this patch)
```
While still: upgrade from `11.0.2.0` to `12.0.2.0`
```
11.0.2.0 < 12.0.2.0 < 12.0.2.0 -> False (before this patch)
     2.0 <      2.0 <=     2.0 -> False (with this patch)
```

closes #119088

X-original-commit: 84ab74c
Signed-off-by: Christophe Simonis <chs@odoo.com>
Before this commit:
Files that should be ignored in the manifest but aren't (js library for example)
it can happen that files have huge lines, the regex to substract the
comments will overuse memory.
For example, a file of 13M with a line of more that 8M characters, the
memory consumptions peak at 1.7G

The results might be different, but it's an acceptable compromise

closes #119977

Signed-off-by: Thibault Francois <tfr@odoo.com>
closes #129515

Related: odoo/enterprise#43416
Signed-off-by: Christophe Simonis (chs) <chs@odoo.com>
"from collections import <ABC>" is deprecated.

Part-of: #138754
PackageLoader fails in recent versions with this error:

  File "/usr/lib/python3.10/importlib/util.py", line 114, in find_spec
    raise ValueError('{}.__spec__ is None'.format(name))

Valueerror: odoo.addons.web.__spec__ is None
Part-of: #138754
Adapted backport of 4d7e7c01fa719

Part-of: #138754
Probably some kind of backport of de59081

Also removes urplus function as werkzeug uses url_encode internally in
order to avoid deprecated Href usage

Part-of: #138754
getchildren method is deprecated since  lxml 2.0

Part-of: #138754
After a browser_js, http requests threads are joined. If one of them
doesn't finish gracefully, a dumpstacks occurs.
As the dumpstacks call is in a loop, it can quickly polute logs. Even
more, a the dumptack may include threads that were not yet processed and
that will be joined in a future loop.

With this commit, dumpstacks will be called once and for all at the end
of the method, if at least one thread is remaining.

Furthermore, before this commit a sleep of 0.5 sec occured at most ten
times for each thread before considering it as lost. It means that each
thread is benefiting of the cumumulated time of the previous ones.
That's not fair.

With this commit, a default timeout of 10 sec is used for all threads.
The original warning is kept for each remaining request.

backport cherry-pick of 3ca788f

Part-of: #138754
As the werkzeug.utils.escape method is deprecated in werkzeug 2.0, we
vendor it in order to ensure compatibility in stable.

This may be be replaced by markupsafe in master as stated in the
warning.

backport cherry-pick of 5e275ee

Part-of: #138754
backport of 34f0866

this fixes the infamous can't adapt type 'RequestUID'

Part-of: #138754
Mitigate generation of non-breaking space on some versions of Babel (in
the french locale used by our tests anyway). Backported from
fe376d5

Part-of: #138754
Before werkzeug 2.0, the `path` attribute was a cached property, now
it's a regular attribute.

With this commit, both cases are handled.

Part-of: #138754
Python module vatnumber doesn't seem maintained anymore. Therefore, we should:
    - call directly stdnum (which is maintained and mostly used everywhere in vatnumber)

Also improve stdnum import, vat fix method and vat expected formats

task-1915371

cherry-pick of 4b2abaf

Part-of: #138754
Manual cherry-pick of 5783642 in order to remove the need of
vatnumber.

closes #138754

Related: odoo/enterprise#48976
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
Prevent an infinite loop when the cycle in the parents does not contain
the starting id: `3->2->1->2->1...`

Example:
```
>>> m=self.env['ir.module.category']
>>> c1,c2,c3 = map(m.browse,[1,2,3])
>>> c2.parent_id = False
>>> c3.parent_id = False
>>> c1.parent_id = c2
>>> (c3|c2).parent_id = c1  # this never ends
```

With current patch the call to `_check_recursion` successfully detects
the new cycle.

closes #151538

X-original-commit: d07ffce
Signed-off-by: Raphael Collet <rco@odoo.com>
Signed-off-by: Alvaro Fuentes Suarez (afu) <afu@odoo.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.