Commit Graph
149530 Commits
Author SHA1 Message Date
Katherine Zaoral 39db0eaff4 [FIX] l10n_ar: share sequences compute sequences
Before this change, we have the errors that documents generated on
pre-printed sales journals mark as unified book were wrongly
named using the wrong doc prefix code.

This was visible thanks to the demo data were we notices that the credit
notes were having FA- doc prefix instead of NC-

This was because we are reusing the shared sequence directly, now we
check and fix the doc prefix for those cases and all documents generated
on shared sequences are properly named.

closes odoo/odoo#86612

X-original-commit: df5bfd22c20d3a3bd72b04acbdae63657e025ce3
Signed-off-by: Josse Colpaert <jco@odoo.com>
2022-03-31 17:25:02 +02:00
william-andre beb6e17066 [FIX] account: remove dead code complete_tax_set
This field was used in version 9.0 [1] to allow users to select their
tax rate, but it was removed in version 12 [2]

[1] https://github.com/odoo/odoo/commit/c04065abd8f62c9a211c8fa824f5eecf68e61b73
[2] https://github.com/odoo/odoo/commit/87f0d2eefb77bfc6a9a0fa7f7dcd1475c7c34639

closes odoo/odoo#80185

Related: odoo/enterprise#22441
Related: odoo/upgrade#3057
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
2022-03-31 17:24:55 +02:00
yhu-odoo 8d0b087525 [IMP] mrp: enable manual consumption on components
Currently, when changing qty_producing on a MO, consumed number of each
component will always be updated. In this commit, we add a new boolean
field manual_consumption to bom.line. If checked, that line won't be
updated when changing qty_producing.
The same but invisible field manual_consumption is also added to each
line on MO. It will use the value on BOM as defualt value. When user
manually set the consued qty, it will be checked automatically. Also,
when user manually update the SML, the field on SM will also be set to
true.

Task-2687494

closes odoo/odoo#80118

Related: odoo/enterprise#25607
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2022-03-31 17:24:44 +02:00
Sébastien Theys 06cbb5793d [IMP] mail, *: tweak style of messaging menu/notification list items
* = sms, snailmail

task-2789056

closes odoo/odoo#86598

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-31 16:28:02 +02:00
Hiral Bhavsar 7bab57a50a [FIX] (im,website)_livechat: visitor country displayed twice in backend
Before this commit:

At least if website_livechat is installed, the livechat visitor (website visitor)
country is displayed twice in channel name: once from the country inside the
name of livechat_visitor and once from the country of the actual
website_visitor.

After this commit:

Livechat visitor country will be displayed only once instead of twice

Task-2668051

closes odoo/odoo#81398

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-31 16:27:54 +02:00
William Braeckman e57bdd6daf [FIX] hr: disable create_employee from employee form view
Prior to this commit the create_employee option was enabled by default
even from the employee's form view which would lead to a loop.

closes odoo/odoo#87670

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-03-31 15:27:18 +02:00
Thibault Francois f3c14b93d8 [FIX] sale: rouding issue at creation
Use case
--------

Field computed with precompute=True at creation get the value
of the float without beeing rounded this can lead to rounding
issue where the value computed at creation is different from
the value computed later.

This can lead to the following issue
A so line is create with a unit price of 192 and a discount of
74.246 the price subtotal it thus 49.45

Later a invoice is created based on the same unit price and a discount
rounded at 74.25 and thus a subtotal 49.44

Solution
--------

Since the issue is not fixed (yet) in the orm, we have to format the
provided discount before the record creation (and precomputation)
to make sure the decimal precision is properly applied and that
no incoherence is introduced in the final record values.

closes odoo/odoo#87661

X-original-commit: 2257ac71596033d8d9f1deaf642071124817de3f
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-03-31 15:27:13 +02:00
Adrien Minet 1775b2e595 [FIX] account_factux: discount taken only for gross price
How to reproduce the bug:

- Install the account app
- Get a FacturX invoice with a discount on item
- Upload the invoice
- Check that the price of the discounted item takes the
  discount into account

Bug:

If you want to upload a FacturX invoice that contains a discount,
Odoo will take the original price into account instead of the
discounted one.

opw-2705291

closes odoo/odoo#87509

X-original-commit: 43fb1c47b4867ac9b1fe7c3dd30e8bed7bd93f13
Signed-off-by: Adrien Minet <admi@odoo.com>
Signed-off-by: William André (wan) <wan@odoo.com>
2022-03-31 15:27:03 +02:00
Leonardo Pavan Rocha 04861eaf9e [IMP] hr_contract: disable email when a contract is about to end
When a contract is about to end, an activity is scheduled for the hr
responsible to act on it. Also, from task 2759601, a new warning was created
showing the contracts that are about to end. Therefore, sending an email to
the hr responsible started being too intrusive. This commit drops the email
sending for this case.

task-2759601

closes odoo/odoo#86379

Related: odoo/upgrade#3359
Related: odoo/enterprise#24287
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-03-31 15:26:48 +02:00
tsm-odoo 33867b9f5c [IMP] mail: remove default values from test model definitions
The get_model_definitions method returns default values for each field. Those default
values are wrong most of the time (dynamic values, reference to non created records on
the client side, ...).

task-2792108

closes odoo/odoo#87641

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-31 13:33:14 +02:00
Brieuc-brd 4877cc5a11 [IMP] web: bs5 utility-class, add font-style
Define "Bootstrap v5 ready" utility-class to handle font-style.
This class definition can be safely removed after migrating to v5.

This class is needed for https://github.com/odoo/odoo/pull/87639

task-2811202

closes odoo/odoo#87637

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-03-31 13:33:10 +02:00
Aktiv Softwareand"Aaron Bohy <aab@odoo.com>" abd8773c78 [FIX] web: action service: handle target "main"
The target "main" feature has been lost during the conversion of
the ActionManager into the action service. An action with target
"main" should always clear the breadcrumbs. This commit
re-introduces the feature.

Fixes #83865

closes odoo/odoo#87610

X-original-commit: 78ec7281ed550eb24629c1b81445b753314d292f
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: "Aaron Bohy <aab@odoo.com>"
2022-03-31 13:33:05 +02:00
Alexandre Kühn c66589a9ac [IMP] mail: remove Thread/compute static method
Task-2806655

closes odoo/odoo#87354

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-31 13:33:02 +02:00
Alexandre Kühn 56fe3087c5 [IMP] mail: remove MailTemplateComponent/mailTemplate
Task-2793280

closes odoo/odoo#87344

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-31 13:32:58 +02:00
Alexandre Kühn 06595953c3 [IMP] mail: turn 'FollowerSubtypeView/follower' into field
Task-2793280

closes odoo/odoo#87014

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-31 13:32:51 +02:00
Hugo Adan 8d3a295426 [REF] pos_restaurant: Split _get_payment_lines method in order to make it more inheritable, now we can add more payment fields and expand them
closes odoo/odoo#87627

X-original-commit: b19fa7d03ee60286d02e9974ca1539195d3b2b16
Signed-off-by: Masereel Pierre <pim@odoo.com>
2022-03-31 12:32:54 +02:00
pedrambiria 6a2f0c8db9 [FIX] point_of_sale: preserve unpaid orders with a payment
Unpaid orders are preserved in the local storage and can be recovered
even if you close the session and open a new one. But they would be
removed if they didn't contain any lines (articles).

On the other hand, it's possible to remove all of the order's lines
after receiving payment. So it's essential to preserve an order which
contains a payment.

Steps to reproduce the issue:
	1_ Open a PoS session and create a new order
	2_ Add some articles and proceed with the payment
	3_ Select one of the payment methods to make the payment
	4_ Do not validate the session and click on the "Back" button
	5_ Remove all of the order's article and close the session
	6_ Open a new session from the same PoS
=> The order with the received payment is removed

The solution is to preserve the orders with a payment line.

opw-2766658

closes odoo/odoo#87502

X-original-commit: c15bc2818d928a102fc58f4cb2ea1a4a7f8755a2
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
Signed-off-by: Masereel Pierre <pim@odoo.com>
2022-03-31 12:32:50 +02:00
Victor Feyens 00ed6aa042 [IMP] mail,* : uniformized API for chatter links
* Enforce html escaping of record title
* Avoid translating html content as much as possible, to reduce translation errors.
* Uniformize/Factorize link generation, easing future tasks, code maintenance, ...

Enterprise PR: https://github.com/odoo/enterprise/pull/25357

closes odoo/odoo#84866

Related: odoo/enterprise#25357
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-03-31 12:32:47 +02:00
Florian Damhaut d34f7d38d8 [FIX] sale_management: options_lines have correct discount
Step to reproduce:
- Create a pricelist with 20% discount and
 Show discount to the user
- In a SO with public pricelist, add option line OL
- Change pricelist to the one created earlier

Current behaviour:
- OL unit price is 80% of list price
- OL discount is 0%

Behaviour after PR:
- OL unit price is 100% of list price
- OL discount is 20%

opw-2761252

closes odoo/odoo#87640

X-original-commit: 0d4293da09821016d9db56ec1f36fbeff3bf8ef2
Signed-off-by: Damhaut Florian (flda) <flda@odoo.com>
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-03-31 11:36:38 +02:00
Hubert Van de Walle (huvw) e3e7623f21 [FIX] base: config setting search: unhighlight settings not matching anymore
Steps to reproduce

  - Install procurement_jit
  - Go to settings
  - Search for 'serv'
  -> Re**serv**ation is highlighted but also ba**se**d

closes odoo/odoo#87611

X-original-commit: 8bbfbfbf0eb6c2238542166984b558b5734c7a2a
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
2022-03-31 10:37:03 +02:00
Hubert Van de Walle (huvw) eb4493c25d [FIX] base: config setting search contains '&amp;'
Steps to follow

  - Go to Settings
  - Type 'Import' in the search bar
  -> 'Import &amp; Export' is displayed

Cause of the issue

  `_wordHighlighter` works on the HTML as a string

Solution

  - Use textContent to get the correct text value
  - Replace the content of the highlighted element by
    * a textnode with the text before the matched substring
    * a `span.highlighter` with the search word
    * a textnode with the text after the matcher substring

Other issues

  A string concatanated css rule was used to filter the matching elements
  This could cause an invalid selector
  -> Filter nodes by their textContent instead.

opw-2778304

X-original-commit: fba1b833eab46ff7a20f7151978394da3aaaa566
Part-of: odoo/odoo#87611
2022-03-31 10:37:02 +02:00
Odoo's Mergebot 15689bad16 [FW][MERGE] hr_payroll,calendar,fleet: Apply miscellaneous performance fixes
closes odoo/odoo#87601

Forward-port-of: odoo/odoo#87068
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-03-31 10:36:57 +02:00
Adrien Widart f2a746ad6a [FIX] sale_mrp: return a dropshipped kit
On a SO, the delivered quantity of a dropshipped kit is incorrect in
case of a return

To reproduce the issue:
1. Activate Dropshipping
2. Create 3 products: KIT AB, A, B:
    - All have the Dropship route and a supplier set
3. Create a BOM of type kit: KIT AB is composed of A & B
4. Create a SO for 1 unit of KIT AB, validate
5. Validate the created PO
6. Deliver the products
7. Create a return for these products
    - Error: On the SO, the delivered quantity is 0 but the return is
not validated yet. This quantity should still be 1
8. Validate the return
    - Error: On the SO, the delivered quantity is now 1, it should be 0

The 'all or nothing' policy should correctly consider the returns: all
moves (to customer) must be done and the returns must be delivered back
to the customer

OPW-2759250

closes odoo/odoo#87596

X-original-commit: f259d10db577bbf1b11fffd028e678b38d5f402d
Signed-off-by: Tiffany Chang <tic@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
2022-03-31 10:36:51 +02:00
Adrien Widart dfb8a6fb31 [IMP] mrp_subcontracting_dropshipping: add test with cancelled picking
Test 52d5ff23c4f16f4cc78c812d389f3475fb3d6a86

X-original-commit: ef57385bcc221bae8957542fe32a7b7a0a1bcf01
Part-of: odoo/odoo#87596
2022-03-31 10:36:50 +02:00
Yolann Sabaux ef8147d698 [FIX] account: allow invoicing internal user/customer
Steps to reproduce:
1. Install sales
2. Change Mitchell Admin contacts so that he is set in the "YourCompany" company
3. Create a quotation with Michell Admin as the customer
4. Put any item and confirm the quote
5. Receive the product and create the invoice
6. Go to the invoice, confirm the payment and register it

Issue:
-> Error with the journal id

Cause:
The payment is considered as internal payment and in https://github.com/odoo/odoo/blob/6d129783b53115927f664499207c8c800d40bca2/addons/account/models/account_payment.py#L886-L895
There is no destination_journal which violates not-null constraint

Solution:
Be sure that there is a destination journal when `is_internal_transfer` is computed.

opw-2753819

closes odoo/odoo#87625

X-original-commit: 362d8cbf7724431672b8b73fb5f4682d4d2c3f66
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: yosa-odoo <yosa@odoo.com>
2022-03-31 09:40:59 +02:00
Touati Djamel (otd) eeaff033b8 [FIX] mrp_landed_costs: validate a landed cost without the need for MRP access
Steps to reproduce the bug:
- Install mrp_landed_costs
- Connect as Admin
- Remove MRP access to Admin and Give him Stock manager access
- Go to inventory settings > Enable “Landed costs”
- Go to inventory > operation > Select any landed cost
- Try to validate

Problem:
An access error is triggered because we check if there are finished moves in the associated pickings and manufacturing orders
before validating the landed cost, but in the "_get_targeted_move_ids" function we access the "mrp_production_ids" field, which is reserved for mrp users.

Solution:
Creating and validating a landed cost is a feature for stock manager users.
We can therefore have users who do not need access to MRP, but who need to  validate and submit landed costs.
So we can give access to all of them even if they are not MRP users.

opw-2800367

closes odoo/odoo#87624

X-original-commit: 3b92178b27dcaa25024b9d79ae35c8768cd72fa6
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
2022-03-31 09:40:55 +02:00
Kevin Baptiste 565f11ec92 [FIX] lunch: properly open lunch products
Since odoo/odoo#fb9c8cd6 it was no longer possible to open the lunch product
in the kanban view as both _openRecord() (from base class) and
_onSelectRecord() were triggering events.

closes odoo/odoo#87612

Taskid: 2810219
X-original-commit: a497d95e8a4a55884800377d0de32babb78c05ce
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-03-31 09:40:48 +02:00
Nicolas Martinelli 3bdba8bc44 [FIX] server.py: cron trigger in recovery
When setting up the PG replication, the slave is considered in recovery
mode. However, `LISTEN / NOTIFY` is not supported in this mode, leading
to an endless loop of crashes.

In recovery mode, we simply deactivate the feature.

closes odoo/odoo#87619

X-original-commit: 6389a64953081130d62f2a1703a27ddfa751098b
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2022-03-31 08:45:41 +02:00
Nicolas (vin) d9ee3a019e [FIX] l10n_fr_fec: allows exporting FEC without TVA number.
Not all company needs a French TVA number but still needs to provide
FEC file.
Improve that by making the TVA number optional, allowing to export the
FEC file without it. The only difference is that in such case, the vat
number won't be appended to the file name.

Task id #2801629

closes odoo/odoo#87620

X-original-commit: 59937bbea86a9d01bb7038f7e307fd88fbb82976
Signed-off-by: Olivier Colson <oco@odoo.com>
Signed-off-by: Nicolas Viseur <vin@odoo.com>
2022-03-31 07:55:40 +02:00
Julien Castiaux 1dd3865208 [IMP] *: odoo.addons.web.controllers.main splitted
The odoo.addons.web.controllers.main python module have been splitted
over multiple files on the basis 1 controller = 1 file. In this work we
adapt all modules to use the new imports.

A non-exhaustive list of where stuff have been moved:

* main.Home		--> home.Home
* main.Session		--> session.Session
* main.WebClient	--> webclient.WebClient
* main.clean_action	--> action.clean_action
* main.ensure_db	--> home.ensure_db

The complete list is accessible in odoo.addons.web.controllers.main.

closes odoo/odoo#87571

Related: odoo/enterprise#25746
Signed-off-by: Raphael Collet <rco@odoo.com>
2022-03-31 02:10:53 +02:00
Julien Castiaux bcf665a291 [MOV] web: split controllers.main in several files
The odoo.addons.web.controllers.main module was a very long bloated file
where many different controllers were concatened. It proved difficult to
work on that file on a regular basis,mainly because ctrl-p "web main.py"
was not pointing the right file.

In this work the file has been split on the basic 1 controller = 1 file.
The original way of importing stuff (through main.py) is still possible
thanks to deprecated aliases.

Part-of: odoo/odoo#87571
2022-03-31 02:10:53 +02:00
Nemael e5e5396db9 [MOV] im_livechat: move Thread outside of public_livechat.js
Task-2212347

closes odoo/odoo#87597

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-30 19:27:00 +02:00
Nemael 327208ca22 [IMP] im_livechat: change html to text to better suit the data type
Part-of: odoo/odoo#87597
2022-03-30 19:27:00 +02:00
Nemael 06b1d20efc [MOV] im_livechat: move Timers outside of public_livechat.js
Task-2212347

Part-of: odoo/odoo#87597
2022-03-30 19:26:59 +02:00
Nemael f5e682be6b [MOV] im_livechat: move Timer outside of public_livechat.js
Task-2212347

Part-of: odoo/odoo#87597
2022-03-30 19:26:59 +02:00
Nemael 69268ee243 [MOV] im_livechat: move CCThrottleFunction outside of public_livechat.js
Task-2212347

Part-of: odoo/odoo#87597
2022-03-30 19:26:59 +02:00
Nemael 6fa40e3958 [MOV] im_livechat: move CCThrottleFunctionObject outside of -
-public_livechat.js

Task-2212347

Part-of: odoo/odoo#87597
2022-03-30 19:26:59 +02:00
Nemael 4cc47b6eda [MOV] im_livechat: move AbstractThreadWindow outside of -
-public_livechat.js

Task-2212347

Part-of: odoo/odoo#87597
2022-03-30 19:26:58 +02:00
Nemael 3f70dcef5b [MOV] im_livechat: move AbstractMessage outside of public_livechat.js
Task-2212347

Part-of: odoo/odoo#87597
2022-03-30 19:26:58 +02:00
Nemael c6370cf8e6 [MOV] im_livechat: move ThreadTypingMixin outside of public_livechat.js
Task-2212347

Part-of: odoo/odoo#87597
2022-03-30 19:26:58 +02:00
Nemael 1ad530529c [MOV] im_livechat: move AbstractThread outside of public_livechat.js
Task-2212347

Part-of: odoo/odoo#87597
2022-03-30 19:26:58 +02:00
Nemael c1318210bc [MOV] im_livechat: move WebsiteLivechatWindow outside of -
- public_livechat.js

Task-2212347

Part-of: odoo/odoo#87597
2022-03-30 19:26:57 +02:00
Nemael a5f8c8a160 [MOV] im_livechat: move WebsiteLivechatMessage outside of -
-public_livechat.js

Task-2212347

Part-of: odoo/odoo#87597
2022-03-30 19:26:57 +02:00
Nemael 634aa21019 [MOV] im_livechat: move WebsiteLivechat outside of public_livechat.js
Task-2212347

Part-of: odoo/odoo#87597
2022-03-30 19:26:57 +02:00
Alexandre Kühn c6daa388f1 [IMP] mail: introduce MessageSeenIndicator/text
Task-2793280

closes odoo/odoo#87372

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-30 19:26:36 +02:00
Rahul Prajapati e3c9e29a44 [IMP] mail: improve active style on mentions dropdown
PURPOSE

The current 'active' class on the @mentions dropdown is not clear enough.
The purpose of this task is to add a grey hover background when the item is
active.

SPECIFICATION

Add the grey hover background when the item is active

Task-2786679

closes odoo/odoo#87598

X-original-commit: 9685d5fed97bb3ef3a84cfbbde2e757755a4bd2a
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-30 18:32:00 +02:00
Alexandre Kühn f0fbdd3a06 [IMP] mail: remove 'MessageSeenIndicator' recompute methods
Task-2806655

closes odoo/odoo#87352

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-30 18:31:53 +02:00
Alexandre Kühn 081c6f147c [IMP] mail: remove MailTemplateComponent/activity
Task-2793280

closes odoo/odoo#87342

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-30 18:31:47 +02:00
Alexandre Kühn 6bd65a50d2 [IMP] mail: turn 'FollowerSubtypeView/subtype' into field
Task-2793280

closes odoo/odoo#87013

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-30 18:31:40 +02:00
Abdelouahab (abla) 6246ec0f46 [FIX] google_calendar : fix default reminder
To reproduce
============

- Sync Google Calendar to Odoo
- Create an event in GCaledar without setting a notification
In Odoo Notification reminder is set

Purpose
=======

we use default reminder given by Google which is notification 30 minutes before even if the event
doesn't have a reminder.

Specification
=============

To solve the issue we use empty reminder instead of the default given by google if no reminder is set.

opw-2792364

closes odoo/odoo#87592

X-original-commit: a25d38dd252a657ea44c822a227e415337003672
Signed-off-by: Arnaud Joset <arj@odoo.com>
Signed-off-by: abla001 <abla@odoo.com>
2022-03-30 17:35:26 +02:00