Commit Graph
164380 Commits
Author SHA1 Message Date
Pedram (PEBR) ff3c554088 [FIX] google_calendar: ensure syncronization with cancelled event
This commit addresses a synchronization issue with Google Calendar,
which arose after the implementation of commit https://github.com/odoo/odoo/pull/94018/commits/d9c4043557c6460b3860216bdfd39a623a5e0795.
The mentioned commit added tracking to the pre-commit process,
inadvertently causing problems during Google Calendar synchronization.

During the synchronization of Google Calendar, a recurring event that
had one of its occurrences deleted resulted in Google sending both a
recurring event record and a cancelled single event. In Odoo's
synchronization process, it first created occurrences for the recurrent
event and then synced the single events. During this synchronization of
single events, the existing cancelled events were unlinked using the
`_cancel` function to remove the event.

The issue surfaced when the `_message_track_post_template` function was
called in the pre-commit phase. If the appointment function was
installed, the `_track_template` was overridden in this module, leading
to an attempt to access the removed event, which raised an error and
prevented calendar synchronization.

With this modification, the `_track_template` will not be called for
the created event that was cancelled in the same transaction.

opw-3418758

closes odoo/odoo#132174

X-original-commit: c1a455f6a46a8c936176e306f35651d60e39f869
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
2023-08-17 16:37:14 +02:00
zel-odoo a1f949c8c3 [IMP] web,mail: Discuss app commands in command palette
This commit adds some discuss-related options in the command
palette.

- hotkeys to add channel (C) & chat (D), and start a meeting (M);
- namespaces `@` or `#` show mentionned and recent conversations
  in Discuss app when search is empty;

Items show optional badge with needaction counter.

Mentions/Recent categories are only visible when there are no
search term. Indeed, `@term` searches for users while `#channel`
searches for channels, so these categories are meant to quickly
jump to recent and important conversations. When typing some
search terms, the fuzzy search has precedence over mentions/recent
criteria.

task-3330218

closes odoo/odoo#128896

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-08-17 14:52:03 +02:00
Abdelouahab (abla) c2896d3b18 [FIX] website_event_sale: mandatory company
To reproduce
============
- create event with ticket that can be sold on website
- make company field empty in event form
- buy ticket from website and go back to the event form > Error raised

Problem
========
- the method `_compute_sale_price_subtotal` is using `company_id`, but as
it's not required in Form View we give it a null value

Solution
========
- make `company_id` required from view
- if `company_id` is not set, use the current company from `env`
- Define constraint on `website_id` as the user should choose website from
same company of the event

opw-3395108

closes odoo/odoo#132173

X-original-commit: 0d70e38ab4bab850ee4bddc7b21b4c6c10809294
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Abdelouahab Laaroussi (abla) <abla@odoo.com>
2023-08-17 13:03:18 +02:00
Adrien Guilliams (adgu) 1e4dbaa8bc [FIX] pos_restaurant: order reminder with product without category
Sometimes, it is possible to have a product for which its category is
unknown by the pos db of the config. This can happen for example when
using pos_loyalty. If a user makes a "buy x get y" program with the
reward being a product with a category not accepted by the config
(e.g. due to a restrict category of the config), the category id cannot
be found in the db of this pos. This leads to problem in pos_restaurant
as under the button order, there is a reminder of the products that
should be sent either to the preparation display or the preparation
printer linked to this pos. If this preparation display or preparation
printer contains the category of the reward, the problem happens.

The fix is to not show the new category (as it is at first not available
due to the restrict so we comply with the choice of the user).
This might be a temporarly fix while waiting for a better solution.

closes odoo/odoo#131379

X-original-commit: a82b550dcf4311ee35570f5b9dc37bf50a46c17d
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-08-17 13:03:05 +02:00
Nicolas Bayet 0c4a94e17d [FIX] web_editor: properly return the value of _hasICEServers
In the forward port #129226, the return value of _hasICEServers was
not properly returned, which led to the collaboration to always be
disabled.

task-3468261

closes odoo/odoo#132165

X-original-commit: e215290bd2d6091396aafadc58a93a68675d77dd
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-08-17 11:48:48 +02:00
Adrien Dieudonné ee850cd689 [IMP] web: removes contains() polyfill
Mainly used for Internet Explorer support.
´contains´ is now supported by Edge.

https://caniuse.com/mdn-api_node_contains

closes odoo/odoo#132162

Signed-off-by: Romain Estievenart (res) <res@odoo.com>
2023-08-17 11:48:44 +02:00
FrancoisGe a35cbff36c [FIX] web: grouped list with aggregated value
Since the relational model (PR 114024) has been rewritten, in a grouped list
 view, if we have a field with name (value, count, aggregates or length)
and it is aggregatable, then the aggregated value of the group is false.

Why:
When loading the group list data or will process the group. As a result,
values such as "value", "count", etc. are overwritten.

Solution:
We will no longer modify the group data, but only extrat what the Group
DataPoint needs.

How to reproduce:
- Go to a grouped list view with the "value" field aggregateable

Before this commit:
    The value displayed on the group for the value field is wrong

After this commit:
    The value displayed on the group for the value field is correct

closes odoo/odoo#132154

Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
2023-08-17 11:48:39 +02:00
niyasraphy 329ce3e113 [IMP] point_of_sale: improve window title in invoice request
before this commit, on invoice request page the window
title is shown as ticket_request_with_code

after this commit, the window title will be shown as
Invoice Request

closes odoo/odoo#131981

Signed-off-by: Vlad Stroia (vlst) <vlst@odoo.com>
2023-08-17 11:48:28 +02:00
Yannick Tivisse c1ce7afcef [IMP] hr_recruitment: Avoid copying applicants private phone on partner
Purpose
=======

The partner is not private anymore, so avoid copying the private information
like phone and mobile when creating a partner (from the chatter for instance).

Only copy needed and unavoidable pieces of information like the partner name
and the email address.

closes odoo/odoo#130982

Taskid: 3414035
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2023-08-17 11:48:18 +02:00
Hubert Van de Walle (huvw) f100f16c3d [FIX] web: Many2One option no_opening -> no_open
When editing a Many2One field with studio, and toggling "Disable
opening" with studio, it doesn't do anything because it's the wrong
option.

opw-3434895

closes odoo/odoo#132102

X-original-commit: 0ec5a45f1633ffaff91aba6808cf50ad1c58c60b
Signed-off-by: Luca Vitali (luvi) <luvi@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
2023-08-17 10:33:19 +02:00
Theo VINCENT (thvi) f8563dcc3e [FIX] pos_online_payment: payment popup display
Since the use of Bootstrap, the online payment popup is no longer correctly displayed.

Steps to reproduce:
 - Configure an online payment method for a shop
 - Open a session for that shop
 - Make an order
 - Select the configured online payment method in the payment screen
 - Click on "Validate" button

The online payment popup is displayed.

The fix consists of adding back the display of this popup as it was before the Bootstrap use.

closes odoo/odoo#132002

Task-id: 3468071
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-08-17 10:33:10 +02:00
vlst f2a107ff29 [FIX] pos*: various ui fixes
pos*: point_of_sale, pos_hr, pos_restaurant

In this PR we fix a number of small UI issues in the point of sale app.

Issues fixed:
- Align filter option in the TicketScreen search bar;
- Align items in the opening popup that shows the available
login options in the pos_hr module;
- Align tips column in ticket screen;
- Made it so clicking on the employee icon does not open the
selection popup if there is only one employee configured
( as it will be empty in this case );

closes odoo/odoo#131351

Task: 3458435
Related: odoo/enterprise#45526
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-08-17 10:33:05 +02:00
Yannick Tivisse b9b165db7d [FIX] hr_work_entry_contract: Correctly compute work entries for edge timezones
closes odoo/odoo#124222

Related: odoo/upgrade#4699
Related: odoo/enterprise#41253
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2023-08-17 10:32:54 +02:00
Yannick Tivisse 8a83cbeb28 [IMP] account: Add salary accounts to generic CoA
Part-of: odoo/odoo#124222
2023-08-17 10:32:53 +02:00
Yannick Tivisse 3312657294 [FIX] hr_payroll_acccount: Make default account configurable on journal
Purpose
=======

2 commits were making impossible to define a default account on a
miscellaneous account journal. However, this is used in payroll
to auto-balance unbalanced moves.

After a discussion with the related team, it has been decided to
revert both commits, which were breaking other use cases as well.

Revert "[FIX] account: fix the domain of default_account_id from account_journal"
This reverts commit b09f06f986.

Revert "[IMP] account: remove default account on misc journal form view"
This reverts commit f2c0bc321b.

Part-of: odoo/odoo#124222
2023-08-17 10:32:52 +02:00
Yannick Tivisse d0e2d1365c [IMP] hr: Expose Social Security Number of employee forms
Part-of: odoo/odoo#124222
2023-08-17 10:32:50 +02:00
Yannick Tivisse b634498fc0 [IMP] hr: Make contract type country specific
Part-of: odoo/odoo#124222
2023-08-17 10:32:49 +02:00
Yannick Tivisse e7ba02b1b1 [IMP] hr_payroll: Move wage_type/schedule_pay on contract
Purpose
=======

Currently the wage_type and the schedule pay are defined on the
salary structure type level, preventing users paying different
employees on the same structure with different salary types or
periodicity, which is a employee choice on certain countries,
like Mexico or the USA.

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

Move the logic at the contract level, but keep the structure
type field definition to be used as default values.

Part-of: odoo/odoo#124222
2023-08-17 10:32:48 +02:00
althaf shaik 00ab68201e [FIX] lunch: handle error of invalid time in lunch suppliers
This traceback raises when user gives invalid time (hours) at the time of
updating a record in lunch suppliers.

To produce this issue:

- Install 'Lunch'
- Open Lunch/Configuration/Vendors
- Open an existing record and in 'Orders' click 'Send Order By' as 'Email'
- Give invalid time in 'Order Time' like -ve value or greater-than 12
- Save the record

Error: 'A traceback appears': 'hour must be in 0..23'

When user update a record 'write' method calls first than
'_sql_constraints' and in that method '_sync_cron' method is used.
Because of user giving invalid time it lead to above
traceback.

See:
https://github.com/odoo/odoo/blob/88c1541a1646c419d37a9ca94a27f069844614db/addons/lunch/models/lunch_supplier.py#L186-L199

Sentry-4297889570

closes odoo/odoo#132143

X-original-commit: 99fb33167fb6bd332548f21c83d69fd9fe6b6c69
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
Signed-off-by: Altaf Shaik (alsh) <alsh@odoo.com>
2023-08-17 09:21:16 +02:00
Lucas Lefèvre (lul) 2088384de6 [FIX] spreadsheet_edition: ignore property fields
See enterprise PR ;)

Property fields are not supported in spreadsheet.
In saas-16.2, it even completely ruins the entire list
if it contains one property field.

With this commit, until we support properly property fields[1],
we ignores property field when the list view is inserted
in spreadsheet

[1] in master, see task 3329490

opw-3284273
opw-3465243

closes odoo/odoo#132138

Task: 3329490
X-original-commit: ada541d6c4a8d0a5b515c4f1f7e9d71c54b992d5
Related: odoo/enterprise#45844
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-08-17 09:21:11 +02:00
Yolann Sabaux f5da45537a [FIX] account: allows ungrouped batch payment with different payment terms
Steps to reproduce:
- Create two Bills with different payment terms with one having no "early_discount" such as '30% Now, Balance 60 Days'
- Select the Bills and click on Register Payment (make sure the payment is not grouped)

Issue:
Server Error

Cause:
We try to Register Payment for all the Bills at once, but the "early_discount" is not defined for all the Bills.
So, whenever there is a move with an early discount, the mode is always considered as "early_payment".
Therefore, we call `_get_invoice_counterpart_amls_for_early_payment_discount` with an empty list since there is no early discount
https://github.com/odoo/odoo/blob/0ffaaebfa5c25c4bf71fb0e02288767dbfac959d/addons/account/wizard/account_payment_register.py#L750-L755
https://github.com/odoo/odoo/blob/0ffaaebfa5c25c4bf71fb0e02288767dbfac959d/addons/account/wizard/account_payment_register.py#L760

Causing the "local variable 'aml' referenced before assignment" error.

Solution:
We only iterate through moves belonging to the batch. This way, we avoid setting the mode to "early_payment" and entering the confition.

opw-3378445

closes odoo/odoo#132113

X-original-commit: 9bba9576d3365500a5c1eda0cfd57457fd999878
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Signed-off-by: Yolann Sabaux (yosa) <yosa@odoo.com>
2023-08-17 09:21:02 +02:00
althaf shaik 1e77837bf5 [FIX] purchase_stock: print report of the purchase order with incoterm location
The traceback arises when a user tries to print 'Request for Qutation'
in 'purchase order' after providing 'Incoterm Location' and 'incoterm' value.

To reproduce this issue:

1) Install 'purchase_stock'
2) Open any existing purchase order
3) Click on 'Other Information' and give any value for 'Purchase Location'
4) Select any 'Incoterm'
5) Now print 'Request for Qutation' template

Error:-''purchase.order' object has no attribute 'invoice_incoterm_id''

On 'purchase_report_template' instead of 'incoterm_id', 'invoice_incoterm_id'
is used.
See:-
https://github.com/odoo/odoo/blob/158f8090ef30065b97ebe8b15b0bf73fff6a9ac4/addons/purchase_stock/report/purchase_report_templates.xml#L43-L48

In 'Purchase_order' there is no attribute of name 'invoice_incoterm_id'.
When the user tries to print 'request for Qutaion' and because of
'invoice_incoterm_id' is used, which leads to above traceback.

sentry-4379690422

closes odoo/odoo#132080

X-original-commit: c1daf78d1aa4252bf0f85cd704df0e929062f496
Signed-off-by: Tiffany Chang (tic) <tic@odoo.com>
2023-08-17 09:20:49 +02:00
Chrysanthe (chgo) 8120fca14f [FIX] account, kanban_dashboard: fix favorite alignment
Commit[1] introduced some changes in order to fix a layout issue in the
accounting dashboard but these changes were applied in a way that affects
a lot of modules and files that should not be modified.

In fact, by removing the padding inside the `kanban_dashboard.scss`
commit[1] is actually removing the padding in every place where
the boolean_favorite widget is used.

There is also a change applied in the Bootstrap library files, which
should remain untouched.

=== AFTER ===

We revert the changes applied by commit[1] and also fix the layout issue
in the accounting dashboard that it aimed to fix.

commit[1]: d4ba0c1

task-3453799
part of task-3326263

closes odoo/odoo#132134

X-original-commit: f78571cec0a5debf78c5dd1859c78b13d33df1ab
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-08-17 01:04:34 +02:00
Walid d9e31fbb51 [FIX] delivery: apply tracking to all pickings in multistep delivery
Steps to reproduce:
- Install DHL carrier
- Enable multistep routes
- On warehouse config set 3 steps(pick,pack,ship) on outgoing shippments
- Create an SO  and add DHL shipping
- Validate the first picking and send to shipper

Bug:
only the first picking has a tracking ref
this causes an issue because this an in internal picking and only the
last is shown to the customer on sales portal so the customer doesn't
have acces to the tracking ref

Fix:
set the referrence on all the pickings of the so

opw-3269257

closes odoo/odoo#132142

X-original-commit: fd19ba5483dc4312e4459100582f417a38b52b3b
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-08-16 22:22:46 +02:00
Xavier ALT 99d4bc5e04 [FIX] mail: correctly parse body as html for pure-html email
Some external tools send email as pure html (no multipart) and when
parsing such email we ends up having the raw HTML as body (text)

This commit ensure we correctly parse and sanitize the body as HTML
for such emails.

closes odoo/odoo#132127

Task-id: 3451889
X-original-commit: a4763d214bfc7b09510226e552f749f9cd95870e
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Xavier Alt (xal) <xal@odoo.com>
2023-08-16 21:12:52 +02:00
Romain Derie ec6677b79f [FIX] website: allow again external website redirect
Broken by commit [1], where only the `url_to` should've been part of the
check for 301/302. The rest of the `if` was about relative URL check,
routing map check and converter check, all related to 308 only.

Note that in the meantime, commit [2] was added in those checks and
needs to be part of 301/302 too.

[1]: https://github.com/odoo/odoo/commit/14a850976711431f36b7f889ea9cf31b1114513d
[2]: https://github.com/odoo/odoo/commit/26fa923f6ab01298bf1a1e9f6a615c9aa9e2e5ed

Fixes https://github.com/odoo/odoo/issues/129290

closes odoo/odoo#132114

X-original-commit: ec27fd45868318542f365ec4ec1b3c9d5084f586
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-08-16 20:03:42 +02:00
moerradi de368ba9b4 [FIX] account: Make generated follow-up reports accessible in menu
Resolved an issue where follow-up reports linked to a partner weren't
visible in the follow-up menu due to 'partner_rank' not incrementing
after a misc entry. The commit ensures the correct update of
'partner_rank', making all relevant reports accessible.

closes odoo/odoo#132082

Task-id: 3437930
X-original-commit: fd97480760f5f02c0b25fd39d86c4f0d3e36308e
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Signed-off-by: Mohamed Erradi (moer) <moer@odoo.com>
2023-08-16 19:05:02 +02:00
Adrien Dieudonné c147339a0c [REF] web: remove legacy redirect
This function is not used anymore.
We now call ´browser.location.assign(...)´ directly.

Related PR: https://github.com/odoo/odoo/pull/112621

closes odoo/odoo#132072

Signed-off-by: Romain Estievenart (res) <res@odoo.com>
2023-08-16 19:04:58 +02:00
Jinane Maksoud 4492bfbb11 [FIX] account: change tax repartition lines default order
The update of repartition lines was matching exitsting values
to the wrong records in the chart template due to a difference
in the sorting.

closes odoo/odoo#132069

X-original-commit: 017eec9112f4cf00fc4392528877c48c6ded1a85
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2023-08-16 19:04:53 +02:00
Walid f60e9b07b6 [FIX] stock: return packages
Steps to reproduce:
- Deliver an SN-tracked product with the Destination Package set (put in pack button also sets this).
- Return that product without setting the Source Package (you can also click "put in pack" which will put the product in yet another pack).
- This already results in two lines with the same SN in the same location, one with +1.00 and one with -1.00 quantity.
- Deliver that product again and put in pack.
- Now there's three lines with the same SN in the same location, two with +1.00 and one with -1.00 quantity.

Bug:
source Package isn't set bydefault when confirming the move_line
we update the stock quantity for that lot_id and Package set to False
the existing quantity has a Package set so it is filtered out and a new
negative quantity is created

Fix:
set the source Package on the return

opw-3179388

closes odoo/odoo#132056

X-original-commit: 9d2d3911a3ac6711d3040d22e146f9eb18de2197
Signed-off-by: Adrien Widart (awt) <awt@odoo.com>
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-08-16 19:04:49 +02:00
Laurent Smet cf23952a97 [FIX] l10n_eg_edi_eta: Remove auto-install
The auto-install has wrongly been introduced by:
https://github.com/odoo/odoo/commit/2d2faafb744abdb09f199ab85f11d317ee1d065e

l10n_es_edi_sii has already been fixed by:
https://github.com/odoo-dev/odoo/commit/02f72d6a2ee73e844537e27594d02c9533954d26

closes odoo/odoo#132052

X-original-commit: 95c3401a274aa3c73a10d32b3c54b357d5c6c114
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2023-08-16 19:04:44 +02:00
Camille Spiritus c5e1716d2e [FIX] account/l10n_ch: QR Bill: adapt QR header to invoice's
In Switzerland, since 16.0, the QR Bill page always has the external_layout template, whatever template the user chose for his invoices. 

This was a "lesser evil" choice to allow the user to print QR-bills : BootStrap5 and wkhtmltopdf were not compatible, causing a display bug and generating incorrect QR Bills before this.  

See for an example the task-3037921.

Returned to the original behaviour, namely :

- Display the invoice header on the QR Bill ;
- Adapt said header display to the layout chosen by the user ;
- Fixed Din5008 display. 

task-3241502

closes odoo/odoo#132051

X-original-commit: 061a6780d445b9e23e62ef69b9da2503cb212cfb
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Signed-off-by: Camille Spiritus (casp) <casp@odoo.com>
2023-08-16 19:04:40 +02:00
Josse Colpaert f20caf3add [IMP] l10n_ec: Add and fix tax group accounts to automate tax closing…
… entry

- These new accounts are to automate the tax closing entry on 103 and 104 reports.
- The tax names of account 11050201 is changed to a better accounting standard name for the understanding of the accounting accounts to be configured in the tax groups, based on the name of the new account group created.
- Accounts payable and receivable are added for each of the tax groups, by company. It's not set in chart template property accounts, because they are different accounts for each tax group. For this reason, the accounts are set in load chart template method.
- Add irbpnr tax group account
- Add Exchange Outflows accounts and fix ec translation for exchange outflows account
- Filter companies with EC chart template set

We needed to adapt to saas-16.2

closes odoo/odoo#132050

X-original-commit: f7b2ff2028490fd1cf97f8fa1bc5e7103fefaa34
Signed-off-by: Josse Colpaert <jco@odoo.com>
2023-08-16 19:04:35 +02:00
Walid 1fb4d356b5 [FIX] mrp_account: AVCO product valuation with component cost 0
Steps to reproduce:
- Create a manufactured product P with AVCO valuation
- On the bom of the previous product add a component C with unit cost 5$
- Manufacture product P (Unit cost correct so far 5$)
- Change component cost to 0 and manufacture again
- Unit cost of P is still 5$ were it should be 2.5$

Bug:
since the move unit price is 0 the standard price of the product P is
used insted for the valuation of the newly created qty

Fix:
force unit price to 0 in the case of manufacturing

opw-3374462

closes odoo/odoo#132047

X-original-commit: f6c2b5368e3abdc292e66dc04efc4031eb12f742
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-08-16 17:48:19 +02:00
Valentin Chevalier 127147bbab [FIX] sale: fix decimal precision in the catalog
A new way to add products in sale orders, through a catalog, was
introduced in commit 216fa84fbe. The precision of the price shown in the
catalog was the currency's precision, but the product price precision
should have been used.

closes odoo/odoo#132046

X-original-commit: 37b5626f58284e13ecfe113842134fe5006f5517
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Signed-off-by: Valentin Chevalier <vcr@odoo.com>
2023-08-16 17:48:14 +02:00
Samuel Degueldre 9210bbf5fb [IMP] web: improve time taken to parse owl templates
This commit removes some code that would allow one to define multiple
templates with the same name, and would cause the the last template with
a given name to override the previous one. This doesn't happen in
practice, nor should it, and the code that is used to allow it
repeatedly queries the document for a selector that is difficult to
process (selecting for elements with a specific attribute value,
especially when many elements in the document have that attribute).

A simple profile, with the crm and project apps installed, brings the
time that it takes to load the owl templates from ~200ms to ~35ms

closes odoo/odoo#132044

Signed-off-by: Francois Georis (fge) <fge@odoo.com>
2023-08-16 17:48:10 +02:00
Adrien Widart (awt) 9a5df70861 [FIX] stock_picking_batch: ensure batch consistency
When processing a batch without backorder, if a picking is not fully
done, it will be removed from the batch

To reproduce the issue:
1. Create two delivery pickings P1 et P2 with demands = 5
2. Have the quantity in the stock
3. Add both to a batch and confirm it
4. Set the done quantity on P1
5. On P2, set a done quantity to 4
6. Process the batch without backorder

Error: Both pickings are done, and so does the batch, but P2 is not
linked to that batch anymore

When processing the batch, we will call `button_validate` on the
pickings recordset
https://github.com/odoo/odoo/blob/213b74be16cecc50e6e99c00f47786a9cbf327a8/addons/stock_picking_batch/models/stock_picking_batch.py#L252-L258
Later on, there is an override of `StockPicking._action_done` in the
batch module. In this override, once we have called `super`, we then
ensure that all pickings of the batch are done, else we detach some
of them:
https://github.com/odoo/odoo/blob/213b74be16cecc50e6e99c00f47786a9cbf327a8/addons/stock_picking_batch/models/stock_picking_batch.py#L252-L258
But here is the issue: as mentionned above, we first call
`button_validate` on pickings recordset. In this method, we will
call `StockPicking._action_done` two times:
https://github.com/odoo/odoo/blob/ca168f7fbcbb8a300a8fa0b46f79a6c116b5aa93/addons/stock/models/stock_picking.py#L1088-L1089
The first time, for the pickings without the backorder option (P2 in
the above use case), and the second time, for the pickings with the
backorder option (P1 in the above use case). As a result, during the
first call, we reach the override in batch module, and of course, P1 is
not yet processed (it will be done during the second call of
`_action_done`). Therefore, we think there is an inconsistency, and we
detach P2.

OPW-3346255

closes odoo/odoo#132037

X-original-commit: c2817285adf9dd44ad7155963f08d324995ba072
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Adrien Widart (awt) <awt@odoo.com>
2023-08-16 17:48:05 +02:00
Romain Estievenart 4ae61cee22 [IMP] web *: remove unused jquery.scrollTo library
*: project, mrp_subcontracting

This commit is a code cleanup, we remove an unused lib from the codebase

The last usage of jquery.scrollTo was dropped in saas-16.4 after the
refactoring of livechat, see here [1].

Note that we have our own ´scrollTo´ utility.

References :
https://github.com/flesler/jquery.scrollTo

[1] https://github.com/odoo/odoo/commit/20c1772d351e14e5233a636313dc79c2fe5b9115#diff-8925fb7187d27cf7abc3fbb149a22cdcfa83eaa435a667b5beb042c4fd0fe3fdL220

closes odoo/odoo#132035

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2023-08-16 17:47:56 +02:00
SaddemAmine 5bd4120928 [IMP] hr_expense,project_sale_expense: Clarifying user error when partner is missing
When the partner is missing, the error message is not clear enough.
This commit adds a new error message to clarify the issue.

Task ID: 3438559

closes odoo/odoo#132029

X-original-commit: 5be853ebb6da19a4f0a147944995583e234bf1b9
Related: odoo/enterprise#45779
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Signed-off-by: Naceur Amine Saddem (sana) <sana@odoo.com>
2023-08-16 17:47:45 +02:00
Brieuc-brd 92ce339ec0 [FIX] mrp: BOM control_panel layout
This commit fixes the layout of the BOM control panel.

task-3419079
Part of task-3326263

closes odoo/odoo#132025

X-original-commit: c0fac4b7b8b66315a553337956999d8eb602ac13
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-08-16 17:47:36 +02:00
David Monnom (moda) 4295c88f94 [FIX] pos_loyalty: wrong syntax for super call
The call to super was wrong, it was called in the old way this._super().

This has now been corrected with the new method
super().`function name`()

closes odoo/odoo#132022

Signed-off-by: Adrien Guilliams (adgu) <adgu@odoo.com>
2023-08-16 17:47:31 +02:00
Tiffany Chang (tic) 33cc629001 [FIX] mrp,repair,stock{_dropshipping}: correct show_operations visible
PR #106911 added the new picking.type for repair and hide the
`show_operations` field from its form view. Unfortunately this writes
over the existing invisible attr for mrp_operation (depending on the
order of module installation, otherwise mrp will do the same to repair).
Therefore we update the attribute logic to only include the picking
types that should have the field visible (incoming, outgoing, internal,
and dropship).

closes odoo/odoo#132012

X-original-commit: 1688a8d82ce7aec32f17fc8c35295cccbb682dd6
Signed-off-by: Steve Van Essche <svs@odoo.com>
Signed-off-by: Tiffany Chang (tic) <tic@odoo.com>
2023-08-16 17:47:27 +02:00
Aungkokolin1997 8a7f221c91 [FIX] project_purchase: use model indicator in query
This commit adds alias table to be sure the `analytic_distribution`
column will not be ambiguous because another table could have the
same column name.

closes #121611
closes #110291

closes odoo/odoo#131991

X-original-commit: 253479633b32383e141fe2ca2ca7395f22651485
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-08-16 17:47:18 +02:00
niyasraphy abda470f53 [FIX] website_forum: show votes from same forum
before this commit, if the user profile is opened
from a particular forum, the votes tab is displaying
the votes from all the forums for this user.

where us, the questions and answers tab is filtering
the data based on the selected forum.

after this commit, the data displayed in the votes
tab will also be filtered based on selected forum,
similar to questions and answers tab.

closes odoo/odoo#131487

X-original-commit: ae33d2e3832cc2ce5597a6727fd44c9d745d36c5
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-08-16 17:47:13 +02:00
mehjabinfarsana 5a8f233b32 [IMP] website_slides: add _rec_name for model
before this commit, _rec_name was not added for
slide.channel.partner

after this commit, _rec_name is added

closes odoo/odoo#123800

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-08-16 17:47:07 +02:00
Julien Alardot (jual) 7e1855f5b1 [FIX] hr_expense: Fix expense unit_amount computation
This fixes a bug when you change currency on an already saved expense
due to the fact that the unit_amount is never recomputed but used to
generate the move line balance

Step to reproduce:
- Duplicate an existing expense paid by an employee
- Change currency + save
- create -> post expense report
- The total amount and remaining amount do not match

closes odoo/odoo#131709

closes odoo/odoo#131818

X-original-commit: e0bceb37ee7656c37ab99a4a4bb3b71d85199e1b
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Julien Alardot (jual) <jual@odoo.com>
2023-08-16 16:05:51 +02:00
Arjun Panchal cd5faa380e [IMP] l10n_in: COA on Tax Configurations
Before this commit
==================
COA for CGST-SGST, IGST, CESS & RC Tax was not properly set in the distribution
for refunds.

After this commit
=================
COA for CGST-SGST, IGST, CESS & RC Tax in the distribution for refunds has been
updated according to the attached spreadsheet.

task - 3284312

closes odoo/odoo#131595

X-original-commit: 6a67b7055c2c53fae2462c70cb5899f372365661
Signed-off-by: Laurent Smet (las) <las@odoo.com>
2023-08-16 16:05:40 +02:00
mehjabinfarsana 0b2133fe4a [FIX] hr_expense: remove quick_create from expense report kanban view
before this commit, on expense report kanban view
after adding group by status, it allows the
to quick create expense report in approved
status.

after this commit, quick create is disabled

closes odoo/odoo#131579

X-original-commit: 6848d8e37d1bce0cb767ba9328b38038b6056e77
Signed-off-by: Laurent Smet (las) <las@odoo.com>
2023-08-16 16:05:35 +02:00
niyasraphy 933856d669 [FIX] hr_expense: warning in log on posting expense je
before this commit, on posting journal entry from
the expense it shows a warning in the log.

*warning in the log*

Action {6: account.move(49,), 'type': 'ir.actions.act_window_close'} contains custom properties 6. Passing them via the params or context properties is recommended instead

after this commit, on posting journal entry
warning wont be displayed in the log

closes odoo/odoo#131444

X-original-commit: 00b09c548b0a01191bea20584193da6a02681a36
Signed-off-by: Laurent Smet (las) <las@odoo.com>
2023-08-16 16:05:26 +02:00
Julien (jula) a44fb24cb5 [FIX] web: check if navLink exists
__Current behavior before commit:__
If there is no link in one of the hamburger menu element,
`el.querySelector` will return `null` and an error will be thrown when
it tries to access `classList`.

__Description of the fix:__
Add a check on `itemLink` and `navLink` before accessing `classList`.

__To reproduce:__
1. Add 2 pages with long names to the website, make sure they are
included in the navbar
1. Open Website Editor
1. Click on the navbar
1. In the **CUSTOMIZE** tab, inside the **Navbar** section, change
**Mobile Menu** to `Off-Canvas`
1. Set **Mobile Menu > Off-Canvas Logo** to `Text`
1. Reduce the width of the page *just enough* so that the hamburger menu
appears instead of the navbar menus only when the web editor is on
1. Click on the hamburger menu, and remove the link of the "My Website"
text at the bottom
1. Exit the Web Editor

([Video](https://watch.screencastify.com/v/dWI3g6NnT5uRcp2KmBOO))

opw-3443200

closes odoo/odoo#131373

X-original-commit: 5b9eb3a1d016a16d395e9888ccd1606543eb99e2
Signed-off-by: Luca Vitali (luvi) <luvi@odoo.com>
2023-08-16 16:05:22 +02:00