Commit Graph
165814 Commits
Author SHA1 Message Date
Saurabh Choraria 3d38f684d5 [FIX] payment_stripe: update log when creation of payment intent fails
When the payment method was detached from the customer, trying to pay with the
linked payment token would end up with a crash because Stripe failed to send us
the payment intent, as it could not create it. In that case, a logger error
occurs on the server which creates noise in the sentry.

Error: The creation of the payment intent failed.
Stripe gave us the following info about the problem:
'Your card has insufficient funds.'

The logger is updated to use the 'warning' level instead of the 'error' level.
This change reflects a less severe logging level for cases where the creation
of payment intent fails.

sentry-4363481906

closes odoo/odoo#131334

X-original-commit: 772457554083847eb6088509ed57acff86702783
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Saurabh Choraria (sauc) <sauc@odoo.com>
2023-08-09 11:52:08 +02:00
Julien Van Roy cb41231749 [FIX] point_of_sale,account: use Send & Print to generate pdfs
When a customer requests an invoice in the `point_of_sale`, use the same
flow as in `account`: the "Send & Print" button.

It generates the pdf, the EDI attachments (Factur-X, Peppol Bis 3, etc)
and send it to the customers/governement. Indeed, in some countries, it
is required to sign the invoice to the government upon validation (e.g.
CFDI in Mexico).

closes odoo/odoo#131317

X-original-commit: 2cc9a35860b59063f536eea9234a1e9c5fa2f00e
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-08-09 11:52:04 +02:00
Ahmed Mohamed 3ffba6ba1f [FIX] hr_attendance: fix attendance report query
closes odoo/odoo#131289

X-original-commit: 7a55fb51ba68c5d8fc01ef5a70968bee389ffe9b
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
2023-08-09 11:51:56 +02:00
Theo VINCENT (thvi) b822cbe011 [FIX] point_of_sale: invalid money input display
Since the use of Bootstrap, the money inputs using the useValidateCashInput hook are no longer correctly displayed when the user input is invalid.

Steps to reproduce:

 - Open a session in a shop
 - Open the "Cash In/Out" menu with the top right dropdown menu
 - Enter an invalid amount, like "invalid" for example

The input is not displayed with red borders.

This commit fixes the display of invalid inputs in the Cash In/Out and Closing Session popups, using the Bootstrap is-invalid CSS class.

closes odoo/odoo#131246

Task-id: 3444048
Signed-off-by: Vlad Stroia (vlst) <vlst@odoo.com>
2023-08-09 11:51:53 +02:00
Xavier-Do 6ea8ca21ae [FIX] test_lint: avoid memory error
Since 16.4, the number of file made pylint reach the default memory
limit from time to time. This commit will remove the limit for this test
as it was done for chrome. The next step would be to split the test
per set of module or maybe analyze the memory consuption of some custom
check.

closes odoo/odoo#131336

X-original-commit: 8acb8d9a8bf5e19b53528275a4ddd5d4a289472b
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2023-08-09 09:11:30 +02:00
Ruben Gomes b5394a93f7 [FIX] account: tour bold text
Make 'Invoice app' text bold.

closes odoo/odoo#131318

X-original-commit: e6190d86621c6d11736096adf9a87ca3d24b4fb1
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Signed-off-by: Ruben Gomes (rugo) <rugo@odoo.com>
2023-08-09 09:11:23 +02:00
Anh Thao Pham (pta) abc44e8027 [FIX] account: prevent taxes on "payment_term" aml
Steps to reproduce:
- Go to Contacts and open any contact (e.g. Contact X)
- Check its configured Account Receivable (e.g. 121000 Account Receivable)
- Configure that account and set a default Sales tax on it (e.g. Tax 15%)
- Create an invoice with Contact X as customer
- Add an invoice line for any amount (e.g. $100) and any tax
- Swith to "Journal Items" tab and display "Taxes" column
A line (with 121000 Account Receivable) has been created automatically to balance the invoice line.
This line has a tax (i.e. Tax 15%): the default one configured on the account.
There should not be a tax for a receivable account.
Another issue is that the tax is set on the aml but not tax line has been created.
- Go back to "Invoice Lines" tab
- Remove the tax on the invoice line
- Save
In "Journal Items" tab, the tax line has been created from the aml with the receivable account.
- Go back to "Invoice Lines" tab
- Add a tax on the invoice line again
- Save
- Remove the tax on the invoice line
- Save
In "Journal Items" tab, there are now 2 tax lines from the aml with the receivable account.
By repeating the previous steps, new tax lines can be created infinitely.

Solution:
To prevent the issue, the default taxes shouldn't be populated on the aml when the account
is a receivable (or payable) one and when the move type is an "invoice" type one.
As "display_type" field of "account.move.line" is set to "payment_term" when the account is
a receivable or a payable one and when "is_invoice" is True on the move, no tax will be set
in "_compute_tax_ids" computed method when "display_type" is "payment_term".

opw-3345953

closes odoo/odoo#131330

X-original-commit: c6076a272cfe997856f3026557900ce9718c45e5
Signed-off-by: Anh Thao Pham (pta) <pta@odoo.com>
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2023-08-09 04:23:19 +02:00
Rahul Prajapati 241a45dbc8 [FIX] mail: remove obsolete starred counter method
`_get_starred_counter` method is obsolete now.
So, there is no meaning in keeping it anymore.

It's usecase has been removed by this PR
https://github.com/odoo/odoo/pull/83777

closes odoo/odoo#131299

X-original-commit: cbf590bfa0999e99064e1a2bb337c8e63f00dd8c
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Rahul Prajapati (rapr) <rapr@odoo.com>
2023-08-09 04:22:57 +02:00
Alejandro Mellado 9816c5a67b [CLA] Update Vauxoo's CLA adding alejandromellado
Incorporate Alejandro Mellado (alejandromellado) as Vauxoo's contributor.

I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

closes odoo/odoo#131277

X-original-commit: 73ee076bb20245fde8629a9f16caea16424c105b
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-08-09 04:22:50 +02:00
Ignacio Cainelli c5fa523904 [FIX] l10n_latam_check: "check False" on entry
Steps to reproduce this bug:

1- On a Bank type journal, set true the "Use electronic and deferred
checks" field
2- Do a new vendor payment with Bank journal and Manual payment method
3- Corresponding journal entry shows "Check False delivered"

closes odoo/odoo#131256

X-original-commit: 4f70fb08af830dd2fece740905c02e598a26b0f6
Signed-off-by: Habib Ayob (ayh) <ayh@odoo.com>
2023-08-09 03:08:37 +02:00
Jinjiu Liu 3445ac4bb5 [FIX] web_editor: the dirty flag is set for character escaping
Reproduction:
1. Install Note, create a new note
2. Start the Inspector, edit the placeholder <p> element in the
description
3. Replace the element as `<p style="color: rgb(32, 31, 30); font-family
: &quot;Segoe UI&quot;, &quot;Segoe UI Web (West European)&quot;, &quot;
Segoe UI&quot;, -apple-system, BlinkMacSystemFont, Roboto, &quot;Helveti
ca Neue&quot;, sans-serif; font-size: 15px;">dsfhislahflidsahisa</p>`
4. The saving icon appears, click it but it will always be there, e.g.
always dirty

Fix: instead of comparing the raw value of the prop value and editing
value, we parse them and compare after the parsing

opw-3341605
task-3434080

closes odoo/odoo#131245

X-original-commit: eda483bd3c3bdc42b95f17a5278c1a9eb83adb05
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Jinjiu Liu (jili) <jili@odoo.com>
2023-08-09 03:08:29 +02:00
John Laterre (jol) 6d5ce106fc [FIX] base: prevent blocking access to commerical fields
Similar to what was done [here](https://github.com/odoo/odoo/commit/5d0111d079601c07c62717575cb22ead15c585d0) when the credit limit feature
was introduced, a `sudo()` is also necessary in
`_load_records_create()`.

This method is called when importing contacts from a CSV file.
So the access to the commercial fields is done when synching
fields from the commercial entity to its contact and should
not block the import.

Fixes #126567

closes odoo/odoo#131225

X-original-commit: 266e22fc4ea5bb4343700f8d08f9ec2580fab365
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Signed-off-by: John Laterre (jol) <jol@odoo.com>
2023-08-09 03:08:22 +02:00
tsm-odoo 76bd362e34 [FIX] mail: no follower spinner on draft record
Before this commit, the follower loading spinner was shown
for draft records until it was saved. This is incorrect,
follower count should instead be 0. This commit fixes this
issue.

closes odoo/odoo#131224

Signed-off-by: Didier Debondt (did) <did@odoo.com>
2023-08-09 03:08:18 +02:00
Yash Vaishnav 86b43bcfa6 [FIX] hr_timesheet: fix task_id field records when creating a timesheet
To reproduce the issue, follow these steps:

1. Install the Timesheet and Project.
2. From the settings menu, create a new company.
3. Create a project using the newly created company(e.g. New Company) and add
   a task to it.
4. Open the Timesheet application and create a new timesheet.
5. In the timesheet, select the project created in step 3, and observe that the
dropdown for tasks does not display any task.

Cause for this issue:
-The timesheet application has a domain set for the task field where the company
associated with the task_id should be the same as the company selected in the
current environment.
-However, when a new project is created with a 'New Company', the tasks
associated with it also have the  'New Company' assigned to them. On the other
hand, the current environment has a default company called 'Your Company'
associated with it.
-Therefore, due to this domain setting, the task field does
not display any tasks since there are no tasks associated with the
'Your Company' in the current environment.

Fix:
Since the cause of the issue is related to the company domain set in the task
field, we can solve it by removing it from the domain.

task-3323027

closes odoo/odoo#131197

X-original-commit: 7b9f9a1323ecaeab2b248784e1493b39fe07b8f1
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-08-09 03:08:14 +02:00
Victor Feyens 405b97cf38 [FIX] website_sale_picking: correctly filter out invalid providers
The 'onsite' payment provider shouldn't be shown to the user
if the cart/order only contains services (or if there are no onsite carriers).
The logic was there but the filtering didn't correctly update the values.

opw-3437107

closes odoo/odoo#131177

X-original-commit: 78cd9a7ab5fb860021a906400a1907b1d8b45be2
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-08-09 03:08:07 +02:00
FrancoisGe c7524e2d8b [FIX] web, *: record key is reactive in KanbanRecord
Before this commit, calls to record[fieldname][value/raw_value] in
the arch of a kanban view did not take into account updates on the Record
Datapoint. So if any data in the Record changed, the [raw_value/value]
was not modified.

In a custom KanbanRecord, you should never use the record containing the
value and raw_value. We will therefore replace this call by using the
datapoint record directly.

How to reproduce:
    - Have a kanban view with a record.my_field.value and a widget allowing
        you to modify the value of my_field.
    - Click on the widget

Before this commit:
    The value of my_field does not change

After this commit:
    The value of my_field has been updated.

closes odoo/odoo#131165

Related: odoo/enterprise#45413
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2023-08-09 03:08:00 +02:00
Thomas Lefebvre (thle) e351d9fe48 [FIX] hr_recruitment: add company_id to the context
Steps to reproduce:
-------------------
- go to Recruitment app and click on a job position;
- for an application without recruiter,
    click on the "Assign" button on the kanban box.

Issue:
------
A traceback occurs.

Cause:
------
To find available user_ids,
we use the `"[..., ('company_ids', 'in', company_id)]"` domain.
But `company_id` is not in the context.

Solution:
---------
Add `company_id` in the context by adding it to the view.

opw-3450558

closes odoo/odoo#131159

X-original-commit: 4fa18ec336b9f44648c1eaa272d6e38f536b628b
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
Signed-off-by: Thomas Lefebvre (thle) <thle@odoo.com>
2023-08-09 03:07:53 +02:00
Nasreddin Boulif (bon) 070d257fb0 [FIX] website: allow to translate appointment page on website
Steps to reproduce:

  - Install `website_appointment` module
  - Activate a second language on main website
  - Activate debug mode
  - Go to Website -> Configuration -> Online Appointments
  - Share multiple appointment and copy the link
  - Open the link in a new tab
  - Switch to second language
  - Open editor and click on `Translate` button

Issue:

  Traceback is raised.

Cause:

  When sharing multiple appointment and opening the shared link, we are
  redirected on the page to select the right appointment and we have the
  key `filter_appointment_type_ids` (with the IDs of the appointments)
  with the value already encoded.
  e.g: `[1, 3]` => `%5B1%2C+3%5D`.

  When translating a page by redirecting to the same URL (but encoded)
  with param `edit_translations` set to 1, the URL is re-encoded and
  therefore the value of the key `filter_appointment_type_ids` is double
  'encoded' and broken/not possible to parse.
  e.g: `%5B1%2C+3%5D` => `%255B1%252C%2B3%255D`.

Solution:

  Don't re-encode the updated URL; `goToWebsite` is expecting a non
  encoded path and is in charge of the re-encoding it.

opw-3409757

closes odoo/odoo#131150

X-original-commit: 574d7847bda5c6e21934f815f64d0d4ce3f70b8b
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-08-09 03:07:50 +02:00
Fabien Pinckaers 3e5b26e56b [IMP] website_slides: imp layout of left panel, secondary links
closes odoo/odoo#131141

X-original-commit: 9efaf53786c30dd23c09b8a1d898ecf97cb2e88b
Signed-off-by: Fabien Pinckaers (fp) <fp@odoo.com>
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-08-09 03:07:43 +02:00
Nicolas Bayet f5405d61e7 [FIX] web_editor,mass_mailing: remove unnecessary loading of html2canvas
Since #119325, html2canvas is not used for the toInline process anymore.
Loading the script was still done in the web editor and mass mailing,
which is not needed anymore.

task-3446888

closes odoo/odoo#130862

X-original-commit: e3c9d3c4fb013124faf6d132297171a34854f991
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-08-09 01:53:07 +02:00
Pierre Pulinckx (pipu) b1ebe3b6f4 [REF] *: Replace core._t imports
In this commit, _t import from import { _t } from
"@web/legacy/js/services/core" and from
 web/static/src/legacy/js/core/translation.js are replaced by
@web/core/l10n/translation.js.

task-3292454

closes odoo/odoo#130865

Related: odoo/enterprise#45270
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
2023-08-09 00:13:08 +02:00
Adrien Minne (adrm) 17d54eff72 [REF] spreadsheet: refactor insert pivot methods
The goal here is to simplify the code of the insertion of a pivot in the
pivot core plugin. Now the domain/style for each cell of the pivot is computed
in the `SpreadsheetPivotTable` class, which simplifies the plugin a lot.

Also take the opportunity to convert all `anchor` array arguments
to `{ col, row }` objects since it's the direction we've taken every
where else: `position.col` is much more readable than `anchor[0]`

closes odoo/odoo#128981

Task: 3318865
Related: odoo/enterprise#44326
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-08-08 22:41:04 +02:00
Adrien Minne (adrm) 77c758fe8b [REF] spreadsheet: define function in constants
Ths commit change the pivot/list function to defined them in a constant,
and add this constant in the function registry, rather than define the
function directly in the registry.

This allow for re-using the functions code and call it from other
functions.

Task 3318865

Part-of: odoo/odoo#128981
2023-08-08 22:41:04 +02:00
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