Commit Graph
162342 Commits
Author SHA1 Message Date
Jurgen (jugj) d7ec92f349 [FIX] hr_holidays : Remove automatic notification if no responsible_ids is set
Currently in hr_leaves_type, if no responsible_ids are set, all members of group_hr_holidays_user would get notified, the new behavior changes that to :
If no responsible_ids are set, no one is notified.
Some unit tests had to be adapted to this new flow, since they were sometimes getting created with no responsible_id assigned, leading to no one being notified.
task-3284318

closes odoo/odoo#125738

X-original-commit: fb1a6a8f0072398c57508b59724fcbde9a34b124
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-06-20 15:58:38 +02:00
Mathieu Duckerts-Antoine 6adcd292b3 [FIX] web: search panel: fields should not be added in search bar
Let us consider the search arch

    <search>
        <field name="foo"/>
        <searchpanel>
            <field name="bar"/>
        </searchpanel>
    </search>

The two tags "field" are supposed to generate different objects:
 - the first one should generate an entry in the search bar autocompletion
 - the second one should generate a search panel section.

It turns out that the second field did also generate an entry in the
search bar. This is of course wrong. We fix that problem and add a test.

closes odoo/odoo#125724

X-original-commit: 7e62e3cf569e59a676a834198854f415fa0ae590
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2023-06-20 15:58:35 +02:00
Victor Feyens ceb1bebc0b [REV] website_sale: stop handling exclusions in /shop
Commit 91d0e9c645 made sure that excluded
combination did not appear in /shop search results, but it significantly
slowed down searches, even in databases without exclusions.

Since the excluded combinations cannot be added to the cart (and the
original feedback did not come from an effective ticket), we believe
the gain is not worth the cost.

This commit reverts that change.

Task-3326948

closes odoo/odoo#125722

X-original-commit: 3082ac99dc195a89e1299be73ef149f40231f86e
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-06-20 15:58:33 +02:00
tsm-odoo 90dd769e93 [IMP] im_livechat, *: add emoji menu to embed livechat
*: mail, web.

This PR adds the emoji menu to the embed livechat. When mounting
the livechat on the odoo frontend, the env is shared between the
livechat app and the main app. This is an issue regarding the
overlay service since the `OverlayContainer` is mounted in the
light DOM while we would expect the overlay styles to be dicted
by the shadow DOM.

In order to solve this issue, an `OverlayContainer` is added to the
shadow DOM and a mechanism to determine whether the overlay belongs
to the light/shadow DOM is introduced.

part of task-2742676

closes odoo/odoo#125713

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-06-20 15:58:29 +02:00
Antoine Dupuis (andu) 73fab18182 [IMP] l10n_it_edi: Add a test for credit note XML export.
At the moment, there is no test that checks that normal credit notes
(i.e. of type TD04, not reverse-charge refunds) are correctly exported
in FatturaPA.

So we're adding one. We're making it a complicated credit note (it
contains some negative amounts) in order to improve the test coverage.

closes odoo/odoo#125690

X-original-commit: f7f2c4275531751253e0fe57a6a192fe98d6da5c
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Antoine Dupuis (andu) <andu@odoo.com>
2023-06-20 15:58:26 +02:00
tsm-odoo f33fcdf8c6 [FIX] im_livechat: fix cors error on embed livechat
Before this commit, starting a page with the livechat embed
in another origin than Odoo would have resulted in an CORS
error being shown due to the `bootstrap_translation` route
being called in response to the legacy `web.session` setup.

This commit restore the legacy session as it was before [1].

[1]: https://github.com/odoo/odoo/pull/122834

closes odoo/odoo#125565

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-06-20 15:58:20 +02:00
Jurgen (jugj) af5d5a2b4f [IMP] hr(_contract) : Add a graph and pivot view for employee
In this PR we add a graph and pivot view that aggregates employees that were created / have their first contract date
per month.
task-3374966

closes odoo/odoo#125419

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-06-20 15:58:17 +02:00
Prakash Prajapati 1179ceaa42 [IMP] hr: track the value on the employee for the Department change
task-3373484

closes odoo/odoo#125200

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-06-20 15:58:12 +02:00
Arjun Panchal 9f1888c0c8 [FIX] mrp: BoM Overview Formatting
Align the product with the caret icon on small screen

task-3357011

closes odoo/odoo#124236

Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2023-06-20 15:58:06 +02:00
Victor Feyens b31a6aec1c [IMP] product,(event_*)sale: clarify (& deprecate) pricelist context
The whole contextual price of products relies on multiple context keys:
* uom
* pricelist
* quantity
* date

The related logic has already been partly removed/deprecated on products,
but the computation of discounts for events/event booths are still relying
on that logic, though imperfectly.

This commit makes sure this hacky logic (relying on those contextual keys)
is as clear and reliable as possible.
We factorize and harmonize the remaining use cases, with a dedicated constant
and specific methods, making sure:
* currency conversion
* price & discount computations
are coherent, while clearly explaining that it should not be used for
any new feature/logic/code.

We also restrict context updates as much as possible (there won't be
any discount when the pricelist is configured to hide the discount from the customer)

closes odoo/odoo#123848

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-06-20 15:58:03 +02:00
Yash Vaishnav 5b997c5bad [FIX] project: remove one dialog box when deleting stages of project
Steps to reproduce:
1) Install the project.
2) Enable 'project stages' through the settings.
3) Try to delete an empty stage
4) Notice that two confirmation dialog boxes appear.

Cause:
The project module contains a dialog box for deleting project stages, resulting
in two confirmation prompts when attempting to delete a project task.

Fix:
The 'deleteGroup' function in the kanban_header file is responsible for deleting
the stages in the project. the 'deleteGroup' function in the KanbanHeader class
is extended and overridden with another confirmation box.

task-3293029

closes odoo/odoo#122018

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-06-20 15:58:01 +02:00
Rohitkumar (roku) f2406749c2 [IMP] project: improve the project milestone
Purpose of the commit is to do the generic improvements for project.

So in this commit did the following changes:
  - display 'tasks' stat button even if there are no records because of  user create
  task immediately.
  - the milestone should not be displayed in red if the task has been completed/cancelled

task:3251634

closes odoo/odoo#119194

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-06-20 15:57:58 +02:00
Louis Wicket (wil) f253e0ba14 [FIX] website: lazy load translations
`_lt` must be used instead of `_t` for `gettext`s that are called when
the file is loaded.

closes odoo/odoo#125695

X-original-commit: 1cde6dc66c3337fa8e6c18156340f18fdab1dd84
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
2023-06-20 14:41:04 +02:00
Romain Derie 24128ed434 [FIX] website: never consider megamenu as active
Oversight of [1], megamenu should never be considered as active.

[1]: https://github.com/odoo/odoo/commit/8d4e99c6a6e2281b00ec25e870065d0728e27606

opw-3375615

closes odoo/odoo#125693

X-original-commit: b024e05215bd858abe5721ad4251ba51d67afcb9
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-06-20 14:41:01 +02:00
Adrien Guilliams (adgu) c730491461 [FIX] point_of_sale: formatting X and Z reports
Parts of the X and Z reports were not formatted correctly.
The parts that have changed are:
    - The datetime of the session is no more bold.
    - The columns of the tables are left-aligned for strings and right
    align for numbers.
    - The page break is better handled.

closes odoo/odoo#125648

Task-id: #3360275
X-original-commit: 2d7b7004d69bf67c1ca940c4418f4a5ac3479f1c
Related: odoo/enterprise#42799
Signed-off-by: Monnom David (moda) <moda@odoo.com>
Signed-off-by: Guilliams Adrien (adgu) <adgu@odoo.com>
2023-06-20 13:28:41 +02:00
amdi-odoo b3d579e7cc [IMP] website_slides: save space in left content panel
Purpose
=======
Earn some space in the left content panel (fullscreen and
course page panels).

Specifications
==============
- Align additional resources to the left and remove bold
on the links and icons.
- Remove "mark as done" bubble and push content to the left.
- Question mark, youtube, etc.. icons now become the mark
as undone button. Icon should have a border outline and be empty
- "V" icon remains the one we use when done (filled and green
as currently)

Task-3265917

closes odoo/odoo#125646

X-original-commit: 9dabc99c7711501ec84b3ce0902cb78fed43a868
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Dieudonné Amélie (amdi) <amdi@odoo.com>
2023-06-20 13:28:39 +02:00
Pierre Paridans d64a23ea22 [FIX] website: CSS properties value comparison
Due to a change between Chrome 101 and 114, the CSS Custom Property
containing custom string are now always serialized using the type of
quotes used in their declaration (ie. single quotes will be kept ;
double quotes also) which wasn't the case in previous versions of Chrome
(and still not the case in WebKitGTK 2.40.0 at least).

This doesn't impact the value itself but only comparison between the
computed value and an arbitrary one (like we do in the design-themes
test).

This commit fixes it by removing the single/double quotes in the
`assertCssVariable` test helper.

The impacted precondition was introduced in odoo/odoo@b29e17765f and
odoo/design-themes@8b377af3a7 .

closes odoo/odoo#125500

X-original-commit: 82074846c429dd6abad5734680ca3e7923668bb9
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2023-06-20 11:33:28 +02:00
shreya patel (shpa) c2eb387068 [FIX] mrp: traceback while printing MO Overview Report
Issue
=====
A traceback occurs when we print MO Overview Report If the `Receipt` data has no decorator.

Steps to reproduce
=================
- Create a MO with 0 qty components Availability and set the Scheduled Date in future.
- Make a purchase for the MO components with same day Order Deadline, and confirm PO.
- Go to the MO Overview Report Click on the PRINT button and you will get the traceback.

In this commit, we ignore setting a decorator when the receipt does not have a decorator.

TaskID - 3300853

closes odoo/odoo#125009

X-original-commit: f03b22b62427ae8a4bd235c353eaa1ea0bf3ff16
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2023-06-20 11:33:22 +02:00
Lucas Lefèvre 23ae2b2886 [FIX] spreadsheet: force light theme
Followup of #123320

Some things changed in saas-16.2

closes odoo/odoo#125706

X-original-commit: 82f79027deb8caa1e25e0ae8389f513db98cd6cd
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-06-20 09:11:06 +02:00
Mathieu Duckerts-Antoine 850d52d0ae [FIX] web: orm: protect webSearchRead
The values for the key "async" found in some services is used to declare
async methods that should be "protected". The hook "useService" makes sure
that no code used to process results of those protected methods is
executed by a destroyed component. The orm method "webSearchRead" was
not protected due to a "typo".

closes odoo/odoo#125688

X-original-commit: 2899888a2449b42b2c5d37846fc9411da6f7f9cc
Signed-off-by: Géry Debongnie <ged@odoo.com>
2023-06-20 09:11:04 +02:00
mega-odoo e502b972c8 [FIX] web_editor: prevent error when edit the float, monetary section in website
'replace() argument 1 must be str, not bool' is generated if the user edit a
float or monetary section in the website view.

Steps to Reproduce

- Make debugger mode ON.
- Go to Settings > Translations > Languages.
- Remove the value of the 'Thousands Separator' field from the current user
language.
- Install the 'eCommerce' module.
- Go to the website.
- Go to the shop menu, and click any product from the product list.
- Click on the Edit button and try to edit any float or
monetary section like a product price (eg. change a product price from 750 to
70) and click on the Save button.

And traceback will be generated.

Applying this commit will resolve this issue.

sentry-4148693017

closes odoo/odoo#125684

X-original-commit: b895175cfc487f3db6e53351fd5774303f193698
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-06-20 09:11:01 +02:00
Valentin Vallaeys (vava) d41720648d [FIX] sale: format draft downpayment date
task-3299805

closes odoo/odoo#120972

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-06-20 09:10:56 +02:00
Valentin Vallaeys (vava) ba954604e5 [IMP] sale: add downpayment ref on SO line
When a SO has several downpayment, they all have the exact same
description "Down payment" which does not provide much information.

This commit adds the invoice reference and the date.

task-3299805

Part-of: odoo/odoo#120972
2023-06-20 09:10:55 +02:00
paso-odoo f115f330f9 [FIX] account: fix TypeError for currency in journal items
If applied, this commit will solve the issue of unsupported operand type in
journal item(s) when currency is not set.

Steps to produce:
- Accounting > Journal Entries > Create new entry.
- Add a line in Journal Items and remove the currency from that line.
- Save > Error will be generated.

Fix this issue by calling the compute of the currency when the currency is not
available.

sentry - 4069681536

closes odoo/odoo#125661

X-original-commit: 7163134b397e113c10936af908bdfebef2336d67
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
Signed-off-by: Parth Solanki (paso) <paso@odoo.com>
2023-06-20 06:58:05 +02:00
william-andre 355dea8b83 [FIX] account: protect currency recompute without blocking completely
The previous fix[^1] was preventing the recomputation of the currency as
soon as there was one set.
For instance, the currency wouldn't change if we changed the journal
for one with another currency.

[^1]: 7f7743470ac1309d5e047563d06362e54edb552a

closes odoo/odoo#125671

X-original-commit: 9f8bd34818414698f9b3fd9fe926659781c13c67
Signed-off-by: John Laterre (jol) <jol@odoo.com>
Signed-off-by: William André (wan) <wan@odoo.com>
2023-06-20 01:34:42 +02:00
Mathieu Duckerts-Antoine fa0f687337 [FIX] web: orm: protect nameGet
The values for the key "async" found in some services is used to declare
async methods that should be "protected". The hook "useService" makes sure
that no code used to process results of those protected methods is
executed by a destroyed component. The orm method "nameGet" was
not protected due to a "typo".

closes odoo/odoo#125683

X-original-commit: c2b9f14fa9fbf67063b8885b698ea17a63d79454
Signed-off-by: Géry Debongnie <ged@odoo.com>
Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2023-06-20 00:24:06 +02:00
Ivàn Todorovich 800147ce9f [IMP] product: price computation performance
This commit improves the performance of `_is_applicable_for`, by:

1) Leveraging the `product.category.parent_path` field.
2) Use `applied_on` for the `if` conditions, which is ~100% faster than using
   the many2one fields due to the related record initialization.

These micro-optimizations are important because of the way `_is_applicable_for`
is used.

See: https://github.com/odoo/odoo/blob/0a5d84289/addons/product/models/product_pricelist.py#L169-L193

Which, for demostration purposes, could be simplified to:

```
for product, qty, partner in products_qty_partner:
    for rule in items:
        if not rule._is_applicable_for(product, qty_in_product_uom):
            continue
```

On a database with 470 products, and about the same number of pricelist items,
these optimization result in a ~30% speedup when computing prices for all
products at once. It may be even better depending on how many nested product
categories are used in the database and in the pricelist rules.

closes odoo/odoo#125670

X-original-commit: 3619f77c73092e800aab10f0df09ca5775545da3
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-06-20 00:24:03 +02:00
Krzysztof Magusiak 9c753b01c9 [FIX] web_editor: append nbsp in text node
In JavaScript, createTextNode() escapes it's contents, so instead of
appending '&nbsp;' as text, we should append the character corresponding
to a non-breaking space. Alternative would be to use innerHTML.

odoo-helpdesk ticket 3372476

closes odoo/odoo#125640

X-original-commit: 698a1a0c521635a0f8eb98388966e70740492274
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-06-20 00:23:53 +02:00
niyasraphy 13f39faccf [FIX] website_{}: show correct placeholder in search bar
before this commit, in the mobile view, in the search bar
of the website users(forum) and events leader board,
the placeholder is shown as Search courses

after this commit, the wrong placeholder will be updated
to Search users in the placeholder as in the normal view.

closes odoo/odoo#125636

X-original-commit: b54f4387812ea20de42e56c22fa90b4a26b6a11e
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Hennecart Jérémy (jeh) <jeh@odoo.com>
2023-06-19 23:17:01 +02:00
Martin Trigaux 1da6f82bb9 [I18N] sale_timesheet: remove duplicated entry
closes odoo/odoo#125595

X-original-commit: f6eb3e1033e1376096faf27c00cdba0508c2c19a
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-06-19 23:16:55 +02:00
Akim Juillerat bbb8a53f47 [REF] mrp: Extract preparation of lot values on mrp.production
This allows to customize the values used to created lots and
avoids repeated code in enterprise module.

closes odoo/odoo#124543

X-original-commit: 0820a69a3fec90717ea10bf4c56a5609d6b376e2
Related: odoo/enterprise#42300
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-06-19 23:16:50 +02:00
Yash Vaishnav ccbb749cfb [IMP] project: display the deadline in red if the date has passed
In this commit, The date deadline field turns red when the date has passed and
the task has not been closed.

task-2947578

closes odoo/odoo#119771

Related: odoo/enterprise#40341
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-06-19 23:16:45 +02:00
Prakash Prajapati cbc2bf6a3a [IMP] project: add invite collaborator button to collaborator list view
This commit includes the addition of an 'Invite Collaborator' button to the
project collaborator list view. When clicked, this button opens the same wizard
as the 'Share Editable' button found on the project.project form view. By using
this wizard, project collaborators can be added to the responsible project.

task-2947578

Part-of: odoo/odoo#119771
2023-06-19 23:16:45 +02:00
Yash Vaishnav 9df284792c [IMP] project: improve the rating template
In this commit, I have updated the rating request email template by making
grammatical changes and including company information such as phone number,
email, and website and also added a 'Best regards'.

task-2947578

Part-of: odoo/odoo#119771
2023-06-19 23:16:44 +02:00
Yash Vaishnav bc90121bfb [IMP] project: set default milestone of the parent task to its subtask
With this commit, the milestone of the parent task will be assigned to
its subtask as default.

task-2947578

Part-of: odoo/odoo#119771
2023-06-19 23:16:44 +02:00
Yash Vaishnav 798f7db3c1 [IMP] sale_timehseet: bring improvements in project invoice notebook
In project.project form view  invoicing notebook > employee/SOL mapping
    - set the project's default Sol
    - selecting existing employees should not be possible
    - allow for on-the-fly employee creation

task-2947578

Part-of: odoo/odoo#119771
2023-06-19 23:16:44 +02:00
Hamza (hisl) 5ce17f327a [FIX] hr_timesheet : update effective_hours for progress_hours computation
Steps to reproduce the issue:

Add a project and create a task with a timesheet in it
set the allocated hours to 00:03
add a line in the timesheet with hours spent 00:03
Current Behaviour:
The percentage calculated would be 96%, even though the time allocated and time spent are equal.

Desired Behaviour:
The percentage should be 100 as both values i.e. time spent and time allocated are equal.

This is happening because effective_hours value is being rounded off to 2 decimal places, and is not accurate enough to compute the progress_hours.

Here, I have used the same line, that is used to compute effective_hours, to compute the task_total_hours but without rounding off. This will make the calculate more precise and accurate.

OPW-3270858

closes odoo/odoo#125619

X-original-commit: 94dd1d570410c9a994027b7030ee9204ca1ec3e9
Signed-off-by: Hamza Islam (hisl) <hisl@odoo.com>
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-06-19 21:25:55 +02:00
Prakash Prajapati 63d930112c [IMP] (website_), hr_recruitment: improve the recruitment app
In this commit we have made the following changes.
- Add new refuse reasons:
       - Languages issues
       - Role already fulfilled
       - Duplicate
       - Spam
       - Refused by Applicant
- Modify refuse reasons:
       - Refused by Applicant: don't like job
       - Refused by Applicant: better offer
- Clickable job position breadcrumb in website.
- Set default applicant when we create new email template
- Use the `selection_badge` widget in Refuse Reason wizard

task-3336247

closes odoo/odoo#125612

X-original-commit: 94bc52e79e37df6daf9af6cb62efd65d63cbb61e
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-06-19 21:25:52 +02:00
Prakash Prajapati 1aeb814ae8 [FIX] project, hr_timesheet: move the action_project_timesheet in hr_timesheet module
When the hr_timesheet module is not installed and a customer uses the
  action_project_timesheets action through customization, a traceback will
  occur because he will not get the action of hr_timesheet.

closes odoo/odoo#125600

X-original-commit: cdeeb70ada8364c681c93961c2bd29f1069cebbf
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-06-19 21:25:50 +02:00
niyasraphy 2a2b13c1d9 [IMP] stock: show cancel state only when cancelled
before this commit, in the stock move and stock
move line form view, the cancelled state is shown
in the second position and in the stock move line
form view, the cancelled state is always visible.

after this commit, the cancelled state will be
moved to last position as in all status bar and
in the cancelled state in move line will be shown
only if the record is in the cancelled state.

closes odoo/odoo#121333

Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-06-19 20:19:35 +02:00
Thomas Lefebvre (thle) 2eb9c0708f [FIX] website_sale: manage access_point_address with Sendcloud
Steps to reproduce:
-------------------
- install website_sale and delivery_sendcloud module;
- create a shipping method (use Sendcloud provider);
- configure the integration with
"Mondial Relay Point Relais International 1-2kg";
- configure option with shipping rule and use location;
- on website create a new quotation with the pubic user;
- process the checkout;

(Check in backend the shipping weight)

- fill City and Zip Code fields with correct value
(example: Paris | 75011)

(- configure the company's country)

Issue:
------
[1.] If the shipping method is the only one, the locations are not displayed.
[2.] The delivery address is not the address of the chosen location.

Cause:
------
[2.] The method `update_eshop_carrier` is retriggered after update the `access_point_address` field.
The `access_point_address` is reset.

Solution:
---------
[1.] Show the option to choose a location if we only have one delivery method
(we are certain that the options should be displayed).
[2.] Use a parameter in the post request to instruct
not to reset the `access_point_address` field.

opw-3326139

closes odoo/odoo#125647

X-original-commit: 677bff31d3acdd05fff6567b693de78cff256ea2
Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-06-19 19:17:08 +02:00
Tom De Caluwé 7f6924e8fd [FIX] core: allow uppercase characters in translatable fields
Identifiers (including column names) that are not double-quoted are folded to
lowercase in PostgreSQL. Before this commit, this resulted in errors when
updating translations for translatable fields, because the query did not
correctly quote all identifiers.

opw-3287428

closes odoo/odoo#125641

X-original-commit: 70ae8de223fc10f6e80dae06b0f6a6f15c198b5f
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
Signed-off-by: Tom De Caluwé (tdc) <tdc@odoo.com>
2023-06-19 19:17:06 +02:00
Hubert Van de Walle (huvw) 9d48733d19 [FIX] account: display journal entries total
Steps to reproduce
==================

- Go to Accounting > Accounting > Journal Entries

The total at the bottom is not displayed and there is a `-` instead.

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

The `amount_total_signed` field uses the currency_field
`company_currency_id`.
It should be present in the view for the web client to be aware of it's
value.

opw-3316448

closes odoo/odoo#125639

X-original-commit: eaec9f7c3c28e2ee9d42597052a21e6b2695cd60
Signed-off-by: William André (wan) <wan@odoo.com>
2023-06-19 19:17:03 +02:00
Mahdi Cheikh Rouhou (macr) 0a89e70e5b [FIX] web : translate all content in customer preview
When we go into customer preview of a quotation for example and change the language different than English (to fr_BE for example)
we see that some of the content isn't translated  and still displaying in english.

Steps to reproduce the error :
1-Install sales and website app
2-Create a quotation for a customer and just save it don't confirm it.
3-Go to customer preview
4-Change the language to fr_BE
5-Click on "signer & payer"
6-You can see that it still display 'Full Name' in english and also some other terms

The origin of the problem is that all the parts that were rendered via a t-call gets rendered in english.
I investigated the problem and it turns out that the language code for the _t is alwyas english(https://github.com/odoo/odoo/blob/06719a84c52c7a97487b7ee0bef3bbe166d5b502/addons/portal/static/src/js/portal_signature.js#L45)
The problem is that the user_context.lang is always undefined here (https://github.com/odoo/odoo/blob/06719a84c52c7a97487b7ee0bef3bbe166d5b502/addons/web/static/src/legacy/js/core/session.js#L201)
As a solution I copied the code from 15.0 which was working fine (https://github.com/odoo/odoo/blob/4fa2dbcaf777c23758519ab0feb9707a7592cd6b/addons/web/static/src/legacy/js/core/session.js#L199-L209).

opw-3192666
.

closes odoo/odoo#125638

X-original-commit: 441c94270a4935d2b0b67a9f8201fcba9d15d957
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
2023-06-19 19:17:00 +02:00
Touati Djamel (otd) 640332df35 [FIX] project_mrp: display MO button even if only confirmed or draft MO
Steps to reproduce the bug:
- Install project_mrp
- Create a MO:
    - select any product
    - add an analytic account linked to a project, e.g: “field service”
    - save

- Go to the “field service” project
- click on “project Updates”

Problem:
The manufacturing order view button is not displayed, because we have
no MO in the done status

To display the button, we do a "read_group" on the
"account.analytic.line" related to the "account.analytic" of the project
 in the "Mrp" category.

https://github.com/odoo/odoo/blob/08112964f76816f11ef28d702ae49243f9cb5f91/addons/project_mrp/models/project.py#L42-L46

However, since the "account.analytic.line" records are created only
when the manufacturing order (MO) is in the "done" status, no records
are found, and so the button is not displayed.

opw-3300251

closes odoo/odoo#125620

X-original-commit: ddf49f0416dd398672f5b97af73f2f3d58cdc16f
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-06-19 19:16:58 +02:00
Nicolas Bayet faeeea76e9 [FIX] web_editor: set the clientId after creating it
Before this commit, when creating a new record, there is no
`_currentClientId` set in the wysiwyg as there is no collaboration
setup for new records. When the user save the record, there is a call
to `Wysiwyg.resetEditor` but as the
`OdooEditor.collaborationSetClientId` was called before
`Wysiwyg.setupCollaboration`, the `_currentClientId` was not set.

That lead to the `OdooEditor._collabClientId` being undefined, which
lead `OdooEditor.serializeNode` to not serialize the node through the
function `serializeNode`.

So unless the client A reload it's page, if another client (B) open
the same record and synchronize with client A, client A will send it's
history when `get_history_from_snapshot` is triggered but no
`_historySteps` mutations nodes will not be serialized.

So when client B will receive the steps in `historyResetFromSteps`,
the code will crash.

After this commit, the proper order will set the _currentClientId in
time because `collaborationSetClientId` is set after
`setupCollaboration`.

task-3359732

closes odoo/odoo#125599

X-original-commit: 85acd380cab34ca507251c8b232520c76f2a3e58
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-06-19 16:40:17 +02:00
Jeremy Kersten 5746f4eccc [FIX] website_forum: don't use trailing / in url_for
Since PR https://github.com/odoo/odoo/pull/106109, url_for remove the
trailing / so we need to handle this case from another way

closes odoo/odoo#125598

X-original-commit: 1d04e56013e53320da4eda5335e06a69f2c479e9
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
Signed-off-by: Jérémy Kersten <jke@odoo.com>
2023-06-19 16:40:15 +02:00
Maximilien (malb) 832c271197 [FIX] account,l10n_es: Adding company registry
For the l10n_es localisation, we needed to print on the invoice the company id
of the partner we send the invoice to. To do that, I had to add some id to make
the xpath work.

Task-3281337

closes odoo/odoo#125596

X-original-commit: 845b275846e49a923a9e181ad37cee3c691f16d0
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Maximilien La Barre (malb) <malb@odoo.com>
2023-06-19 16:40:09 +02:00
smna-odoo b3baa64adb [FIX] sale: prevent traceback while add new product in sale order line
An error occurs because to convert the amount in sale order line company is
required.

when user remove the company and tries to add a new product in sale order line
error occur.

applying these changes will resolve this issue.

sentry-4090085761

closes odoo/odoo#125575

X-original-commit: c04bc8026eae79c01fb9315d8063b12d3a1e2fa8
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Signed-off-by: Smit Nagar (smna) <smna@odoo.com>
2023-06-19 16:40:07 +02:00
Walid 56227b9049 [FIX] delivery: Backorder shipping cost with invoice policy in real
port of this fix
https://github.com/odoo/odoo/pull/70454

Steps to reproduce the bug:

- Let's consider a delivery carrier DC with invoice policy = 'real'
- Let's consider a consumable product P with a weight = 1kg and sales price = 10€
- Create a sale order SO with 2 P and add DC as shipping cost
- Process the shipment for 1 P and create a backorder
- Process the second shipment with the last P

Bug:

Two lines L1, L2 with DC were created on SO but only L1 as a price unit and a description.
L2 had a price unit = 0€ and no description.

opw-3219711

closes odoo/odoo#125573

X-original-commit: 79dad0a7599584f14e4ab3e96c393983e95aa519
Signed-off-by: Adrien Widart (awt) <awt@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-06-19 16:40:04 +02:00