Commit Graph
165708 Commits
Author SHA1 Message Date
aliya c23ab615d8 [FIX] account_peppol: fix settings text, search
The text should be update, since we do not review applications anymore.
Also, currently if a user types a random text in the settings' search bar,
Peppol setting appears. Peppol settings should be enclosed in `block` tags as all other settings.

task-3525510

closes odoo/odoo#137355

X-original-commit: 156b0c94c2c9cf26b1168864c723e2ad2d720311
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Signed-off-by: Aliya Tastemirova (alta) <alta@odoo.com>
2023-10-03 16:55:45 +00:00
Louis Baudoux 24b3d9799c [FIX] partner_autocomplete: fix res_partner_manyone widget
The `partner_gid` key isn't part of the response of the Autocomplete API
of Clearbit anymore, so we can't rely on its presence to know if the
suggestion comes from Clearbit or not.

Ticket #3321391

closes odoo/odoo#137354

X-original-commit: 63b8aa6b69d917c5c1cc83e11c530cd2fd665f25
Signed-off-by: Francois Georis (fge) <fge@odoo.com>
Signed-off-by: Louis Baudoux (lba) <lba@odoo.com>
2023-10-03 16:55:44 +00:00
Josse Colpaert 73de649796 [FIX] l10n_es_edi_sii: export regimen key should depend on taxes
We made it depend on the partner country, but it is better to
identify it through the tax being used.  E.g. it is only the
exportation of goods that is needed to change the regimen
and not the services.

We also needed to change the test, because we used E2 with
a Belgian partner.

opw-3514270

closes odoo/odoo#137184

X-original-commit: 14d5be171e238d7aa12f513659929b5b940eea78
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Josse Colpaert <jco@odoo.com>
2023-10-03 15:37:33 +00:00
Josse Colpaert ccd9dd7ca9 [FIX] l10n_es_edi_sii: intracom should be identified by tags, not country
We use the casilla 10 and 11 of the modelo 303 to identify intra-community
instead.

This way, the tax defines the regime that should be used.

opw-3514270

X-original-commit: eb287e911afc652c122b44c39af4b6d6b11bf618
Part-of: odoo/odoo#137184
2023-10-03 15:37:33 +00:00
Bruno Boi 00875e2654 [IMP] web: remove useless recompute position hook
This commit brings a simple improvement.
There is no need to reposition an element while
you are scrolling inside of it.

closes odoo/odoo#137139

Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
2023-10-03 15:37:32 +00:00
Bruno Boi 2c7afe7fe2 [REF] web_tour: use OverlayContainer for pointers
**Before this commit**
The tour_service make use of a custom
main component TourPointerContainer.
But there is really no good reason it does.

**After this commit**
The tour_service now make use of the overlay service.
Advangates:
- same place in DOM for all piece of UI that overlays
  the other elements.
- should avoid potential stacking context issues
- removal of a useless component, less code to maintain

Part-of: odoo/odoo#137139
2023-10-03 15:37:32 +00:00
David Monnom (moda) 41713c5cce [IMP] pos_self_order: attributes choice in single page
Previously, attributes had to be selected one by one on different pages.
For each choice, you had to click on the next button.

Now, all product attributes are on the same page, simplifying selection.

closes odoo/odoo#137107

Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-10-03 15:37:31 +00:00
Brieuc-brd 12031dd6b0 [IMP] website: adapt style of editable fields
This commit adapts the hover style of the editable fields elements to
match the new overlay style.

task-3368793

closes odoo/odoo#132653

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-10-03 12:52:33 +00:00
Brieuc-brd 3d1974543f [FIX] mass_mailing: adapt first/last drop zone position
Prior to this commit, the first drop zone at the top and the last one at
the bottom were half hidden.
This commit adapts their position in order to be fully visible.

task-3368793

Part-of: odoo/odoo#132653
2023-10-03 12:52:33 +00:00
Brieuc-brd 388c88eaf2 [FIX] web_editor: remove handle area's overlapping
Prior to this commit, the area of top and bottom handles overlapped the
content according to the size of the overlay border.

This commit changes the way height is calculated to remove this overlap.

task-3368793

Part-of: odoo/odoo#132653
2023-10-03 12:52:33 +00:00
Brieuc-brd 3af727c183 [IMP] web_editor: update overlay buttons
This commit adapts the draggable icon in the overlay button to improve
the readability.

This commit also adapts the "danger" background color of
`oe_snippet_remove` button to maintain consistency with the web editor.

task-3368793

Part-of: odoo/odoo#132653
2023-10-03 12:52:33 +00:00
Brieuc-brd 8ca644252e [IMP] website, web_editor: redesign the drop zone
This commit adapts the drop zone to maintain consistency with the style
of web editor.

task-3368793

Part-of: odoo/odoo#132653
2023-10-03 12:52:33 +00:00
Brieuc-brd 70f723a9f7 [IMP] web_editor: redesign the handle elements
This commit improves the design of handles, making them more user
friendly.

task-3368793

Part-of: odoo/odoo#132653
2023-10-03 12:52:33 +00:00
Brieuc-brd 8204d15822 [IMP] web_editor: redesign the grid layout
This commit improves the design of the grid layout to make it easier to
read.

task-3368793

Part-of: odoo/odoo#132653
2023-10-03 12:52:33 +00:00
Yosua Nicolaus 23b0d6f5a6 [IMP] account: improve invoicing tour
improve the flow of invoicing tour by:
- moving some bubble to a more clear position
- rewrite some text content
- delete some and add new tour step

closes odoo/odoo#132382

Task-id: 3468585
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
2023-10-03 12:52:31 +00:00
Yosua Nicolaus 6db8079d7b [REM] account: remove useless fixme & extra_trigger
remove unrelevant FIXME from 1 year ago as it was not relevant anymore

Task-id: 2632645
Part-of: odoo/odoo#132382
2023-10-03 12:52:31 +00:00
Bruno Boi c4fb9c92d7 [FIX] web: remove popover unused style
The style was introduced with commit [1]
but then its only usage was removed in [2].

[1]: af89b46c5b
[2]: 59f4d112abf1eb175214614f9a84fc0c7a4af932

closes odoo/odoo#137309

X-original-commit: 22ccb0e795637864706a9933a23f605590a1f36e
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
2023-10-03 08:42:22 +00:00
Claire Bretton (clbr) 43b3abd3e2 [FIX] account: fix traceback on payment info button
Steps to reproduce:
1. Accounting > Invoices > click any unpaid invoice
2. Register Payment (doesn't matter if it's full or not)
3. Click the info (i) button next to the "Paid on" below invoice lines
-> Traceback
Before the traceback the unreconciliation button available was not
refreshing the view, which still appeared with "Paid on".
We fix both problems at the same time.

task-id:3516681

closes odoo/odoo#136383

Signed-off-by: Habib Ayob (ayh) <ayh@odoo.com>
2023-10-03 08:42:20 +00:00
std-odoo b56e6dfdcc [IMP] web: show properties sum in list view
Purpose
=======
Always show the sum of a property column if its type is integer or float.

When we group records we don't show the sum, because it will require
to be able to aggregate properties (`properties.xxxxx:sum`) and the
technical cost is too big for the feature it gives.

Task-3468750

closes odoo/odoo#133700

Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2023-10-03 08:42:19 +00:00
Carmen Bianca BAKKER c466b4751d [FIX] base: Prevent singleton ValueError on res.partner's barcode
Fixed the string en passant.

closes odoo/odoo#137356

X-original-commit: 56e44e157f316e7cb0edac7bd0976bea3cbf895c
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
2023-10-03 07:19:03 +00:00
Ali Alfie (alal) d58e0c43c7 [FIX] l10n_es_edi_facturae: change signature template
This commit fixes the signature in the export by:
- Changing the signature template to remove unnecessary transforms.
- Replacing SigningCertificateV2 with the correct tag. According to https://www.facturae.gob.es/formato/Paginas/politicas-firma-electronica.aspx the signature follows the XAdES ETSI TS 101 903 format which contains the tag SigningCertificate instead.
- Correcting the way the signature node was removed in the _get_uri_function.

closes odoo/odoo#137321

X-original-commit: e4d92f37da41e7e5efaeb82b4adfff669083fb23
Signed-off-by: William André (wan) <wan@odoo.com>
2023-10-03 07:19:01 +00:00
Ali Alfie (alal) ca797bb960 [IMP] l10n_es_edi_facturae: import facturae
Allows for importing FACe XML files.

task-3387230

X-original-commit: 6b970d73b8feac1903e271770f7df77fc2d96b71
Part-of: odoo/odoo#137321
2023-10-03 07:19:01 +00:00
Xavier-Do de13b9030b [FIX] lunch: remove freezetime class decorator
Using freezetime to decorate a TestCase can have strange effects.

It looks like an override but monkeypatching the
setUpClass/tearDownClass. It started breaking between python 3.10.6 and
3.10.12. See pr message for more details.

closes odoo/odoo#137215

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2023-10-03 07:19:00 +00:00
Xavier-Do b67f50a57a [IMP] tests: improve logging of active patcher
Part-of: odoo/odoo#137215
2023-10-03 07:19:00 +00:00
FrancoisGe 22f31a5d0c [FIX] web: external button in many2one field
The goal of this commit is to fix two problems in the Many2one field:
1. At setup, the field is considered to be isFloating when its value is false.
2. When "xxx" is encoded and "Create xxx" is selected, the field is still
   considered to be isFloating even the selection.

isFloating should only be true when the user is performing a search, when
they have made their choice isFloating should be set to false.

These problems should result in the external button not being displayed
in these two cases. Currently, the button is displayed correctly due to
a bug in owl. The bug in owl causes all Components that have executed
evaluateExpr with record.evalContext will be render each time record.update
is called. For example, for Many2oneField, it is the call to dynamic.context
in extractProps that will cause the rendering of the Component Field
containing Many2oneField. This will trigger a call to onWillUpdateProps
each time record.update is called, and will modify isFloating to make it correct.
In order to fix OWL without introducing any bugs, we're going to fix these problems.

How to reproduce after OWL is fixed:
====================================

Case 1:
------
- Go to a form view with an field "x" (with an onchange) and a many2one field
- Create a new record (the many2one field is empty)
- Edit field "x"
- The onChange returns a value for the many2one

Before this commit:
    The external button is not displayed

After this commit
    The external button is displayed.

Case 2:
------
- Go to a form view with a many2one field
- Insert "blabla" in the many2one
- Click on "Create blabla".

Before this commit:
    The external button is not displayed

After this commit
    The external button is displayed.

closes odoo/odoo#137212

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-10-03 07:18:59 +00:00
rupa-odoo 206cf98a8a [FIX] hr_timesheet: fix access rights of planned_hours
Before this commit, Even if the user doesn't have access to the timesheet still
user was able to see the "Allocated Hours" in Project tasks. which is part of
the timesheet.

After this commit, if the user doesn't have access to the timesheet then
the user won't be able to see the "Allocated Hours" in Project tasks.

task:3472646

closes odoo/odoo#137135

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-10-03 07:18:57 +00:00
Xavier Morel 9d3de1190b [FIX] core: make model decorators work better with decorator 5
Decorator 5 changed the default decoration method from a transparent
exec-ing to wrapper functions. This makes the decorators visible to
the profiler, and breaks one of the profiler tests as the stack traces
now differ between using decorator 4 and decorator 5. Amongst other
concerns, this is an issue because debian bookworm has updated
decorator to 5 (.1.1), and the next ubuntu LTS (which should be 24.04
hopefully codenamed Nefarious Nematode) will do the same (Ubuntu has
been providing decorator 5 since 23.04).

5.1 added a `decoratorx` function which corresponds to the old
exec-based `decorator`, however it doesn't have a `decorate`
version. So we have to flag the wrappers, instead of decorate-ing the
original method with them. This seems to have the same semantics so
why we were using `decorate` is not entirely clear why we were not
doing that previously (neither
b1e83fd7b8 nor #25383 really provide
explanations). Possibly because pylint is a dum-dum and requires
ignoring one of its rules?

Implement in 14 since it doesn't hurt even though the test in question
does not exist yet.

closes odoo/odoo#137323

X-original-commit: 52e92904eca3cdeaee734b0a83e2d3fb463e8b56
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2023-10-03 06:16:49 +00:00
Aaron Bohy 2f9c4979fa [IMP] web,survey: better error management in tests
The initial motivation of this commit was to ensure that the qunit
test suite doesn't stop when an error is thrown in a test, which
could happen if the error was thrown "sufficiently close to the
end of the test". Indeed, the "unhandledrejection" event being
async, it was sometimes triggered after the end of the test, when
the service registry was already reset, and the check of the
presence of the error service was wrong, so the error event wasn't
default prevented (e.g. await makeView(...) and the view crashes
at render time).

This led us to rework in more depth the way we deal with errors in
tests. Here are a few behaviors we want (probably not exhaustive):
 - an error in a test must never end the suite (executed in py)
 - an error in a test must always make the test fail, except if the
   error is expected in the scenario, which one must be able to
   state
 - a test must always wait for potential unhandledrejection events
   to be triggered before ending.
 - ideally, we don't want to have to deal with unhandledrejection
   in each test throwing an error (in order to prevent the suite to
   stop)

To achieve this, we come with the following solution. We introduce
a new assertion method, "expectToThrow" which allows to state that
during the test, we expect errors to be thrown. It takes a list of
error messages that will be compared at the end of the test with
the errors that have been thrown during the test. If they differ,
a qunit failure is pushed and the test fails. If an error occurs
in a test and "expectToThrow" hasn't been called, qunit is directly
informed of the error and a failing assertion is done, make the
test fail as well.

If the error service isn't available in the test environment, we
apply the logic above when an "error" or and "unhandledrejection"
event is thrown. If the error service is available, we wrap the
default handler (typically the one that handles everything that
hasn't been handled by specific handlers, like tracebacks) and if
we get to it, we apply the logic above. This means that one must
call "expectToThrow" if
 - the error service isn't deployed, or
 - the thrown error is handled by the default handler, because
   it is something like a traceback (errors like UserError,
   ValidationError are graciously handled by the RPCErrorHandler)
   and thus never reach the default handler.

In all cases, we prevent default the event such that the error
doesn't make the python test end.

Finally, to ensure that "undhandledrejection" events are handled
before the test ends, we wait, in the qunit lib, for a setTimeout
before ending the test, which ensures that all such events have
been dispatched.

closes odoo/odoo#137120

Related: odoo/enterprise#48211
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
2023-10-03 06:16:46 +00:00
alsh-odoo 2331165bd0 [FIX] l10n_it_edi: set default 'demo' for l10n_it_edi_sdicoop_demo_mode
This traceback arises when the user tries to activate
'l10n_it_edi_sdicoop_register' without 'l10n_it_edi_sdicoop_demo_mode'.

To reproduce this issue:

1) Install 'l10n_it_edi' without demo data
2) Open 'Invoice/Customers/Customers'
3) Set the value of 'Codice Fiscale' field for all customers
4) Go to the 'Configuration/Settings/Electronic Document Invoicing' block
5) Now activate 'Allow Odoo to process invoices' twice

Error:- "KeyError: False"

[1] On the '_set_l10n_it_edi_sdicoop_register_demo_mode' method,
'edi_mode' variable is getting value through 'l10n_it_edi_sdicoop_demo_mode'.

When the user is not activated 'l10n_it_edi_sdicoop_demo_mode', 'edi_mode'
value will be 'False'.

Here 'edi_mode' is used in '_create_proxy_user' method and in that
'_create_proxy_user' the '_register_proxy_user' method is used, in
which the 'response' variable is getting value with the help of
'_get_server_url'method.

[2] But '_get_server_url' method returns 'proxy_urls[proxy_type][edi_mode]'.

Because the user did not selected'l10n_it_edi_sdicoop_demo_mode',
the 'edi_mode' value will be 'False', Which leads to the above traceback.

This commit will resolve the above issue by selecting default value 'demo',
if no 'l10n_it_edi_sdicoop_demo_mode'.

See:-
[1]
https://github.com/odoo/odoo/blob/8a13ca14d3fd251bbf85b1d8949b9d3c6ea76119/addons/l10n_it_edi/models/res_config_settings.py#L81-L92

[2]
https://github.com/odoo/odoo/blob/8a13ca14d3fd251bbf85b1d8949b9d3c6ea76119/addons/account_edi_proxy_client/models/account_edi_proxy_user.py#L84-L89

Sentry-4457787457

closes odoo/odoo#136771

X-original-commit: d6f9a0015c9f82fd7719883f604ad4d808332485
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
Signed-off-by: Altaf Shaik (alsh) <alsh@odoo.com>
2023-10-03 06:16:45 +00:00
bat-odoo 0ac02c60dc [FIX] mrp: prevent traceback when user modify reports using studio
Before this commit
==================
Currently, when we try to modify the BoM Overview report from the studio then
it's return traceback.

Steps to produce
================
- Install Manufacturing(`mrp`) and Studio(`web_studio`)
- Now open Manufacturing and click on the studio icon
- click on the reports button and select BoM Overview report
- Now you can see the traceback

After this commit
=================
With this commit, no more errors occur when we try to modify reports from the studio.

closes odoo/odoo#137175

X-original-commit: 00785e729ab3aaf650102c0ca8b14f9855744574
Signed-off-by: Quentin Wolfs (quwo) <quwo@odoo.com>
Signed-off-by: Bhavin Patel (bat) <bat@odoo.com>
2023-10-03 05:16:47 +00:00
Xavier ALT d3099f569f [FIX] auth_password_policy: keep current policy on update
On update/upgrade we should keep current password policy if its
already set

closes odoo/odoo#137326

X-original-commit: c27257914b47b6fda6d4349f9e553abbbfa53347
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Signed-off-by: Xavier Alt (xal) <xal@odoo.com>
2023-10-02 18:47:46 +00:00
Prakash Prajapati 99936d5a43 [FIX] web: fix the tooltip of the state_selection
Issue:
      If the user does not pass hide_label options then the tooltip appears twice.
Fix:
     In this commit we have removed the null tooltip.

Example:
     <field name="kanban_state"  widget="state_selection" />

task-3475416

closes odoo/odoo#137281

X-original-commit: d39cfca349d5b623eb87f71f9996b3794de24378
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Prakash Prajapati (ppr) <ppr@odoo.com>
2023-10-02 15:38:15 +00:00
Eteil Djoumatchoua(etdj) da18c86117 [FIX] stock: Enable searching on lot's product qunatity
Steps:
- In ``stock.production.lot`` list view, use the filter 'Expiration Alerts'

Issue:
Every lots with ``product_expiration_alert`` set to True are returned but also the ones
with ``product_qty`` set to 0.0.

Reason:
The ``StockProductionLot.product_expiration_alert`` represents lots with expiration before or equal to the current date
but don't consider the quantity of product on hand.

Solution:
After discussing with Thomas (THD), and Tiffany (TIC) the solution is to add a new custom search function on the compute
field ``product_qty`` that will be used with the 'Expiration Alerts' filter to solve the problem.

opw-3474622

closes odoo/odoo#137251

X-original-commit: 09f1a45ccbb8b463e7d9326a25c2b0b18173b133
Signed-off-by: Tiffany Chang (tic) <tic@odoo.com>
Signed-off-by: Eteil Junior Djoumatchoua (etdj) <etdj@odoo.com>
2023-10-02 14:12:52 +00:00
Djamel TouatiandWilliam Henrotin 3a4574d67f [FIX] stock: avoid error when editing quant with duplicated sn
The error is caused by this commit: https://github.com/odoo/odoo/commit/e21c17fae8a29c8ee04883b27d761b8ce13cf5b7

Steps to reproduce the bug:
- Enable Storage location in inventory setting
- Create a storable product “P1”:
    - Tracked: SN
- Create a purchase order with 1 unit of P1
- Receive product:
    - location: WH/stock/shelf 1
    - SN: S1
- Valide the delivery
- Go to the product form
- update the quantity:
    - new quant:
        - Location: WH/stock/shelf 2
        - SN: use the same as shelf 1 (S1)
- You will receive a warning informing you that S1 is already used in
another location (this is expected), but the quant is still created
with this SN.

- Now try to clear the quant or refresh the page.

Problem:
You will always get a user error: "Quant's editing is restricted, you
can't do this operation." This occurs because the field "sn_duplicated"
is computed, and the write function is called to set it as True.
However, since this field is not included in the allowed fields,
the user error will always be triggered.

opw-3511463

closes odoo/odoo#137206

X-original-commit: 3a7b781dc1fad41ca0120c48f7587edb6d7adafe
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
Co-authored-by: William Henrotin (whe) <whe@odoo.com>
2023-10-02 14:12:51 +00:00
David Monnom (moda) dcae390faf [IMP] point_of_sale, pos_self_order: save custom product attribute
Previously, the custom value of an attribute was not saved in the
database when selected via the point of sale or Self Order. The only way
to see this value was via the product name.

Now, this custom value is saved via the `product.attribute.custom.value`
template, in order to follow the behavior of the Sale module.

Others fix in this PR:
- Prevent to pass to payment page when we are in mobile mode. Only kiosk
mode is allowed to do so.
- Hide "Modify" button in the cart page when the line is already sent to
the server.
- Make the language popup behaviour available in mobile mode too.

closes odoo/odoo#136612

Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-10-02 14:12:49 +00:00
Julien Carion (juca) 0792200c9d [IMP] web: add include archived to domain selector
This commit introduces a new feature to the domain selector that allows
to toggle a new "include archived" option that alters the domain in a way
such that archived records are included or not. This domain part is naive
and may overlap with custom parts of the domain. The special domain part
which includes archived records (['&', <previous_domain>, '|', ('active'
, '=', True), ('active', '=', False)]) is invisible inside the domain
tree but remains visible in the domain code editor.

Also rename the "Match records with xxx of the following rules" statement
to "Match xxx of the following rules".

task-3482381

closes odoo/odoo#135861

Related: odoo/enterprise#47599
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
2023-10-02 14:12:47 +00:00
Guillaume (gdi) 2cede25222 [IMP] website: add Instagram page snippet
This commit adds a new snippet to display an Instagram page on the
website using an iframe that embeds the Instagram page.

task-2603045

closes odoo/odoo#133905

Signed-off-by: Benjamin Vray (bvr) <bvr@odoo.com>
2023-10-02 14:12:46 +00:00
Brieuc-brd b5b94857e7 [IMP] website: add thumbnail for Instagram page snippet
This commit adds a thumbnail for the incoming Instagram page snippet.

task-3495454

Part-of: odoo/odoo#133905
2023-10-02 14:12:46 +00:00
Triet Ngo d05372eb7b [IMP] purchase, sale, stock: add packaging in reports
Several reports don't include product packing info on them. This is
useful for customers to see that what they bought matches what they
expected and for pickers who need to know which product packaging they
should be selecting from stock. Reports this was added to are:
- Sales orders,
- purchase orders (including RFQs),
- picking operations,
- delivery slips.

Note that we purposely exclude backordered moves since they weren't
deemed to be necessary at the time this feature was created.

Also includes light refactoring to remove repeated code for conversion
of product qty to packaging qty and to make it easier to do this
conversion in the future (i.e. can pass product.packaging without
original record that it was assigned to)

Task id 2927379

closes odoo/odoo#96858

Signed-off-by: Steve Van Essche <svs@odoo.com>
2023-10-02 14:12:45 +00:00
Louis (loco) f2ea69a8cf [FIX] web_editor: show dropzones at an over after an over event
Steps to reproduce the bug:
- Add a "Text-Image" snippet on the website page.
- Take an "Inner content" snippet from the right panel and drag it from
a dropzone to another. It has to be fast so that the order of the "over"
and "out" dropzone events is "over" > "over" > "out" and not "over" >
"out" > "over" as usual.

-> The exited dropzone is not correctly displayed.

The problem is that since [1], the website is inside of an iframe. Due
to that, the snippets menu does not have a direct access to the
dropzones. To solve the problem, the already defined `$dropZones`
variable is used instead of searching the dropzones inside the DOM. For
the snippet editor, the problematic line has been deleted at it is
already handled by `_outPreviousDropzone()`. This is acceptable since
the commit that introduced `_outPreviousDropzone()` ([2]) and the commit
that introduced the removed line ([3]) were both introduced to handle
the case of an "over" after an "over". In other words, as
`self.droppped` will always be `true` when
`self.dragState.currentDropzoneEl` is set and it will always be `false`
when `self.dragState.currentDropzoneEl` is not set, the problematic line
can be removed as it is already handled in `outPreviousDropzone()`.

[1]: https://github.com/odoo/odoo/commit/31cc10b
[2]: https://github.com/odoo/odoo/commit/c6886410603a16b6a3c5fe459d273dd883c110c7
[3]: https://github.com/odoo/odoo/commit/fed5854e32bcddf8b14b8311b2fe542eed990f77

task-3522552

closes odoo/odoo#137255

X-original-commit: 06fde42d3ba0e8be2128cda8e695c5def917f391
Signed-off-by: Benjamin Vray (bvr) <bvr@odoo.com>
2023-10-02 12:58:53 +00:00
Bruno Boi bf954def41 [FIX] web: close popover on pointerdown
**Preliminary note**
The fix mentioned in this commit is already done
in another commit [1].
The below commit message stayed the same for history's sake.

**Before this commit**
A popover would close on outside mousedown event.

This is not sufficient enough, has for instance all the draggable stuff
makes use of the pointer events instead of the mouse events.

This lead to some unwanted behavior, i.e.:
- Open the DomainSelectorDialog
- Open a ModelFieldSelectorPopover
- Try to drag the modal
- The popover remain open and its position is not updated.
  The dialog's dragging is fine.

**After this commit**
The popovers will close on pointerdown away events.
Now:
- Open the DomainSelectorDialog
- Open a ModelFieldSelectorPopover
- Try to drag the modal
- The popover is closed and the dragging still works as expected.

[1]: 76665eb400168a6fd6e2b5f5fe099c8c4e9c8a5e

closes odoo/odoo#137247

X-original-commit: c63dbc4ed0a04e34571c2929f43812873b62fd16
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
2023-10-02 12:58:52 +00:00
Maximilien (malb) 01666d9c21 [IMP] account_report: trade account rework
Before this PR, the trade partner filter was using a boolean instead of a
selection field. This PR will change the type of the field to a selection.

closes odoo/odoo#135129

Task-id: 3499156
Related: odoo/enterprise#47288
Related: odoo/upgrade#5135
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
2023-10-02 12:58:49 +00:00
Chenyun Yang dd357f2f6a [IMP] spreadsheet: mark _t function to be hidden
This commits hides a function in spreadsheet that are not supposed to be
used by end users: `_t`. It can only work with static strings in the source
code.

task 3102309

closes odoo/odoo#109863

Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-10-02 12:58:46 +00:00
Jinjiu LiuandRodolpho Lima 80b3edea0c [FIX] web_editor: restore popover edit link focusing on URL
Reproduction:

1. Install website
2. Change to edit mode and click a link on the main page, for example,
“contact us” at the bottom
3. click "Edit link" in the popover

Fix: use the variable `shouldFocusUrl` for link tool props update

task-3514360

closes odoo/odoo#137246

X-original-commit: af035687c57f8b34261beff121669ee044d9b7df
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Co-authored-by: Rodolpho Lima <rcdl@odoo.com>
2023-10-02 11:42:58 +00:00
Jigar Vaghela d5bc5eb8ec [IMP] l10n_in_edi: Only Send E-invoice if is under GST and include receipts
if GST related tax is selected then we send E-invoice else not needed

task - 3360018

closes odoo/odoo#137187

X-original-commit: 2d59d7506ef00db0e8a1c641634179e56dc423dd
Related: odoo/enterprise#48196
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Jigar Vaghela (jva) <jva@odoo.com>
2023-10-02 11:42:56 +00:00
Alexandre Kühn b526078ae9 [REF] mail: set data immediately on discuss model relational field
With this commit, instead of `Record.insert()` before setting
relation with records, we can immediately pass record data.
For example:
```js
message.author = { id: 3, type: "partner", name: "Admin" };
thread.messages.add({ id: 10, body: "some-text-content" })
```

This is supported on all relational fields that define a target
model.

To make this work while drastically avoiding cyclic dependencies
in code, whenever data have to be inserted in relation, they are
pre-inserted with essential data, and then they are fully inserted
after being registered in the relation.

closes odoo/odoo#136539

Related: odoo/enterprise#47854
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-10-02 11:42:55 +00:00
Alexandre Kühn 485bcb82bf [REF] mail: make store service a model
This simplifies managing relations on the store, and gives
incentive to define them there instead of another prop that
is a record, e.g. `discuss`.

Part-of: odoo/odoo#136539
2023-10-02 11:42:55 +00:00
Flotchet ab93449323 [IMP] website_hr_recruitment: Enhance UI/UX
Previously, applicants could submit job applications without providing a
resume or LinkedIn profile URL. Additionally, there was no notification
for applicants if they had recently applied for the same job or another
position, and no checks or notification were in place for malformed
LinkedIn URLs.

This commit addresses these issues by:
- Requiring at least one of Resume or LinkedIn profile for an applicant
  to apply.
- Notifying applicants about prior applications for the same job or
  different positions.
- Adding a LinkedIn URL an notifying the applicants that he has
  probably made a mistake if the regex doesn't match his input.

task-3446696

closes odoo/odoo#131308

Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
2023-10-02 10:39:42 +00:00
Valentin Vallaeys (vava) 612d85b92c [IMP] sale_management: hook for optional products domain
closes odoo/odoo#137053

Related: odoo/enterprise#48138
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-10-02 09:11:18 +00:00
Andrea Grazioso (agr-odoo) 7ee07bc8c8 [FIX] l10n_cl: relocate timbre electronico in invoice
With an L10n_cl company
Create invoice
Send&Print

Issue: Invoice report does not correctly print the electronic stamp.
It is in the wrong position (on the right, it should be on the left) and
it is shrinked.

In commit
https://github.com/odoo/odoo/commit/3764914c8616bf59d299e6279cc6fc93321cdacb
the 'total' section of the invoice report has been
moved into a right column as floating element.
This commit reposition the stamp on the left column

opw-3474173

closes odoo/odoo#136987

X-original-commit: 37cce94c200f05ee66b9577b95d2eb478134148f
Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
Signed-off-by: Andrea Grazioso (agr) <agr@odoo.com>
2023-10-02 09:11:16 +00:00