Commit Graph
149128 Commits
Author SHA1 Message Date
Alexandre Kühn 00d356d54d [IMP] mail: add top-level guard on MessageComponent
Task-2793280

closes odoo/odoo#86696

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-18 21:29:56 +01:00
Alexandre Kühn 9f7f8b7971 [IMP] mail: guard ActivityBoxComponent
Task-2797754

closes odoo/odoo#86702

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-18 20:40:48 +01:00
Alexandre Kühn 272292e4f6 [IMP] mail: guard ActivityComponent
Task-2797754

closes odoo/odoo#86701

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-18 20:40:44 +01:00
Gorash 816e2eb8a6 [FIX] base: do not duplicate spaces for t-foreach
The duplication was used to have a cleaner html page source code by
aligning the <script t-foreach/> for example. However, this behavior
seems difficult to understand and use. Additionally the behavior can be
done with a <t> tag and placing the script inside.

From now on, the space "trick" is only done for <t> tags, so the
template fragment

    <article t-foreach="[0, 1, 2]" t-as="value" t-esc="value"/>
    <t t-foreach="[0, 1, 2]" t-as="value">
        <article t-esc="value"/>
    </t>

renders as

    <article>0</article><article>1</article><article>2</article>
        <article>0</article>
        <article>1</article>
        <article>2</article>

closes odoo/odoo#86695

X-original-commit: 8f817790d3f36455c66647e79df40b7173ac498a
Signed-off-by: Raphael Collet <rco@odoo.com>
2022-03-18 20:40:41 +01:00
Raphael Collet f5ff26f42e [FIX] core: name_get() should return "" instead of False
Because of 4347491670, the method
name_get() can now return records with False as label, and this makes
code crash when it expects a string.  Make sure that name_get() always
return strings as labels, while keeping False as empty value for the
field 'display_name'.

closes odoo/odoo#86688

X-original-commit: ff37a2fef89df292b52b1501c28fcf841e1628f5
Signed-off-by: Raphael Collet <rco@odoo.com>
2022-03-18 19:50:10 +01:00
Laurent Stukkens (LTU) 7cac66187b [FIX] sale_project: use is_closed in domains instead of stage_id.fold
Before this commit:
- Two uses of `stage_id.fold` were remaining in the code of sale_project
  although `is_closed` is directly available in the model and is an
  indexed field.

After this commit:
- The use of `is_closed` will improve the code performance as the field
  is in the model and indexed.

closes odoo/odoo#86681

X-original-commit: ec98ba2c883e2d37352dba400f911532a6510a1c
Signed-off-by: Xavier <xbo@odoo.com>
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-03-18 19:50:06 +01:00
stefanorigano (SRI) 804de0c7e6 [FIX] mail: o_Activity_userAvatar aspect-ratio
This commit fixes an issue causing the activity's avatar image to exceed
the available vertical space when in portrait mode.

The avatar's width/height are now fixed and its pic is set to cover the
available room only.

task-2795252

closes odoo/odoo#86583

X-original-commit: efbff4dae62c5c72541be96045cc96e3acf46628
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-18 18:59:44 +01:00
tsm-odoo d9ecd32197 [IMP] mail: introduce a new way to seed test data
This PR prepares the ground for the new env one. The objective is to stop
relying on 'this' during tests. In order to do this, a new way to seed data
has been introduced.

task-2792108

closes odoo/odoo#86447

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-18 18:59:40 +01:00
Julien Castiaux 6ff21e2e0e [FIX] core: support controllers outside addons
With the iot-box it is possible to download modules from an odoo server
into the iot-box. Those odoo modules are `exec`-like and exposed on the
box. With those modules come some controllers. Because they were
`exec`-like, they lack a python module name which makes
`_generate_routing_rules` to reject them.

With this fix, we authorise to declare controllers outside of odoo
addons. Those controllers cannot be extended, nor can they override
other controllers.

closes odoo/odoo#86275

Signed-off-by: Julien Castiaux <juc@odoo.com>
2022-03-18 17:56:55 +01:00
Adrien Widart 140615ed6b [FIX] sale_stock: keep SM's UoM on generated SOL
When delivering an additional product with a specific UoM, the generated
line on the sale order should have that same UoM

To reproduce the issue:
1. In Settings, enable "Units of Measure"
2. Create two products PA and PB (UoM of PB is the meter)
3. Create and confirm a SO with 1 x PA
4. On the picking, add 1 km(!) x PB
5. Validate the picking
6. Go back on the SO

Error: the line for PB is incorrect, its UoM is 'm', it should be 'km'

OPW-2761913

closes odoo/odoo#86668

X-original-commit: 805fac507354db75875a5326999ad9c17e4d0fd6
Signed-off-by: Steve Van Essche <svs@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
2022-03-18 16:07:42 +01:00
Louis Wicket (wil) b9fd435b99 [MOV] mail, *: move tests
* = hr_holidays, im_livechat, sms, snailmail, website_livechat,
    website_slides

Move tests files into `static/tests`.

Task-2759560

closes odoo/odoo#86581

Related: odoo/enterprise#25375
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-18 16:07:29 +01:00
Andrea Grazioso (agr-odoo) 1fc6f4261b [FIX] account,sale: fiscal position map tax incl. to incl.
Create a 21% tax included in price
Create a 6% tax included in price
Create a fiscal position that will replace the 21% tax included by the
6% tax included
Create a customer and assign this fiscal position
Create a product :
Price = 121€
Tax = 21% tax included
Create a SO with this customer and this product
Create an invoice (from scratch) with this customer and this product

SO : the unit price is 100,00€
Invoice : the unit price is 106,00€

Fix by creating a common method to calculate the price_unit

opw-2699793

closes odoo/odoo#86514

X-original-commit: 8ab56af6827a640a3f41a87905778432b3786c00
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
2022-03-18 16:07:22 +01:00
Alexandre Kühn 73db2d735f [IMP] mail: turn 'MessageView/hasAuthorOpenChat' into field
Task-2793280

closes odoo/odoo#86466

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-18 15:11:45 +01:00
Alexandre Kühn 642cec94c4 [IMP] mail: turn 'Message/shorttime' into field
Task-2793280

closes odoo/odoo#86459

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-18 15:11:41 +01:00
xlu-odoo 1f7d6213d4 [FIX] web_editor: style upload notifications
When applied, this commit will add correct classes and structure to fix
the style of upload notifications in the web editor. When an user
uploads an image, he gets a progress and validation (or error)
notification. We changed how notifications look at [1], but this
particular notification did not get the correct style.

[1]: https://github.com/odoo/odoo/commit/2629348090d6eabe8f9d3ae70a41f7ff7d45bbb6

task-2791078

closes odoo/odoo#86172

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-03-18 15:11:34 +01:00
Julien Alardot (jual) 76adea1b66 [ADD] l10n_se: Add missing tripartite trade taxes in the tax reports
Currently, the tax report contains the lines for tripartite trade,
but no taxes have been made for these.
As the EC list report use these taxes it, these needs to be implemented.

closes odoo/odoo#86658

Task: task-2759470
X-original-commit: 2fcf3f14b545efc95b46502b2fb8fa2bcfe9d480
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Julien Alardot (jual) <jual@odoo.com>
2022-03-18 14:14:58 +01:00
Jorge Pinna Puissant 42940aa6e9 [FIX] web: add the globals
On 19e775b3cc we added the same rules that
exists in test_lint on the tooling, but we didn't add the globals.

closes odoo/odoo#86649

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-03-18 13:18:34 +01:00
Thibault Delavallée 9c144ab432 [FIX] portal, website_crm_partner_assign: fix access action from mail
Two lines have been inverted in ``_get_access_action`` override, leading
to access rights not being correctly checked. This currently leads customers
with token to land on portal without token, which is not the expected
behavior.

Followup of odoo/odoo@a018735

closes odoo/odoo#86646

X-original-commit: dd7d60aca8718763aaa211e138f684d8797f5d8c
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-03-18 12:26:36 +01:00
Alexandre Kühn c0c25fb14e [IMP] mail: turn 'Message/trackingValues' into field
Task-2793280

closes odoo/odoo#86450

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-18 12:26:28 +01:00
Alexandre Kühn a0cedbde0d [IMP] mail: turn 'Message/avatarUrl' into field
Task-2793280

closes odoo/odoo#86446

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-18 12:26:24 +01:00
William Braeckman 2d3f9c9cf8 [FIX] hr: hide create employee from res_users form view
Prior to this commit the create_employee check box was always shown when
using the view_users_simple_form, it will now only show when the record
does not exist yet.

TaskId-2797251

closes odoo/odoo#86636

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-03-18 11:28:16 +01:00
rhe-odoo d9bbe86184 [FIX] point_of_sale: Fix refund lst price change
When we were doing a price modification on a product and this orderline was refund, the displayed price on the product screen was changed to the new value.

Example:
  - Default price: 33
  - Paying with a price set to: 2
  The order is refund:
  - Product price is set to 2
  It should only be 2 on the order refunded.

The fix doesn't change the price of the product after a refund anymore.

closes odoo/odoo#86627

X-original-commit: 6251289360bd0188f63ac0b0537cefae5ac29de3
Signed-off-by: Masereel Pierre <pim@odoo.com>
2022-03-18 11:28:12 +01:00
dbkosky 0180bbcadd [FIX] l10n_it_edi: Mismatching IdCodice
When codice fiscale is not the same as the partita IVA, the template was
utilising the wrong value for IdCodice in <IdTrasmittente>. It should
use the value of codice fiscale, and if it's not found, then use the vat
value (e.g. when it's not an Italian company).

closes odoo/odoo#86621

X-original-commit: e961ff220aee5e89a3de7b301923bfa3f1665077
Signed-off-by: Josse Colpaert <jco@odoo.com>
2022-03-18 10:33:02 +01:00
dbkosky b19021b047 [FIX] account_edi_proxy_client: don't update the demo state
The issue is that the config param is data, which means that when the
module is updated, the config parameter will be updated (i.e. reset to
the 'demo' state), which will cause havoc on client databases. Even if
we set the record to 'noupdate=1', the existing clients will have the
record updated.

The solution is to remove the config param from the data entirely, thus
preventing it from being updated when updating the module, and instead
have a 'post_init_hook' that sets the parameter to 'demo' (this will
only happen when the module is installed, and never again).

closes odoo/odoo#86607

X-original-commit: 1d3cd7ee32caede10cd4ffd496ffd59a4103b04f
Signed-off-by: Josse Colpaert <jco@odoo.com>
2022-03-18 00:22:51 +01:00
dbkosky aa9f7a8c48 [FIX] l10n_it_edi: PrezzoUnitario 100% discount
PrezzoUnitario causes an error when the discount is 100% as it tries to
divide by zero. Fix this by just using the unit price when the discount
is 100%.

closes odoo/odoo#86614

X-original-commit: 23e84145ad5beaf1baa0d6a1fc9ed4056a6b1243
Signed-off-by: Josse Colpaert <jco@odoo.com>
2022-03-17 23:07:56 +01:00
dbkosky 31380f38f2 [FIX] l10n_it_edi: edi rejects IdDocumento
The EDI rejects the xml if the <IdDocumento/> is longer than 20
characters long.

X-original-commit: 2c76293c1575923048d66e66c6999af773c309cf
Part-of: odoo/odoo#86614
2022-03-17 23:07:56 +01:00
tsm-odoo 2538a71944 [IMP] mail, *: make mail tests stop relying on this
*: hr_holidays, im_livechat, mail, mail_bot, sms, snailmail, test_mail,
website_livechat, website_slides.

Mail tests are currently relying on this during tests to make env, widget,
data available. We don't wan't to add magic keys to this anymore.

task-2792108

closes odoo/odoo#86559

Related: odoo/enterprise#25341
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-17 19:30:08 +01:00
Alexandre Kühn 6a4b20beb4 [IMP] mail: remove 'MessageComponent/threadView' getter
Task-2793280

closes odoo/odoo#86449

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-17 19:29:56 +01:00
Alexandre Kühn dea2da8b25 [IMP] mail: turn 'Discuss/addChatInputPlaceholder' into field
Task-2793280

closes odoo/odoo#86443

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-17 18:37:14 +01:00
oco-odoo 69792684cf [FIX] account: correct tax_tag_invert value for base line on cash basis reversal
Consider the following case:

1) Create a 42% cash basis tax, impacting different grids on each repartition line
2) Create a misc entry using this tax, with the same lines as an invoice, with base amount of 100
3) Create a payment and reconcile it with the invoice-like move from step 2. This will create a cash basis move.
4) Cancel reconciliation
===> In the tax report, instead of seeing 0 in the base grid, we see 200. Amounts are doubled instead of being cancelled, they shouldn't. Tax grid is fine.

This is due to the fact tax_tag_invert is going to be computed, and will hence not have the same value as on the original move, since debit and credit on base and tax lines are inverted in the reverse move. Tax line is fine because it relies on tax_repartition_line_id, which is kept from the original move.

We now force keeping the same value for those moves as in the original one, to force full cancellation.

OPW 2769340

closes odoo/odoo#86229

X-original-commit: 338c2e908bda73b8be81270e3ea721325452b73b
Related: odoo/enterprise#25182
Signed-off-by: Laurent Smet <las@odoo.com>
2022-03-17 18:37:04 +01:00
Brieuc-brd b2fa832fb8 [IMP] mail: AttachmentViewer, keep consistency with classes
Prior this commit,`o_AttachmentViewer_toolbar`,
`o_AttachmentViewer_viewIframe` and buttons used CSS properties with
arbitrary values.

To keep the layout consistent and remove more raw css, this commit uses
component and utility classes instead.

task-2781992

closes odoo/odoo#85772

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-17 18:37:00 +01:00
Brieuc-brd 22286a1688 [REF] mail: AttachmentViewer, review and simplify scss
Part of the overall v16 SCSS optimization/restyle, task-2704984

task-2781992

Part-of: odoo/odoo#85772
2022-03-17 18:37:00 +01:00
Laurent Stukkens (LTU) 0aaa767cd1 [FIX] sale_timesheet: prevent session timeout at the end of test tour
Prior to this commit:
- The test tour was falling in some circumstances, when additional reads
  were done right after the last step.

After this commit:
- Adding the last step which is returning the the project app menu will
  prevent having those additional reads after the last step.

closes odoo/odoo#86558

Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-03-17 17:43:41 +01:00
Mitul Shah 5d64b9f069 [IMP] mass_mailing_{sms}: add group name to manage xpath
We have added the name of the group to Email Content to minimize the
indexing on xpath.

Task-2710557

closes odoo/odoo#86555

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-03-17 16:49:47 +01:00
Cedric Prieels (cpr) 1ba0b6c8f5 [FIX] sale_timesheet: remove unwanted file
A file was accidentally pushed in the context of a last rebase
prior to merge.
See odoo/odoo#82634

closes odoo/odoo#86564

Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-03-17 13:14:53 +01:00
Louis Wicket (wil) e16976ddfc [IMP] mail, *: move up model files
Move model definition files from `models/thing/thing.js` to
`models/thing.js` and remove the now empty intermediate directory.

Task-2759582
 * = calendar, crm_livechat, hr, im_livechat, mail_bot, sms, snailmail,
     website_livechat, website_slides

closes odoo/odoo#86464

Related: odoo/enterprise#25291
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-17 11:27:59 +01:00
Louis Wicket (wil) df147ac6f2 [IMP] mail, *: move model tests into/static/tests
* : mail_bot, website_livechat
Task-2759560

Part-of: odoo/odoo#86464
2022-03-17 11:27:59 +01:00
Brieuc-brd 20cf610fad [REF] web: change $dark variable
Prior this commit, the dark color was the same as the Bootstrap color.
It wasn't contrasted enough and was therefore replaced by raw css in
some situations.

To keep consistency with the overall layout, this commit applies the
darkest gray as the $dark variable to improve the value and now
encourages the use of utility classes instead of raw values.

task-2788931

closes odoo/odoo#86046

Related: odoo/enterprise#25100
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-03-17 11:27:51 +01:00
fja-odoo 59e7d10ed4 [FIX] web: fix filter between datetime
In a recent fix, the default values generated for datetime fields in
custom filter was incorrectly set, as the returned date objects were
lost instead of being assigned.

This commit restores the intended behavior.

closes odoo/odoo#86538

X-original-commit: 2720c5be24a1324c058eaaa0a6a7c627f92e856c
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-03-17 10:31:40 +01:00
Dossogne Bertrand e456f023c5 [IMP] hr_appraisal: improve usability
In the mobile review of all apps, some behaviors have to be corrected.

After this commit :
- When you want to select a feedback template to send, the list is showed with less information so that it's easier to read.
- The ask feedback is open to any employee of the company, not only the users of the app. The email will be sent with a link available to anyone.
- When state is Done, the add buttons on skills does not appear anymore.

TaskID : 2743968 [Appraisal] Usability

closes odoo/odoo#84053

Related: odoo/enterprise#24044
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-03-17 10:31:34 +01:00
Brieuc-brd ca0c86bde5 [REF] web: update arrow directions & SCSS revamp
Prior this commit, the popover arrow was in raw SCSS and used only
the four basic directions (top, right, bottom, left).

After this commit, the popover uses the Bootstrap arrow and this
arrow can also use the additional directions defined in
`position_hooks.js`.

It also revamp the SCSS of the component.

task-2748120

closes odoo/odoo#83646

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-03-17 10:31:30 +01:00
Bruno Boi 755cd98853 [MOV] web: move position_hook up one folder
Part-of: odoo/odoo#83646
2022-03-17 10:31:30 +01:00
Bruno Boi 54b7209a3d [REF] web: some API changes for usePosition hook
Changes:
- remove all of o-popper-position... auto applied classes system
- add a onPositioned callback to the options
  Usage
    usePosition(reference, {
      /**
       * @param {HTMLElement} popperElement
       * @param {{
       *  direction: "top" | "right" | "bottom" | "left",
       *  variant: "start" | "middle" | "end"
       *  top: number,
       *  left: number,
       * }} position
       */
      onPositioned: (popperElement, position) => {
          const { direction } = position;
          // ...
      }
    });

Part-of: odoo/odoo#83646
2022-03-17 10:31:30 +01:00
Bruno Boi 615788fbc9 [IMP] web: remove comp.el usage in useposition
As component.el is removed: see https://github.com/odoo/owl/blob/master/CHANGELOG.md#9-componentel-is-removed

Part-of: odoo/odoo#83646
2022-03-17 10:31:29 +01:00
stefanorigano (SRI) 9c41002b39 [FIX] web: review fixed-width icons
Prior to this commit an 'oi-fw' icon width was assigned directly to its
:pseudoelement and eventually refined according to sizes classes.

Despite being useful in some circumstances, this behavior was causing
inconsistencies when 'oi-fw' icons were rendered beside 'fa-fw' ones.

This commit reviews how fixed-width icons are achieved, providing a more
consistent visual result between '.fa' and '.oi' classes.

task-2795108

closes odoo/odoo#86508

Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2022-03-17 09:37:48 +01:00
Benoit Socias 3cf9416175 [FIX] web_editor: remove custom gradient button from colors inventory
Since [1] when resetting the background color of the header, the footer
or the copyright, the 'menu-custom' property is saved as the 'false'
string.
There is no visual effect of this problem, but in case that property is
used in an SCSS `color-yiq` function call, it will trigger an error.

This commit solves this by removing the root cause of this 'false'
string: during the initialisation of color palettes a list of named
colors is built by browsing the color buttons and associating their
data-color attribute to their background-color, except for buttons
containing a gradient color.
Unfortunately this inventory also looked at the "Custom" gradient
button: this button has no background color (and was thus not detected
as being a gradient and therefore not excluded from the inventory) and
it has data-color="false". It therefore introduced a mapping between ""
and "false" - thus making the reset operation's empty string mapped to
the "false" string. This commit removes that button from the named
colors inventory.

Steps to reproduce:
- select the header
- open the "Colors" palette
- click on the None button (the trashcan icon)
=> the customization properties attachment contained a line
```
'menu-custom': 'false',
```

[1]: https://github.com/odoo/odoo/commit/a48a30f954afcb6ff3a59c4f32b05fd0c2cfcd2b

task-2633169

closes odoo/odoo#86548

X-original-commit: 2f28c37f2386ad7c1dcca79d9b516820f9607d8d
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-03-16 23:22:46 +01:00
Thibault Delavallée 76b8d8f550 [REV] account: remove mail performance tests
Query counter tests related to account composer are actually dependent on
l10n due to extra queries, related to account.move fields and/or COA
specific code. Moreover some COA might skip or delay the sending, leading to
emails not being sent.

Purpose would be to run those tests only with generic_coa. Those tests will
be moved and improved soon, removing it currently to avoid frictions with
L10N builds.

This reverts odoo/odoo@d0e0db3b8e

closes odoo/odoo#86540

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-03-16 23:22:43 +01:00
Brieuc-brd 49f8c8c8b9 [REF] mail: Chatter, review and simplify scss
Part of the overall v16 SCSS optimization/restyle, task-2704984

task-2781992

closes odoo/odoo#86279

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-16 23:22:39 +01:00
Brieuc-brd fc23c3f69f [REF] mail: ChatWindowManager, review and simplify scss
Part of the overall v16 SCSS optimization/restyle, task-2704984

task-2781992

closes odoo/odoo#86265

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-16 22:33:51 +01:00
Brieuc-brd 4665ef1d08 [REF] mail: ChannelMemberList, review and simplify scss
Part of the overall v16 SCSS optimization/restyle, task-2704984

task-2781992

closes odoo/odoo#86173

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-16 22:33:47 +01:00