Commit Graph
149305 Commits
Author SHA1 Message Date
Thibault Delavallée c2fd9a4965 [IMP] (test_)mail: allow attachment propagation in all activity feedback methods
Activity-level feedback method accepts attachment_ids but not its mixin-level
counterpart. This commit fixes that by adding the parameter. The activity-level
action_feedback_schedule_next method now also accepts attachments in addition
to the feedback, making the API coherent through all entry points.

At activity level ``action_done`` now goes through ``action_feedback``. This
means it now has two main methods
  * ``action_feedback``;
  * ``action_feedback_schedule_next``;

All methods finally end up calling ``_action_done`` and correctly propagate
feedback and attachments. We have a bit less entry points with possible API
changes.

Test mail models are updated to be able to use this small addition.

Task-2710804 (Mail: Clean MailThread API)

Part-of: odoo/odoo#86393
2022-03-24 13:57:34 +01:00
Davan CHIEM DAO dc9ebd3472 [FIX] l10n_it_edi: Discount computation from invoice import
This fixes the how general discounts and product discounts are represented in the Italian EDI.

Previously, discounts were erroneously calculated and represented on several invoice lines not linked to the product.
Now, cascading discounts are summaries as 1 percentage discount for products and 1 amount for the general discount.

closes odoo/odoo#85863

Task: 2764978
X-original-commit: 5769f13e48c5b68bf19fc82377b9ea716ea4a85e
Signed-off-by: Josse Colpaert <jco@odoo.com>
2022-03-24 13:57:15 +01:00
Pouya Malekinejad eb23c0c9d5 [IMP] *: unify contact widget usage with VAT
The contact widget supports displaying VAT but it was added manually in the reports after contact. This commit fixes this behavior and results in fewer code and an easier way for the l10n modules which may modify VAT display.

closes odoo/odoo#83733

Related: odoo/enterprise#25195
Signed-off-by: Laurent Smet <las@odoo.com>
2022-03-24 13:57:11 +01:00
Adrien Widart c3fff714c5 [IMP] stock: set partner for inter-warehouse transfers
Test af13e76629

closes odoo/odoo#87118

X-original-commit: cb93c259bf5e3aac4ae8fbbd071c68c8dd049911
Signed-off-by: Steve Van Essche <svs@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
2022-03-24 12:57:33 +01:00
Andrea Grazioso (agr-odoo) 7d028396e0 [FIX] l10n_cl: unable to issue credit note
Have a CL company setup
Issue an invoice
Then generate the credit note via 'Add Credit Note' wizard
Add a reason (credit method is locked to 'partial refund') and confirm
Error will raise “You can not use a invoice document type with a refund
invoice”

This occur after
https://github.com/odoo/enterprise/commit/9e049b833b23809e4287ef61ddf7482413debefd

We now fall back to the logic of l10n_latam_invoice_document
which, in turns, fall back to the l10n_cl, ignoring the 'credit_note'
case.

opw-2794515

closes odoo/odoo#87116

X-original-commit: c9ff9d28ab75c02093ca54d9fbd1d2e203c5ee2e
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
2022-03-24 12:57:29 +01:00
Sébastien Theys 648d47ede1 [IMP] mail: use message list view for guarding
Now that message list view exists, it should be used whenever possible, in
preparation of future commits.

Part of task-2801089

closes odoo/odoo#87113

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-24 12:57:25 +01:00
Alexandre Kühn d801553c53 [IMP] mail: introduce 'MessageAuthorPrefixView' model
Task-2793280

closes odoo/odoo#86973

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-24 12:57:20 +01:00
lejeune quentin 08621a1b0c [FIX] hw_drivers: Allow the IoT to run without data base
From the last refactoring #78857 it was no longer possible to run the odoo server on an iot

With this commit we change the override of the db_list function
And and reload the driver controllers

closes odoo/odoo#86665

Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2022-03-24 12:57:16 +01:00
Alexandre Kühn aca77f18b8 [FIX] mail: do not show chat window hidden menu in mobile
Task-2795429

closes odoo/odoo#86551

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-24 12:57:12 +01:00
Alexandre Kühn af9b2f5657 [IMP] mail: turn 'MessageView/isSelected' into field
Task-2793280

closes odoo/odoo#86465

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-24 12:57:08 +01:00
Brieuc-brd f0b92a6d5c [IMP] web: revamp graph view
This commit simplifies the SCSS of the Graph view.

task-2740030

closes odoo/odoo#83132

Related: odoo/enterprise#23633
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-03-24 12:57:01 +01:00
dja-odoo 472fac659e [IMP] mail: limit followers edition/removal for users with read access
Before this commit, if the user has read only access to a record:

 - User could see 'Add Followers' button, which raised AccessError
 - User could see edit and remove icons but performing these actions
  for followers other than one related to logged in user, it also
  raised AccessError.

With this commit, we are restricting it based on the user rights, if
the user has read only access to a record:

 - 'Add Followers', subtype edition(pencil icon) and follwer removal
   buttons will be visible only for the follower related to logged in
   user, not for others. This way we can avoid the unexpected
   AccessErrors.

Note that if user is having write access for the record, nothing
changes.

task-id-2447776

closes odoo/odoo#70575

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-03-24 12:56:52 +01:00
Xavier-Do f49d09decd [FIX] crm: avoid indeterminism linked to create_date filter
The test `test_assign_count` may fail randomly leading to the error:

```
self.assertEqual(self.sales_team_1_m3.lead_month_count, 14)
AssertionError: 12 != 14
```

Since BUNDLE_HOURS_DELAY is 0 (during tests), the domain becomes
`[('create_date', '<', fields.Datetime.now()]`

Depending of the time when the transaction starts, and the tests is
executed, the domain could match more or less records when executed one
second earlier or later. This is especially True for single module build
where there is less logic and the execution is faster. The domain may be
tested earlier and match less records.

This error can be reproduced deterministically by setting
`BUNDLE_HOURS_DELAY = 1/3600`

A fix could be to ignore ignore the create_date domain if the
BUNDLE_HOURS_DELAY is 0, we want to match all records in theory
(except if some of them are created in the future...)

The chosen solution is to use cr.now and use a <= instead.

Some assertions where also added to the test in order to identify why
the count was different and give a more precise message when it fails.

```
AssertionError: Lists differ: [] != ['TestLeadInitial_0000', 'TestLeadInitial_[97 chars]006']

Second list contains 6 additional elements.
First extra element 0:
'TestLeadInitial_0000'

- []
+ ['TestLeadInitial_0000',
+  'TestLeadInitial_0001',
+  'TestLeadInitial_0002',
+  'TestLeadInitial_0004',
+  'TestLeadInitial_0005',
+  'TestLeadInitial_0006']
```

task-2796579

closes odoo/odoo#87107

X-original-commit: 4a5b68f05c57ba36560d43733dfd04b67c3297a8
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2022-03-24 10:48:56 +01:00
Aurélien (avd) 0f548c3047 [IMP] stock: avoid calling quant_tasks by default.
Currently, a cron is called once a day (by default)
to merge duplicated quants. Moreover, each
time the customer loads the Inventory Report,
the duplicated quants are also merged.

This is a bit overkill as duplicated quants
due to concurrent updates are quite rare. Also,
merging quants can be quite slow when the stock.quant
table is big (>1M).

This commit adds an ir.config_parameter to turn
off the merging of quants when accessing the
Inventory Report. It can be switched back on
for a specific DB if duplicated quants happen
more frequently.

opw-2574152

closes odoo/odoo#87119

X-original-commit: bb2cb76a724c1bc12aa7e515b1376b88ffd97b3d
Signed-off-by: Arnold Moyaux <arm@odoo.com>
2022-03-23 22:14:11 +01:00
Sébastien Theys df30f9fba3 [FIX] mail: reintroduce scroll to top on posting message in chatter
The feature was broken in https://github.com/odoo/odoo/commit/80d74e7ee0eab83dc5100e0776df09d04b882fec#diff-14904a101d1c0589d79515df7065aeeaaf0d4cdeaff9a4748ff0331c481efe8eL275
where `loadNewMessages` was mistakenly removed.

But this call is useful to make sure newly posted messages (from other users)
are fetched, as well as having the side-effect to scroll to the newly posted
message of the current user in particular.

closes odoo/odoo#87114

X-original-commit: 1550e08945597f3a49a7c8adec3cc0c2d9afdf82
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-23 22:14:07 +01:00
bit-odoo 0f98a416e5 [FIX] mail: attachment viewer download and print buttons for guest
Before this commit:

Attachment viewer download and print buttons not working for guests.

After this commit:

Attachment viewer download and print buttons will work for guests.

Task-2664842

closes odoo/odoo#87025

X-original-commit: 191a4b21a446d17a5090481b16f3de56a57f611e
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-23 21:11:06 +01:00
Alexandre Kühn 3de3573f1e [IMP] mail: remove useless guard 'Thread/hasComposerThreadTyping'
Thread/hasComposerThreadTyping is always set to boolean, so never `undefined`.

Task-2793280

closes odoo/odoo#86965

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-23 21:11:02 +01:00
Alexandre Kühn 9c2890ac86 [IMP] mail: turn 'ComposerView/hasHeader' into field
Task-2793280

Part-of: odoo/odoo#86965
2022-03-23 21:11:02 +01:00
Alexandre Kühn 7f70db13f3 [IMP] mail: guard VisitorBannerComponent
Task-2797754

closes odoo/odoo#86957

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-23 21:10:56 +01:00
Alexandre Kühn c1cbffacf4 [IMP] mail: guard SnailmailNotificationPopoverComponent
Task-2797754

closes odoo/odoo#86956

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-23 21:10:52 +01:00
Alexandre Kühn 07c1c6ee13 [IMP] mail: guard SnailmailErrorComponent
Task-2797754

closes odoo/odoo#86955

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-23 20:18:50 +01:00
Alexandre Kühn 8e833f0cd2 [IMP] mail: guard WelcomeViewComponent
Task-2797754

closes odoo/odoo#86953

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-23 20:18:45 +01:00
Alexandre Kühn d722bfe267 [IMP] mail: guard DiscussSidebarMailboxComponent
Task-2797754

closes odoo/odoo#86815

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-23 20:18:41 +01:00
Odoo's Mergebot 1046118577 [MERGE][IMP] website_event: display the timezone when a datetime is used
PURPOSE

Cleanup all the places where an hour or a datetime is been used to
display with the date the corresponding timezone.

SPECIFICATIONS

Display the timezone of the event  next to each datetime. For the event
main page and the track/agenda pages, we display the timezone next to
each date unless the timezone of the visitor is the same as the event.

We also introduce a new "time" qweb field converter. It is used to display
a float value into a real "time" (not duration).

Task-2458013

closes odoo/odoo#78049

Related: odoo/enterprise#21543
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-03-23 20:18:35 +01:00
Jérémy Hennecart (jeh) d4780b756d [IMP] website_event: display the timezone when a datetime is used
Cleanup all the places where an hour or a datetime is been used
to display with the date the corresponding timezone.
The goal is to know the timezone used where a datetime is displayed
on the event pages.

task-2458013
COM PR: odoo#78049

Part-of: odoo/odoo#78049
2022-03-23 20:18:34 +01:00
Jérémy Hennecart (jeh) 5cf3206547 [IMP] base: add qweb field for float value representing a time value
We add a new qweb field that transforms a float value to a human-
readable time format.

task-2458013
COM PR: odoo#78049

Part-of: odoo/odoo#78049
2022-03-23 20:18:34 +01:00
Jérémy Hennecart 6649e7c39c [IMP] *event*: replace t-esc by t-out
Replace each t-esc by t-out since it's now deprecated in templates

task-2458013
COM PR: odoo/odoo#78049
ENT PR: odoo/enterprise#21543
2022-03-23 20:18:34 +01:00
Fabio Barbero d3ac342041 [IMP] survey: hide Answer page if no scoring
Purpose
=======
Avoid showing the "Correct Answer" field if the survey is not scored
(for question type numerical, date or datetime). Since it is the only
field on this page, hide the page completely.

Task-2795296

closes odoo/odoo#87074

X-original-commit: 71af5dfc69dfb22b3700986c16fa116447d06796
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-03-23 19:25:19 +01:00
Merlin (megu) d3e4fce07c [FIX] stock: correct total ordered quantity on delivery slip
The total ordered quantities on a delivery slip with order lines of the
 same product was wrong + this PR
https://github.com/odoo/odoo/pull/83591 was incorrect, the undelivered
products should be displayed once

Steps to reproduce:
1. Install the Sales and Inventory app
2. Create and confirm a sale order with two order lines, both with the
same product
3. Go to the delivery and confirm it with all demands met
4. Print the delivery slip
5. The ordered quantity of the product is wrong, it should be equal to
the delivered quantity

Solution:
Use all empty moves in package-less products
`qty_ordered` = `qty_done` when in a package (the potential remaining
quantities will be displayed in the package-less products or in the
backorder section) or when there is no backorder (as the undelivered
products will either be added to the package-less products section or
the ordered quantity will be incremented later)
If we are not in a package and there is a backorder, adapt the ordered
quantity to remove the quantity of the packages considered before
Convert `qty_done` to the UoM of the stock move

opw-2722203
opw-2758840
opw-2782572

closes odoo/odoo#87072

X-original-commit: 332ec796ac77c8383a04a924508013c735f67d1e
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
2022-03-23 19:25:16 +01:00
Ivan Yelizariev 2f1bd13274 [FIX] project: make custom fields copiable again
Since #73341 copy_data is filtered to avoid leaking information to portal user.
Partically, it makes custom field not copiable.

Fix it by disabling the filter for internal users. This may lead to a problem
with hacky field `personal_stage_type_ids`. To avoid extra complexity in the
code, just mark it as `copy=False`. The latter change is kind of an improvement
from functional point of view, since using default personal stage seems to be a
better idea rather than copying the stage.

---

opw-2746922

closes odoo/odoo#87064

X-original-commit: 9947e82c5c25cde030aca43f7eb6fe1293300329
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-03-23 19:25:12 +01:00
Julien Mougenot a5cce9f592 [FIX] web: Empty cache when editing favorites
Before this commit, the view service kept the same cache information
even thought favorite filters would be created or deleted. This caused
inconsistencies when the interface tried to reload views that would
access the cache and display outdated information.

Now the related views cache keys are invalidated when favorite filters
are created or deleted.

closes odoo/odoo#76507

closes odoo/odoo#87031

X-original-commit: 84e260e4ecad5116def4d9dcdd0b35d7e87fa45d
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-03-23 19:25:05 +01:00
Jinjiu Liu 6aec353480 [FIX] purchase: removed header on subsequent pages of RFQ
Reproduction:
1. Change Document layout style to "Boxed"
2. Creating a PO with long descriptions for each product, make sure the
report is at least 2 pages
3. Send By Email (use default RFQ template)
4. In chatter, open the RFQ pdf file-> go to second page -> the
descriptions overlap the header

Reason: like a fix from previous bug in sale order report, the header is
removed in subsequent pages to avoid overlapping

Fix: set the header to row group, keep the new change in master too

opw-2779427

closes odoo/odoo#87026

X-original-commit: dece57d1c8e7d0a86c58802459434c02d53ecb58
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Signed-off-by: Liu Jinjiu (jili) <jili@odoo.com>
2022-03-23 19:25:01 +01:00
Alexandre Kühn 8aa97941c6 [IMP] mail: guard RtcLayoutMenuComponent
Task-2797754

closes odoo/odoo#86940

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-23 18:05:21 +01:00
Alexandre Kühn 3f89170c8d [IMP] mail: guard RtcInvitationCardComponent
Task-2797754

closes odoo/odoo#86938

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-23 18:05:17 +01:00
Alexandre Kühn 6f69dc504f [IMP] mail: guard RtcControllerComponent
Task-2797754

closes odoo/odoo#86936

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-23 18:05:12 +01:00
FrancoisGe 2853e7d1cf [FIX] web: CP separate namespace and search value
The purpose of this commit is to allow the removal of the search value
without removing the namespace.

Use case before this commit:
1. I perform a search in the homeMenu;
2. The command palette opens with "/" + my search;
3. I realise that my search is wrong and I would like to delete its
contents;
4. I press control+a to select the content of my search;
5. I press the backspace key;
6. The "/" and my search is deleted;
7. I perform a new search;
8. I realize that I forgot to add "/" at the beginning.

This commit will remove the namespace from the input which will allow
the user to delete the search without adding the namespace.

If the user wants to remove the namespace, they will have to press the
backspace key with an empty input.

If the user wishes to change the namespace, they will have to start
their search with that namespace. This will be removed from the input
and replace the old namespace.

closes odoo/odoo#86926

Task-id: 2768527
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-03-23 18:05:08 +01:00
Alexandre Kühn ea0d4faa79 [IMP] mail: guard RtcCallViewerComponent
Task-2797754

closes odoo/odoo#86848

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-23 17:14:20 +01:00
Alexandre Kühn 403666fcc7 [IMP] mail: guard RtcCallParticipantCardComponent
Task-2797754

closes odoo/odoo#86847

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-23 17:14:16 +01:00
Alexandre Kühn ff47ba8dad [IMP] mail: guard PopoverViewComponent
Task-2797754

closes odoo/odoo#86845

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-23 17:14:11 +01:00
Alexandre Kühn beda6fc72c [IMP] mail, *: guard PartnerImStatusIconComponent
*: hr_holidays

Task-2797754

closes odoo/odoo#86844

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-23 17:14:07 +01:00
Alexandre Kühn f6a0636733 [IMP] mail: guard ThreadViewTopbarComponent
Task-2797754

closes odoo/odoo#86952

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-23 16:17:13 +01:00
Alexandre Kühn d099d45f25 [IMP] mail: guard ThreadViewComponent
Task-2797754

closes odoo/odoo#86951

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-23 16:17:10 +01:00
Alexandre Kühn 146e11ecc8 [IMP] mail: guard ThreadTextualTypingStatusComponent
Task-2797754

closes odoo/odoo#86950

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-23 16:17:06 +01:00
Alexandre Kühn 90b3ea7cfe [IMP] mail: guard ThreadPreviewComponent
Task-2797754

closes odoo/odoo#86949

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-23 16:17:01 +01:00
Alexandre Kühn 55286327fa [IMP] mail: guard ThreadNeedactionPreviewComponent
Task-2797754

closes odoo/odoo#86948

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-23 16:16:57 +01:00
Alexandre Kühn 694fe89cfc [IMP] mail, *: guard ThreadIconComponent
*: im_livechat

Task-2797754

closes odoo/odoo#86947

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-23 16:16:54 +01:00
Alexandre Kühn 4b5d981b47 [IMP] mail: guard RtcVideoComponent
Task-2797754

closes odoo/odoo#86946

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-23 16:16:50 +01:00
Alexandre Kühn 38b6e2ade8 [IMP] mail: guard RtcOptionListComponent
Task-2797754

closes odoo/odoo#86945

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-23 16:16:46 +01:00
Alexandre Kühn 89e036f0cf [IMP] mail: guard NotificationRequestComponent
Task-2797754

closes odoo/odoo#86843

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-23 14:37:59 +01:00
Alexandre Kühn 5f6da59b02 [IMP] mail: guard NotificationPopoverComponent
Task-2797754

closes odoo/odoo#86839

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-23 14:37:55 +01:00