Commit Graph
146884 Commits
Author SHA1 Message Date
Yannick Tivisse f9f68adb2c [IMP] sale: Convert onchange_user_id into a compute method 2021-12-02 12:12:01 +01:00
Yannick Tivisse f503e69d3b [IMP] sale: Write create methods in api_create_multi mode 2021-12-02 12:12:01 +01:00
Yannick Tivisse ec84b7e7bd [IMP] sale: Add pre_compute=True on necessary fields 2021-12-02 12:12:01 +01:00
Yannick Tivisse c10db4492e [IMP] sale: Convert _compute_tax_id into real compute method 2021-12-02 12:12:01 +01:00
Yannick Tivisse 5fea243e1a [IMP] sale: Convert _onchange_pricelist_id into compute method 2021-12-02 12:12:01 +01:00
Yannick Tivisse 2806c5fd9f [IMP] sale: Convert onchange_partner_id into compute method 2021-12-02 12:12:01 +01:00
Yannick Tivisse f0f30828fc [IMP] sale: Convert onchange_partner_shipping_id into compute method 2021-12-02 12:12:01 +01:00
Yannick Tivisse b9194406ec [IMP] account: Avoid multiple rebrowse in get_fiscal_position
+ Make it private, as it is not supposed to be called from the
webclient.
2021-12-02 12:12:01 +01:00
Yannick Tivisse 550eb0b73c [IMP] account: Convert _onchange_sale_tax into compute method 2021-12-02 12:12:01 +01:00
Yannick Tivisse 40b2bc6f65 [IMP] website_sale: Convert _onchange_group_discount_per_so_line into compute method 2021-12-02 12:12:01 +01:00
Yannick Tivisse ebd719e0fa [IMP] website_sale: Convert _onchange_sale_delivery_settings into compute method 2021-12-02 12:12:01 +01:00
Yannick Tivisse 7b82fc1fe1 [IMP] sale_stock: Add query counter test on SO batch creation
This is be a correct metric to ensure the onchanges convertion
into compute methods using precompute attribute is going
in the right direction.
2021-12-02 12:12:01 +01:00
Jeremy Kersten 685c76aad2 [FIX] mail_group: only check members based on email and no author_id
In v15, in _find_members, we try to find a members with an email and without
partner_id or a member with the partner_id provided (if provided).

This commit remove the author_id, and so the partner_id to only looking for
members based on their email address.

Author_id could be the wrong since email is not uniq on partner.
We retrieve the same behavior than previously from this way.

courtesy of std for help to find a solution

closes odoo/odoo#80638

X-original-commit: 98d7b1417ee82fefcef175dd83ab41cd89db5119
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-12-02 10:19:00 +00:00
Paolo (pgi) f3e9e6f4b6 [FIX] l10n_ch: Fix QR bill according to specs
Reworked the structure of the HTML and the SCSS
to adhere to the official specs:

- 5mm padding inside the two main sections
- Correct font sizes
- Bold headers
- Increased the Swiss Cross inside the logo (7mm x 7mm)
- Scissors pictogram on the outline
- Dashed borders

Sizes now take the wkhtmltopdf (1/1.25 factor) shrinking
into consideration.

closes odoo/odoo#80544

X-original-commit: f02622684c6a220a425044d8d4a5fd474efdb519
Signed-off-by: William André (wan) <wan@odoo.com>
2021-12-02 10:18:56 +00:00
Víctor Martínez 8891f25872 [IMP] base_address_city: address field sync city_id.
`_address_fields` are used by `update_address` [1], which is in turn
called by `_fields_sync` and `_children_sync`.

This mechanism is in charge of synchronizing parent/children address fields
for contacts of type == "contact", as they don't really have an address of
their own. They simply copy the address of their parent.

Without this fix, an inconsistency is created between the value of city_id
and the value of the parent.

[1]: https://github.com/odoo/odoo/blob/20648ef21/odoo/addons/base/models/res_partner.py#L429

TT33047

closes odoo/odoo#80236

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-12-02 10:18:52 +00:00
Christophe Monniez c6600d1ea4 [IMP] core: bump master release version to 15.2
closes odoo/odoo#80708

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2021-12-02 08:31:59 +00:00
Jérémy Hennecart (jeh) f6bcae9879 [FIX] website_event: fix arrow in some versions of ubuntu
In some version of ubuntu with GNOME, the arrow is not
available. We replace the arrow already defined by the unicode
decimal code of the arrow and remove the arrow separator for the
datepicker (a dash is used by default).

task-2655272

closes odoo/odoo#80700

X-original-commit: ebd0d68280b59954df17f3a56675d194b1e8f70b
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-12-01 20:10:45 +00:00
Alexandre Kühn df0cbf88fc [FIX] mail: make rtc dialogs title translatable
Before this commit, the title of RTC dialogs -- like "Change Layout" menu
during a video-conference -- was not properly translated. The titles were
always shown in English as a result.

This commit now properly mark them as translatable string, so they should
now be properly translated in other languages than English.

Task-2703292

closes odoo/odoo#80689

X-original-commit: fbcdb644f24ecd10049a3730099c4a426a1f607f
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-12-01 19:23:47 +00:00
wde-odoo 1fb99d79b1 [IMP] survey: improve survey usability in backend
PURPOSE

This commit globally improves the backend survey module usability, notably by
renaming labels, moving menu items around and cleaning unused features.

SPECIFICATIONS

These changes include (non-exhaustive list):

On questions

  - Changing labels, action helpers and modules description to be clearer;
  - Re-organizing the survey.question form view, notably to clearly distinguish
    fields related to answers and validation options;
  - Removing the "Clean test answers" server action as it can be done through
    a search + unlink;
  - Removing the allow_value_image field as we now always display the
    image field. Users simply choose to let it blank;

On surveys

  - Re-organizing the survey.survey form view fields to get a clear view of
    the various options;
  - automatically update scoring type when checking certification: if not one
    linked to scoring, update to scoring without answers;
  - set create as create_multi to speedup batch creation;
  - Changes ACL rights for user_input_line. Now, only Survey Managers can
    change answers. Survey users keep only a read access on answers, meaning
    changing what customers / people answered is now limited to managers;

Globally

  - Moving menu items and make them visible outside debug mode;
  - Answer recap on print frontend page is now visible whenever a scoring is
    applied, not only for certification, as if scoring is activated seeing
    answers is probably wanted;

Task-2600241

closes odoo/odoo#79813

Related: odoo/upgrade#3033
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-12-01 18:39:45 +00:00
Victor Feyens c704b3fb0b [FIX] payment: a user should see all his available partner tokens
... even if they are in a company in which he has no access rights.

Finetuning of #79253 to keep previous multi-company behavior.
We didn't consider the fact that the previous behavior was fully managed
in sudo (through request.env.user.partner, which gives a sudoed record)
and changed the behavior by using an unsudoed search.

closes odoo/odoo#80694

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2021-12-01 17:55:12 +00:00
Victor Feyens 2f1b15d982 [FIX] core: in _auto_init, only log computation message if table is not empty
closes odoo/odoo#80687

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2021-12-01 17:09:00 +00:00
Yannick Tivisse 87224e158c [IMP] core: precompute docstring
Part-of: odoo/odoo#80687
2021-12-01 17:09:00 +00:00
std-odoo 3b97f601be [FIX] base: avoid variable name collision with functions in QWeb
Bug
===
The arguments of the lambda function might be the same as other
variables in the QWeb. In that case the template rendering will crash.

To avoid this issue, we encapsulate the name of the argument to be sure
it's not the same as other variable in the QWeb engine (so the name of
the argument can no longer make the QWeb rendering crash)

Task-2674716

Closes #78392.

Forward-port of 96b09b127028e5c9a83c89acce86e1b6df904c6f
2021-12-01 17:30:51 +01:00
bit-odoo 36abba30f6 [FIX] mail: attachment viewer not working for other types than image for guest
Before this commit:

Attachment viewer not working for other types than the image for guest.

After this commit:

Attachment viewer will work for guest.

Task-2664816

closes odoo/odoo#80686

X-original-commit: 7bb5776d2108a20d248f98f2741be92e1bc9de50
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-12-01 15:35:45 +00:00
Alexandre Kühn 30d7766eea [IMP] mail,snailmail,web: remove t-on on component
Preparation work to use OWL v2 in discuss code.

Task-2694200

closes odoo/odoo#80024

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-12-01 14:07:57 +00:00
Martin Trigaux aa07f93ef7 [IMP] package: update lxml version
Update the version to benefit from the fix for
https://github.com/advisories/GHSA-pgww-xf46-h92r
https://nvd.nist.gov/vuln/detail/CVE-2020-27783

This vulnerability is reproducible in Odoo with
html_sanitize(..., sanitize_tags=False) which does NOT happen for
user-facing content.

Remove old compatibility check (lxml 3.1 was released in 2013)
and cleanup global variables only used once

closes odoo/odoo#64248

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2021-12-01 14:07:47 +00:00
Bruno Zanotti c80eaa9ddf [IMP] l10n_ar: total amount in letters for MiPyMEs
According to the Argentinean law N° 27440, it is required for MiPyMEs
document types to show in the report the total amount in letters.

closes odoo/odoo#80669

X-original-commit: 9ae95a9a69fd3316b1a217225e8ebacbb51b8fe8
Signed-off-by: William André (wan) <wan@odoo.com>
2021-12-01 11:50:46 +00:00
Paolo (pgi) 10632d8ce3 [FIX] l10n_fr_fec: test wizard must have test_file = True
closes odoo/odoo#80668

X-original-commit: 3ae0b21f4b269859dc41ab6851e2e6e52b6b2e11
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Paolo Gatti (pgi) <pgi@odoo.com>
2021-12-01 11:50:42 +00:00
Kevin Baptiste a790a241da [FIX] hr_holidays: fix wrong employee_id fallback
A wrong fallback value was used, the domain is expecting the employee ID
and not the employee record.

closes odoo/odoo#80663

Taskid: 2675380
X-original-commit: 6e68df1a69079bc16888ad588c97f234c9b9fa07
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-12-01 11:05:14 +00:00
Xavier BOL (xbo) 581056425f [FIX] projet: fix duplicate id in project demo data
Before this commit, 3 xmlid are duplicated, so the result is not
expected.

This commit changes the duplicated xmlid to create the 6 tasks as
expected.

Part of task-2671848

closes odoo/odoo#80661

X-original-commit: 12e848cb200d4b763563e0b110c963aeb71d706e
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2021-12-01 11:05:09 +00:00
Nicolas Bayet 094ec14233 [FIX] web_editor: wait popover to be inserted to modify it
In some circumstance, `this.$target.data('bs.popover').tip` was not
defined until added into the DOM.

Task-2666388

closes odoo/odoo#80657

X-original-commit: 4fdd17b7436984ade2ce97dd57d749cc18c452dc
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-12-01 11:05:05 +00:00
Paolo (pgi) 423c7029d9 [IMP] l10n_pe: Moved ICBPER tax group from enterprise to community
closes odoo/odoo#78187

Related: odoo/upgrade#2914
Related: odoo/enterprise#21596
Signed-off-by: Josse Colpaert <jco@openerp.com>
2021-12-01 11:04:56 +00:00
David Beguin 51d131663c [FIX] survey: test if survey exist in survey_layout for background management
Since fd75481d52, we use the survey variable to compute the
background_image_url in the survey_layout. In some cases (notably in
survey_session_code template), this layout is used without knowing the
variable 'survey'.

After this commit, the 'survey' variable is tested before usage.

Also, this commit add the o_survey_background class to the t-attf-class that
already exists on 'wrapwrap' selector. Otherwise, by having both t-att-class
and t-attf-class, only the t-att-class is kept.

Task-2703147

closes odoo/odoo#80656

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-12-01 10:18:11 +00:00
Chong Wang (cwg) 1ceccf68e8 [IMP] sign: improve ui for buttons
Put "Sign Now", "Send" and "Share" into the dropdown menu of "Action" button when the window is too small
Add add "Send" "Sign Now" and "Share" buttons in the list view
Make green saving Kanban in the center of the screen when the window is too small
Change the order of buttons for signature popover
Make "width: 30%" css only for buttons for signature popover to avoid text overflow
change 'Adopt and Sign' to 'Adopt & Sign'

before this commit: there are some overflow and misalignment for buttons

task-2630720

closes odoo/odoo#79292

Related: odoo/enterprise#21671
Signed-off-by: Arnaud Joset <arj@odoo.com>
2021-12-01 10:17:57 +00:00
Chong Wang (cwg) db5b055138 [FIX] calendar: fix recurrence name
change the wrong recurrence name like
"Every 1 Months on the -1 Last for 3 events"
to
"Every 1 Months on the Last Thursday for 3 events"

before this task,
If you create a recurrence event and invite another partner in calendar with
* Repeat Every: xxx "Months"
* Day of Month: Day of month: Last Thurday
The recurrence name in the email would be like
"Every 1 Months on the -1 Last for 3 events"

closes odoo/odoo#78809

Signed-off-by: Arnaud Joset <arj@odoo.com>
2021-12-01 09:30:02 +00:00
Raphael Collet 0011823932 [FIX] core: cr.transaction no longer depends on registry
The cursor features a "transaction" object to manage application-
specific data in relation with cursor operations.  In its initial
implementation, the transaction object was created by the registry.
This created a requirement: in order to be used in environments, a
cursor had to be created by registry.cursor().

We now remove that unnecessary technical requirement by making
environments create the transaction object on demand.

closes odoo/odoo#80644

X-original-commit: e902713648bca329e6821859462b2128aad62c09
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2021-12-01 08:44:48 +00:00
Nicolas BayetandAntony Lesuisse f98db923e2 [FIX] web_editor: fix module auto install with web
The web_editor dependency with mail was problematic:
- web_editor would not auto_intall without the mail being installed
- A circular dependency problem with discuss

In order to avoid creating a new module shared by mail
and web editor, the use of a hack has been decided.
By checking if `notification_type` is in the session, we ensure
that the module mail is installed.

Task-2698655

closes odoo/odoo#80640

X-original-commit: 4e611d7527f85fc074115bd018adb7d6e5ea2c53
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Co-authored-by: Antony Lesuisse <al@odoo.com>
2021-12-01 08:01:00 +00:00
Antoine Guenet 9f480ba234 [FIX] mass_mailing: restore empty template thumbnail
The empty template had no thumbnail for the "select your template" tab.
This introduces a simple white one.

closes odoo/odoo#80622

X-original-commit: b1ac5a0167c0463d6d83bf4a8463a5e7432ebc21
Related: odoo/enterprise#22616
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-12-01 08:00:54 +00:00
Antoine Guenet 4d519e5b9c [FIX] mass_mailing: switch templates on hover thumbnail
Templates in mass_mailing have been redefined in [PR]: all their custom
styles have been removed so they all are built in a way that they could
be built using the editor only. Since this was done, the "select your
template" tab has been broken because there are no styles to apply.
This fixes the feature by adapting it to the new context: instead of
changing the styles, it applies the fresh template as if we were
starting a brand new e-mail.

[PR] https://github.com/odoo/odoo/pull/77312

task-2702007

X-original-commit: 09a8e58fd59c297727f9f64ec2a434caaf5b9a67
Part-of: odoo/odoo#80622
2021-12-01 08:00:54 +00:00
Kevin Baptiste 82803328b2 [FIX] hr_expense: allow users to read paid expenses
Simple users lost the ability to read their own paid expenses due to
missing access rights on account.move.

closes odoo/odoo#80646

Taskid: 2698791
X-original-commit: f164967c1eef731e92f41945b9a9fa05099950d9
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-12-01 07:18:10 +00:00
Thibault Francois 59aa5f7c0e [FIX] survey: question not define in survey.layout on print route
How to reproduce issue
-----------------------

- Create a survey with more than one question
  - Layout: One page per question
- Complete a first survey
- Start a second survey but don't finish it

- Click on see result
- Click on the answer of the uncompleted answer

you got a traceback
'NoneType' object has no attribute 'id'

Node: <t t-set="page_number" t-value="page_ids.index(question.id)"/>

Why this is happening ?
-----------------------

question is define in survey_page_print template inside a foreach.
The scope of question thus is limited to this foreach.

Solution
--------

Declare question before the foreach in a t-set

closes odoo/odoo#80648

X-original-commit: d80ec72696010d668047c8fb1d9665f6aa1b2ee6
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-11-30 19:08:12 +00:00
Sébastien Theys 08a3df6428 [FIX] mail: prioritize internal users when looking for mentions
Since https://github.com/odoo/odoo/pull/73689 all internal users are no longer
known at init. Unlike what was stated in the corresponding PR, the code of
mentions wasn't actually good enough to allow it without any drawback.

This PR fixes the issue by prioritizing internal users on the result of the RPC.

As a bonus the internal user state is immediately returned when fetching
followers, which allows mentions to be accurate even before the RPC is done.

task-2695224

closes odoo/odoo#80645

X-original-commit: 86de2f231be87b289deb85c3b20b93d890cce918
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-11-30 18:23:49 +00:00
Romeo Fragomeli ef70369eaa [FIX] web: navbar menu not shown on tablet
Before this fix, 'currentApp' returned 'undefined' on mobile but
there is no reason not to return the current app on mobile.
This has been fixed in enterprise repository.

Now that 'currentApp' returns a value, we have to explicitly hide
'menuItem' for small screen.

Steps to reproduce:
* Open Odoo on tablet
* Select an App => BUG

opw-2687424
opw-2688832

closes odoo/odoo#80639

X-original-commit: 3659d65f37d08737f99d62ecb8cd486ba8d764f4
Related: odoo/enterprise#22620
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: Romeo Fragomeli (rfr) <rfr@odoo.com>
2021-11-30 17:40:11 +00:00
Philippe Wauthy 1db8dc26c7 [FIX] hr: update accesss right for hr_employee
In a multi-company environment, it is not possible to update information (language, email,...) from My Profile.
The security rule only allows to change information if the right company is selected or if the user has no company.
Since a user assigned to several companies will have several records in hr_employee referring the same user_id, the security rule is now updated to allow updating information from the My Profile page if the hr_employee.user_id refers to the current user_id.

task-2678411

closes odoo/odoo#80637

X-original-commit: 3e9393c71ccf1b00c051155afd68b3a0cfff05cd
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-11-30 17:40:04 +00:00
Philémon van Helden 3b833c73a7 [IMP] mass_mailing, *: improve mailing stat buttons
*mass_mailing_crm, mass_mailing_sale 

Currently, the Mailing stat buttons have a few problems.
The business reporting smart buttons send the user to a list of linked records,
which doesn't provide much value (e.g. what is the user supposed to do with a
list of 12345 leads?). They also show wrong values depending on access rights.
The Mailing KPI smart buttons lead to a blank screen if there's no data to show.

In this commit, we add/adapt all action helpers to help users understand what is
going on. For the business reporting smart buttons we instead send users to
relevant reporting actions, so they can make sense of the data we showed before.
The values of the business reporting smart buttons are now calculated as a super
user.
We also change some domains from the whole UTM Sale Domain to only using
Source ID, which simplifies computation while staying accurate.

task-2604515

closes odoo/odoo#76798

Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2021-11-30 16:53:33 +00:00
Hiral Bhavsar 89fbe1c34e [FIX] mail: invisible reply icon on temporary or transient messages
Before this commit:

Replying to the answer of /who command in a channel leads to the reply not being
associated with the correct message, it should simply not be possible.

After this commit:

Reply icon will be invisible for temporary or transient message.

Task-2700389

closes odoo/odoo#80623

X-original-commit: 1df56ba9e105bd2766e252be22a320046b815cf3
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-11-30 16:07:51 +00:00
Charles Ferir ccc85fd269 [FIX] stock: solve possible infinite recursion
Steps to reproduce:

  - Test upgrade request 40290

Issue:

  Traceback raised.

Cause:

  The _find_delivery_ids_by_lot function can raise a
  RecursionError: maximum recursion depth exceeded if
  there is a loop in the path of lots.

  When running the function recursively for
  lot_id contained in produce_line_ids the same lot
  can be reached multiple times.

  In the case of db 40290:
  move_380->move_381
  move_381 and move_419 both in lot_1320
  move_419->move_423
  move_423 and move_380 both in lot_567
  move_380->move_381
  ...(goes on forever)

Solution:

  Use a lot_path optionnal argument to test if
  a lot has already been visited.

Full Traceback:
```
Traceback (most recent call last):
  File "/tmp/tmp81rzi7n7/migrations/testing.py", line 208, in test_check
    self.check(value)
  File "/tmp/tmp81rzi7n7/migrations/base/tests/test_mock_crawl.py", line 85, in check
    self.assertFalse(diff, msg)
AssertionError: [('stock.menu_action_production_lot_form', 195, 'Inventory > Master Data > Lots/Serial Numbers', 310), ('mrp.menu_mrp_traceability', 258, 'Manufacturing > Products > Lots/Serial Numbers', 310)] is not false : At least one menu or view working before upgrade is not working after upgrade.

('stock.menu_action_production_lot_form', 195, 'Inventory > Master Data > Lots/Serial Numbers', 310):
 Traceback (most recent call last):
   File "/home/odoo/src/odoo/15.0/odoo/api.py", line 879, in get
    return field_cache[record._ids[0]]
 KeyError: 567

During handling of the above exception, another exception occurred:

 Traceback (most recent call last):
   File "/home/odoo/src/odoo/15.0/odoo/fields.py", line 1057, in __get__
    value = env.cache.get(record, self)
   File "/home/odoo/src/odoo/15.0/odoo/api.py", line 882, in get
    raise CacheMiss(record, field)
 odoo.exceptions.CacheMiss: 'stock.production.lot(567,).delivery_count'

During handling of the above exception, another exception occurred:

 Traceback (most recent call last):
   File "/tmp/tmp81rzi7n7/migrations/base/tests/test_mock_crawl.py", line 182, in crawl_menu
    self.mock_action(action_vals)
   File "/tmp/tmp81rzi7n7/migrations/base/tests/test_mock_crawl.py", line 293, in mock_action
    mock_method(model, view, fields_list, domain, group_by)
   File "/tmp/tmp81rzi7n7/migrations/base/tests/test_mock_crawl.py", line 319, in mock_view_form
    [data] = record.read(fields_list)
   File "/home/odoo/src/odoo/15.0/odoo/models.py", line 3227, in read
    return self._read_format(fnames=fields, load=load)
   File "/home/odoo/src/odoo/15.0/odoo/models.py", line 3247, in _read_format
    vals[name] = convert(record[name], record, use_name_get)
   File "/home/odoo/src/odoo/15.0/odoo/models.py", line 5867, in __getitem__
    return self._fields[key].__get__(self, type(self))
   File "/home/odoo/src/odoo/15.0/odoo/fields.py", line 1106, in __get__
    self.compute_value(recs)
   File "/home/odoo/src/odoo/15.0/odoo/fields.py", line 1265, in compute_value
    records._compute_field_value(self)
   File "/home/odoo/src/odoo/15.0/addons/mail/models/mail_thread.py", line 410, in _compute_field_value
    return super()._compute_field_value(field)
   File "/home/odoo/src/odoo/15.0/odoo/models.py", line 4249, in _compute_field_value
    getattr(self, field.compute)()
   File "/home/odoo/src/odoo/15.0/addons/stock/models/stock_production_lot.py", line 122, in _compute_delivery_ids
    delivery_ids_by_lot = self._find_delivery_ids_by_lot()
   File "/home/odoo/src/odoo/15.0/addons/stock/models/stock_production_lot.py", line 204, in _find_delivery_ids_by_lot
    for delivery_ids_set in line.produce_line_ids.lot_id._find_delivery_ids_by_lot().values():
   File "/home/odoo/src/odoo/15.0/addons/stock/models/stock_production_lot.py", line 204, in _find_delivery_ids_by_lot
    for delivery_ids_set in line.produce_line_ids.lot_id._find_delivery_ids_by_lot().values():
   File "/home/odoo/src/odoo/15.0/addons/stock/models/stock_production_lot.py", line 204, in _find_delivery_ids_by_lot
    for delivery_ids_set in line.produce_line_ids.lot_id._find_delivery_ids_by_lot().values():
   [Previous line repeated 926 more times]
   File "/home/odoo/src/odoo/15.0/addons/stock/models/stock_production_lot.py", line 197, in _find_delivery_ids_by_lot
    move_lines = self.env['stock.move.line'].search(domain)
   File "/home/odoo/src/odoo/15.0/odoo/models.py", line 1810, in search
    res = self._search(args, offset=offset, limit=limit, order=order, count=count)
   File "/home/odoo/src/odoo/15.0/odoo/models.py", line 4682, in _search
    query = self._where_calc(args)
   File "/home/odoo/src/odoo/15.0/odoo/models.py", line 4438, in _where_calc
    return expression.expression(domain, self).query
   File "/home/odoo/src/odoo/15.0/odoo/osv/expression.py", line 442, in __init__
    self.parse()
   File "/home/odoo/src/odoo/15.0/odoo/osv/expression.py", line 701, in parse
    right_ids = comodel.with_context(active_test=False)._search([(path[1], operator, right)], order='id')
   File "/home/odoo/src/odoo/15.0/odoo/models.py", line 4683, in _search
    self._apply_ir_rules(query, 'read')
   File "/home/odoo/src/odoo/15.0/odoo/models.py", line 4464, in _apply_ir_rules
    expression.expression(domain, self.sudo(), self._table, query)
   File "/home/odoo/src/odoo/15.0/odoo/osv/expression.py", line 442, in __init__
    self.parse()
   File "/home/odoo/src/odoo/15.0/odoo/osv/expression.py", line 701, in parse
    right_ids = comodel.with_context(active_test=False)._search([(path[1], operator, right)], order='id')
   File "/home/odoo/src/odoo/15.0/odoo/models.py", line 4682, in _search
    query = self._where_calc(args)
   File "/home/odoo/src/odoo/15.0/odoo/models.py", line 4438, in _where_calc
    return expression.expression(domain, self).query
   File "/home/odoo/src/odoo/15.0/odoo/osv/expression.py", line 431, in __init__
    self._unaccent = get_unaccent_wrapper(model._cr)
   File "/home/odoo/src/odoo/15.0/odoo/osv/expression.py", line 405, in get_unaccent_wrapper
    if odoo.registry(cr.dbname).has_unaccent:
   File "/home/odoo/src/odoo/15.0/odoo/__init__.py", line 104, in registry
    return modules.registry.Registry(database_name)
   File "/home/odoo/src/odoo/15.0/odoo/modules/registry.py", line 61, in __new__
    return cls.registries[db_name]
   File "/home/odoo/src/odoo/15.0/odoo/tools/func.py", line 71, in wrapper
    return func(self, *args, **kwargs)
 RecursionError: maximum recursion depth exceeded

('mrp.menu_mrp_traceability', 258, 'Manufacturing > Products > Lots/Serial Numbers', 310):
 Traceback (most recent call last):
   File "/home/odoo/src/odoo/15.0/odoo/api.py", line 879, in get
    return field_cache[record._ids[0]]
 KeyError: 567

During handling of the above exception, another exception occurred:

 Traceback (most recent call last):
   File "/home/odoo/src/odoo/15.0/odoo/fields.py", line 1057, in __get__
    value = env.cache.get(record, self)
   File "/home/odoo/src/odoo/15.0/odoo/api.py", line 882, in get
    raise CacheMiss(record, field)
 odoo.exceptions.CacheMiss: 'stock.production.lot(567,).delivery_count'

During handling of the above exception, another exception occurred:

 Traceback (most recent call last):
   File "/tmp/tmp81rzi7n7/migrations/base/tests/test_mock_crawl.py", line 182, in crawl_menu
    self.mock_action(action_vals)
   File "/tmp/tmp81rzi7n7/migrations/base/tests/test_mock_crawl.py", line 293, in mock_action
    mock_method(model, view, fields_list, domain, group_by)
   File "/tmp/tmp81rzi7n7/migrations/base/tests/test_mock_crawl.py", line 319, in mock_view_form
    [data] = record.read(fields_list)
   File "/home/odoo/src/odoo/15.0/odoo/models.py", line 3227, in read
    return self._read_format(fnames=fields, load=load)
   File "/home/odoo/src/odoo/15.0/odoo/models.py", line 3247, in _read_format
    vals[name] = convert(record[name], record, use_name_get)
   File "/home/odoo/src/odoo/15.0/odoo/models.py", line 5867, in __getitem__
    return self._fields[key].__get__(self, type(self))
   File "/home/odoo/src/odoo/15.0/odoo/fields.py", line 1106, in __get__
    self.compute_value(recs)
   File "/home/odoo/src/odoo/15.0/odoo/fields.py", line 1265, in compute_value
    records._compute_field_value(self)
   File "/home/odoo/src/odoo/15.0/addons/mail/models/mail_thread.py", line 410, in _compute_field_value
    return super()._compute_field_value(field)
   File "/home/odoo/src/odoo/15.0/odoo/models.py", line 4249, in _compute_field_value
    getattr(self, field.compute)()
   File "/home/odoo/src/odoo/15.0/addons/stock/models/stock_production_lot.py", line 122, in _compute_delivery_ids
    delivery_ids_by_lot = self._find_delivery_ids_by_lot()
   File "/home/odoo/src/odoo/15.0/addons/stock/models/stock_production_lot.py", line 204, in _find_delivery_ids_by_lot
    for delivery_ids_set in line.produce_line_ids.lot_id._find_delivery_ids_by_lot().values():
   File "/home/odoo/src/odoo/15.0/addons/stock/models/stock_production_lot.py", line 204, in _find_delivery_ids_by_lot
    for delivery_ids_set in line.produce_line_ids.lot_id._find_delivery_ids_by_lot().values():
   File "/home/odoo/src/odoo/15.0/addons/stock/models/stock_production_lot.py", line 204, in _find_delivery_ids_by_lot
    for delivery_ids_set in line.produce_line_ids.lot_id._find_delivery_ids_by_lot().values():
   [Previous line repeated 926 more times]
   File "/home/odoo/src/odoo/15.0/addons/stock/models/stock_production_lot.py", line 197, in _find_delivery_ids_by_lot
    move_lines = self.env['stock.move.line'].search(domain)
   File "/home/odoo/src/odoo/15.0/odoo/models.py", line 1810, in search
    res = self._search(args, offset=offset, limit=limit, order=order, count=count)
   File "/home/odoo/src/odoo/15.0/odoo/models.py", line 4682, in _search
    query = self._where_calc(args)
   File "/home/odoo/src/odoo/15.0/odoo/models.py", line 4438, in _where_calc
    return expression.expression(domain, self).query
   File "/home/odoo/src/odoo/15.0/odoo/osv/expression.py", line 442, in __init__
    self.parse()
   File "/home/odoo/src/odoo/15.0/odoo/osv/expression.py", line 701, in parse
    right_ids = comodel.with_context(active_test=False)._search([(path[1], operator, right)], order='id')
   File "/home/odoo/src/odoo/15.0/odoo/models.py", line 4683, in _search
    self._apply_ir_rules(query, 'read')
   File "/home/odoo/src/odoo/15.0/odoo/models.py", line 4464, in _apply_ir_rules
    expression.expression(domain, self.sudo(), self._table, query)
   File "/home/odoo/src/odoo/15.0/odoo/osv/expression.py", line 442, in __init__
    self.parse()
   File "/home/odoo/src/odoo/15.0/odoo/osv/expression.py", line 701, in parse
    right_ids = comodel.with_context(active_test=False)._search([(path[1], operator, right)], order='id')
   File "/home/odoo/src/odoo/15.0/odoo/models.py", line 4682, in _search
    query = self._where_calc(args)
   File "/home/odoo/src/odoo/15.0/odoo/models.py", line 4438, in _where_calc
    return expression.expression(domain, self).query
   File "/home/odoo/src/odoo/15.0/odoo/osv/expression.py", line 431, in __init__
    self._unaccent = get_unaccent_wrapper(model._cr)
   File "/home/odoo/src/odoo/15.0/odoo/osv/expression.py", line 405, in get_unaccent_wrapper
    if odoo.registry(cr.dbname).has_unaccent:
   File "/home/odoo/src/odoo/15.0/odoo/__init__.py", line 104, in registry
    return modules.registry.Registry(database_name)
   File "/home/odoo/src/odoo/15.0/odoo/modules/registry.py", line 61, in __new__
    return cls.registries[db_name]
   File "/home/odoo/src/odoo/15.0/odoo/tools/func.py", line 71, in wrapper
    return func(self, *args, **kwargs)
 RecursionError: maximum recursion depth exceeded
```

closes odoo/odoo#80606

X-original-commit: acceb903b0487987edd5da9ce343c0f6c3ff44d8
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2021-11-30 16:07:47 +00:00
Aurélien WarnonandJulien Banken e70c203910 [IMP] crm: add small view improvements for crm.lead
This commit simply re-organizes a few fields on the crm.lead form view to give
more visibility to the most important information and to give more space to the
"Notes" section.

Task-2677144

closes odoo/odoo#80591

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Co-authored-by: Julien Banken <jbn@odoo.com>
2021-11-30 16:07:43 +00:00
Horacio Tellez 43cd3b4dfe [IMP] payment: customer is no longer able to see tokens for disabled acquirers.
Saved payments methods for disabled acquirers are no longer visible on the customer
portal. It was fustrating for the customer to see saved payment methods that he was
no longer able to use as they are disabled.
Now the use should only be able to see payment methods that he can indeed use.

Task - 2679695

closes odoo/odoo#79253

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2021-11-30 16:07:36 +00:00
Odoo's Mergebot dea661b215 [MERGE] resource: get work intervals based on resource settings/contracts
The False key is always added in attendance and leave intervals batch
but is not added in the work_intervals batch.

To give a more smooth API, this commit aligns work_intervals behavior
with the two other methods behavior, regarding the added False key.

task-2646630

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

closes odoo/odoo#77362

Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2021-11-30 17:07:26 +01:00