Commit Graph
148900 Commits
Author SHA1 Message Date
ed484ba8bc [IMP] hr_timesheet: add index in project_id on timesheets model
Before this commit, a search to find the timesheets is slow because the
model containing the timesheets contained also the basic AAL and so many
records could be stored into that model.

This commit adds an index on project_id field in that model to search
quicker than before the timesheets since a AAL is a timesheet when the
`project_id` field is set.

Closes #85513

X-original-commit: 8cc4006
Part-of: odoo/odoo#85968
Co-authored-by: Yannick Tivisse <yti@odoo.com>
Co-authored-by: Laurent Stukkens (LTU) <ltu@odoo.com>
2022-03-07 20:23:15 +00:00
Brice bib Bartoletti 57346c85f8 [FIX] l10n_ch,l10n_dk,l10n_fi: 0% tax fix
Every tax should have a tax repartition line even 0% tax

closes odoo/odoo#85990

X-original-commit: 17e3bd58e519bd40fdc0c7fd431cd1a8f90cf33e
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Brice Bartoletti <bib@odoo.com>
2022-03-07 19:15:03 +00:00
Anh Thao Pham (pta) 2712bf5891 [FIX] sale: hide archived taxes in SO edition form
Steps to reproduce:
===================
- Create a Sales tax
- Archive it
- Go to Sales and create a SO
The archived tax is available for SO line

Cause:
======
Context {'active_test: False'} is defined on tax_id field of SO line
to still display archived taxes on existing SO.
This context is passed to the field in the form view by default, allowing
archived taxes to be selected in SO creation/edition.

opw-2769057

closes odoo/odoo#85987

X-original-commit: 3f4497aac646f27514a03531ba57b100add7da92
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-03-07 18:22:39 +00:00
Alexandre Kühn f7701221e0 [FIX] mail: make RTC work
Oversight of https://github.com/odoo/odoo/pull/85651
Commit above made changes to some icons from `oi-` to `fa-`.
Doing so, there was unfortunately a typo, and the template was not valid.
As a result, RTC did not work.

This commit fixes the typo, and make RTC work again.

closes odoo/odoo#85980

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-07 18:22:35 +00:00
Merlin (megu) e807688807 [FIX] point_of_sale: product name on delivery slip from pos order
Delivery slip created from a POS order contains the product name 3 times

Steps to reproduce:
1. Install Point of Sale app
2. On the Point of Sale dashboard, open 'Shop' settings (with the three
dots on the top right corner)
3. Check Ship Later in Inventory
4. Open a POS session, add a product to an order and go to the payment
5. Select a payment method and a customer, check the option "Ship Later"
 and then validate the order
6. Quit the POS session and go to Point of Sale > Orders > Orders
7. Open the created order and access its picking with the smart button
8. Print the delivery slip
9. The name of the product is printed 3 times

Solution:
Override `_get_stock_move_values` in point_of_sale in order to overwrite
the value of `description_picking` when the order comes from a POS

Problem:
`product_description_variants` doesn't hold the same value whether it's
in sales or in point_of_sale. In Sales it describes the variants of the
product but in point_of_sale, it is the full product name i.e. the
product name and the variants used.

opw-2736443

closes odoo/odoo#85963

X-original-commit: 1c6710f59e2c9cf679c80a246ebb355a1b21776c
Signed-off-by: Masereel Pierre <pim@odoo.com>
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
2022-03-07 18:22:25 +00:00
Touati Djamel (otd) 30f3f8d816 [FIX] stock: use inventory adjustment name as a reference
Steps to reproduce the bug:
- Create a storable product “Test”
- Go to inventory > Operations > Inventory Adjustments
- Add a new line > Choose the “Test” product > Qty = 1*
- Select this line > Click on the “Apply” button
- You have the possibility to enter an “Inventory Reference / Reason”
- Go To reporting > stock moves

Problem:
The reference is “Product Quantity Updated” instead of the inventory adjustment name.

In the "action_apply" function, we give the name in the context: https://github.com/odoo/odoo/blob/15.0/addons/stock/wizard/stock_inventory_adjustment_name.py#L27

So that it is then used when creating the `stock.move`: https://github.com/odoo/odoo/blob/15.0/addons/stock/models/stock_quant.py#L800

But the context is destroyed here because we give a dict instead of a key :  https://github.com/odoo/odoo/blob/15.0/addons/stock/models/stock_quant.py#L296

Solution:
Remove the context override because it was done here: #83884
with the explanation that it's due to the write being called too many times here:
https://github.com/odoo/odoo/blob/8b155b695823dfa954464ad0d5dd07445ece2471/addons/stock/models/stock_quant.py#L244-L248

but then this later PR: #84771 deletes the same problem lines.

opw-2762169

closes odoo/odoo#85961

X-original-commit: eac6ca0db043fe59cf83988e6b000e700350930f
Signed-off-by: Tiffany Chang <tic@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
2022-03-07 18:22:21 +00:00
Alexandre Kühn 2b71efac3e [FIX] mail: correct visual of popover view
Popover view were broken due to change in signature of
component hook `usePosition()` in this PR:
https://github.com/odoo/odoo/pull/85389

Task-2786868

closes odoo/odoo#85954

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-07 18:22:17 +00:00
Alexandre Kühn 1bc7976f95 [IMP] mail: turn "Chatter/isPreparingAttachmentsLoading" into field
Task-2734101

closes odoo/odoo#85015

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-07 18:22:13 +00:00
AnjaliandKrina Oza d4252825f5 [IMP] project,hr,sale(_timesheet): generic improvement for project
The purpose of this commit, is to make generic improvements in
project.

In this commit, following changes are made:

- add allocated hours field in project form and list view
- remaining hour widget in project kanban view displays allocated
  hours (-) timesheeted hours on task
- hide progress bar in project list view if planned hours is zero
- hide task stages if user is set
- move company field below tags	field
- project list view: rename 'Activities' to 'Next Activity'

task-2692856

closes odoo/odoo#82019

Related: odoo/upgrade#3149
Related: odoo/enterprise#23148
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Co-authored-by: Krina Oza <kro@odoo.com>
2022-03-07 18:22:06 +00:00
Antoine Guenet 37bc99b309 [FIX] mass_mailing: target existing paragraph in tour
After choosing a template, the mass_mailing tour is supposed to tell us
to click in a paragraph to edit it. It was targeting a snippet that
doesn't exist anymore so the class name had to be adapted for it to
work again.

task-2778418

closes odoo/odoo#85934

X-original-commit: 2e2004b7cda8ea4dadb8de06991b7a2c91992661
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Antoine Guenet <age@odoo.com>
2022-03-07 17:15:11 +00:00
Antoine Guenet 9bf72b7083 [FIX] mass_mailing: make sure droplet obvious next to title
The mass_mailing tour had a droplet to the right of the mailing's title,
which was not so obvious to the eye so this moves it to the bottom.

task-2778417

X-original-commit: f6d69879ca6c55e6dd29387820383e069eccad07
Part-of: odoo/odoo#85934
2022-03-07 17:15:11 +00:00
Antoine Guenet 826a185fdf [FIX] mass_mailing: preserve changes on preview templates
Previewing templates in the "SELECT A TEMPLATE" tab of mass_mailing made
one lose all their changes. This makes sure they are preserved and
restored when needed.

task-2778411

closes odoo/odoo#85932

X-original-commit: e96e11d6ab8e5f7a6d5da498409cc0d5fb26cad1
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Antoine Guenet <age@odoo.com>
2022-03-07 16:03:04 +00:00
Antoine Guenet 92e7909832 [FIX] mass_mailing: prevent rollback on change after template switch
Pick a template for your new mailing, then change your mind and select
another one in the "SELECT A TEMPLATE" tab. Then make a change in the
mailing: your template change is rolled back. This is the bug that is
fixed with this commit.

task-2778411

X-original-commit: f84f15922af3a1e13409d3fd65805e64f7c6de4c
Part-of: odoo/odoo#85932
2022-03-07 16:03:03 +00:00
David Tran 81cc8bd1cd [FIX] membership: wrong view arch
Wrong arch caused the following error when user language is not English

ValueError: Không tìm thấy phần tử '<tree string="Liên hệ">' trong giao
diện cha

View name: res.partner.tree.form.inherit
Error context:
 view: ir.ui.view(2867,)
 xmlid: membership.view_partner_tree
 view.model: res.partner
 view.parent: ir.ui.view(115,)

closes odoo/odoo#85936

X-original-commit: 7bfea3cee51400239430aa89aa28a62cae7ba0c5
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-03-07 13:30:55 +00:00
Nicolas Bayet 98073c3bb0 [FIX] web_editor: prevent editor powerbox hint duplication
Whenever the browser is lagging between multiple enter,
the command hints were not being updated until the browser
main thread process the event queue.

Task-2728794

closes odoo/odoo#85935

X-original-commit: 8525f6ea677e89a932c783545c1d9dcf9b4d175a
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-03-07 13:30:51 +00:00
Alexandre Kühn 2115ca10af [IMP] mail: introduce 'ChatWindow/componentStyle' field
Task-2694206

closes odoo/odoo#85916

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-07 13:30:48 +00:00
Victor Feyens 804ed65c4a [FIX] l10n_it_ddt_stock: broken test
closes odoo/odoo#81510

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-03-07 13:30:44 +00:00
Victor Feyens 7f859cb97f [IMP] sale: fix ci-style
W0622(redefined-builtin) coll 34: Redefining built-in 'help'

Part-of: odoo/odoo#81510
2022-03-07 13:30:43 +00:00
Victor Feyens 3f1b0b70af [IMP] sale: clean res config settings fields ordering
Part-of: odoo/odoo#81510
2022-03-07 13:30:43 +00:00
Victor Feyens 8c7bd64e3e [REF] sale: clean SO & SOL fields & methods
* order by logic/dependencies
  * reduce stacktrace depth during create precomputation
  by computing the computed fields dependencies before the field itself
  not during the field computation (if the field was defined after)
* guidelines applications
  * single quotes for tech strings
  * double quotes for strings shown to user
  * respect max line length
  * try to follow consistent order for field attributes
  * ordering of methods (computes, onchanges, crud, ...)

Part-of: odoo/odoo#81510
2022-03-07 13:30:43 +00:00
Thibault Delavallée 3dd09d63fc [FIX] crm: update counter for rare extra queries on runbot
Still having sometimes a test failing due to extra queries...

closes odoo/odoo#85929

X-original-commit: 34eebe66f12bf43dbf7c16800e177907fe39f2ba
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-03-07 12:36:17 +00:00
mreficent 42ebebe927 [IMP] calendar: use m2o_reference on calendar.event
closes odoo/odoo#70521

Signed-off-by: Arnaud Joset <arj@odoo.com>
2022-03-07 11:38:41 +00:00
Thibault Delavallée 1fb856a980 [UPD] various: update query counters (and comments)
Purpose is to update counters according to current runbot's state. This eases
checking impact of future performance improvements done.

Task-2631088 (Appointment: profile and add performance tests)

closes odoo/odoo#85838

X-original-commit: b0c7a6397526ad2698fac0701e4323c019ea8bf6
Related: odoo/enterprise#25002
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-03-07 10:41:47 +00:00
Loan (lse) 68663f1b2b [FIX] microsoft_calendar: prevent parallel JS calls to sync_data
Before this commit:
A call to `sync_data` was made each time an event happen in the calendar
( changing the day, switching to day/week/month/year ).
This can easily saturate the server and spam the Microsoft API.

After this commit:
One call is made at a time per tab.

This PR is an adaptation of the same fix which was done only for
Google calendar at:
https://github.com/odoo/odoo/pull/69619/files#diff-8457ad89f2f7a1847af533828b40994bfc6d80e1e9d45ee7707b534bda2b0f06
and partially solve another PR that I was planning (but a bit too "overkilled"):
https://github.com/odoo/odoo/pull/85465

OPW-2749791 & OPW-2741728

closes odoo/odoo#85754

X-original-commit: d25b3d783fd08cd1c84095da554f52b463422bc2
Signed-off-by: Arnaud Joset <arj@odoo.com>
2022-03-07 10:41:44 +00:00
Jorge Pinna Puissant c319e9c55f [IMP] test_lint: add support to eslint for design_themes
closes odoo/odoo#85889

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2022-03-07 08:47:44 +00:00
Florian Damhaut c1014d9cd6 [FIX] calendar: notification detail correct redirection
Step to reproduce:
- Create an event in calendar with reminder
- (Move the event to trigger the reminder)
- Click on 'Details'

Current Behaviour:
- Open a new event

Behaviour after PR:
- Open the event linked to the notification

opw-2761492

closes odoo/odoo#85089

X-original-commit: e1787f5a107f452f5c50e4e931cdd7afcea04e48
Signed-off-by: Arnaud Joset <arj@odoo.com>
Signed-off-by: Damhaut Florian (flda) <flda@odoo.com>
2022-03-07 08:47:40 +00:00
root e663077c11 [IMP] account: create hook to override searchbar sortings/filters
With this commit we can now call a hook when we want to modify the code for this route.
Before this commit the only way to modify/extend this would be by taking over a big part of the code.

closes odoo/odoo#84907

Signed-off-by: Laurent Smet <las@odoo.com>
2022-03-07 07:56:01 +00:00
Pierre Masereel 7655963ef9 [FIX] point_of_sale: payment by terminal when settle due
When we want to settle the amount due by a customer, we can choose a
payment method through a Popup. When the payement method choosed in the
popup is linked to a terminal the payment line is added, but don't have
a correct status, so we cannot send the request to the terminal.

To correctly add the payment and related status, we are moving some
logic that was set in the payment screen into the method that create the
payment line on the order.

closes odoo/odoo#85873

X-original-commit: 325772042c3d55034842e5710ab398237531e494
Signed-off-by: Masereel Pierre <pim@odoo.com>
2022-03-06 10:57:11 +00:00
Ruben Gomes 0df8a0d955 [FIX] mobile: calculation of invoice lines and journal items on update
Problem :
* updating an invoice line on mobile would result in an incorrect untaxed amount, tax amount and total amount on the invoice and an incorrect entries in the journal items
* subtotal of invoice line was not showing in mobile view

Solution :
* the problem was that debit and credit fields were missing from the view so onchange were not trigger

closes odoo/odoo#85877

Task: task-2766245
X-original-commit: c1b9c96dddaa02209bae042481781dd175a678dc
Signed-off-by: Ruben Gomes <rugo@odoo.com>
Signed-off-by: William André (wan) <wan@odoo.com>
2022-03-05 09:46:37 +00:00
Thibault Delavallée 8772e71b04 [FIX] mail: fix trailing comma
Die, you commies ! You wouldn't bear our mighty OdooTrailingComma force !

closes odoo/odoo#85864

X-original-commit: 1be8592c160d69c630efcd312a7603cf1d8c1359
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-03-04 21:12:42 +00:00
Thibault Delavallée 927ec3a999 [FIX] mail: fix MailMail failure type naming when sending
Followup of odoo/odoo@c178a7829f where a failure type renaming was badly
propagated. This commit fixes failure type naming allowing to correctly
distinguish a missing email from an invalid email.

Task-2684479 (Mail: Better send error storage and display)

X-original-commit: 1a08b3f4b3aa849549783348c51c393a1f84a409
Part-of: odoo/odoo#85864
2022-03-04 21:12:41 +00:00
Alexandre Kühn 2c550e22c5 [IMP] mail: turn "Rtc/disconnectAudioMonitor" into field
Task-2734101

closes odoo/odoo#85025

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-04 20:18:57 +00:00
Didier (did) 15a8e5176b [FIX] mail: send is_main with the attachments
task-2783076

closes odoo/odoo#85869

X-original-commit: c35b18bb2ab4198f015c3681ed600e0e7cf66657
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-04 19:04:46 +00:00
Alexandre Kühn cc789f82d5 [IMP] mail: move rtc recover timeout in its own method
Task-2734101

closes odoo/odoo#85127

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-04 19:04:42 +00:00
stefanorigano (SRI) 6f4f3699bf [ADD] web: bs5 utility-classes, add positions
closes odoo/odoo#85804

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-03-04 17:30:25 +00:00
Miquel Raïch 2ba37637b5 [IMP] mail: revert of "set an integer widget on many2one_reference field"
Revert of https://github.com/odoo/odoo/commit/d3f6c3b579f39b313401c63d97b95ce690501591

Cleanup. The JS has already been adapted to many2one_reference fields.

closes odoo/odoo#85843

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-04 15:57:57 +00:00
Thibault Delavallée a740bdd7f8 [IMP] mail: remove unnecessary indexes on composer model
Those indexes probably come from previous implementation of composer model
when it was inheriting from mail.message. It was also inheriting from the
custom search / read manual ACLs implementation doing some SQL directly to
check access. Those indexes should not be necessary anymore as anyway this
is a transient model.

Prepares Task-2088884 (MailComposer: Onchange to editable computed stored)

closes odoo/odoo#85841

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-03-04 15:00:58 +00:00
Thibault Delavallée 81e782250a [IMP] base: remove postmaster-odoo default bounce
Coming from odoo/odoo@a4597fe34f . This code is not necessary anymore since we better
handle From, SMTP-From, as well as allowing mail server filtering. We can
now use standard aliases and servers instead of relying on hardcoded value
"postmaster-odoo".

Task-2784996

closes odoo/odoo#85837

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-03-04 15:00:54 +00:00
Odoo's Mergebot c9aa2eb982 [MERGE][IMP] web: pager scss revamp
This PR simplifies the SCSS of the Pager component.

After the revamp of the pager, the Legacy Pager was broken because it
used the same SCSS file. This commit adds some BS classes on the Legacy
Pager to keep consistency between both versions while waiting for the
removal of the legacy one.

task-2733437

closes odoo/odoo#82866

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-03-04 16:00:49 +01:00
Brieuc-brd 070455953b [IMP] web: keep consistency with legacy pager
After the revamp of the pager, the Legacy Pager was broken because it
used the same SCSS file. This commit adds some BS classes on the Legacy
Pager to keep consistency between both versions while waiting for the
removal of the legacy one.

task-2733437

Part-of: odoo/odoo#82866
2022-03-04 15:00:47 +00:00
Brieuc-brd 623d67d254 [IMP] web: pager scss revamp
This commit simplifies the SCSS of the Pager component.

task-2733437

Part-of: odoo/odoo#82866
2022-03-04 15:00:47 +00:00
Brieuc-brd 5097bbd595 [ADD] web: bs5 utility-classes, add gaps
Define "Bootstrap v5 ready" utility-class to handle gaps.
This class definition can be safely removed after migrating to v5.

task-2733437

Part-of: odoo/odoo#82866
2022-03-04 15:00:47 +00:00
tsm-odoo a6bb70c91a [MOV] mail, test_mail: move tracking value tests
task-2767820

This move is done to prepare the use of server side model definitions during tests.
Indeed, a model having all type of tracked fields will be needed to ease tracking
value testing. This model will be added to the test_mail module so the tracking
value tests need to be there as well.

closes odoo/odoo#85819

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-04 14:08:10 +00:00
Dossogne Bertrand 2bde9ebcc3 [IMP] hr_leave: improve leave ux
Small changes in the layout of the hr_leave form view,
mainly for the manager's view point

Task : #2734842 [Time Off] ux changes

closes odoo/odoo#82976

Related: odoo/enterprise#23896
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-03-04 14:07:50 +00:00
JF Aubert 723b642713 [FIX] mrp: fix _split_productions overloading
add missing _set_consumed_qty parameter in _split_productions overloading
fix typo in cancel_remaining_qty parameter

closes odoo/odoo#85824

Task: 2783912
X-original-commit: 1071e74d58c14c3a32c4d19669b0dd8426b14f1a
Related: odoo/enterprise#24995
Signed-off-by: Arnold Moyaux <arm@odoo.com>
2022-03-04 13:12:56 +00:00
Josse Colpaert 83859de33c [FIX] account_edi: We should delete the last info/warning/error msg when success to not have something weird still in the view
closes odoo/odoo#85818

X-original-commit: dab20ed277e32179244ae00df0b8d1c7c19011c6
Signed-off-by: William André (wan) <wan@odoo.com>
2022-03-04 13:12:51 +00:00
william-andre 3f6c210745 [FIX] stock: clean clean duplicated key
One key has two different types. Fix one and
let the other one as is to use it in the report

clean commit a038607bfdbe764fd436a94ce8149720fdca87ff

closes odoo/odoo#85813

X-original-commit: 4ca4dbc6707f26d69a4116b1ad90c1d9082119a1
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Signed-off-by: William André (wan) <wan@odoo.com>
2022-03-04 13:12:48 +00:00
Audric Onockx (auon) 0910f071a7 [FIX] product : apply only active price rules
Steps :
Install Sale / E-commerce.
Create product P (price = 100).
Create price list L.
Create price rule R (product = P, price = 50).
Go to product P > Price Rules > archive R.
Create a quotation. / Website > click 'Go to website' > Shop.
Select price list L.
Create a SOL with product P. / Search for product P.

Issue :
Price is 50.

Cause :
Archived price rules are included in the 'search' of
_compute_price_rule_get_items().

Fix :
Exclude them.

opw-2752184

closes odoo/odoo#85811

X-original-commit: d5e8308492ac8955ad76fd8d9f3781266dee76f6
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-03-04 13:12:43 +00:00
sofiagvaladze 3840959acf [FIX] hr_expense,sale_expense: make expense_line_ids editable
Related PR - odoo/odoo#84978

task - 2768700

closes odoo/odoo#85619

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-03-04 12:16:35 +00:00
Thibault Francois e1983aa413 [FIX] base{_import_module}: cloc should not count generated code
* Studio generate computed field "count" when the user add a button
in the button box. Since those lines are written by studio with drag and drop
it should not be counted for the maintenance subscription.

We can detect them because field created by the user in studio start with x_studio
and fields created outside studio does not have studio_customization
xml_id

* Add test to make no standard module introduce customization in the
database during the install the will be counted by cloc

see https://github.com/odoo/enterprise/pull/22664

closes odoo/odoo#85763

X-original-commit: 47ae24081fe5c0c86ce8507229dfb550ec585633
Signed-off-by: Christophe Simonis <chs@odoo.com>
Signed-off-by: Thibault Francois <tfr@odoo.com>
2022-03-04 11:16:52 +00:00