Commit Graph
149156 Commits
Author SHA1 Message Date
Romain Derie 1df5ff685e [FIX] website: prevent click on readonly stat button
When clicking on readonly stat button (website related), it would
sometimes raise a traceback since there is no action to redirect to.

Step to reproduce:
- Go to Website > Visitors > Visitors
- Select a Visitor to enter its form view
- Now, either:
  A. Enter edit mode
  B. Enter edit mode and discard (or save)
- Click on stat button

This will raise a traceback, since the `disabled` property is now gone.
Indeed, the framework is adding/removing that attribute when entering
or leaving edit mode.
See disableButtons()/enableButtons()` called by
_setEditMode()/_onDiscard()/..`

Note:
- With the new framework/owl, there is no TB as the `disabled`
attribute is not removed anymore.
- In 14.0, there is no issue despite the `disabled` attributed being
removed.

Fixes #78500
Closes #80884

Courtesy of @odooaktiv

closes odoo/odoo#86552

X-original-commit: e8882fb745d140eb8d4385b7a1d0f754c78453ab
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-03-21 14:59:57 +01:00
Alexandre Kühn 10f3138d54 [IMP] mail: turn 'ThreadView/hasComposerThreadName' into field
Task-2793280

closes odoo/odoo#86469

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-21 14:59:53 +01:00
Alexandre Kühn fa6d67f2bc [IMP] mail: turn 'ComposerView/hasFooter' into field
Task-2793280

closes odoo/odoo#86468

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-21 14:59:50 +01:00
Didier (did) fc9e67bc6b [IMP] mail: move message unread counter to channel
The field could have been removed from thread since https://github.com/odoo/odoo/commit/88b8cd058713bfad2942f7e7434c34b6c1a6e7da

task-2746109

closes odoo/odoo#83765

Related: odoo/upgrade#3222
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-21 14:59:42 +01:00
Akim Juillerat 25fa0a3833 account: Keep partner_id from counterpart_vals if existing
In case an open balance needs to be created on a receivable or
payable account after reconciliation, but no partner was defined
on the statement line, we want to keep the partner from the
counterpart values that was identified through reference matching.

closes odoo/odoo#86752

X-original-commit: 8c4d6d362c096e9dc67562ecd7bad0ce08bc6697
Signed-off-by: Florian Gilbert <flg@odoo.com>
2022-03-21 14:01:17 +01:00
Bruno-brsy 8629eccb96 [FIX] phone_validation: new convention number for Ivory Coast
Step to reproduce:

- Install contacts
- create a new contact and set "Côte d'Ivoire" as country
- add a phone number like this one: (+225) 01 02 03 04 05
- try to send a sms to the number, it's says "(Invalid number)" instead
  of the number, so it's not possible to send the SMS

The Ivory Coast has a new standard for the phone number since the 31
January 2021, the phone number can have a length of ten digits. And we
use the library phonenumbers with the version 8.9.10 and 8.8.1 for the
runbot and the SaaS server, but it's quite old (the 8.9.10 is released
on Jul 12 2018). The library in version 8.12.29 resolve the issue, but
using the recommended installation method, we would not have this
version.

opw-2726582

closes odoo/odoo#86742

X-original-commit: 2f718cd78feeafb82b2d11a58e1a518a69d52c5e
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Bruno-brsy <brsy@odoo.com>
2022-03-21 14:01:13 +01:00
Alexandre Kühn bc80d3413e [IMP] mail: guard AttachmentViewerComponent
Task-2797754

closes odoo/odoo#86709

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-21 14:01:06 +01:00
stefanorigano (SRI) c9d58ecca4 [IMP] web,*: o_cursor_default utility-class
This commit is part of v16 overall restyle, task-2704984.

task-2797245

closes odoo/odoo#86626

Related: odoo/enterprise#25365
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2022-03-21 14:01:03 +01:00
Alexandre Kühn 00d595af76 [IMP] mail: turn 'MessageView/authorAvatarTitleText' into field
Task-2793280

closes odoo/odoo#86458

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-21 14:00:56 +01:00
Alexandre Kühn d60f8e3293 [IMP] mail: turn 'Messaging/isNotificationBlocked' into field
Task-2793280

closes odoo/odoo#86453

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-21 14:00:52 +01:00
Alexandre Kühn 5c5ef04aa3 [IMP] mail: turn 'Message/prettyBodyAsMarkup' to field
Task-2793280

closes odoo/odoo#86451

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-21 14:00:48 +01:00
Alexandre Kühn d62e7d9af4 [IMP] turn "Message/datetime" into field
Task-2793280

closes odoo/odoo#86448

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-21 14:00:44 +01:00
Alexandre Kühn 71775e32bb [IMP] mail: turn 'SuggestedRecipientInfo/dialogText' into field
Task-2793280

closes odoo/odoo#86440

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-21 14:00:41 +01:00
Adrien Widart 0e7f90529e [FIX] sale_purchase: adapt POL description
When confirming a sale order, if a purchase order is generated, the
descriptions of the PO's lines won't be adapted to the vendor

To reproduce the issue:
1. Create a vendor V
2. Create a product P:
    - Type: Service
    - In Purchase, add a line L01:
        - Vendor: V
        - Vendor Product Name: Name01
        - Vendor Product Code: C01
    - Purchase Automatically: True
3. Create and Confirm a SO with 1 x P
4. Open the generated PO

Error: The description is incorrect (it's the standard name of P instead
of "[C01] Name01")

OPW-2777702

closes odoo/odoo#86256

closes odoo/odoo#86679

X-original-commit: 77a2ad4b81c54fe6a91f2be242345c9d2af10dc0
Signed-off-by: Tiffany Chang <tic@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
2022-03-21 12:11:51 +01:00
Alexandre Kühn acd5c98c6e [IMP] mail: 'MessagingMenu/mobileNewMessageInputPlaceholder'
Task-2793280

closes odoo/odoo#86452

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-21 12:11:47 +01:00
Vincent Larcin 0039c4a04e [MOV] account_sale_timesheet,sale_project_account: remove useless bridges
Since the sale module depends on the account module, the bridges account_sale_timesheet
and sale_project_account can be merged with sale_project.

This commit removes those bridges and merges them with sale_project.

Task-2772395

closes odoo/odoo#86045

Related: odoo/upgrade#3321
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-03-21 12:11:43 +01:00
Alexandre Kühn 5a0ff3f499 [IMP] mail: turn 'ComposerView/hasThreadTyping' into field
Task-2793280

closes odoo/odoo#86457

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-21 11:12:16 +01:00
Alexandre Kühn e15f00da76 [IMP] mail: turn 'Discuss/orderedMailboxes' into field
Task-2793280

closes odoo/odoo#86444

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-21 11:12:12 +01:00
Arnold Moyaux 1c233c2f23 [FIX] mrp: quantity done on stock.move set as 0 when producing
To reproduce:
    1. create a BOM with analytic account
    2. create a MO to produce 10 of the above product
    3. change producing qty to 5, SAVE the form.
    4. change producing qty to 10, SAVE the form.

It happens because the server receive at the same time a new
`stock.move.line` creation and a quantity_done to write on the
`stock.move`.

closes odoo/odoo#86431

Signed-off-by: Arnold Moyaux <arm@odoo.com>
2022-03-21 11:12:08 +01:00
boan-odoo 33114b9007 [IMP] stock: resize prod. form view fields
Some fields in the inventory tab of the product
form view had their input widget needlessly stretched
to the maximum available size.

closes odoo/odoo#84056

Task: 2654703-9
Signed-off-by: Arnold Moyaux <arm@odoo.com>
2022-03-21 11:12:00 +01:00
boan-odoo 4a48d48364 [IMP] stock: show related products on duplicated barcode
Previously, product barcodes uniqueness was enforced
by a SQL constraint, resulting in a generic error message.

The SQL constraint has been replaced by a Python check,
which allows the listing of conflicting barcodes in the
error message, including those resulting from batch edits.

Task: 2654703-7
Part-of: odoo/odoo#84056
2022-03-21 11:12:00 +01:00
boan-odoo 03c959d83d [IMP] stock: recolor operations status badges
In various views, expand and harmonize the badge
colors for picking status (draft, assigned, done, ...).

Task: 2654703-4
Part-of: odoo/odoo#84056
2022-03-21 11:12:00 +01:00
boan-odoo 0d279449b1 [IMP] stock_picking_batch: add batch transfer column
In the "Reporting -> Product Moves" view,
add an optional "Batch Transfer" column (default: show).

Task: 2654703-2-3
Part-of: odoo/odoo#84056
2022-03-21 11:11:59 +01:00
boan-odoo 800501e679 [IMP] delivery: group product moves by carrier
In the "Reporting -> Product Moves" view,
allow grouping of products by carrier names.

Task: 2654703-2-2
Part-of: odoo/odoo#84056
2022-03-21 11:11:59 +01:00
boan-odoo 3d39cf16a5 [IMP] stock: group product moves by category
In the "Reporting -> Product Moves" view,
allow grouping of products by category names.

Task: 2654703-2-1
Part-of: odoo/odoo#84056
2022-03-21 11:11:59 +01:00
JF Aubert e85e8568b1 [FIX] mrp: fix bad workorder-move link
Workorder _action_confirm works in batch and is designed to
link workorders and moves per production.

Original code breaks the 'per production' constraint by linking
moves from all productions to workorders of the last one when
called on workorders from multiple productions.

closes odoo/odoo#86698

Task: 2797201
X-original-commit: b25f1e005987641a208de30162808005ad6e705a
Signed-off-by: Arnold Moyaux <arm@odoo.com>
2022-03-21 10:15:13 +01:00
Benoit Socias 79a8e4fe8f [FIX] web_editor: use valid properties for hovered custom outline button
Since [1] the CSS property reset for hovered outline buttons is using
invalid property values.

After this commit the color and image are only reset on non-hover:
- the `background-color` is already set to `none` by `.btn`,
- the `background-image` is only set if defined on the button's style -
there is no need to reset it.

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

task-2633169

closes odoo/odoo#86699

X-original-commit: 8530235bff30bfcad55cf39927f0733d30fe2eee
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-03-20 22:09:12 +01:00
dbkosky d40358639f [FIX] l10n_it_edi: Tax calculation fails edi constraint if tax price included
When using price included taxes, the xml contained data that failed to
meet the constraints of the edi. This is due to the local rounding on
the lines of the invoice.
For example:

	A product costing 321€, on two lines of the invoice, with
	a price included tax of 22%
	Rounded per line:
	float_round(
		321 - (321/122 * 100),
		2 # To two decimal places
	)
	evaluates to 57.89, the total tax will be 2 * 57.89 = 115.78

	In the case of global rounding
	float_round(
		321 + 321 - (321/122*100) - (321/122*100),
		2 # To two decimal places
	)
	evaluates to 115.77,

	so we have a difference of one cent.

This can be exacerbated by more lines.

The constraints on the EDI that this conflicts with are on the tax
summary section for each tax.
The constraints (roughly reworded):
00422:  The base taxable amount for the tax must be equal to the sum of
	the base product prices (for which we have already used the
	rounded computed values, calcuated in the invoice) +
	<Arrotondamento> (rounding).

00421:  The value provided for the <importo> that is the value of the
	vat is equal to the taxable base multiplied by the tax rate.

The problem is that because of our local roundings, the taxable base
is equal to our products, but the tax rate * taxable base is not equal
to the tax amount (as present in the invoice).

This commit adds to the rounding field and subtracts from the
taxable base of the tax summary a value rounding value that
should make tax rate * taxable base equal to the value of the vat.

closes odoo/odoo#86711

Task: 2789290
X-original-commit: def954e85e83e5be18c0a1805f0af20f8116bf3d
Signed-off-by: Josse Colpaert <jco@odoo.com>
2022-03-20 20:29:23 +01:00
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