Commit Graph
163941 Commits
Author SHA1 Message Date
Maximilien (malb) 16488e5603 [IMP] l10n_sk,l10n_cz: invoice layout legal imp
before this PR, some legal information were missing from our invoice layout,
for the l10n_cz and l10n_sk localization.

For l10n_cz:
- On move we add a taxable supply date
- On the company we add a trade registry field
- On report template we add the company_registry, the vat number

For l10n_sk:
- On move we add a taxable supply date
- On the company we add a trade registry field and income tax id
- On report template we add the company_registry, the vat number and income tax
id

closes odoo/odoo#126837

Task: 3374969
Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
2023-08-08 22:41:00 +02:00
hapa-odoo 1b512efdac [IMP] holiday: improve UX holiday timeoff
-Display the state of a time off that you open from the dashboard
-Rename Stress Days into "Mandatory Days"
-My Allocations 
    Remove "Employee" from the Group By
    Replace filter `Current Year` with `Currently Valid`.
-My Time Off
    -Remove Employees from list view and kanban view
-Create an allocation / allocation request form
  - Create an allocation ux : employee side- compute the name of the allocation.
  - Make field `allocation_type` invisible if there is no active accrual plan in the database.
-Accruals
  -Add an "archive" in the action menu of the accrual plan.
  -Show Employee button in the form view of the Accrual Plan. 
-Renamed stress day into the mandatory days.
-Renamed string of the menu Approval into the Management.
-Remove two legends in the time-off Dashboard
  - Public Holiday
  - Mandatory Day

task-3084232

closes odoo/odoo#116472

Related: odoo/enterprise#40576
Related: odoo/upgrade#4472
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
2023-08-08 21:09:51 +02:00
Victor Feyens d98c0af075 [FIX] sale_product_configurator: non configurable no_variant attributes
If a given template T has two attributes lines:
* standard attribute (instant creation): one value
* no_variant attribute (never create a variant for it): one value

It will have one automatically generated variant V, which will be automatically
selected on the sale order line if you chose the template T.

If optional product(s) are added on the template T, the configurator will
open to choose the optional products.

But in this situation, the main product was shown as "Option not available"
on the configurator.  This is wrong since there is the valid variant V that we
can use.

This is caused by a behavioral change in 16.0, we saved the variant V directly
on the sale order line, before opening the configurator.  Previously, the values
were applied to the line after the configurator was closed (if there were optional
products).

As the values were applied before the call to `_openProductConfigurator`,
the product.template.attribute.value of V (the standard one, not the no_variant)
is given to the wizard opening, disabling the automatic fallback that previously
gave the two expected ptav's (the standard AND the no_variant one), leading to
an incomplete combination, which was considered invalid.

This commit restores the previous behavior, by setting the product on the line
only if there is no optional products. If there are, everything will be
correctly managed when the configurator is closed.

opw-3355216

closes odoo/odoo#131147

X-original-commit: 902c7112c75841ede560c51d54e12e9cf809ee8c
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-08-08 20:07:26 +02:00
Victor Feyens 58b90963ba [FIX] sale_product_configurator: do not show unavailable values
Values removed from the product should be hidden instead of being shown
as forbidden values.

opw-3434706

closes odoo/odoo#131145

X-original-commit: 9a581c46dca46ad44957cf1a47748f0c56ad07ca
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-08-08 20:07:22 +02:00
niyasraphy be20951c05 [FIX] base: traceback on rpc call if data contain default dict
before this commit, on reading data with default dict data
type is showing error to end user, without returning the
requested data.

for eg, if a read operation is triggered on model sale.order
it wont return the requested data, instead traceback is
shown in response.

in sale.order model the tax_totals field is a computed
field, with data as format default dict which was
causing the issue.

after this commit, without any traceback the requested
data will be returned to the user.

closes odoo/odoo#131123

X-original-commit: cc61b926f4daff26fb577e2f700d013ec15f4b4f
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
2023-08-08 20:07:18 +02:00
David Monnom (moda) 01b3a2e4c2 [REF] point_of_sale, pos_*: only use export_for_ui for serializing
*:pos_hr,pos_hr_restaurant,pos_loyalty,pos_restaurant

Before when serializing a pos.order from the server, we are using
several methods for different use cases.

- table syncing: get_table_draft_orders
- order sharing: get_draft_share_order_ids
- ticket screen: export_for_ui

All of these methods had their own logic.

Now, to improve the maintainability of point_of_sale, order
serialization is only performed via export_for_ui.

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

closes odoo/odoo#130695

Taskid: 3449870
Related: odoo/enterprise#45151
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-08-08 18:40:52 +02:00
niyasraphy 1b8351038d [FIX] base_setup: enable auto install
before this commit, on creating a new db, the general
settings menu is not accessible for end users without
installing any app.

for eg, if user need to activate the developer mode,
no option without installing an app.

after this commit, on a fresh db base_setup module
will automatically installed on creating a new db,
and general settings menu will be accessible.

closes odoo/odoo#129298

Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
2023-08-08 18:40:45 +02:00
Merel Geens (mege) 4b3f6a3241 [IMP] base: insert dummy SMTP server
The current neutralization implementation for ir_mail_server deactivates
existing servers. This can still result in mails being sent if an SMTP
server was specified on the command-line. To prevent that from happening
a dummy SMTP server is defined that doesn't resolve to anything.

I've opted to use the "invalid" domain for this purpose:
https://www.rfc-editor.org/rfc/rfc6761#section-6.4 .

closes odoo/odoo#131138

X-original-commit: 4ceed406ead570b00e6e8973e55866bee4c84de8
Signed-off-by: Merel Geens <mege@odoo.com>
2023-08-08 13:08:20 +02:00
duybq86 a6049398e3 [CLA] signature for DuyBQ
closes odoo/odoo#131115

X-original-commit: 0a1d7d71388ce760196875008333f7a7f7e4f083
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-08-08 13:08:16 +02:00
Adrien Widart (awt) 6a8d33c37a [FIX] account,base: remove sentry flags
These flags should not be part of Odoo codebase. They have been
implemented internally.

closes odoo/odoo#130947

X-original-commit: 182e4475cef2f6d160381d58726f452169b738e3
Signed-off-by: Vranckx Florian (flvr) <flvr@odoo.com>
Signed-off-by: Adrien Widart (awt) <awt@odoo.com>
2023-08-08 11:09:24 +02:00
Joseph Caburnay e628b6507f [FIX] pos_{online_payment_}self_order: price based on company taxes
**Steps to reproduce:**

- Install pos_self_order.
- Create a product with a price of any price, say 100.
- Assign a tax of 10% to the product.
- Create a new company and switch to it.
- With the same product, add a new tax, say 20%.
- Go back to the original company.
- Open a bar (restaurant pos.config) that allows self order which also loads the
  product.
- Open self order page and add the product.
- [BUG] The product's price is not only 10%-taxed, but also 20%-taxed.

**Explanation and fix**

The issue is caused by use of sudo almost everywhere in the context of
pos_self_order. This commit removes/reduces this use of sudo in many places and
contextualize the records involved in the calculation such as pos.config,
product.product, etc. to be the ones of the company and the user who opened the
current pos.session.

After this changes, only the taxes that belong to the company of the pos.config
record are used in the price and tax calculations.

closes odoo/odoo#131140

X-original-commit: 7ce7f3e21ad8f457742e27f88b7146c7d8fff5f3
Signed-off-by: David Monnom (moda) <moda@odoo.com>
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-08-08 08:56:25 +02:00
Anh Thao Pham (pta) 4a38bf2927 [FIX] analytic: limit width of analytic tag to 200px
Steps to reproduce:
- Activate "Analytic Accounting" in Accounting settings
- Go to Accounting / Configuration / Analytic Accounting / Analytic Accounts
- Create an Analytic Account with a very long name (i.e. +100 chars)
- Go to Expenses
- Create an Expense with the created Analytic Account in the Analytic field
The display of the labels in the form view should break because the badge is too
long and is taking all the available width.

Solution:
Limit the width of tag badges in "analytic_distribution" widget as it is done in "many2many_tags" widget.
https://github.com/odoo/odoo/blob/2f47df6663b65c4f6b6ec61f956c453e97563462/addons/web/static/src/views/fields/many2many_tags/many2many_tags_field.scss#L47-L49

opw-3322688

closes odoo/odoo#131136

X-original-commit: 32fc4d44446a15b215c3f61cb2b35fa6f4ecb95b
Signed-off-by: John Laterre (jol) <jol@odoo.com>
Signed-off-by: Anh Thao Pham (pta) <pta@odoo.com>
2023-08-08 08:56:22 +02:00
Laurent Smet c8b5fdbb44 [FIX] account_edi_ubl_cii: Fix call to '_prepare_edi_tax_details'
This module no longer depends of account_edi.
Then, `_prepare_edi_tax_details` can't not be used.
We need to use `_prepare_invoice_aggregated_taxes` instead.

closes odoo/odoo#131109

X-original-commit: 89debfc12e2712a03896080a707cee6942b11581
Signed-off-by: Habib Ayob (ayh) <ayh@odoo.com>
Signed-off-by: Laurent Smet (las) <las@odoo.com>
2023-08-08 08:56:15 +02:00
Lopes Marc (loma) 248ee476fd [FIX] website_slides: create new sections only once
Bug to reproduce
----------------

- Log in as admin
- Go to the frontend page of a course
- Click on 'Add Section'
- Fill the form (name input)
- Press 'Enter' or click on save button x times
x sections with the same name will be created

Specifications
--------------

Prevent the 'Add section' form being submitted multiple times in a row.

task-3432418

closes odoo/odoo#131107

X-original-commit: a91a60b4be5b2f606d20fbe574625b85e43407f6
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2023-08-08 08:56:12 +02:00
Zeel Patel 8989a211bc [FIX] l10n_in_edi: prevent traceback when give invalid zip code
Before this commit
Previously, there was a bug that caused an error when a zip code containing
any character was entered.

After this commit
This bug has been fixed now.

task id- 3441139

closes odoo/odoo#130942

X-original-commit: 8deeabdbfbee20289d79151fa2821ce04585d0bd
Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
Signed-off-by: Zeel Patel (zepa) <zepa@odoo.com>
2023-08-08 08:56:08 +02:00
Hamza (hisl) 9bd2e29dc8 [FIX] account : add round to payment term line sum
The sum of floating points in not correct when we add a number of lines in payment term. The sum comes up to be 99.999999993 or close to this depending upon the number of lines.

1. Create payment term with 15 lines having percent payment  value of 0.166.
2. Keep the last line as calculated by the app.
3. Try to save the payment term.

Current Behavior:
A validation issue would arise stating the sum should be equal to 100.

Expected Behavior:
The payment term should be saved.

OPW-3450723

closes odoo/odoo#131126

X-original-commit: faebcd0fade95dcdbe1b70449ca46cb7e03f9926
Signed-off-by: Laurent Smet (las) <las@odoo.com>
2023-08-07 20:59:16 +02:00
Samuel Degueldre 627259e0da [IMP] web: update owl from 2.2.4 to 2.2.5
Release notes:
https://github.com/odoo/owl/releases

Commits:
[FIX] compiler: fix xmlns attribute not being set correctly in firefox
[FIX] compiler: fix t-call at root of template causing crashes
[REF] compiler: minor cleanup
[FIX] devtools: fix inspected path

closes odoo/odoo#131082

X-original-commit: ad9db912c45ebd49d9df87fbaee1f8b49421b081
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
2023-08-07 20:59:06 +02:00
tsm-odoo 7fcf33189e [FIX] im_livechat: fix livechat session state
Before this commit, the fold state, seen message id and message unread counter
was never saved on the livechat session state. This is due to an incorrect check
on the session state. We wan't to ensure the session is not closed when writing
such information but the state was checked on the thread instead of the livechat
service.

closes odoo/odoo#131049

X-original-commit: a81208d980a2a30bcff6382729e2ed8369e6a65d
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
2023-08-07 19:58:19 +02:00
Aurélien (auma) 12f004f281 [FIX] web_editor: fix uneditable block when height > 10000px
When applied, this commit will restore the edition of a block when
the content has a height > 10000px.

Steps to reproduce:
1) Go to a runbot
2) Go to a blog or on the homepage
3) Enter edit mode
4) Add some text in one bloc with a total height above 10000px
5) The text will be uneditable on the top

Current behavior:
If the text is too important in one block (more than 10000px),
the text will be uneditable

Expected behavior:
The text should be accessible and editable even if the block
has too much content

opw-3393570

closes odoo/odoo#130965

X-original-commit: 493d31a9b2f6508e1e48627ff510120f93870c4e
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-08-07 19:57:57 +02:00
Hubert Van de Walle (huvw) f603e86959 [FIX] project, web: create_group compatible with custom _rec_name
Steps to reproduce
==================

- Enter studio
- Create a new app
- Create a new model with "pipeline stages" enabled
- Close studio
- Switch to the kanban view
- Add a new stage

`ValueError: Invalid field 'name' on model 'x_test_stage'`

Cause of the issue
==================

A model _rec_name is not always name. This is the case for example with
studio stages. In that case,  `_rec_name == 'x_name'`.
Since [commit], we do a create instead of a name_create.

Solution
========

First do a name_create to handle custom _rec_name. Then if there is
still some field to be written, do a simple write.

[commit]: 4e974e5

opw-3432017

closes odoo/odoo#130921

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
2023-08-07 19:57:54 +02:00
pash-odoo 0a4e2fbcd2 [REM] hr_timesheet: remove access rule for group_hr_timesheet_user
Before this commit, access rule for group_hr_timesheet_user is define for
read and write permission for task which allow internal user to edit task if
link is provided even if user have no access.

In this commit, we have remove access rule for group_hr_timesheet_user because
it is not required anymore since read access is already given to internal user
which does not allow user to edit task if user have no access.

task-3354831

closes odoo/odoo#130807

Related: odoo/upgrade#5020
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-08-07 19:57:47 +02:00
Vincent Larcin 57fe90b449 [REM] sale_timesheet: remove display_create_order field
The field `display_create_order` is no longer used anywhere and can safely be removed

closes odoo/odoo#128986

Enterprise: https://github.com/odoo/enterprise/pull/44765
Upgrade: https://github.com/odoo/upgrade/pull/4996
Related: odoo/enterprise#44765
Related: odoo/upgrade#4996
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-08-07 19:57:24 +02:00
amdi-odoo c3157da12f [IMP] website_slides{_survey}: add slide icon class field
Add a slide icon class field to prevent computing
the fa-class icon from the slide type in the template
everytime we need it.
Also, using a template wasn't suitable anymore as we
may need the icon outside of its own <i> tag
(see slide_sidebar_done_button).

Task-3378180

closes odoo/odoo#125859

Related: odoo/upgrade#4802
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2023-08-07 19:57:21 +02:00
Chenyun Yang 0587f914b8 [FIX] spreadsheet: fix global filter display name
This commit fixes the bug of undefined filter display name.

A few weeks ago the property names of record when updating record selector have been modified. Previously it's `name` but now it's `display_name`. This is the root cause of the bug.

task 3453374

closes odoo/odoo#130724

Related: odoo/enterprise#45349
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2023-08-07 17:35:48 +02:00
Eugene Molotov f6c1de8476 [CLA] add em230418 to it-projects-llc's CLA
closes odoo/odoo#131031

X-original-commit: c94744cb642a6ec0e9dbb053f022aa8d7ef53d17
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-08-07 16:20:01 +02:00
casp-odoo a24c7d06c5 [FIX] l10n_fr: adapt translation 'company_registry' to SIREN
In France, the information contained in the company_registry field is named SIREN : https://www.economie.gouv.fr/entreprises/numeros-identification-entreprise#numerosiren

Since this information is mandatory on invoices, adapted the translation in FR localization.

task-2827661

closes odoo/odoo#131014

X-original-commit: 03f37cae7455d8d79d485538d2ee28007301aeae
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Signed-off-by: Camille Spiritus (casp) <casp@odoo.com>
2023-08-07 13:42:28 +02:00
Didier (did) 47621309e9 [FIX] mail: search for partner to invite should match input
Before this PR, RPC in the channel invitation form could resolve in the wrong
order and display outdated result.
This PR introduce the use of `useSequential` hook witch ensure that irrelevant
RPC are canceled.

closes odoo/odoo#131011

X-original-commit: 7d628b6a2785a4ac2a1081413e8a54c7ad695cb5
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
Signed-off-by: Didier Debondt (did) <did@odoo.com>
2023-08-07 13:42:24 +02:00
Claire Bretton (clbr) ac28418ff3 [IMP] account_edi,l10n_{eg,es,it}_edi{_eta,_sii}: Disable account_edi auto_install
We change account_edi to be auto_install=False to avoid installing it when
it is not nedeed and create noise data that will always be empty.
It was previously auto_installed when Invoicing was installed.

Note that auto_install=['parent_module'] will automatically install the module
when 'parent_module' is installed (in this case the localization) AND install
missing dependencies (in particular here 'account_edi').

task-3454076

closes odoo/odoo#130997

X-original-commit: 2d2faafb744abdb09f199ab85f11d317ee1d065e
Related: odoo/enterprise#45337
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Signed-off-by: Claire Bretton (clbr) <clbr@odoo.com>
2023-08-07 13:42:09 +02:00
Maximilien (malb) 56ea931f32 [FIX] l10n_fr: adding description
In the taxonomy PR: odoo#114638, we changed the
name of the taxes but the description wasn't modified so the users have
difficulty understanding what the codes means. In this pr, we added a
description in english and in french so that people can have a better
understanding.

closes odoo/odoo#130996

Task: 3398682
X-original-commit: ea85cae2275fde939e63eebed73d3453c6b9dcd9
Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
Signed-off-by: Maximilien La Barre (malb) <malb@odoo.com>
2023-08-07 12:32:52 +02:00
Victor Feyens 467619a244 [FIX] sale: show more lines on the order form view
Users are not able to reorder lines on order having more
than 40 lines as only 40 lines are shown by default.

In some advanced flows, new lines are automatically added to the
end of the lines and the user has no way to move them back in
the first ones (or in a specific section if it's not on the same
page).

opw-3437983

closes odoo/odoo#130956

X-original-commit: b316cd61bff1c05f8b07d036e9c0409998982a69
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-08-07 12:32:48 +02:00
kusi-odoo 7d9b90308e [FIX] hr, hr_contract: set contract end date when we archive the employee
1) If the contract is running when the employee is archived, we move the contract in the
   expired stage and we set the date of the archive wizard to the
   contract's end date.

2) If the contract has expired when the employee is archived, do not change the date.

task-3373275

closes odoo/odoo#130714

X-original-commit: e84106cdc5ae8015ee0c15a6c842d91dc2da1343
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
Signed-off-by: Kuldeep Singh (kusi) <kusi@odoo.com>
2023-08-07 12:32:37 +02:00
Turkesh Patel 23ecf40ced [FW][FIX] website_sale_stock_wishlist: product not found
In the wishlist, if a product has no stock available, the customer can request to be notified when the product is "back in stock".

If a barcode is configured on the product, the request will fail with a "Missing record" error.

Indeed, the code relied on the tracking info (google analytics data) to find the product id.  This is a mistake since the barcode is given as `item_id` in the tracking info if set (instead of the product id).

Since the product id information is already available as node data, use this mean to get the right product id directly.

Fixes #130471

closes odoo/odoo#130949

Forward-port-of: odoo/odoo#130473
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-08-07 10:58:52 +02:00
Michael (mcm) 00d8aef1c7 [REF] web, *: remove legacy patch
This commit removes legacy patch/unpatch functions and adapts their use
by using the modern patch. There was also a custom patch function used
in tests which has been replaced too.

closes odoo/odoo#130867

Related: odoo/design-themes#685
Related: odoo/enterprise#45271
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-08-07 10:58:48 +02:00
Lopes Marc (loma) 6c3c4fe370 [FIX] website_forum: allow new user to see own pending post
How to reproduce the bug:
------------------------

- Create a new user
- Log in as that user
- Go to a forum that don't require karma to ask a question.
- Create a new post
- On validation, you'll end up on a 404 page.

If we use the portal user instead, we see the post with a banner explaining
it has to be validated. This should be the result here too.

Specifications:
--------------

- When new users (karma = 0) create a post, redirect them to the page
relating to their question.

task-3372016

closes odoo/odoo#130857

X-original-commit: 9f624795c68d69ddf212657fe43cc45fc32747a0
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
2023-08-07 10:58:37 +02:00
David Monnom (moda) 444d20bd94 [FIX] point_of_sale: missing classes on save button
During the bootstrap refactoring we forgot to add some classes to the
save button of the POS (`btn btn-light rounded-0 fw-bolder`) which are
used on the other buttons of the POS.

They are now added to the save button.

closes odoo/odoo#130718

Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-08-07 10:58:33 +02:00
Lucas Lefèvre (lul) 5318e947bd [IMP] spreadsheet: interpret more months reprensentation
This commit improves the way months are recognized in pivot functions.
It also removes the use of `moment.js` which will be removed in the future
(see task 3391739)

Currently, months in a pivot function must follow a very specific
format.
It must be mm/yyyy

`ODOO.PIVOT(1, "amount", "date:month", "01/2020")`

Among other things: "1/2020" does not work, it must be prefixed by a
leading zeros.

Now, any date-like value would work:

month: "1/2020"
first of the month: "1/1/2020"
any day in the month: "1/2/2020"
using the DATE function: DATE(2020, 12, 1)
using NOW()

Future work: `PIVOT.HEADER` should return a the date as a number
when the date is a month. But it's currenctly quite a mess.
because we use the same method for a million things (`getGroupByDisplayLabel`).

Task 3413243

closes odoo/odoo#129782

Related: odoo/enterprise#44684
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2023-08-07 10:58:29 +02:00
Rmi Rahir (rar) b6f2087bf8 [IMP] spreadsheet: update o_spreadsheet to latest version
### Contains the following commits:

https://github.com/odoo/o-spreadsheet/commit/91607311 [REL] 16.5.0-alpha.1
https://github.com/odoo/o-spreadsheet/commit/b9db2a6f [FIX] find_and_replace: update search undo/redo & add/delete header
https://github.com/odoo/o-spreadsheet/commit/c701edb0 [FIX] find_and_replace: disabled button css and shorten the debounce Task: 3432224
https://github.com/odoo/o-spreadsheet/commit/52e98921 [IMP] Demo: Add an uncaught error catcher Task: 3392372
https://github.com/odoo/o-spreadsheet/commit/5aef9dd4 [FIX] find_and_replace: show formula checkbox not updating properly
https://github.com/odoo/o-spreadsheet/commit/6ace3df7 [FIX] find_and_replace: updating the cell will update the search
https://github.com/odoo/o-spreadsheet/commit/ee0506d2 [FIX] find_and_replace: hidden cell should not be considered
https://github.com/odoo/o-spreadsheet/commit/e1f68c2b [IMP] dates: detect mm/yyyy strings as dates Task: 3413243
https://github.com/odoo/o-spreadsheet/commit/3ba2c3c0 [REL] Bump master version to 16.5.0-alpha.0
https://github.com/odoo/o-spreadsheet/commit/39a37866 [IMP] jest: update jest to 29.5.0 Task: 3047642
https://github.com/odoo/o-spreadsheet/commit/500997ef [FIX] SortPlugin: fix crash whith empty-ish cells
https://github.com/odoo/o-spreadsheet/commit/69051ea5 [FIX] *: unify to strict equality operator
https://github.com/odoo/o-spreadsheet/commit/8a9914a2 [FIX] ActionButton: update SVG icon to display current style in top bar
https://github.com/odoo/o-spreadsheet/commit/9ba05e3a [FIX] dashboard: Fixed filter icon position
https://github.com/odoo/o-spreadsheet/commit/80aec0bc [IMP] topbar: allow double clicking on paint format
https://github.com/odoo/o-spreadsheet/commit/49554975 [FIX] currency: display localized custom format preview Task: 3389619
https://github.com/odoo/o-spreadsheet/commit/87108395 [IMP] format: config default currency
https://github.com/odoo/o-spreadsheet/commit/01823df7 [IMP] menus: localize number format preview Task: 3389619
https://github.com/odoo/o-spreadsheet/commit/599003a3 [IMP] header_size: resize row based on wrapped text Task: 3240138
https://github.com/odoo/o-spreadsheet/commit/fabc8449 [REF] ui_sheet: extract getters into helpers Task: 3240138
https://github.com/odoo/o-spreadsheet/commit/f044ec98 [MOV] helpers: move text helpers to a separate file Task: 3240138
https://github.com/odoo/o-spreadsheet/commit/71cc9589 [FIX] menus: dynamically add all functions
https://github.com/odoo/o-spreadsheet/commit/bd7271e9 [IMP] pr_template: match template with commit format
https://github.com/odoo/o-spreadsheet/commit/dc81d48c [IMP] Figure: add icons to figures context menu Task: 3391903

Part-of: odoo/odoo#129782
2023-08-07 10:58:29 +02:00
Julien Van Roy ad37ebefb9 [IMP] account_edi_ubl_cii: UBL Bis 3 add support for Denmark
Denmark is comprised in the EAS list but is not currently supported in
Odoo. This commit makes UBL Bis 3 available for Danish companies.

The schemeId "0184" corresponds to the "DIGSTORG" and is mandatory for
Danish Suppliers (see: rule DK-R-014,
https://docs.peppol.eu/poacc/billing/3.0/rules/ubl-peppol/DK-R-014/).

issue-130519

closes odoo/odoo#130856

X-original-commit: 6e842dac3bd299a68f6358a9bd59c5a3a09665f4
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Signed-off-by: Julien Van Roy (juvr) <juvr@odoo.com>
2023-08-07 09:51:24 +02:00
hupo-odoo 62f69aaf51 [FIX] account: auto post valid invoices
Previously, when account moves were set to auto post, and the cron was triggered to post them, if a single invoice triggered a UserError, none of them were posted (User error might be for example missing required field to post, archived journal, inactive currency, ...). This commit enables to post all valid invoices. The invoices that could not be posted are now visible on the accounting dashboard on their respective journal card with the 'to check' attribute, and a note is written on the chatter of the problematic invoices, describing the reason why the move could not be posted.

For performance reasons, we lowered the number of moves that can be posted in a single batch. This way, if a move among a batch cannot be posted, all moves of this batch must be handled one by one. Doing batch of 100 is already the case in 16.0

task-3244310

closes odoo/odoo#130958

X-original-commit: 5c0ba84d20334f307834113fdea61f04391cbcbe
Signed-off-by: John Laterre (jol) <jol@odoo.com>
Signed-off-by: Hugo Poncelet (hupo) <hupo@odoo.com>
2023-08-07 07:58:51 +02:00
John Laterre (jol) d94a3087be [IMP] account,analytic: UI/UX improvements
Miscellaneous improvements:
1. In analytic tags, the percentage is now a prefix.
2. In the widget, 0% accounts are now hidden.
3. In the analytic items list/pivot views, it is now possible to search by:
- Financial Account.
- Cross by.
4. By default, the pivot view is now grouped by plans and then analytic accounts.
5. An "Analytic Reporting" menuitem that opens the pivot view is added in Reporting > Management.

task-3446504

closes odoo/odoo#130971

X-original-commit: adb8ec875c9b4e299147c46dc60a87fd26fff91f
Signed-off-by: Habib Ayob (ayh) <ayh@odoo.com>
Signed-off-by: John Laterre (jol) <jol@odoo.com>
2023-08-06 20:27:15 +02:00
william-andre 6a2f9a49fd [FIX] account: suggest default repartition lines
`default_get` is bad m'kay?

Reproduce:
* Accounting > Configuration > Taxes > Create
* Just add a name, save.

There are no repartition lines, but there should be at least one line
for the base line.
This happens because `default_get` was only computing the main field
`repartition_line_ids` and it was allowed because the contraint was not
checking that same field.

closes odoo/odoo#129840

X-original-commit: f05457c82af63358c292350ef110f0b18c27f164
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2023-08-06 19:12:13 +02:00
Xavier-Do 76adca8ec9 [FIX] website: clear cache on ir.asset archive
Since #121376 a clear_cache was removed when unlinking an attachment

This clear_cache was not useful when restarting a server with new
sources, an other operation changing the content of an assets should
invalidate the cache manually. This is the case of ir.asset CUD
operations.

Unfortunately, a manual update was left missing in website, when
archiving ir.assets used for snippets.

This was discovered on runbot, with two workers, when the first workers
generates assets before the cron, and the second one after the cron.

The second worker unlinks attachments creating an inconsistency in the
cache of the first one.

This problem can be solved quickly by invalidating the assets cache in
the cron manually but this will be done in all cases. The proposed
solution will check the ir.asset that should change and only clear the
cache if the state changed.

Regarding performances, this should actually be a slight improvement in
query count since at the cost of one more select to prefetch the record
we can avoid multiple update, one per snippet. In most case no update at
all should be done, at most 2 can be done (one for archive, one for
unarchive).

Example with some assets to unarchive:

Before:
TOTAL ENTRIES: 277
SELECT: 158 (~0.16591858863830566s)
UNKWOW: 54 (~0.0202481746673584s)
UPDATE: 65 (~0.03202557563781738s)

After:
TOTAL ENTRIES: 214
SELECT: 159 (~0.1663439826965332s)
UNKWOW: 54 (~0.029229164123535156s)
UPDATE: 1 (~0.0002865791320800781s)

If the number of query is lowered, the python processing is slightly
higher. Locally the test time is similar, slightly longer since an
additional call to _disable_unused_snippets_assets was added to check
the cache invalidation

closes odoo/odoo#130973

X-original-commit: 3aeab51ff4379e6d76172614fd39f09d6c449ac6
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2023-08-06 17:58:53 +02:00
Audric Onockx (auon) 5f6292ccff [IMP] sale_timesheet: make timesheet revenues accurate for prepaid
...services

In the reporting of Timesheets, "timesheet revenues" represent
`sol.price_unit * sum(timesheets.unit_amount)`.
While this calculation is correct for SOLs with a service
invoiced on delivered quantities, it doesn't reflect the truth
when the product is prepaid/fixed price (ordered quantities).

With this commit, the "timesheet revenues" related to the latter
type of services will be equal to
`sol.price_total / sol.qty_delivered * sum(timesheets.unit_amount)`.
Where we determine the revenue per unit, and apply it to
the total duration of timesheets.

Example:
Say a SOL with a service of type "prepaid/fixed price",
an ordered quantity of 4, and a price per unit of 3.00€.
The total price is 12.00€ no matter how much has been delivered.
Say users A and B, having respectively timesheeted 2h and 1h,
so the delivered quantity of the SOL is 3.
We'll note "timesheet revenue of user X" "TR(X)".

Before this commit:
`TR(A) = 3.00€/h * 2h = 6.00€`
`TR(B) = 3.00€/h * 1h = 3.00€`
`TR(A) + TR(B) = 6.00€ + 3.00€ = 9.00€`
The total timesheet revenues is 9.00€ where it should be 12.00€.

Now:
`TR(A) = 12.00€ / 3h * 2h = 8.00€`
`TR(B) = 12.00€ / 3h * 1h = 4.00€`
`TR(A) + TR(B) = 8.00€ + 4.00€ = 12.00€`
The total timesheet revenues corresponds to the SOL's total price.

task-3368808

closes odoo/odoo#127875

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-08-05 13:17:02 +02:00
kais-odoo 32dec19ee0 [FIX] web,project: fixes groupby attribute in pivot _getEmptyGroupLabel
Before this commit, since we used to show custom label for project and assignees
as 'private' and 'unassigned' section in pivot view,  if we want to display show
custom label for groupby with sub group type we might get confuse with passing
'groupby' attribute on _getEmptyGroupLabel pivot method.

In this commit, fixes groupby issue by passing 'fieldname' instead of 'groupby'
cause groupby contains 'groupname : subgroup' like 'deadline : year'.

closes odoo/odoo#130960

Task: 3186578
X-original-commit: cae3531deb032289f5f823df7ffa565ee89189ea
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-08-05 12:20:31 +02:00
Loan (LSE) d271b213a5 [FIX] barcodes: handle ^ with | barcode rule patterns
Before this commit:
 If the barcode nomenclature uses the or `|` symbol.
 The part after it would be used as a "contains" instead of a
 "start with".
 e.g: `123|456`
 would be transformed in the JS code to `^123|456` instead of:
 `^123|^456`
 As such, you would have error "can't find product with barcode" if
 you set such a rule and a product barcode contains the second part.
 For e.g: the barcode `44445666` would match, but should not!

After this commit:
 Force the second (and following if any) part to start with.

Note: in practice it is pretty rare to have `|` in the pattern, but
it is the case for a default rule in version 16, see:
https://github.com/odoo/odoo/blob/5ac58ebf983c1c02019253c0430fde3502e13e7c/addons/pos_loyalty/data/default_barcode_patterns.xml#L10
In this case, if a regular product have `044` in its product barcode,
the PoS will tell that there is no corresponding coupon instead of
adding the product.
But the issue itself still apply in version 14 in case of custom rules

opw-3356951

closes odoo/odoo#130961

X-original-commit: 103566699d3492b682219efc3614f26d2ea972e5
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Loan Sens (lse) <lse@odoo.com>
2023-08-05 01:55:50 +02:00
Claire Bretton (clbr) a469d3700b [FIX] l10n_ar: remove inconsistent tax demo data
Remove tax demo data:
- They have the same tax name which breaks a uniqueness constraint, and
cause error at migration.
- It doesn't make sense to have taxes demo data
Also remove assignation of those taxes on other aml demo data.

closes odoo/odoo#130934

X-original-commit: 9917aa208fbdacb5b06fd728f86abda2905cbbd0
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Signed-off-by: Claire Bretton (clbr) <clbr@odoo.com>
2023-08-04 22:30:21 +02:00
abd-msyukyu-odoo 5feda35e6f [IMP] web_editor: put rollback code assignation on its own line
If the `_toRollback` property of the editor is assigned on its own line, it is
easier to identify which assignation caused/prevented a rollback when
debugging.

closes odoo/odoo#130894

X-original-commit: 263dcbaf9aa0c48bd61bf85b091c746d7850cfe1
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-08-04 16:35:12 +02:00
Joseph Caburnay 7100f014cf [FIX] account: PdfReadError import error
As introduced here:
https://github.com/odoo/odoo/pull/112611/commits/dce4ec8380aad1a1d1b40c33a50ab5914838ba18,
PdfReadError should be imported conditionally as it is now possible to have dev
environments with different versions of PyPDF2.

We are employing the same strategy done in the mentioned commit to avoid import
error when the environment has python > 3.10 and PyPDF2 v2.12.1

closes odoo/odoo#130892

X-original-commit: 0163edfb16c849eac61fb33b400faedda33f667f
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-08-04 16:35:08 +02:00
oco-odoo 78a8e0a98e [FIX] l10n_fr_fec: alleviate memory error when exporting too many move lines
We now split the export of the FEC files per batch of move lines. This was necessary, as the fetchall() ran on the cursor to get the results could return a huge amount of data on big databases, saturating the RAM.

This fix is not exhaustive, and memory consumption could be lowered by removing the need to convert the whole file to base 64 and write it in attachment. Those changes are not doable in stable ; further improvements will come to master.

OPW 3442579

closes odoo/odoo#130884

X-original-commit: 86a221fa3773b5b23ae8f1ad653c1aaac607482e
Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
2023-08-04 16:35:05 +02:00
Martin Trigaux 7f4da03e36 [IMP] mail: allow posting HTML message via RPC
Since 69f911d994 it was no longer possible to post an HTML
message via a script. Allow to do it but log a warning to discourage
doing so. Markup object should still be the propoer way to do it.

closes odoo/odoo#130883

X-original-commit: a890db49935813d0794765492c057404592e5977
Related: odoo/documentation#5273
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-08-04 16:34:58 +02:00