Commit Graph
149073 Commits
Author SHA1 Message Date
Sébastien Theys b8d57d06bc [IMP] mail: remove unused o-attachment-removed
The event is no longer bound since 0df4b0029b

And it's fine in this case : the form view does not need to be updated when
removing a pending attachment from composer.

closes odoo/odoo#86491

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-16 17:04:45 +01:00
Alexandre Kühn 693f77c124 [IMP] mail: turn 'ComposerView/isCompact' into field
Task-2793280

closes odoo/odoo#86467

Signed-off-by: Ooming <wil@odoo.com>
2022-03-16 17:04:38 +01:00
Alexandre Kühn e8206b4dfa [IMP] mail: turn 'ThreadView/hasComposerThreadTyping' into field
Task-2793280

closes odoo/odoo#86455

Signed-off-by: Ooming <wil@odoo.com>
2022-03-16 17:04:32 +01:00
Demesmaeker a6a8a669b9 [IMP] payment_stripe: manage async notifications
Some payments may be confirmed asynchronously, and we need to be aware
of their status, even if they are not in a "checkout session complete"
event. Relying on successful payment or setup intents instead manage
more use cases.

task-2733725

closes odoo/odoo#84150

Related: odoo/upgrade#3350
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-03-16 17:04:25 +01:00
tsm-odoo b15959cd95 [IMP] mail, *: make start method handle cleanup
*: calendar, hr, hr_holidays, im_livechat, mail, mail_bot, note, sms, snailmail,
website_livechat, website_slides.

This commit prepares the removal of beforeEach function in the
mail test suite. Cleanup was relying on beforeEach adding widgets,
components, unpatch method 'this'. We need to clean things up without
using either beforeEach or 'this'.

task-2792108

closes odoo/odoo#86526

Related: odoo/enterprise#25326
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-16 16:07:58 +01:00
Thanh Dodeur 818eadd4ea [FIX] base: ensures that the proper attachment field is retrieved
Before this commit, any field requested to `_binary_record_content()`
when the model was `ir.attachment` would be considered as `raw`.

This assumption works at the moment but could lead to unexpected
behavior down the line.

see https://github.com/odoo/odoo/pull/86005#discussion_r824420219

closes odoo/odoo#86524

X-original-commit: eeb93287f9a9027d0ce22f9fd3305a7ab081d69f
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-16 16:07:43 +01:00
David Tran 15b93edc8e [I18N] mail: add missing func _ for messages
closes odoo/odoo#86521

X-original-commit: a08f4e00715dba4a0447dce879b46da0e581669e
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-03-16 16:07:38 +01:00
Jérémy Hennecart (jeh) d248f5afce [FW][FIX] calendar: use the event_tz in mail templates
Try to use the event_tz before falling back on the mail_tz (user tz) in the
context. Add a tool method allowing to override this behavior easily instead
of concatenating "or". As template is modified anyway translations are already
broken.

Task-2699765

closes odoo/odoo#86513

X-original-commit: odoo/odoo@6ef642ccdc
Part-of: odoo/odoo#86070
Related: odoo/enterprise#25322
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-03-16 16:07:27 +01:00
Antoine Guenet f50eaa4412 [FIX] web_editor: prevent infinite scroll in mass_mailing in dialogs
When opening mass_mailing in a dialog (eg, in marketing automation),
dragging a snippet to the bottom of the page (without dropping) caused
an infinitely growing scrollbar on the document element.

Note: this revealed that in that particular context the auto scroll to
snippet feature is broken and while dragging we have an extra scrollbar,
on the editable area. In order to fix that, we need to be able to
identify from within the iframe the case where mass_mailing
self-resizes. This involves changing the view to add an option which
will set a class on the document element. This is not acceptable in
stable and will therefore be fixed in master instead.

task-2742664

closes odoo/odoo#86506

X-original-commit: 29c6c80ac7009aa5068c763778342f7c6b115fad
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-03-16 16:07:22 +01:00
Antoine Guenet 8fb3cbed2a [FIX] mass_mailing: ensure no overflow of empty editor message
The empty editor message was overflowing its container when in a modal,
so a part of it was hidden and there was a scrollbar. This fixes it by
setting its width to the available space.

task-2742664

X-original-commit: 0bbe0a6e108591146d1d8cfb252b31f24fbf8ca5
Part-of: odoo/odoo#86506
2022-03-16 16:07:21 +01:00
Alexandre Kühn 9ddc046e24 [IMP] mail: turn 'ComposerView/hasFollowers' into field
Task-2793280

closes odoo/odoo#86472

Signed-off-by: Ooming <wil@odoo.com>
2022-03-16 16:07:13 +01:00
Alexandre Kühn f8633598c8 [IMP] mail: turn 'Discuss/addChannelInputPlaceholder' into field
Task-2793280

closes odoo/odoo#86442

Signed-off-by: Ooming <wil@odoo.com>
2022-03-16 16:07:09 +01:00
Cedric PrieelsandPriyanka Kakadiya aa24c3a757 [IMP] *: improve report security
* hr_timesheet_{attendance}, project, rating, sale_timesheet

- removed the 'admin' group on the reporting menu items so that 'users' can
  access these menus.
- 'timesheet / attendance' menu should only show if user has access for both
  the attendance and timesheet.
- Project/User should access 'Task Analysis' report And Added rule for user.
- customer ratings: only show ratings which has access of their project/task.
- ratings: user should not able to edit ratings.

task-2467564

closes odoo/odoo#82634

Related: odoo/enterprise#23439
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Co-authored-by: Priyanka Kakadiya <pka@odoo.com>
2022-03-16 16:07:00 +01:00
rhe-odoo bde64f5706 [FIX] point_of_sale: cash rounding refund
Cash rounding value were not added with negative amount.
For example if you made an order:
  - amount of the order: 1.98
  - rounding value: 0.05
  - amount to pay: 2.00
The refund of this order should be:
  - amount of the order: - 1.98
  - amount to pay: - 2.00
  - amount to pay before the fix: - 1.98

Because when we added the latest fix that allowed payment lower than the cash rounding value (for example an order amount of 0.03 with a cash rounding for 0.05), the negative amount were not taken into account.
Whenever a negative amount had to be paid, the condition was triggered and return a 0 as rounding to apply (-1.98 < 0.05 => true).
Now we check the absolute value of the total amount to consider if we need to apply a rounding.

closes odoo/odoo#86520

X-original-commit: 421e9d9100e9593999c9490342070a81b1786078
Signed-off-by: Masereel Pierre <pim@odoo.com>
2022-03-16 15:09:29 +01:00
Munaf Khan 4c072bd257 [FIX] digest: fix digest mail failure due to blank "From" field
Currently while sending a digest, if a company does not have an email
address set, the "From" field for the mail is blank and so trying to
send digest fails.

With this commit, if a company does not have an email address set, it
will fallback to logged in user's email address as a "From" value.
In most cases, it will be the Odoobot email address (if the digest is
sent with the CRON) but if the admin send manually the digest, we will
use the admin email address.

TaskID-2729780

closes odoo/odoo#86507

X-original-commit: b9f8b8c721cbe56ebec5e43f96e478107d0c30ff
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-03-16 14:11:45 +01:00
Florian Charlier 332bfade6e [FIX] mail: adjust emails design
Improve the design of SO/PO/INV mails together with the other changes of the
release, i.e. fixes a few imprecisions introduced by odoo/odoo#82167.

In particular, these changes enforce
* a responsive, mobile friendly layout tested on many devices and OS
* more generally, a consistent styling. Note that some redundancy in directives
 is required for compatibility across email clients.

Translation files are included.

Task-2751139
Follow-up of Task-2712450
See odoo/enterprise#25154

closes odoo/odoo#86494

X-original-commit: 4914127b428802d2ff2e15351238a3ffef24b9cc
Related: odoo/enterprise#25306
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-03-16 13:16:46 +01:00
Mitul Shah 4b5556cd33 [IMP] mass_mailing_{sms}: group visibility for email marketing
Before this Commit,
While creating a new SMS mailing, There is an empty settings tab.

After this Commit,
- We have added a new 'Option' group and set the
'Include opt-out link' field in this group.
- We have moved the 'Responsible' from Email Content to Tracking group.
- Responsible(user_id) will be always visible.
- Email Content group will visible only while creating Email Marketing.

Task-2710557

closes odoo/odoo#86488

X-original-commit: 8d5ad3a2092da6188bcbf3ca2c12c20bc95eadb1
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-03-16 13:16:42 +01:00
roen-odoo e21b48c511 [FIX] sale: Show sales from archived partners
Current behavior:
When you access sales tree view of a company, the sales of archived partners are not shown in the list.
But the sales count on the smart button is right.

Steps to reproduce:
- Add a partner to a company
- Create a sale with this new partner and confirm it
- Archive the new partner
- Go on the company contact page
- The smart button will show the number of sales
- Click the sale smart button
- The list is missing the new partner's sales

opw-2774862

closes odoo/odoo#86485

X-original-commit: ba4b929a174df501adf982ea16f4a030faec0a6b
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2022-03-16 13:16:39 +01:00
Alexandre Kühn df8d0b5ea3 [IMP] mail: turn 'ComposerView/currentPartnerAvatar' into field
Task-2793280

closes odoo/odoo#86438

Signed-off-by: Ooming <wil@odoo.com>
2022-03-16 13:16:32 +01:00
Alexandre Kühn 10adbacd8a [IMP] mail: turn 'ChatWindow/shiftPrevText' into field
Task-2793280

closes odoo/odoo#86435

Signed-off-by: Ooming <wil@odoo.com>
2022-03-16 13:16:29 +01:00
Sébastien Theys 4d5652539a [FIX] mail: restore scroll in discuss app
min-height 0 is necessary for flex elements to properly shrink smaller than
their content. It was missing on this newly introduced parent.

Follow up on https://github.com/odoo/odoo/commit/cbe1bc809538f690115e1632448258663e1f52e4

task-2793274

closes odoo/odoo#86405

X-original-commit: 54df143917ed002190f5f628ce9bbc6840b4efd2
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-16 13:16:25 +01:00
Didier (did) 2b03a1869e [IMP] mail: add a copy link button
This PR add a copy link button to the invitation link inside the invite people
panel.

task-2664866

closes odoo/odoo#86257

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-16 13:16:21 +01:00
Nicolas Lempereur 49913f1f35 [FIX] pos_sale: decrease sale.report ID conflict
issues:

- search sale.report with `('order_id', '!=', False)` in list view =>
  you might get lines without sale order, with the wrong product, ...

- group sale.report by product on list view => you might get lines with
  a different product than the group

cause:

the sale.report IDs are an union of sale_order_line.id and
pos_order_line.id => so there can be 2 lines of sale.report with same
IDs but pointing two completely different record.

rejected solution:

using row_number() over() for ID after the UNION ALL => rejected since
there was a `row_number` on sale.report at one point that was removed
because of performance issue (03bd6f5243e189cd05b3fc7ad774cc07ea733e14).

solution:

using negative IDs for pos_order_line lines

drawback:

in 14.0, we already use negative IDs for sale_order without lines =>
the probability of conflict is lower for this case and sale.order.line
not being in conflict is better.

opw-2586062
opw-2694529

closes odoo/odoo#83621

X-original-commit: cdaf046637704b53047b79984669ed2044cd8da6
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2022-03-16 13:16:17 +01:00
Odoo's Mergebot ed79ef116b [MERGE] mass_mailing: allow users to re-use old mass mailing template
Purpose
=======
Allow users to re-use a design they made in a previous mailing.

Specifications
==============
Add a duplicate button when the mailing has been sent (so the users
can easily duplicate an existing mailing to re-use the template).

Allow the user to add a mailing to the favorite. When we open the web
editor for the first time, show the email bodies of the favorite
mailings. When the users click on them, load the HTML like we do for
the themes.

Filter the mailing templates based on the model defined on the mailing,
so the user will see the most appropriate templates.

Task-2593231

closes odoo/odoo#79174

Related: odoo/enterprise#23308
Related: odoo/upgrade#3176
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-03-16 13:16:14 +01:00
std-odoo e0b80ac30e [IMP] mass_mailing: filter the mailing templates based on the target
Purpose
=======
Filter the mailing templates based on the model defined on the mailing,
so the user will see the most appropriate templates.

Task-2593231

Part-of: odoo/odoo#79174
2022-03-16 13:16:13 +01:00
std-odoo 5508ca04e1 [IMP] mass_mailing: allow users to re-use old mass mailing template
Purpose
=======
Allow users to re-use a design they made in a previous mailing.

Specifications
==============
Add a duplicate button when the mailing has been sent (so the users
can easily duplicate an existing mailing to re-use the template).

Allow the user to add a mailing to the favorites. When we open the web
editor for the first time, show the email bodies of the favorite
mailings. When the users click on them, load the HTML like we do for
the themes.

Task-2593231

Part-of: odoo/odoo#79174
2022-03-16 13:16:13 +01:00
std-odoo d8e4aefa74 [IMP] mass_mailing: add title for the templates and update thumbnail
Purpose
=======
We can now define a title for the mailing templates that will be
displayed bellow the thumbnail.

Improve the thumbnail image of the "plaintext" template.

Technical
=========
The title is set on the "title" atribute, and not on "data-title",
because the data attributes are not translated.

Task-2593231

Part-of: odoo/odoo#79174
2022-03-16 13:16:13 +01:00
std-odoo d2852a3db2 [IMP] mass_mailing: remove the web editor menu flicker
Purpose
=======
When we create a new mailing, the web editor toolbar appear during
a fraction of a second. We want it to be visible only during the
edition of the template.

Task-2593231

Part-of: odoo/odoo#79174
2022-03-16 13:16:12 +01:00
std-odoo 9417fc7e27 [IMP] mass_mailing: open the standard mailing list form view
Purpose
=======
Open the standard mailing list form view when creating a mailing list
from the Kanban view because it had no use and was a bit confusing.

Rename the field "Is Public" to "Show In Preference" to describe a bit
better the usage from a functional POV.

Task-2593231

Part-of: odoo/odoo#79174
2022-03-16 13:16:12 +01:00
simonev 480fc6b38b [FIX] repair: avoid currency error when deleting pricelist field
closes odoo/odoo#85722

X-original-commit: 5ef00fcdccf788ab33789d505f88ec1bc0750d4d
Signed-off-by: Arnold Moyaux <arm@odoo.com>
2022-03-16 12:17:28 +01:00
Goffin Simon acc9313d2e [FIX] delivery: Do not show HS code when state != done
Steps to reproduce:

- Let's consider a storable product P with HS code
- Create a SO with P and confirm it
- Print the delivery slip

Bug:

The header HS CODE was displayed even if the column doesn't exist in the table

opw:2744000

closes odoo/odoo#83834

X-original-commit: 7f8a6b0accea9ef0d95e4cd613aa7cabdff936d6
Signed-off-by: Simon Goffin <sig@odoo.com>
2022-03-16 11:17:15 +01:00
Pierre-Yves Dufays db63c03af9 [IMP] website_slides: display a user-friendly error message when accessing an
unauthorized course content

Display a user-friendly error message when a user access an unauthorized
course content.

Specifications:

When a non-authorized course content is accessed, instead of a 403 error page,
redirect to the course page with a small notification saying
"You need to join this course to access ContentName"

Technical remarks:

As the slide URL may lead to a 403 if the user has not access to the course and
we didn't want to change that route, we have decided to share URL with a
specific route when the resource is protected (is_preview = False):
slides/slide/<int:slide_id>/share

To make available that new URL in the templates and to the client, a computed
field website_share_url has been added to the channel and slide model.

Note that when checking the access rule, a MissingError can be triggered if for
example the content has been deleted. In that case the user will be redirected
to a 404 and 2 reads are performed but the code is more generic.

Task 2742087

closes odoo/odoo#83935

Related: odoo/upgrade#3280
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-03-16 09:58:42 +01:00
pedrambiria 011410e821 [FIX] base: HTML formatting of currencies with zero decimal places
Before this commit: printing a product's label which has currency with
zero decimal places (like CFA franc) raised a traceback error.

To fix this issue, I added a condition that checks whether there is
a separator in the value to ensure that the currency has a decimal point.

opw-2711074

closes odoo/odoo#83358

X-original-commit: bc2ad6ac2312d8446e6d2a9909e957d5e18c3c0e
Signed-off-by: Simon Goffin <sig@odoo.com>
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2022-03-16 08:56:35 +01:00
Rémy Baranx (bar) fe4c65df23 [FIX] calendar: email calendar event attendees
When clicking on the "email" button in the `calendar.event`
form view, the `email_to' field should be filled with the list
of attendee email addresses separated by a comma.

opw-2667016

closes odoo/odoo#81857

X-original-commit: 87e913b892c2518a716fceb247b57ab8c955a07f
Signed-off-by: Arnaud Joset <arj@odoo.com>
2022-03-16 08:56:31 +01:00
Adrien Widart 50fb7fd963 [FIX] purchase_stock: include "to approve" PO in forecasted report
When a PO is in the "To Approve" state, it disappears from the
forecasted report

To reproduce the issue:
1. In Settings, enable "Purchase Order Approval" with a minimum amount
equal to 0
2. Create a storable product P
3. With Marc Demo:
    - Create a PO with 50 x P
    - Consult the forecasted report of P: there are 50 x P "Forecasted +
Pending"
    - Confirm the PO (its state becomes "To Approve")
    - Consult the forecasted report of P

Error: The 50 x P disappeared: 0 On Hand, 0 Forecasted, 0 Forecasted +
Pending. We should still see 50 Forecasted + Pending

OPW-2774586

closes odoo/odoo#86476

X-original-commit: c66fc2f3bfd069642fc9ed61ff322a136974a65c
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
2022-03-16 08:04:38 +01:00
anhe-odoo 099f20ab7c [FIX] stock_account: don't update inventory valuation for negative quantity
Expected Behaviour

When updating the cost of a product with a negative quantity and then
making an inventory adjustment, the final value should be corrected according
to the current cost of the product

Observed Behaviour

In the case we had a negative quantity when changing the cost, the compensation
layer will be ignored when doing an inventory adjustment afterward, leading to
an incorrect total value in the inventory valuation

Reproducibility

This bug can be reproduced following these steps:
- Create Storable product with costing method = AVCO Automated, Update cost to 100$
- Sell 10 units of this product (Inventory valuation at -1000 $ for -10 units)
- Update cost of the product to 10 $ (Inventory valuation at -100 $ for -10 units)
- Create an inventory adjustment to set the quantity of the product to 0.
==> Inventory valuation is a 900 $ for 0 unit of our product

Related Issues/PR

- opw-2635692

closes odoo/odoo#86389

X-original-commit: 673a6b69e335b29d011b7c5743c3fe101445a5e1
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Hendrickx Anthony (anhe) <anhe@odoo.com>
2022-03-16 07:08:44 +01:00
Alexandre Kühn 1520a98d69 [IMP] mail: turn 'ChatWindow/shiftNextText' into field
Task-2793280

closes odoo/odoo#86374

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-15 13:22:03 +01:00
Julien Alardot (jual) 70a34a7773 [MOV]: l10n_sa l10n_sa_invoices: merge l10n_sa_invoices into l10n_sa
The l10n_sa_invoices changes do not need to be in a separate module as
they are always required for l10n_sa.
This merges the two modules into l10n_sa

closes odoo/odoo#85215

Task: task-2723443
Related: odoo/upgrade#3303
Signed-off-by: Julien Alardot (jual) <jual@odoo.com>
Signed-off-by: Florian Gilbert <flg@odoo.com>
2022-03-15 10:48:45 +01:00
Xavier Morel 8045d656c8 [FW][FIX] web/lib: backport jquery bugfixes
opw-2793379

closes odoo/odoo#86416

X-original-commit: 0dd7c78b06726543825008a48d3dc004d2af4557
2022-03-15 07:56:28 +01:00
std-odoo cd89f9b66f [FIX] mail: remove reference to Jinja
Purpose
=======
Since 68182baff4bdf4b3bcc1f46b361f5a5b8ac9aa11 , Jinja mail templates
have been replaced by QWeb templates. But some reference to Jinja
in the mail settings have been forgotten.

Task-2701037

closes odoo/odoo#86409

X-original-commit: ad366762cb4c2086dd3f3398a19d10c9c01579a0
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-03-14 20:47:56 +00:00
Gorash b8922969f5 [FIX] qweb: do not allow rendering inline template
During the merge of qweb/ir.qweb at commit 9ce5bc8881,
the behavior of qweb was preserved instead of the one from ir.qweb.
Rendering inline templates should not be allowed as it is not needed and
include security risks.

Also, minimizing the number of possible types for template arguments
simplifies the API. An error message allows the developer to know how to
adapt his code.

closes odoo/odoo#86404

X-original-commit: 31f3152a1328ec8e2dd28f15433a2cc3ccc80f81
Signed-off-by: Olivier Dony <odo@odoo.com>
2022-03-14 20:47:52 +00:00
roen-odoo 7877c22a8d [FIX] payment: exclude acquirers requiring tokenization when logged out
Current behavior:
Public user have access to payment method that require tokenization wich leads to error when they use it.
We should not show those payment methos to the public users (e.g We shouldn't show sepa direct debit because this method uses tokenization)

Steps to reproduce:
- Activate SEPA Direct Debit in the payment acquierers
- Select Bank as payment journal
- In the bank payment journal create an account number (e.g BE71096123456769), and select a Bank (e.g BNP)
- Create a new customer (type : company, country : spain, and an email)
- Create a quotation with this new customer
- Click on the "action" icon and click on generate payment link
- Open the link in an incognito window (to make sure you'r not connected in Odoo)
- Try to use the sepa direct debit
- An access error appears because public user do not have access to payment.token.

opw-2754505

closes odoo/odoo#86415

X-original-commit: 2a084c4810c6d1af82901882d1588c8449ebdc78
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2022-03-14 19:56:17 +00:00
Thanh Dodeur b10c04ef05 [FIX] base: ensures that raw related fields are not treated as base64
Before this commit, since the refactor of some base64 decoding flows and
the addition of the raw field*, reading the content of a field that was
related to the `raw` field of `ir.attachment` was treated as reading a
base64 encoded content. This commit fixes this issue.

*https://github.com/odoo/enterprise/commit/680db8197731dae175027f81a705c38b0abf94da

task-2785146

closes odoo/odoo#86403

X-original-commit: 6aa984f072dde5667d07516888c6a4bf19aead8e
Related: odoo/enterprise#25272
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-14 19:04:24 +00:00
Joonas Hartonen 150f64af56 [FIX]mail_plugin: write method return added
* res.partner write method was missing return. This caused errors with XML RPC writes.

closes odoo/odoo#86396

X-original-commit: 0a6bcb709116be8c8149047a5a0c6fdf939eccc4
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-03-14 18:16:16 +00:00
Lucas Lefèvre c5b28f5163 [REF] mail: turn 'Composer/placeholder' into field
This commit moves the logic associated with the composer placeholder for two
reasons:

- move business logic from components to models
- allow to easily override the placeholder in other module.
  This is uselfull for the feature allowing to leave comments on a spreadsheet.

Task 2638411 (spreadsheet comments)
Task 2793280

closes odoo/odoo#86381

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-14 17:29:00 +00:00
Alexandre Kühn aa879efef8 [IMP] mail: turn 'ChatWindow/newMessageFormInputPlaceholder' into field
Task-2793280

closes odoo/odoo#86373

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-14 17:28:50 +00:00
Alexandre Kühn 7269d9e4f8 [IMP] mail: turn 'AttachmentViewer/imageStyle' into field
Task-2793280

closes odoo/odoo#86371

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-14 17:28:47 +00:00
Alexandre Kühn 371c28a8ba [IMP] mail: turn Activity/noteAsMarkup as field
Task-2793280

closes odoo/odoo#86370

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-14 17:28:44 +00:00
Florian Damhaut a4b7338a95 [FIX] hr_holidays: multi-period accrual reset at year start
Step to reproduce:
- Create an accrual plan with the option "at the end of the year,
 unused accruals will be lost" and that can be allocated every year
(in this example, 3 days)
- Create an allocation for Marc Demo based on that accrual plan
 and starting in 2020.
- Run scheduled action
 "Accrual Time Off: updates the number of time off"
- Connect as Marc Demo

Current behaviour:
- Marc Demo has receive a 6 day allocation
- While loop over the elapsed period doesn't take lost time into account

Behaviour after PR:
- Marc Demo receive 3 day allocation

opw-2769066

closes odoo/odoo#86369

X-original-commit: fc18355158b6724aeb3f900cae50cdab3e6d707b
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-03-14 17:28:40 +00:00
Pedro M. Baeza 3e1ba365a0 [FIX] sale_timesheet: Fix _create_invoices signature regression
Modifying the signature of a method in a children module breaks things,
as other modules not being aware of the change will call super method
without the proper arguments. This also applies to adding new keyword
arguments, as these arguments are not propagated through the super call
chain, and you'll lose the value in the best case, or have a crash in
the worst one.

This overwrite is not only adding 2 new keyword arguments, but also
removing an existing one (`date=None`).

Closes #85269

closes odoo/odoo#86367

X-original-commit: c933da43a890d4691391757b8760c80d8e70b1fc
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Signed-off-by: Xavier <xbo@odoo.com>
2022-03-14 17:28:37 +00:00