Commit Graph
161674 Commits
Author SHA1 Message Date
Touati Djamel (otd) 432f7d4e9d [FIX] mrp: allow overviewing of bom with decimal quantity
Steps to reproduce the bug:
- Create a storable product with BoM:
    - add any product as component
    - save
    - Click on the BoM overview widget
    - Change the quantity of a BOM with a number that has a decimal
        value.

Problem:
The quantity is converted to an integer because this input does not
accept a decimal value.

opw-3288403

closes odoo/odoo#123024

X-original-commit: de5087df501bffdaa14ca6a8b7a19da802f4e016
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-06-01 09:14:00 +02:00
Archana Vaghasiya e10111594e [FIX] service: prevent traceback when field value is none
When the value of fields is getting None. And no value is assigned to the
`field`. So the traceback will be generated.

In this commit, we will assign a default value to the field if the field gets a
None value. So that it won't get a None value in any case.

sentry-4211843089

closes odoo/odoo#123193

X-original-commit: 3e652808305d3ef4674963195f3c7cdf91b37654
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
Signed-off-by: Archana Vaghasiya (arva) <arva@odoo.com>
2023-06-01 07:01:57 +02:00
Habib (ayh) 837c20371b [FIX] l10n_za: tax report missing 15A
The missing 15A tax report line was added in odoo/odoo#90369 but it was not included in the VAT Payable/ Refundable Total line.
With this commit, we add codes to TotalA and TotalB and modify the final total to use these codes instead.

Bug report directly to me

closes odoo/odoo#123190

X-original-commit: d813d807c6454dd6cd0b613e9df386eb0ddfd619
Signed-off-by: John Laterre (jol) <jol@odoo.com>
Signed-off-by: Ayob Habib (ayh) <ayh@odoo.com>
2023-05-31 23:05:40 +02:00
Benjamin Vray 26400fd523 [IMP] website: aligns contact footer columns to the top
Before this commit, the columns in the "contact" footer template were
aligned at the bottom, which looked bad and served no purpose.

This commit aligns the columns towards the top, like the other footer
templates.

Steps to reproduce the bug:

- Choose the "contact" footer for the homepage of a website.
- Add multiple lines in one of the columns of the footer.
- The columns are aligned at the bottom, and it looks quite ugly.

task-3321445
task-3241256

closes odoo/odoo#122274

Signed-off-by: Outagant Mehdi (mou) <mou@odoo.com>
2023-05-31 18:36:45 +02:00
Ivàn Todorovich 92b0a67dd8 [IMP] hr_holidays: perf improvement
Previously, a performance improvement landed on 5a2efd2.
It totally makes sense, but there's a corner case that's actually hurt by that
commit: there are cases where the heavy computation of employee_quantity_available
is simply not used by the following loop.

This commit solves it.

It also improves the readability of the code by unpacking and properly naming
some variables.

closes odoo/odoo#123122

X-original-commit: 902305908780336050a0d5b778727a6c06c7a2fd
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-05-31 17:26:24 +02:00
Alexandre Kühn 75dd284ab1 [FIX] mail: attachment button in chatter mobile should not wrap
Before this commit, the attachment button had icon and label on
different lines in mobile, which made the chatter topbar bigger
in height than it should.

closes odoo/odoo#123098

X-original-commit: 1afe20789fcf197ccc0a240d39d57d10e1f1454a
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-05-31 17:26:22 +02:00
Aaron Bohy 0fdff8200e [FIX] web: tests: fix tests failing locally
The adapted tests passed on runbot but failed (at least) on chrome
113.

closes odoo/odoo#123097

X-original-commit: ac1a158b5f6c04f94573a2fb6c7c94d9506e39aa
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-05-31 17:26:19 +02:00
tsm-odoo e86c1ce94a [FIX] website: hide backend chat windows from website preview
Before [1], chat windows were not shown on the website preview.
Showing them was not intended and those chat windows overlap
with the one of the livechat.

This PR restores the previous behavior by preventing chat
windows to be shown on the website.

[1]: odoo#110188

closes odoo/odoo#123096

X-original-commit: 3e74f5c1f4ea045725edcd945276e524529ffd97
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Stockbauer Matthieu (tsm) <tsm@odoo.com>
2023-05-31 17:26:16 +02:00
Brieuc-brd 40dea12b02 [FIX] mail: remove unnecessary css in chatter
This commit removes the css that was creating two layout issues :
[1] When the chatter was rendered under the form view with the
`isInFormSheetBg` class, it added an unwanted background and border.

[2] When an attachment was uploaded and created a preview (eg. in
approvals), it created an unwanted border.

This commit fixes these issues.

task-3334866
Part of task-3326263

closes odoo/odoo#123095

X-original-commit: 5171b0bb2054f4755d0ba70b6820806c5253774d
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-05-31 17:26:14 +02:00
Yolann Sabaux db68392f77 [FIX] account: enforce contraint on required field for cash rounding
Steps to reproduce:
- install l10n_be (company B)
- stay on Company A and create a cash rounding
- Go to Company B and create an invoice
- In Other Infos > Cash Rouding Method, set it to the earlier created one
- Save

Issue:
You won't be able to save. But the message is too generic to know what is the cause of it
"Missing required account on accountable invoice line."

Cause:
The field `profit_account_id` is company_dependent. Therefore, the same cash rounding record will be accessible in both companies but in Company B the `profit_account_id` won't be set.
When Saving, we compute a cash difference (rounding) and try to create a new line for it. But since there is no account set, the sql constraint will be raised.

Solution:
The less dirty solution is to have an onchange that check that whenever we want to set a cash rounding method, it has all the required fields set

opw-3185950

closes odoo/odoo#123072

X-original-commit: e0df7cafefa3c2956105bd35c5bedc0c5bcdffaa
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Yolann Sabaux (yosa) <yosa@odoo.com>
2023-05-31 17:26:11 +02:00
Loukas Wets (lowe) 7cbe85756f [FIX] pos_loyalty: fix call of formatCurrency method
This fix is a followup to the changes made in 5d951d9
where `format_currency` is replaced with `formatCurrency` which is based
on a more standard way offormatting monetary values.

closes odoo/odoo#122420

X-original-commit: b56a5d1
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Heinz Robin (rhe) <rhe@odoo.com>
2023-05-31 17:26:08 +02:00
Adrien Widart (awt) b7c40e24b1 [FIX] stock: clean quants after moving package
When moving a package, the quant at source location is not
automatically removed

To reproduce the issue:
1. In Settings, enable
   - Packages
   - Storage Locations
2. Create a storable product P
3. Update the on hand quantity
   - 1 x P at WH/Stock in package PK
4. Create a planned delivery D with 1 x P
5. Confirm and reserve D
   - PK should be reserved
6. Validate
7. Open the package
   - Its location is "Partner Locations/Customers", which make sense
8. Inventory > Configuration > ... > Locations, open WH/Stock
9. Current Stock

Error: There is a line with PK. The quantity is 0 but still, it
create some confusion for the user who could believe that the package
is still in WH/Stock

This issue does not occur if the user goes through the product form
and click on the on hand quantity. The "incorrect" quant will not be
there. This is because, when loading the action, we call
`_quant_tasks`:
https://github.com/odoo/odoo/blob/05a7f5c04804423cfc3a833a1b3f0b5eec3fc147/addons/stock/models/stock_quant.py#L296-L300
This method will clean the quants (merge & unlink)

However, in the above case (step 9), the action is defined on XML side:
https://github.com/odoo/odoo/blob/7d4dfeb0e26b387dee312897264a68963f90267f/addons/stock/views/stock_location_views.xml#L24-L26
https://github.com/odoo/odoo/blob/d956e719d43c68abe6210e3136db576aaa6f60b8/addons/stock/views/stock_quant_views.xml#L190-L196
So, we can't make it behave as it does from the product form,
unfortunatly.

As alternative, we can try to call `_unlink_zero_quants` when we are
moving a package (and not `_quant_tasks` for perf matters as, so far,
we will not have any quant to merge)

OPW-3292238

closes odoo/odoo#123071

X-original-commit: 30cbfdc79e54a7e7a260051da321837cd224792c
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Adrien Widart (awt) <awt@odoo.com>
2023-05-31 15:54:26 +02:00
Alexandre Kühn f6f3b56461 [FIX] mail: emoji picker select category works in Firefox
Before this commit, when clicking on a category in emoji picker
when using Firefox, sometimes the previous category was selected.

This come from Firefox selecting the previous sticky section with
`getBoundingRect()` and `elementFromPoint` on grid top coordinate.

This commit fixes the issue by rounding to the integer, so that
the previous hidden and sticky section is not selected in Firefox.

closes odoo/odoo#123068

X-original-commit: ecae83ef9bd93a55e296023bc8c735f04d5e73f8
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-05-31 15:54:21 +02:00
Brieuc-brd 8b15ce6652 [FIX] board: remove duplicate viewbox of svg icon
Prior to this commit, the svg icon of `board` had duplicate `viewBox`
that breaks the svg.

This commit fixes this issue.

task-3343278
Part of task-3326263

closes odoo/odoo#123067

X-original-commit: 48c8c6b32951e6393e41f2705dbdd9020dae971b
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-05-31 15:54:15 +02:00
Alexandre Kühn 953498de76 [FIX] mail: reintroduce notif + chat window on new user connection
A recent refactoring of discuss app unintentionally removed the
feature to automatically notify and open chat window with new user
when they log in for the 1st time.

closes odoo/odoo#123044

X-original-commit: 9132dacbf9b4b9d000b6d0be23938b46db1035a1
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-05-31 15:54:13 +02:00
mky-odoo 905f811c74 [FIX] account: prevent traceback while remove currency and company
Expected singleton: res.currency() when currency not provided
also when remove company in invoice.

Steps to Produce:-
- While go to invoice and click on `REGISTER PAYMENT`
- Remove currency from wizard

Traceback will be generated.

Applying this changes will resolve this issue.

sentry - 4149615534

closes odoo/odoo#123031

X-original-commit: 3e2bbb3c6d84688ab628a7559f1f5329d2172339
Signed-off-by: William André (wan) <wan@odoo.com>
2023-05-31 15:54:10 +02:00
Olivier Dony cea9150fb7 [FIX] http: make session lifetime consistent and configurable
Before 16.0 and https://github.com/odoo/odoo/pull/78857 the session
cookie duration was set to 3 months, but the server-side garbage
collection of inactive session was reaping them after 7 days of
inactivity. The cookie lifetime was essentially superseded by the
server-side GC.

After https://github.com/odoo/odoo/pull/78857 these limits were made
consistent with each other, but the lifetime value was kept at 3 months,
which is a bit too long as a default.

This commit changes the default SESSION_LIFETIME back to 7 days for both
limits.

In addition, since the server-side GC is now implemented by a
database-specific cron job, this commit introduces an optional system
parameter `sessions.max_inactivity_seconds` that can be set to override
the default server-side GC threshold, to make it shorter.

Note 1: the ICP does not modify the cookie lifetime which will remain set
to the default 7 days. This means normal browser sessions won't stay
alive for longer than 7 days of inactivity. So `sessions.max_inactivity_seconds`
can't be effectively set to a longer expiration time.
This seems like a reasonably safe default.

Note 2: the session GC happens during the execution of the autovacuum
cron job ("Base: Auto-vacuum internal data") which is scheduled once per
day by default. When setting a small `sessions.max_inactivity_seconds`
value, it may be necessary to increase the frequency of that cron job
accordingly.

closes odoo/odoo#122964

X-original-commit: 05ff9a2db32c2fb1afa107ac005423218f452290
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
2023-05-31 15:54:05 +02:00
Rahul Prajapati 2bd074e26c [FIX] base: error handling of server actions
Currently when a server action causes an error it raises an Exception
which will be caught by sentry and causes unnecessary traffic.

So, we stop catching exceptoins from server actions which are supposed
to be generated by User's Mistakes.

sentry-4169384356

closes odoo/odoo#121707

Signed-off-by: Adrien Widart (awt) <awt@odoo.com>
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2023-05-31 15:54:02 +02:00
Dossogne Bertrand 3b78f6ae9b [IMP] hr_skills: make resume lines translatable
Before this commit, the name and description of resume lines
were not translatable.

task-3323624

closes odoo/odoo#121166

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-05-31 15:53:59 +02:00
dasz c68e4606f8 [IMP] hr,hr_presence,hr_attendance,hr_holidays: move presence computation to employee_base
Employee presence is not a sensitive data and should be available for all db users
this commit moves the computations from attendance, holidays and hr_presence to the
employee_base model, which is how it was originaly made in the hr module. This way
the presence marker does not depend on the user's hr rights

closes odoo/odoo#118437

Task: 3267790
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-05-31 15:53:54 +02:00
Sébastien Theys a3260cfcd7 [FIX] mail: apply multi-company when feching systray activities
A raw query is not necessary to produce the desired result, found
activities need to be kept only if the corresponding record can be found
with standard search (which includes multi-company check).

Part of task-3266643

closes odoo/odoo#123070

X-original-commit: 9dd7ae942aebe2cfd3e2dcd52e10b3bff5c8e0a9
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-05-31 14:23:48 +02:00
Alexandre Kühn 85c84207cc [FIX] mail: no focus locking in composer on Safari
Before this commit, when a discuss composer is open on Safari,
the focus was locked inside the composer. Click away did not
resolve it.

This most certainly happens because changing `selectionStart`
and `selectionEnd` on an input in Safari puts the focus on the
input.

This commit fixes the issue by not changing the current selection
of input just before backing up.

Related to https://github.com/odoo/odoo/commit/4efb465f6adcf8e4f9c6d4daa0b6f90079832af5

closes odoo/odoo#123069

X-original-commit: 71c745ea81baeb02bf217f37bf9a4c64e435da05
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-05-31 14:23:45 +02:00
Joseph Caburnay 787223c4e7 [FIX] point_of_sale: random runbot error (20517)
When performing the picking action in the context of savepoint, the env
inside the action can randomly change causing an AccessError which is
caught as UserError (in the current point_of_sale code). Flushing before
calling a method in a savepoint will deterministically avoid this issue.

Note that the weakset used to store environments was modified in #121604
to avoid this kind of issue.

When using a cr.savepoint, the transaction must be flushed but in we
don't have any reference to the env that should be used on the cursor,
meaning that the env is chosen in the list of existing env. This choice
is random because Transaction.envs is using a Weakset.

In some case, the chosen env does not have the correct access right
because the context allowed_company_ids is corresponding to a company
coming from another test, leading to an access error, hidden by the try
except.
Flushing the environment before creating the savepoint will help to
prevent this issue by flushing on a well defined environment.

Note that the weakset used to store environments was modified in #121604
(master)

closes odoo/odoo#123048

X-original-commit: c7c268ed50c1f6fd6eebe7d8a01abdb9d4a32573
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2023-05-31 14:23:42 +02:00
Walid 2714a25621 [FIX] stock: dropshiping delivery slip in client's language
Steps to reprodue:
- Create a dropshipped product
- Sell the product to a client with a different language set
- Print the delivery slip

Bug:
delivery slip is currently being printed in the vendor's language

Fix:
Print the delivery slip in the client language when possible

opw-3193015

closes odoo/odoo#123047

X-original-commit: 0ad04a80b1f99feda2fdefbf24cbc3c494110a8d
Signed-off-by: Adrien Widart (awt) <awt@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-05-31 14:23:40 +02:00
Paul Morelle c01b4a9f3c [FIX] board: avoid double-escaping in domain
This reverts commit bfadb8e491fe2acda63a79f9577eaaec8a1c8d9c.

Since that commit, the domain may be double-encoded in the database if
the user reorganizes the layout of his dashboard: once by the JavaScript
code, and once by the serialization of the innerHTML property.

However, there is no need to have it double-encoded, and some tools such
as the upgrade scripts will fail upgrading the domain.

With this commit, we are serializing the document to XML instead of HTML
and therefore the produced output is valid XML that will be correctly
interpreted by all the tools.

However, double-encoded domains might still be present in existing
databases, so we also need to take this into account when reading the
domain.

OPW-3130117

closes odoo/odoo#123045

X-original-commit: dd8f2640a281b86b73d3b296dd0a5aec7664eb4f
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Christophe Simonis (chs) <chs@odoo.com>
Signed-off-by: Paul Morelle (pmo) <pmo@odoo.com>
2023-05-31 14:23:37 +02:00
Thomas Lefebvre (thle) 41cc810d6b [FIX] hr_holidays: public holidays affect other companies
Issue:
------
In a multi-company context, the creation of a public holiday
in one company will affect leaves in other companies.
We cancel leaves that have the same time slot as the
public holiday, regardless of the company.

Solution:
---------
Take account of the company in which
the public holiday is created and compare
it with the company of the employee who has leave.

opw-3339973

closes odoo/odoo#123040

X-original-commit: 2d2d3388df7ffe0243d13d5b922b5ba6776a434d
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-05-31 14:23:34 +02:00
paso-odoo 90c9173370 [FIX] mrp: handle keyError when workorder(s) deleted
If applied, this commit will solve the issue of keyError when we confirm the
manufacturing order and work order (s) are deleted.

Steps to produce:
- Configure BOM with 'Operations'.
- Set operations in the 'Consumed in Operation' field which is in 'Components'.
- Create MO using that BOM.
- Delete the work order(s) from MO.
- Click on the 'Confirm' button.

Fix this issue when the work order is not available for that operation,
setting False in stock.move record(s).

sentry - 4171798106

closes odoo/odoo#123033

X-original-commit: 36e02b91e88c5e014d132643b6ffb24a71342d6c
Signed-off-by: Parth Solanki (paso) <paso@odoo.com>
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-05-31 14:23:32 +02:00
Benjamin Vray 3a2288dc28 [FIX] web_editor: fix image cropping not working
Since this commit [1], the image cropping feature is no longer
functioning properly. The modification of the "activateCropper" function
code to remove the use of underscore has resulted in a change in the
"data" parameter value passed to the cropper compared to before. This
alteration is the cause of the issue.

Steps to reproduce the bugs:

- Open the homepage in Website edit mode.
- Drag and drop a text-image snippet onto the page.
- Click on the image in the text-image snippet.
- Click on the "Crop Image" button in the image options.
- Change the aspect ratio of the image by clicking on the "4:3" button.
- Click on the "Apply" button to apply the changes.
- Bug: The changes are not being applied.

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

task-3339518

closes odoo/odoo#122996

X-original-commit: d42070b6abe5ca65d43ae4f2426619684c7aec4d
Signed-off-by: Colin Louis (loco) <loco@odoo.com>
2023-05-31 14:23:29 +02:00
David Monnom (moda) 3db548c76f [IMP] point_of_sale,pos_restaurant: add bus_service
Before a longpolling every 5 seconds was set up to sync the number of
orders per table in the pos_restaurant, which was not very
userfriendly / efficient.

Now, the longpolling has been replaced by a bus (websocket). As soon as
an order is sent to the server by another PoS, the server dispatches the
information to all other PoS using the corresponding floor plan.

The bus_service was initialized in the pos_store of the point_of_sale,
but is now used only in the pos_restaurant via override.
This was done for obvious future use.

closes odoo/odoo#121875

Signed-off-by: Heinz Robin (rhe) <rhe@odoo.com>
2023-05-31 14:23:24 +02:00
Xavier ALT 1c3ba9c3f6 [FIX] mail_group: fix error when browsing mailing lists
To reproduce (on runbot):

- Go to /groups url
- click on "Public Mailing List"

This fix `AttributeError: 'PortalMailGroup' object has no attribute 'env'`
(introduced by odoo/odoo@b60cf1f977)

closes odoo/odoo#123032

X-original-commit: 2bd4a907a0db07ee8bb7f4ffa3017f20c25f79d4
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Xavier Alt (xal) <xal@odoo.com>
2023-05-31 13:08:34 +02:00
Alexandre Kühn 9c33452387 [FIX] mail: yellow bubble when there's a mention of self
closes odoo/odoo#123029

X-original-commit: c3f68f3a1d9b0245586bc7f6acece3b9a98bbf91
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-05-31 13:08:32 +02:00
Xavier Luyckx (xlu) 8762d7c535 [FIX] hr_gamification: missing margin below badge button, adapt milk
Before this commit, when viewing the received badges tab in an employee's
profile, there was a lack of spacing below the "Grant a badge" button.

This commit resolves the issue by introducing proper spacing between
the button and the displayed badges.

task-3329971
part of task-3326263

closes odoo/odoo#123028

X-original-commit: cace0db0aad57ee09edb1a41763b0a43aa1e46ff
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-05-31 13:08:29 +02:00
Julien Carion (juca)andVincent Larcin 52b483e6f8 [FIX] project,web: fix readonly in list view cells
This commit changes how automatic readonly props are applied to list
fields so that it doesn't override the getFieldProps method

It also fixes the method 'getCellReadonly' in ProjectTaskListRenderer,
which was renamed to 'isCellReadonly' in the framework but not in the custom renderer.

Task-3340379

closes odoo/odoo#123026

X-original-commit: da3b2421b3f851629d5d287223b7ef581a30a5ab
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Signed-off-by: Larcin Vincent (vila) <vila@odoo.com>
Co-authored-by: Vincent Larcin <vila@odoo.com>
2023-05-31 13:08:26 +02:00
Romain Estievenart 91af1abbd5 [FIX] web: searchbar in listview takes focus after unselected all items
Steps to reproduce:

1. Open the "project" app
2. Switch to the list view
3. Select "All items"
4. Unselect "All items"
5. The focus searchbar is now focused => bug

The searchbar is autofocused (each time it enters into the dom). Unlike
before, in lists, it is removed when there are selected records, and
comes back when there's no selection anymore. As a consequence, it takes
back the focus. It should only take the focus on a first load, not every
time the searchbar re-appears

Task ID: 3336233

closes odoo/odoo#123025

X-original-commit: 15aacceb401a6868b694870693e7679677be80a0
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-05-31 13:08:24 +02:00
Xavier Luyckx (xlu) 48ec76d24e [FIX] hr_holidays: remove border-radius from alerts in discuss
Before this commit, due to milk changes, when a user was out of the
office, an alert box with a border-radius was displayed at the top of
the chat. This border-radius needed to be removed.

This commit effectively resolves this issue.

task-3337778
part of task-3326263

closes odoo/odoo#123023

X-original-commit: 41685396c75aa7902e480629b91143381cca8bd1
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2023-05-31 13:08:21 +02:00
tsm-odoo 7139a0db35 [REF] website_livechat: prettify tour files
This commit prepares the ground for the refactoring of the
public livechat by prettifying the files that will be modified
in order to ease the diff.

part of task-2212347

closes odoo/odoo#123022

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-05-31 13:08:19 +02:00
Antoine Dupuis (andu) 9f9a0ee7dd [FIX] l10n_it: Remove accounts 71 and 72 from the CoA.
Since the coming into force on 01/01/2016 of Legislative Decree 139/2015
implementing EU Directive 2013/34/EU, extraordinary gains and losses
should no longer be accounted separately on the P&L statement.

See this article https://www.fisco7.it/2017/02/come-ricollocare-nel-conto-economico-gli-abrogati-oneri-e-proventi-straordinari/

There is therefore no point in having special accounts for
extraordinary gains and losses.

So we are removing accounts 71 and 72, both from the CoA and from the
Profit and Loss accounts.

Since they should no longer be used since 2016, this should not have any
impact for existing users.

closes odoo/odoo#122990

X-original-commit: 19cd212f762afdc906aa9f41793cc5c1fa9ea828
Related: odoo/enterprise#41687
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: Antoine Dupuis (andu) <andu@odoo.com>
2023-05-31 13:08:16 +02:00
Louis Wicket (wil) 8f65738646 [I18N] l10n_it_edit: update translations
closes odoo/odoo#122965

X-original-commit: 614a2d3136beb1bf8fab945fdbafb75090984ac5
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
2023-05-31 13:08:11 +02:00
Ahmad Khanalizadeh 3d21e61e4b [FIX] delivery: exclude service lines from commodities
Steps to reproduce:
configure easypost for international shipping (e.g. using USPS)
Make a sale order for a customer in another country
Add a discount program (e.g. 10% off)
Attempt to add shipping and get the rates
Get traceback:
`Easypost returned an error: Wrong parameter type.
- value: must be greater than or equal to 0`

To fix this we need to exclude service type products when creating
commodities from order lines (similar to creating commodities from
stock move lines)

opw-3269467

closes odoo/odoo#122869

X-original-commit: c4904454d46036374ea5e9ae7047f1546e9cab44
Signed-off-by: Tiffany Chang <tic@odoo.com>
Signed-off-by: Khanalizadeh Ahmad (khah) <khah@odoo.com>
2023-05-31 13:08:06 +02:00
utag-odoo a5b8bb3bc3 [IMP] hr_holidays: add placeholder in the responsible field of the timeoff type
In this commit we have added "Nobody will be notified" placeholder in
responsible of the leave type model.

task-3334478

closes odoo/odoo#122452

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-05-31 13:08:03 +02:00
Viktors Lipskis (vili) df69ff4bbb [IMP] web: enable JS tooling for sign
This commit enables JS tooling inside the sign module, with the exception of
legacy code.

task-3338273

closes odoo/odoo#122304

Related: odoo/enterprise#41421
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-05-31 13:08:00 +02:00
Jurgen (jugj) 3eb0a2c73f [IMP] hr_work_entry: Show conflicting work entries by default
task - 2901988

closes odoo/odoo#120662

Related: odoo/enterprise#40879
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-05-31 13:07:52 +02:00
dasz 21aca47046 [IMP] hr_contract: add ordering option to structure types
added sequence + handle for tree view and updated compute
to select company's country's structure type first.

task 3279050

closes odoo/odoo#119810

Related: odoo/enterprise#41190
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-05-31 13:07:46 +02:00
Kevin Baptiste 1b707c8e14 [FIX] hr_holidays: freeze date on tour
Use freeze_time to ensure the tour runs on a date where the employee is
supposed to work.

Fixes runbot build error: 21683

closes odoo/odoo#123010

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-05-31 11:45:04 +02:00
Xavier Luyckx (xlu) ad692e77c0 [FIX] mail: chatter, planned activities badge spacing
Prior to this commit, in the "Chatter", when a user planned an activity,
a new section appeared at the top of the chatter displaying the planned
activities. Users had the ability to collapse this section. When the
section was collapsed, a title and a badge were displayed next to it,
indicating the number of activities.

However, since milk, it was observed that the badge was positioned too
close to the title, requiring some spacing adjustments. Additionally,
the badge has been updated to adhere to milk by adopting a rounded-pill
shape.

task-3339256
part of task-3326263

closes odoo/odoo#122945

X-original-commit: fab1f6242cc0d8984a5f36876dcbf4150c340d8d
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-05-31 11:45:01 +02:00
divy-odoo 21f5d1c678 [FIX] website_blog: fix size options values when blog regular cover
Before this commit, the widget value was updated (based on the current
state) prior to updating the snippet UI. As a result, the widget value
reflected used the non-updated UI labels.

task-3112890

closes odoo/odoo#122810

X-original-commit: edc88a2ab99673427cbeac05246b8e586b121b72
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Divyesh Vyas (divy) <divy@odoo.com>
2023-05-31 11:44:58 +02:00
Andro Gvivradze b69fa1b064 [IMP] event[_booth]_sale: add ticket and booth in sale order template
This commit allows us to add the events on sales order templates, and then
configure them in the sales order quotations. Users will get an error when
trying to confirm a quotation if events are not configured, and they will
be able to configure said events by clicking on them.

Task-2988003

closes odoo/odoo#116974

Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2023-05-31 11:44:55 +02:00
Antoine Dupuis (andu) 6179727d5c [FIX] account: automatic entry wizard: avoid clashes with lock dates
Currently, if you use the automatic entry wizard to change the period of
a journal item dated prior to the lock date, you'll just get blocked
with a UserError, with no workaround.

This commit changes the date of the adjustment entry to be the first end
of month after the lock date. As a result, the adjustment entry can be
created.

Based on PR #92439

closes odoo/odoo#122997

Taskid: 2823170
X-original-commit: fdeaff0a879bdf1242ed0a8d85e3e0363dd3276b
Signed-off-by: Antoine Dupuis (andu) <andu@odoo.com>
Signed-off-by: William André (wan) <wan@odoo.com>
2023-05-31 10:32:14 +02:00
Antoine Dupuis (andu) 3469537d51 [REF] account: Vendor Bills: Refactor the lock date message
At the moment, the lock date message is generated in
_compute_tax_lock_date_message. We delegate it to a separate function
in order to use this message elsewhere as well.

Note: this refactor introduces minor changes in behaviour:
- we remove the second part of the lock date message (that mentions
  other lock dates than the most blocking one), because it is too much
  information.

- we calculate the new accounting date from the existing accounting date
  rather than from the existing invoice date. This should not change
  anything in practice, since the new accounting date will be the last
  day of the period after the lock date.

task-2823170

X-original-commit: aeb6707dfc0f4aa093d7687bbb0e488558d2a99f
Part-of: odoo/odoo#122997
2023-05-31 10:32:13 +02:00
Guillaume (guva) 83df770d0a [FIX] account: move date on reversed exchange move
Before this commit, the reversal of a passed exchange
move was not created on the correct date:

- If sequence is reset by month, the reversal should
  be created at the end of the month of the exchange
  move, and if sequence is reset by year, at the end
  of the year.

Steps:

- With a foreign currency X activated and two different
  rates few months in the past.
- Create and confirm an invoice with currency X at the
  date of the first rate.
- Register a payment at the date of the second rate
  (an exchange move is created).
- Unreconcile the payment from the invoice.
-> A reversal of the exchange move is created, but the
   date is wrong (set to today's date).

opw-2856385

closes odoo/odoo#122981

X-original-commit: 130832942d4bd40e0c11676b030db6fb794bfbdb
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
Signed-off-by: Guillaume Vanleynseele (guva) <guva@odoo.com>
2023-05-31 10:32:08 +02:00