Commit Graph
166832 Commits
Author SHA1 Message Date
zel-odoo 8bea49fef6 [FIX] mail:Remove duplicate autofocus code
closes odoo/odoo#139717

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-10-25 20:56:04 +00:00
Valeriya(vchu) 85342d72ee [FIX] sale_product_configurator: fix function _addProduct
steps to reproduce:
- create product A with optional product B
- add product A as optional of product B
- create SO with product A and add optional product B in configurator
after this commit choosing optional product is fixed
opw-3388598

closes odoo/odoo#139709

X-original-commit: b416e0b684c3e371d70db3a9f6653f1371acf972
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Signed-off-by: Valeriya Chuprina (vchu) <vchu@odoo.com>
2023-10-25 20:56:02 +00:00
Adrien Schoffeniels 6fb1d19ecd [IMP] product: move properties from product.product to product.template
Purpose:
-------
Commit [1] added the properties field on the product.product template.
However, the product.template model is more suitable to hold these
properties as the product.product model already has attributes which
are quite similar to properties.

Task-3570286

[1]: https://github.com/odoo/odoo/commit/70043822103638f651a521bd2da36cfdfd86245e

closes odoo/odoo#139702

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-10-25 19:37:37 +00:00
flvr-odoo 7d25e7bf92 [IMP] website: add signature to form
This commits add a signature to the website_form.

The purpose of this modification is to allow the controllers to be
able to verify that the form was originally generated from the view.

This prevent the end user to submit arbitrary values to the website_form
controller.

In this commit, email_cc and email_bcc are treated as the same fied as
it holds the same function

This does not offer protection against submission replay. Previous versions
of the form are not invalidated by editing the view.

If one need to completely reset that protection and invalidate the
previously generated website_form, the only solution is currently to
change the database secret.

closes odoo/odoo#139701

Signed-off-by: Vranckx Florian (flvr) <flvr@odoo.com>
2023-10-25 19:37:36 +00:00
Maximilien (malb) c123b676da [FIX] l10n_ar: traceback filter
It seems that the invisible is not working on filter and so the fiscal
country_code cannot be evaluated which causes a Traceback when trying to access
the res_partner form view.

closes odoo/odoo#139698

Task: 3270458
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
2023-10-25 19:37:35 +00:00
hupo-odoo 128054575c [FIX] account: move bank reco menuitem to Enterprise
Without the Accounting app and the Bank Reconciliation part, the menu item "Reconciliation Models" is irrelevant. We therefore move the menu item from account to account_accountant.

task-3540705

closes odoo/odoo#139689

X-original-commit: 17f3fc980bf65f3ca4a02da998afafdfd386e0de
Signed-off-by: John Laterre (jol) <jol@odoo.com>
Signed-off-by: Hugo Poncelet (hupo) <hupo@odoo.com>
2023-10-25 19:37:34 +00:00
Xavier Morel 39be91b48e [IMP] core: clean up the ACL tracebacks some
Currently if a record is not in the cache it raises a `CacheMiss` the
handling of which leads to loading the record from the database (or
something).

If an issue occurs during that loading, because the loading is an
`except` scope the cache miss gets linked with the new one via

> During handling of the above exception, another exception occurred:

This is both noise (the cache miss is not actually relevant) and
misleading, because the wording makes it look like an unrelated error
occurred during handling.

- move the loading of the record out of the `except` to limit the
  scope of the `KeyError` and avoid "inheriting" it
- try to `from None` a few specific errors to remove implicit linkage,
  as the new error should have all relevant information, the key error
  / cache miss is just an implementation detail

closes odoo/odoo#139680

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2023-10-25 19:37:31 +00:00
Eteil Djoumatchoua(etdj) 893781c9a8 [FIX] sale_project: correct the domain of task's sale order
Steps:
- Create a contact with 2 sub contacts Sub1 and Sub2.
- Create a service product with project creation on order.
- Create a quotation for Sub1 and the created product and confirm.
- Go to the created project and create a task.
- Edit the task and change the customer to Sub2.
- Empty the sale order item.

Issue:
The sale order doesn't appear in the drop list.

Cause:
Wrong domain on ``ProjectTask.sale_line_id``.

opw-3441194

closes odoo/odoo#139670

X-original-commit: 8b6bd8c92402a92efed71f97de61eaeffb0caea7
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-10-25 19:37:28 +00:00
Jigar Vaghela 7389345696 [IMP] product*: create product and variant by xml file
before this commit:
===================
you can not create xml record for product.template and product.product and link them for same product
if you like to achieve it you need to do it like

```
<record id="product_template_1" model="product.template">
    <field name="name">Box</field>
    .
    .
    .
    <field name="list_price">8000.0</field>
</record>
<record id="product_template_attribute_line_1" model="product.template.attribute.line">
    <field name="product_tmpl_id" ref="product_template_1"/>
    <field name="attribute_id" ref="product_attribute_color"/>
    <field name="value_ids" eval="[(6, 0, [ref('product.product_attribute_value_1'), ref('product.product_attribute_value_2')])]"/>
</record>

<function model="ir.model.data" name="_update_xmlids">
    <value model="base" eval="[{
        'xml_id': 'product.product_template_attribute_value_1',
        'record': obj().env.ref('product.product_template_attribute_line_1').product_template_value_ids[0],
        'noupdate': True,
    }, {
        'xml_id': 'product.product_template_attribute_value_2',
        'record': obj().env.ref('product.product_template_attribute_line_1').product_template_value_ids[1],
        'noupdate': True,
    },]"/>
</function>

<function model="ir.model.data" name="_update_xmlids">
    <value model="base" eval="[{
        'xml_id': 'product.product_product_red',
        'record': obj().env.ref('product.product_template_1')._get_variant_for_combination( obj().env.ref('product.product_template_attribute_value_1')),
        'noupdate': True,
    }, {
        'xml_id': 'product.product_product_4b',
        'record': obj().env.ref('product.product_template_1')._get_variant_for_combination( obj().env.ref('product.product_template_attribute_value_2')),
        'noupdate': True,
    }]"/>
</function>
```

after this commit:
==================
you can create product.tempalte and product.product from xml file and link it manully by attribute value

like
```
<record id="product_template_1" model="product.template" context="{'create_product_product': False}">
    <field name="name">Box</field>
    .
    .
    .
    <field name="list_price">8000.0</field>
</record>

<record id="product_template_attribute_line_1" model="product.template.attribute.line" context="{'create_product_product': False}">
    <field name="product_tmpl_id" ref="product_template_1"/>
    <field name="attribute_id" ref="product_attribute_color"/>
    <field name="value_ids" eval="[(6, 0, [ref('product_attribute_value_blue'), ref('product_attribute_value_red')])]"/>
</record>

<record id="product_template_attribute_value_1" model="product.template.attribute.value">
    <field name="attribute_line_id" ref="product_template_attribute_line_1"/>
    <field name="product_tmpl_id" ref="product_template_1"/>
    <field name="attribute_id" ref="product_attribute_color"/>
    <field name="product_attribute_value_id" ref="product_attribute_value_blue"/>
</record>

<record id="product_product_blue" model="product.product">
    <field name="product_tmpl_id" ref="software_reseller.product_template_1"/>
    .
    .
    .
    <field name="product_template_variant_value_ids" eval="[(6, 0, [ref('product_template_attribute_value_1')])]"/>
</record>

<record id="product_template_attribute_value_2" model="product.template.attribute.value">
    <field name="attribute_line_id" ref="product_template_attribute_line_1"/>
    <field name="product_tmpl_id" ref="product_template_1"/>
    <field name="attribute_id" ref="product_attribute_color"/>
    <field name="product_attribute_value_id" ref="product_attribute_value_red"/>
</record>

<record id="product_product_red" model="product.product">
    <field name="product_tmpl_id" ref="software_reseller.product_template_1"/>
    .
    .
    .
    <field name="product_template_variant_value_ids" eval="[(6, 0, [ref('product_template_attribute_value_2')])]"/>
</record>
```

closes odoo/odoo#139669

Signed-off-by: Pierre Masereel (pim) <pim@odoo.com>
2023-10-25 19:37:26 +00:00
Florent de Labarre 96e3f27424 [FIX] mail: show correctly qweb error
Before this commit it is impossible to find the qweb error when you preview an email template.

closes odoo/odoo#139668

X-original-commit: 1f373de5f218a1f43015f4f80e60d1da0188d6b5
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-10-25 19:37:25 +00:00
Sébastien Theys 67d32fff44 [FIX] snailmail: tests: fix "message_tests.js"
runbot-24463
runbot-24508

closes odoo/odoo#139646

X-original-commit: f6b658a5dbc227c30830d0c60a2d862892c3306f
Signed-off-by: Didier Debondt (did) <did@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-10-25 18:11:12 +00:00
aliya 556b05125b [IMP] account_peppol: improve move states and filters
Structure `peppol_move_state` according to the following logic:
1. Ready to Send / Invoices confirmed addressed to partners that are Peppol valid and not in one of the other statuses. Default behavior upon posting such an invoice.
2. Queued / In case of asynchronous sending only, the instruction to send has been given via the Send & Print but the cron wasn't run yet. It is still possible to cancel the sending.
3. Pending Reception / Too late to cancel, synchronous or asynchronous sending makes it now impossible to cancel the sending
4. Canceled / Once asked explicitly by the user. It's instant.
5. Done     / Upon confirmation or delivery received from the AP
6. Error / Upon confirmation of a notification of error received from the AP

Add an action on sale journals to open invoices that are ready to be sent via Peppol

- Peppol ready filter in Customer Invoices view
- Rename `PEPPOL state` to `Peppol status` for consistency
- Pre-fill valid phone numbers in `account_peppol_phone_number` field
- Fix async sending in demo mode

closes odoo/odoo#139615

Signed-off-by: Laurent Smet (las) <las@odoo.com>
2023-10-25 18:11:11 +00:00
Claire Bretton (clbr) 489faccb78 [FIX] account: Send & Print - prevent multi email if no mail template set
We don't want to allow to send multiple invoices by email if there is
no mail template set. It would lead to unwanted behaviors.

closes odoo/odoo#139612

Related: odoo/enterprise#49477
Signed-off-by: Laurent Smet (las) <las@odoo.com>
2023-10-25 18:11:10 +00:00
Claire Bretton (clbr) c0f12dc031 [FIX] account: Send & Print values on move shouldn't be copied
We don't want to copy values to be sent when duplicating a move.

Part-of: odoo/odoo#139612
2023-10-25 18:11:10 +00:00
Claire Bretton (clbr) c5c1e6a4e2 [FIX] account,*: Send & Print - remove useless param
Remove useless parameter on the `_get_wizard_values` method, coming
from previous implementations.

Part-of: odoo/odoo#139612
2023-10-25 18:11:10 +00:00
Claire Bretton (clbr) 0d3d6c8e27 [REF] account,*: Send & Print - clean computes
- Clean computes to avoid unnecessary recomputations and improve
the readability.
- Various small fixes after this refactor PR https://github.com/odoo/odoo/pull/139311:
wrong usage of `self`, missing `api.model`

Task-id: 3415101
Part-of: odoo/odoo#139612
2023-10-25 18:11:10 +00:00
Claire Bretton (clbr) da165d53a3 [FIX] l10n_es_edi: Move Send & Print files under wizard files
The Send & Print files were in the wrong folder, they must be under
`wizard` folder.

Task-id: 3415101
Part-of: odoo/odoo#139612
2023-10-25 18:11:10 +00:00
“moda” 4db538611d [IMP] point_of_sale,pos_*: automaticaly paid order when amount is 0
*: pos_online_payment_self_order,pos_restaurant,pos_self_order

Previously, when self order was set to "pay after each" and a user
ordered an order with a total of $0.00, the order was not automatically
set to paid status, as is the case with point_of_sale.

Now, when the self order is set to "pay after each" and an order with a
total of $0.00 is placed, it will be automatically paid.

Minor fixes:
- A props has been removed from `ReceiptHeader` because it was causing
an error in debug mode.
- In point_of_sale, when an order was placed with a total of $0.00, an
error was raised during validation because no payment method was
selected. Now, before checking this payment method, we first check
whether it exists.

closes odoo/odoo#139555

Related: odoo/enterprise#49442
Signed-off-by: Adrien Guilliams (adgu) <adgu@odoo.com>
2023-10-25 18:11:05 +00:00
vlst c12a87180e [REF] pos*: remove getSteps
pos*: l10n_es_pos, point_of_sale, pos_hr, pos_loyalty, pos_online_payment,
      pos_online_payment_self_order, pos_restaurant, pos_sale, pos_self_order

In this commit we refactor all the pos tours.

Changes:
 - Removed the `startSteps`, `getSteps` functions as they were
   no longer serving a purpose. We now simply put the tours steps
   in the array returned by the function given to `steps`. We
   apply `flat()` to this array in order to be able to provide both
   single steps and arrays containing multiple steps;
 - removed the classes from the tours. Now each helper function
   is simply exported from it's file and is consumed as `import * as myHelpers`;
 - removed the `do`, `check`, `exec` subpaths as they were not providing
   a clearer api. The functions themselves already have descriptive names.
   ( writing `ProductScreen.do.clickHomeCategory()` is not clearer than
   `ProductScreen.clickHomeCategory()` )
 - formatted all files.

closes odoo/odoo#139317

Task: 3565443
Related: odoo/enterprise#49313
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-10-25 18:11:01 +00:00
williamandh4818 dc696c8ed4 [IMP] analytic: allow cross analytics
Purpose
=======

Make it possible to compare analytic values between plans by inputting
up to one account per plan on each line.
For instance, if we have 2 plans: "Country" and "Product Type", with the
following accounts

| Country | Product Type |
| ------- | ------------ |
| BE      | Drinks       |
| LU      | Food         |

And the following invoices:
* 1000€ of drinks in Belgium
* 2000€ of food in Belgium
* 3000€ of food in Luxemburg

We want to be able to display the following pivot tables:

|     | Drinks | Food | Total |
| --- | ------ | ---- | ----- |
| BE  |   1000 | 2000 |  3000 |
| LU  |      0 | 3000 |  3000 |
| Tot |   1000 | 5000 |  6000 |

|        | Total |
| ------ | ----- |
| Food   |  5000 |
| * BE   |  2000 |
| * LU   |  3000 |
| Drinks |  1000 |
| * BE   |  1000 |
| Total  |  6000 |

Implementation
==============

* `ir.fields` are added/removed dynamically on `account.analytic.line`
* Each analytic plan corresponds to one field on `account.analytic.line`
* The fields are added dynamically in the views.
* `account.analytic.plan` doesn't have a `company_id` field anymore,
  meaning that all the companies have access to all the plans. This
  means that the applicability fields and lines are now company
  dependent, and those can be used to know which fields/plans to display
  for which company.
* There can no longer be one "Project" plan per company, even if the
  accounts of that project can still be owned by only one company.
* There is now only one method to get the default (or "Project" plan),
  which is `_get_plan_columns`

task-3497653

closes odoo/odoo#139225

Related: odoo/upgrade#5306
Related: odoo/enterprise#49226
Signed-off-by: William André (wan) <wan@odoo.com>
Co-authored-by: william <wan@odoo.com>
Co-authored-by: h4818 <ayh@odoo.com>
2023-10-25 18:10:57 +00:00
Valentin Chevalier 41440868c2 [IMP] website_sale: add shown_on_product_page on kanban view
closes odoo/odoo#137975

Signed-off-by: Francois Georis (fge) <fge@odoo.com>
2023-10-25 18:10:55 +00:00
Valentin Chevalier e3fe2b01f1 [IMP] web,sale: allow selection widget in kanban view
Currently, users who want to change the visibility of product's
documents need to open their form view and edit it.

The selection widget now allows users to quickly edit the way a document
is displayed to their customers from the product's documents kanban view.

Part-of: odoo/odoo#137975
2023-10-25 18:10:55 +00:00
Arnold Moyaux 7dda6bb927 [REF] stock: quantity pocalypse
The rational is:
Currently we have 2 columns. One for reservation, the other
for quantity picked.

However in real time, either you follow the reservation and everything
goes well. Otherwise you pick something else. In the case where you
pick somewhere else than reserved, you would like to modify the
reservation to have something similar and free the quantity you
didn't pick and expect the system to not suggest the ones you took.

In other hand, we always want to have the reserve quantity similar to
the done.

On top, having two columns could be confusing for the end user.

The cons:
-The qty_done column could be use during the picking, to
remember if something has been pick or still to pick.
- For some flow (put in pack), it's easier to write a part of the quantity to pack
and still want to reserve the full amount of product.

We goes back and choose a ligther interface over complex feature.

Changes:
Qty done and reserved qty are merged into a single column.
A new checkbox on the move exists to mark it as picked or not
Since the reservation always follow the quantity, it's now possible
to have more reserved quantity than stock. However the system will
never propose it and the inventory showing reserved > quantity should
be a warning.
The system should never modify a move that has been picked. We don't
want to overide the user action.

Regression:
Not able to pick a single stock.move.line

closes odoo/odoo#137864

Related: odoo/enterprise#48709
Related: odoo/upgrade#5310
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2023-10-25 18:10:54 +00:00
Loukas Wets (lowe) c43297435c [IMP] pos_restaurant: default floor plan when new config
In this commit a new default floor plan is added along with one table when
creating a new restaurant pos_config. It ensures that the default floor
is removed for the demo data and for the tests.

closes odoo/odoo#139594

Signed-off-by: David Monnom (moda) <moda@odoo.com>
2023-10-25 17:03:23 +00:00
anhe-odoo 02c4f52a9a [FIX] spreadsheet_edition: fixes image export in .xlsx
Task Description

o-spreadsheet now allows to insert images in a spreadsheet, and
we also allow to export them inside .xlsx file. However, while this
works as intended in a standalone o-spreadsheet server, it doens't
work correctly in Odoo as the data of the image are not found while
we try ton convert the spreadsheet to an xlsx file. This PR aims to
simplify the request made to get the binary data of the image file.

Related task

closes odoo/odoo#139549

Task: 3524473
X-original-commit: 301a98c
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2023-10-25 17:03:21 +00:00
Bastien (bvdn) 78f551b2fc [FIX] project: allow state reset for stage batch modification
The onchange on the stage_id/project_id wasn't triggered when modifing tasks in batch
we are now putting the same conditions as the onchange but in the task write() method

closes odoo/odoo#139491

X-original-commit: 0accffc0eb65f40e44d31402a0a362abaaa9b9bd
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-10-25 17:03:20 +00:00
Mathieu Duckerts-Antoine 998ef1f63a [IMP] tools: ignore set in view expressions
Now that some field attributes like invisible are given by Python expressions
and that those can involve some set operations, we have to ensure that
the views can be validated if they use such operations. We do that and
add a test.

closes odoo/odoo#139451

Signed-off-by: Géry Debongnie <ged@odoo.com>
2023-10-25 17:03:19 +00:00
Mathieu Duckerts-Antoine 39e5124170 [IMP] web: support set intersections in condition tree
Now that some field attributes like invisible are given by Python
expressions that can involve set operations, we want to be able to easily
edit those expressions in the expression editor. For this we have to
improve a bit the mapping expression <-> condition tree, in order to
have simple rewrittings like
"set(user_ids).intersection([1, 2])" <-> condition('user_ids', 'in', [1, 2]).

Part-of: odoo/odoo#139451
2023-10-25 17:03:19 +00:00
GorashandMathieu Duckerts-Antoine febece1371 [IMP] web: py_js: support of set and some set operations
We make py_js support sets and the operations intersection, union, and
difference.

Part-of: odoo/odoo#139451
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Christophe Matthieu <chm@odoo.com>
2023-10-25 17:03:19 +00:00
Mathieu Duckerts-Antoine 55e1a4546e [FIX] web: py_js: improve evaluation of bool
The evaluation of some expressions involving bool like "bool()" were wrong.
We fix that and add some tests.

Part-of: odoo/odoo#139451
2023-10-25 17:03:19 +00:00
Rob Coekaerts 6c89c9b312 [FIX] hr_work_entry_contract: fix the time off defer
This commit addresses a specific issue: the prevention of work entries being
generated when an employee's leave needs to be deferred. In some cases,
employees may need to postpone or reschedule their entire leave period at
once, rather than creating separate work entries for each day of leave. This
change in the code ensures that such deferred leaves are handled more
efficiently, allowing for the entire leave duration to be deferred in one action
streamlining the leave management process.

closes odoo/odoo#139434

Task: 3424006
X-original-commit: 17ca2e19fd231df5e19297eaee72a4e946825a94
Related: odoo/enterprise#49390
Signed-off-by: Bertrand Dossogne (bedo) <bedo@odoo.com>
2023-10-25 17:03:17 +00:00
vishal padhiyar 0987ee5b5e [FIX] web_editor: sanitize html pasted in codeview
Before this commit:

When we paste html using selectAll and we click code view button then the newly
added template will be visible and immediately got removed by old template. This
problem is because of pasted html is not sanitized.

After this commit:

Now when we paste html using selectAll then we actually see new html template in
result.

task-3473633

closes odoo/odoo#139384

X-original-commit: 6d6e1527ccdf5e616330905bc4b7e4fdd80c6192
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-10-25 17:03:16 +00:00
visp-odoo 45f70979a8 [FIX] mass_mailing: issue when pasting html in email marketing
Before this commit:

When you try to copy paste html in code view of email marketing then in preview
it will show the code instead of template.

After this commit:

Now when you try to paste html in code view of email marketing then it will show
template preview as a result.

task-3473633

X-original-commit: 5cd1a900d89c34877be2c1036ad52d8b4a70c849
Part-of: odoo/odoo#139384
2023-10-25 17:03:16 +00:00
Daniel Kosky (dako) c66cfcca81 [FIX] account_peppol: fix config setting option
The res config settings view contains block in which peppol can be
enabled. Enabling peppol using the checkbox inside the block installs
the peppol module. Once installed, the "Use Peppol invoicing" option is
available, which is itself a checkbox, nested inside of the previous
one. This gives the appearance of duplication, and in addition it's not
relevant at this point to provide the user the option to uninstall
peppol from this menu.

The solution is to replace this content in the view when peppol is
installed, such that the peppol options are always displayed, and the
enable peppol checkbox is replaced.

For this reason, references to the "is_account_peppol_participant" have
been removed, as its use was primarily for hiding/displaying these
settings. The field is no longer useful, and should, references to be
removed in a later Paccount_R have been removed, as  its use was
primarily forhiding/displaying these settings. The field is no longer
useful, and should be removed in a later upgrade script.

Required fields have been modified in the xml such that they no longer
prevent saving from the res config settings, instead validation is
performed on the "validate registration" button action.

closes odoo/odoo#139379

Task-id: none
Signed-off-by: Laurent Smet (las) <las@odoo.com>
2023-10-25 17:03:15 +00:00
21f20eccd9 [IMP] portal: redesign
This PR introduces a general redesign of the Portal user interface in order
to give it that fresh and sleek vibe we also introduced in the backend. 

A list of the different changes can be found below. It includes redesign
of some elements as much as layout modification, or element additions.

closes odoo/odoo#138077

Related: odoo/enterprise#48641
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Co-authored-by: fdamhaut (FLDA) <flda@odoo.com>
Co-authored-by: stefanorigano (SRI) <sri@odoo.com>
2023-10-25 15:50:36 +00:00
Chrysanthe (chgo) fc551f36a6 [FIX] portal: remove unused SCSS variables
This commit removes unused variables inside portal.

Before the redesign, portal was using a card layout. To ensure these
cards were always visible and readable, we used SCSS variables to detect
the `background-color` of the page. If the `background-color` was white,
we would set it to a light gray to ensure our cards are visible.

With the new design, we modified the structure and layout of the page,
using a bg-light class directly on the cards rather than modifying the
background of the body, which made these lines useless.

Since they are not used anywhere, we remove them from our SCSS file.

task-3046004

Part-of: odoo/odoo#138077
2023-10-25 15:50:36 +00:00
Chrysanthe (chgo) df8535fbd4 [REF] portal, *: portal redesign
*: base, account, account_payment, auth_top_portal, hr_timesheet, loyalty,
   mrp_subcontracting, payment, project, purchase, sale, sale_stock,
   sale_timesheet, website_crm_partner_assign, website_sale,
   website_slides

Portal general redesign. Increase visual consistencies with the backend
[1] and adapt to the new default website design [2].

[1] https://github.com/odoo/odoo/pull/116641
[2] https://github.com/odoo/odoo/pull/120302

task-3046004

Part-of: odoo/odoo#138077
2023-10-25 15:50:36 +00:00
Michael (mcm) fcb16a3b1b [IMP] *: remove guarded catch
This commit removes the promise extension which added the function
`guardedCatch`. It was used to filter server and connection errors from
javascript errors. Instead of using guardedCatch, we should use catch
and check if the reason is a server or connection error if needed and
re-throw the error if it's not handled.

closes odoo/odoo#137702

Task: 3439226
Related: odoo/enterprise#48451
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-10-25 15:50:34 +00:00
william-andre d8627c4e38 [REF] account,sale*: remove local cache for currency rates
Since it is cached by the ORM (see parent commit), there is no need to
manage the caching in the business code anymore.
In most cases in addition to making the code shorter, it also makes it
more readable by making the direction of the rate more obvious with the
use of the `to_currency` parameter.

closes odoo/odoo#137609

Signed-off-by: Raphael Collet <rco@odoo.com>
2023-10-25 15:50:33 +00:00
william-andre 9353a6f9ba [IMP] base: cache currency convertion rate per transaction
Most of the time, rates are computed in a loop by using
`<res.currency>._convert`. This leads to a lot of round trips with the
database.

This PR is caching the value for a whole transaction.
In order to do that, the non stored field `rate` has new (missing)
contextual dependencies: the arguments of `_get_conversion_rate`.
This allows to move the actual computation of the rate to the computed
field, and `_get_conversion_rate` is now only a proxy to avoid playing
with the context manually; also kept for backward compatibility.

Other solutions were considered:
* `ormcache`, but we want to avoid creating multiple caches and reduce
  the possibility to have inter dependent caches.
* managing a local cache everywhere, which is cumbersome and error prone
* a helper for the previous option by using a converter factory, but it
  is still an issue when the convert function is called from multiple
  call functions because the cache isn't shared then.

Part-of: odoo/odoo#137609
2023-10-25 15:50:33 +00:00
william-andre 2de30612f5 [REM] base: remove deprecated compute on currency
This method has been deprecated for more than 5 years, time to clean.

Part-of: odoo/odoo#137609
2023-10-25 15:50:33 +00:00
miad-odoo 2e974c10af [FIX] product: print labels only for consu, storable, combo
Before this commit, the "Print Labels" button shows for all products except
services.

However, this button does not make sense for event_booth, event_ticket, course,
... products

So we only show this button for storable, consumable and combo products.

Task-3390587

closes odoo/odoo#136753

Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2023-10-25 15:50:32 +00:00
Pratik Raval 28097c6dc2 [IMP] various: update wording of action labels
This commit changes the wording of actions and notifications in the modules
listed below:
1) Discuss (Leave Conversation)
2) Web (Delete Filter, Get View - Close, Tours - Close, and property field
   access warning)
3) Calendar (Stop Synchronization, Configure, and Discard)
4) CRM (Assign Leads)

Task-3390780

closes odoo/odoo#130353

Related: odoo/enterprise#44919
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2023-10-25 15:50:30 +00:00
damr 3b7dd79e5f [IMP] sale: Invoicing flow improvements
This commit's purpose is to ease the the flow of invoicing from the
project app. The warning message when the user tries to invoice without
fulfilling the condition has been updated.
When the customer of an SOL is a person and belongs to a company, the
company is now also shown on the sol, in addition of the name of the
customer. The idea is that the user is more keen to recognize the
company than just the name of the person.

task-3251615

closes odoo/odoo#122611

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-10-25 15:50:28 +00:00
Abderraouf Ghrissi (abgh) 3c6c796f32 [IMP] sale{project,timesheet}: Generic Improvement
Before this commit:
An internal use case of training cannot be handeled with the current ux.
Basically, training is sold to customers. It is given by a consultant who needs to timesheet their time.
With the current implementation, each training would generate 1 SO per customer per training.
This makes it impossible to timesheet because the consultant cannot split nor multiply their
time per person attending the training.
Because of that, timesheets cannot be billable which leads the reporting to be inaccurate.

After this commit:
A new field called `billing_type` is introduced allowing the users to flag the timesheets from a project as
considering as billable even they have no SOL set. And so
a billable project with billing_type set to 'billable manually', will have its timesheets without any SOL
considered manually billed.

task-3565762

closes odoo/odoo#139478

Related: odoo/upgrade#5318
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-10-25 11:37:39 +00:00
Karnav Sojitra 2d55340797 [FIX] tools: raise validation error while invalid expression
When the user tries to modify the view with an invalid xpath expression,
an XPathSyntaxError traceback will appear.

Steps to produce:
1. Install the Accounting module.
2. Settings > Technical > UI > Views > Open any view
3. Invalidate expr syntax and try to save, thus an error will be generated.

Error: XPathSyntaxError: Invalid expression

This commit handles XPathSyntaxError by raising ValidationError
instead of a traceback.

sentry-4377014622

closes odoo/odoo#139435

X-original-commit: 2af583d0b803b3334b871002e447d3211eb09bc2
Signed-off-by: Achraf Ben Azzouz (abz) <abz@odoo.com>
2023-10-25 11:37:36 +00:00
Paolo Gatti (pgi) 6637f1a4ab [FIX] l10n_it_edi: Send and print Checkbox behaviour fix
Several fixes after test:

- `l10n_it_edi_warning_message` 's compute was wrong

- `is_being_sent` allows for the Check Sending button to show, it just
  reloads the page

- now the XML export button is only readonly if there's PDF and no XML.
  In the other cases, it can be checked. It's checked and readonly if
  all XMLs are generated.

- some label fixin'

closes odoo/odoo#139362

Signed-off-by: Laurent Smet (las) <las@odoo.com>
2023-10-25 11:37:35 +00:00
Adrien Minne (adrm) 61d54527fc [IMP] spreadsheet: improve wrong linked menu handling
If a chart was linked to an odoo menu, but the odoo menu didn't have
an action, the user would get a traceback when clicking on the chart.

This commit:
- Improves dashboard validation. Now we test that the menu is linked
to an action, in addition to testing that the menu exists
- Send a "danger" notification when the user clicks on a chart with
a menu without an action linked to it, rather than a traceback

closes odoo/odoo#139324

Task: 3563450
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2023-10-25 11:37:33 +00:00
Jérémy Hennecart (jeh) b3ffdf02bb [FIX] mass_mailing: remove extra domain in view
Remove the extra mailing_domain in the form view and
keeping the one on a separate line.

This extra domain field was introduced by the improvement
task on the mailing form view design.
For more info see: e542cca69e

task-3562293

closes odoo/odoo#139224

Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2023-10-25 11:37:32 +00:00
Shaan Thakkar (THSH) 4e7d383692 [FIX] website_slides: unwanted html text
How to reproduce:
=================
1. Open any course having quiz.
2. Select quiz content.
-> In the quiz template we can see that the html content is not sanitize.

Technical:
==========
I think the issue arises after this commit https://github.com/odoo/odoo/commit/0d7acf60b4cca84a8c700edd97af8c4de6b78010

After this commit:
==================
Now t-esc is deprecated and the HTML text is not sanitize in the template
so instead of t-esc we are using t-out.

Task-3555159

closes odoo/odoo#138873

Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2023-10-25 11:37:30 +00:00