Commit Graph
164347 Commits
Author SHA1 Message Date
niyasraphy 8cd9db0923 [IMP] calendar, repair: move action from root menu to new menu
before this commit, the repair orders is directly
linked with the root menu of repair application and if you user opens the repair app, repair orders
action is shown as it is linked with the main menu.

similarly in the calendar app, the calendar is linked
with the root menu calendar.

but now if user move to reporting or configuration menu of repair app, there is no menu to access the repair orders.

with the new milk redesign on clicking the root menu user will be taken to home screen, where us there is hamburger menu in previous design to navigate to home screen.

so only way for user to access the repair order menu is to go back to home screen and come back.

similarly in the calendar app, if user takes the
configuration menu, in order to access the calendar, user
has to go to home screen and come back.

after this commit, a new sub menu is introduced in both
app and moved the action linked with root menu to
the newly added sub menu.

closes odoo/odoo#126329

Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-08-23 10:03:25 +02:00
Yolann Sabaux d1f9b17f51 [FIX] account_edi: Remove to_send edi documents when reseting to draft
Steps to reproduce:
- install l10n_it_edi
- create a bill and set the move line with a tax "RC"
- confirm
-> the blue banner edi appears
- reset to draft
- change the tax to a non "RC" tax
- post the bill

Issue:
Despite resetting the bill to draft state and rectifying the tax configuration, the document could still undergo unintended processing as a Reverse Charge Bill.

Solution:
Reverse Charge bills, particularly those involving Intra-EU transactions, mandate that the VAT be paid by the buyer rather than the seller.
Italian EDI regulations necessitate the submission of such bills to the Tax Agency, specifying the buyer's tax obligations through a process known as tax-integration or self-invoicing.

In cases where an incorrect Reverse Charge tax is mistakenly applied to a domestic vendor bill, the existing issue becomes evident.
Even if the bill is Reset to Draft and the incorrect tax is removed, the associated edi_document will still be existing and will still have its "to_send" state. Consequently, the Scheduled action incorrectly attempts to send it.

This commit rectifies the problem by ensuring that when a bill is reset to draft state, the associated edi_document is promptly deleted.
The document will be recreated only during the posting process, should it genuinely require submission to the tax agency.

opw-3281007

closes odoo/odoo#132752

X-original-commit: f2c973a970af947a0e77a5e835237b09f11bdf7e
Related: odoo/enterprise#46112
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Signed-off-by: Yolann Sabaux (yosa) <yosa@odoo.com>
2023-08-23 08:57:15 +02:00
Xavier Morel 5dbdf7ca69 [IMP] core: reintroduce warning on watch
Was removed during the watch refactoring of #111422, present to avoid
people merging `watch=True`.

closes odoo/odoo#132727

X-original-commit: d2b33743e1b6faef82b24eb1e30b142e6b072290
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2023-08-23 07:40:34 +02:00
roen-odoo 63fb465956 [FIX] pos_daily_sales_reports: opening difference counted only once
Current behavior:
The opening difference is counted twice when printing the session report
So the expected cash amount is wrong.
It was happening because the opening difference was counted in the
cash_register_balance_start and also in the cash_real_transaction.
So we use the previous session closing balance to only coun the opening
difference once.

Steps to reproduce:
- Open a PoS session with 100€ in the cash register and close it.
- Reopen the session and enter 50€ in the cash register.
  (The opening difference is 50€)
- Make a sale for 10€, using cash payment.
- Close the session and print the session report.
- The expected cash amount will be 10€ when it should be 60€.

opw-3384313

closes odoo/odoo#132690

X-original-commit: fce504ad1cdfd7c90fe85fcb7965524dc122ebac
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-08-22 20:59:10 +02:00
Odoo's Mergebot 27592c0c17 [MERGE] base, mail: move alias /email configuration to mail
RATIONALE

As multi-company tolerant alias domains will soon replace the usage of
configuration parameters, having them in base then replaced by more advanced
models in mail would be complicated to handle and not useful. Move those
ICP to 'mail' so that all mail configuration is done in that module.

SPECIFICATIONS

Move config parameter used for alias domains configuration in 'mail' module.
Base should be as simple as possible and let mail deal with mail server
complexity.

Move 'mail.{bounce/catchall}.alias' used with 'mail.alias.domain' to make
bounce and catchall emails. Move 'mail.default.from' as it will be integrated
into alias domains in some form.

Note that 'mail.default.from_filter' stays as an ICP in base as it is a
more global default parameter. It is used as default value in 'connect' when
no mail_server is used and no from_filter can be retrieved.

Some tests in 'base' are either fixed, either moved directly into 'mail'.
We now differentiate base behavior (without ICP) from configurable behavior
(with ICP in mail).

Split '_get_test_email_addresses' into two methods allowing to generate the
'from' and 'to' when testing SMTP connection. Improve test coverage, notably
for edge cases.

See sub commits for more details.

LINKS

Preparation for MC aliases, following
  * odoo/odoo#130768 + odoo/enterprise#45204 (test suite preparation)
  * odoo/odoo#130632 + odoo/enterprise#45118 (alias cleanup)
  * odoo/odoo#131492 (mail server test preparation)

See odoo/odoo#76734 and odoo/enterprise#20983 for MC Alias PR.

Task-3453347 (Mail: Move Mail ICP from Base to Mail)
Prepares Task-36879 (Mail: Support MultiCompany Aliases)

closes odoo/odoo#130750

Related: odoo/enterprise#46000
Related: odoo/upgrade#5025
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-08-22 20:58:57 +02:00
Thibault Delavallée a4fe51cb2e [MOV] base, mail: move mail config parameters usage to mail
RATIONALE

As multi-company tolerant alias domains will soon replace the usage of
configuration parameters, having them in base then replaced by more advanced
models in mail would be complicated to handle and not useful. Move those
ICP to 'mail' so that all mail configuration is done in that module.

SPECIFICATIONS

Move config parameter used for alias domains configuration in 'mail' module.
Base should be as simple as possible and let mail deal with mail server
complexity.

Move 'mail.{bounce/catchall}.alias' used with 'mail.alias.domain' to make
bounce and catchall emails. Move 'mail.default.from' as it will be integrated
into alias domains in some form.

Note that 'mail.default.from_filter' stays as an ICP in base as it is a
more global default parameter. It is used as default value in 'connect' when
no mail_server is used and no from_filter can be retrieved.

Some tests in 'base' are either fixed, either moved directly into 'mail'.
We now differentiate base behavior (without ICP) from configurable behavior
(with ICP in mail).

Task-3453347 (Mail: Move Mail ICP from Base to Mail)
Prepares Task-36879 (Mail: Support MultiCompany Aliases)

Part-of: odoo/odoo#130750
2023-08-22 20:58:54 +02:00
Thibault Delavallée 29f7e6d894 [FIX] base: be defensive when computing parts of 'from_filter'
From filter could be ill-defined, like ' ' or ','. This commit just make
some code more defensive against those values.

Task-3453347 (Mail: Move Mail ICP from Base to Mail)
Prepares Task-36879 (Mail: Support MultiCompany Aliases)

Part-of: odoo/odoo#130750
2023-08-22 20:58:53 +02:00
Thibault Delavallée 79677134d7 [IMP] base: split _get_test_email_addresses to distinguish from/to
Split '_get_test_email_addresses' into two methods allowing to generate the
'from' and 'to' when testing SMTP connection. As 'email_to' is always the
same better have a small method for it. Moreover it eases overrides if
some code wants to tune the from / to by overriding only the necessary one.

Task-3453347 (Mail: Move Mail ICP from Base to Mail)
Prepares Task-36879 (Mail: Support MultiCompany Aliases)

Part-of: odoo/odoo#130750
2023-08-22 20:58:52 +02:00
Thibault Delavallée 17e5bbb38b [IMP] base, mail: improve and add tests about ir mail server
Prepares the move of ICP to mail before replacing them by dynamic alias
domains. Improve test coverage, notably for edge cases. Continue to make
tests more explicit after odoo/odoo#131492. Some tests are also merged to
lessen number of different tests when possible, notably when only a test
parameter differs (like giving an SMTP session or not).

Clean ICP and mail servers setup in test classes allowing to remove some
unnecessary extra initialization. Cleanup a mock in mail.

Task-3453347 (Mail: Move Mail ICP from Base to Mail)
Prepares Task-36879 (Mail: Support MultiCompany Aliases)

Part-of: odoo/odoo#130750
2023-08-22 20:58:50 +02:00
Sébastien Theys ed7621d726 [REF] mail, *: remove unnecessary makeFakeNotificationService
* = hr, im_livechat

The real service works just as well, gives more guarantee on what is
actually tested, and requires less lines of code.

closes odoo/odoo#132744

Related: odoo/enterprise#46108
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-08-22 20:01:17 +02:00
David 8bd5c46872 [FIX] event: display event full name in registration form
In the event.registration form it can be hard to tell which event the
attendee belongs to at first sight if the event name is too long and
there are several ones with the same root.

Same approach as in https://github.com/odoo/odoo/pull/94315

TT44730

closes odoo/odoo#132730

X-original-commit: a10a0d66eaa841f114f7b0b3d79de124ee2d7fb0
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-08-22 20:01:13 +02:00
althaf shaik 07dea7ba45 [FIX] account_payment: handle error while computing suitable payment token
This traceback may arise while computing suitable payment tokens,
when a user clicks register payment in invoice.

Because in '_compute_suitable_payment_token_ids' method,
instead of 'paymet.token' 'payment.tokeb' is used.
Which is an invalid model name. It leads to keyerror

Error: 'KeyError: 'payment.tokeb''

See:
https://github.com/odoo/odoo/blob/60598dff9d8482bcea2f32fea6df1b1b71c760d6/addons/account_payment/wizards/account_payment_register.py#L36-L41

sentry-4380761438

closes odoo/odoo#132725

X-original-commit: f169d92454bba61547dc5bbbc3a6f9c45798562e
Signed-off-by: Achraf Ben Azzouz (abz) <abz@odoo.com>
2023-08-22 20:01:08 +02:00
Pedram (PEBR) 13656c71c3 [FIX] *_calendar: neuter Google & Microsoft Calendar
This addresses an issue with the current Google and Microsoft
Calendar synchronization feature in Odoo. It aims to prevent
inadvertent modifications on calendars in a duplicate database.

opw-3382489

closes odoo/odoo#132698

X-original-commit: 9c94804893cf41eb91aaa8750bf2d9a59f513158
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
2023-08-22 20:00:57 +02:00
Simon Goffaux (sigo) 11b9767b3e [FIX] website_form: fix translation issue in saas
In a SaaS server, the _meta_data variable will be translated when the
HTTP worker is spawned and it will be translated into whichever language
is set on the DB that spawns said worker. This causes issues when other
DBs use this worker as the variable may be translated into a language that is
not present in that DB. To rectify this issue, we use lazy translate so
the translation lookup is executed at rendering.

opw-3385997

closes odoo/odoo#132691

X-original-commit: b7a538998cfbb2428e6575bbac892a9aff26f0c5
Signed-off-by: Simon Goffaux (sigo) <sigo@odoo.com>
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-08-22 20:00:53 +02:00
Sébastien Geelen (sge) 4a7de52b0f [FIX] web_editor: ensure link insertion
When inserting a link into mass_mailing document
we need to delay the blur event to prevent the to_inline.

If the to_inline is called when the link dialog is open
the context is lost in the document and the link failed
to be inserted.

task-3234749

closes odoo/odoo#132667

X-original-commit: db38abf259c1a6fed51e8e99785ffea770e9e909
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Geelen Sébastien (sge) <sge@odoo.com>
2023-08-22 20:00:44 +02:00
Didier (did) 479ba79182 [IMP] mail: fix contains typing to avoid lint error
closes odoo/odoo#132632

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-08-22 20:00:24 +02:00
yhu-odoo a8977a7c76 [FIX] mrp: manual_consumption field can't save
The field manual_consumption field on mrp.bom is computed,
`readonly=False` should be added to make sure it's changable.
Also on the form view, `force_save="1"` should be added to make sure the
value will be saved since we make it readonly in some cases on the view.

closes odoo/odoo#132600

X-original-commit: 4bdfd0d1e0d95af92a1afae5888e9e587fc4994e
Signed-off-by: Tiffany Chang (tic) <tic@odoo.com>
Signed-off-by: Yuchen Huang (yhu) <yhu@odoo.com>
2023-08-22 20:00:15 +02:00
roen-odoo be4d4892f6 [FIX] l10n_fr_pos_cert: allow you to remove reward line in FR PoS
Current behavior:
When a reward line had 0 quantity, it was considered as active and the
points were deducted from the customer's balance.

Steps to reproduce:
- Install l10n_fr_pos_cert
- Change the Current company to FR company
- Create a loyalty card program
- Open the POS and add a product to the order to get points and trigger
  the reward.
- Remove the reward line, it should go to 0 quantity instead of being
  removed.
- The point are still removed from the customer's balance.

opw-3372998

closes odoo/odoo#132573

X-original-commit: f170bebb38fff044a9f0e247095adc3aaf5a5074
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-08-22 18:59:52 +02:00
Thomas Beckers 049caf6e92 [FIX] l10n_fr_fec: no cash basis compute
Before this, there was a computation of cash basis moves for each reconciliation
done during FEC import and it can slow down a lot the import for nothing since
no taxes will be in the imported entries so no cash basis will result from
reconciliation.

Now, the cash basis moves computation is skipped to improve the performance.

Here are the stats of reconciliation time on fresh database using a FEC file
of ~76000 amls including ~15000 reconciled.

V15 without fix => 8 min 15 s
V15 with fix => 5 min 27 s

V16 without fix => 9 min 36 s
V16 with fix => 1 min 33 s

opw-3274391

closes odoo/odoo#132549

X-original-commit: b2f15e1eabcc7bfd25231b16cba064b10cd54539
Related: odoo/enterprise#46021
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Signed-off-by: Thomas Beckers (tbs) <tbs@odoo.com>
2023-08-22 18:59:42 +02:00
Didier (did) 1d14df47da [IMP] mail: add possible value of thread.type
closes odoo/odoo#132485

Signed-off-by: Didier Debondt (did) <did@odoo.com>
2023-08-22 18:59:32 +02:00
Nicolas Lempereur 7c035c4bd1 [FIX] mass_mailing: save codeview to style-inline
Scenario:

- edit a mass mailing while in debug mode
- switch to codeview
- do a change
- click on save

Issue:

The body_arch is updated (making it seems like our change are taken into
account), but the body_html is not and the outdated version will be sent.

Solution:

With this change, when we commit the changes and have the codeview
opened, we will first update the wysiwyg editable to the current
codeview value, before updating body_html.

related to opw-3103549

closes odoo/odoo#132129

X-original-commit: 576bee4b7e426f45c7bf418b9762a46407f66549
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2023-08-22 18:59:18 +02:00
Didier (did) f30588273c [IMP] display typing status inside ImStatus
task-2282361

closes odoo/odoo#131518

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-08-22 18:59:14 +02:00
Hamza (hisl) 9492df6ad4 [FIX] sale: add salesperson to SO invoice follower
The salesperson is not added to the following list of invoice that is generated from a sales order.

1. Create a sales order by assigning a salesperson.
2. Confirm the order and generate the invoice.

Current Behavior:
The salesperson is not added to the message following list of invoice.

Expected Behavior:
The salesperson should be in the message following list of invoice.

OPW-3439198

closes odoo/odoo#130930

X-original-commit: d9cb66e22fc9f8cfa1c00a2808294fe1178ffaa1
Signed-off-by: Hamza Islam (hisl) <hisl@odoo.com>
2023-08-22 18:59:09 +02:00
niyasraphy 1f12be2a91 [IMP] web: remove always_reload from test case
This option is no longer necessary since [1] as the value is now reloaded by default.

related to: https://github.com/odoo/odoo/pull/130169

closes odoo/odoo#130896

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-08-22 18:59:05 +02:00
Pierre Paridans 6a0fc567bc [IMP] web,website_slides: split up {non-}legacy in name_and_signature.scss
closes odoo/odoo#130875

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2023-08-22 18:59:00 +02:00
Pierre Paridans 95af954b26 [REF] web,website_slides: move mimetypes.scss out of legacy
Part-of: odoo/odoo#130875
2023-08-22 18:58:59 +02:00
Pierre Paridans 4c1d9a9e4a [REF] web,website_slides: move translation_dialog.scss out of legacy
Part-of: odoo/odoo#130875
2023-08-22 18:58:58 +02:00
Pierre Paridans 1760924385 [IMP] web: remove unused switch_company_menu.scss
Part-of: odoo/odoo#130875
2023-08-22 18:58:57 +02:00
Pierre Paridans 65d35b8f73 [IMP] web,website_slides: remove unused keyboard.scss
Part-of: odoo/odoo#130875
2023-08-22 18:58:55 +02:00
Pierre Paridans a7b01e4a6a [IMP] web,website,website_*: moves zoomodoo lib out of web module
This commit moves the ZoomOdoo library out of the web module and the
backend bundle (through the common bundle) to the website module (as
it's used by it and its dependent modules).

Part-of: odoo/odoo#130875
2023-08-22 18:58:54 +02:00
Pierre Paridans 47c5a09219 [IMP] web,point_of_sale,website_slides: move FA overrides out of legacy
Part-of: odoo/odoo#130875
2023-08-22 18:58:53 +02:00
Arnold Moyaux 88a9074345 [FIX] sale_stock: update SO line with import
Creates a sale order, then validates the delivery.
Modify the sale order lines qty via import.
We expect a new delivery instead we have a UserError

The purpose of the userError is to avoid editing
reserved quantity directly in the picking. But in
SO/PO case it's handle by the system and quantities
are correctly reserved so the UserError should not
happens.

Remove the basic constraint on stock since it should not
be an issue anymore

opw-3336131

closes odoo/odoo#130870

X-original-commit: 87f62c90e703049bde8676663851a98e3b19f9db
Signed-off-by: Tiffany Chang (tic) <tic@odoo.com>
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2023-08-22 18:58:39 +02:00
Lucas Lefèvre e7128d68ee [REF] spreadsheet: use helper to create currency format
closes odoo/odoo#126933

Task: 3458811
Related: odoo/enterprise#43425
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2023-08-22 18:58:15 +02:00
utag-odoo 7849eded82 [IMP] hr_recruitment: remove grey area around mail text content
The commit includes changes to the email layout template. The existing template
id `mail_notification_light` has been replaced with a template id
`mail_notification_light_without_background`. This template adds a white
background color to the table element within the email notification, enhancing
the visual appearance.

task-3356254

closes odoo/odoo#125703

Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
2023-08-22 18:58:11 +02:00
Xavier Bol (xbo) b88cdfe4d9 [FIX] mail: add missing function evaluateBooleanExpr in activity record
Before this commit, when the user tries to access to activity view,
a traceback is occurred because `ctx.__comp__.evaluateBooleanExpr`
is not a function used inside the template of `ActivityRecord`.
That function is in fact used in the view compiler but the
ActivityRecord component does not have that function defined.

This commit defines that function in `ActivityRecord` component to
correctly compile its template.

Steps to reproduce:
------------------
1. Install Project
2. Go to Project > Tasks > My Tasks
3. Select the activity view of `project.task`

Actual behavior:
---------------
A traceback is occurred saying `ctx.__comp__.evaluateBooleanExpr`
is not a function.

Expected behavior:
-----------------
The activity view should be loaded as before.

closes odoo/odoo#132610

Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
2023-08-22 16:09:07 +02:00
Pierre Paridans 777eb76755 [REF] web,hr_holidays,website_slides: remove legacy Popover component
Replace usage of legacy Popover component.

Also, small css cleanup in hr_holidays.

task-3439226

closes odoo/odoo#132604

Related: odoo/enterprise#46062
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2023-08-22 13:38:24 +02:00
Adrien Guilliams (adgu) ec8106da5c [FIX] point_of_sale: correct taxDetails where used improperly
The tax details was recently changed and two places were it was used
were forgotten during the changes. This led to bugs in the discount
button with taxes that have the options "tax included in price" and
to company using round globally as rounding method.

Steps to reproduce the first bug:
    -   Set at least one tax with the attribute "tax included in price"
        to true
    -   Associate this tax to the config used
    -   Activate the global discount setting
    -   Open PoS and click on some products with the tax newly created
    -   Click the discount button in the Action pad widget

Steps to reproduct the second bug:
    -   Set the setting Rounding method of your company to
        "Round globally"
    -   Open PoS and click on products
    -   The total shown is 0

closes odoo/odoo#132484

Signed-off-by: David Monnom (moda) <moda@odoo.com>
2023-08-22 11:47:49 +02:00
hupo-odoo f2964dc02a [FIX] account{,_edi,_ubl_cii}: mass export edi documents
When selecting several invoices from the list view, it is possible to trigger an action to export all edi documents in a zip file. This commit fixes 2 different issues:

a) We want to be able to export edi documents that have not been sent. Therefore, we no longer filter for 'sent' and 'cancelled' edi documents.

b) We want to also export edi documents that have ubl format. These documents are, from 16.2, in another field on account.move and no longer part of edi_document_ids. This is the reason why we had to move the logic from account_edi to account to make it overridable to other modules. This new way of overriding the function will also enable other formats to be included in the export function.

task-3441449 (issue 1)
task-3439427 (issue 2)

closes odoo/odoo#131242

X-original-commit: f8654b3501aca6e5d77ced5f73cb351c61684cd2
Related: odoo/enterprise#45529
Related: odoo/upgrade#5032
Signed-off-by: Laurent Smet (las) <las@odoo.com>
2023-08-22 11:47:31 +02:00
Benjamin Vray 568198374b [FIX] web_editor: fix image shape selector
Steps to reproduce the bug:

- On Chrome, go to the Email Marketing application.
- Enter edit mode to modify a mail template.
- Add a text-image snippet to the template.
- Click on the image.
- Open the shape image selector in the options of the image.
- Scroll through the list of available shapes.
- Bug: A traceback error occurs.

The bug occurs because sometimes, in the 'scroll' function of the
selector, the 'ev.currentTarget' becomes 'Null'. This issue is specific
to Chrome and only happens in the email template editor (not in the web
page editor). It appears that this issue is related to using the
'throttleForAnimation' function for the event, where the value of
'currentTarget' gets lost during various calls.

We fix this bug by avoiding the use of 'currentTarget' in this specific
case. However, further investigation would be required to fully
understand the problem.

task-3431820

closes odoo/odoo#132574

X-original-commit: c799345f6ae81f10a8133688431fe63ed23617ad
Signed-off-by: Colin Louis (loco) <loco@odoo.com>
Signed-off-by: Benjamin Vray (bvr) <bvr@odoo.com>
2023-08-22 09:49:54 +02:00
niyasraphy 845c3c0114 [FIX] hr: allow creation of new work location
before this commit, on creating a new work location from
work location menu, is blocking the creation of the record
as a required field is not added in the view.

* Employees -> Configuration -> Employees -> Work location

Message:

The operation cannot be completed:
- Create/update: a mandatory field is not set.
- Delete: another model requires the record being deleted. If possible, archive it instead.

after this commit, the required field is added in the view
and end user can create a new work location from work
location menu

closes odoo/odoo#132537

X-original-commit: 389246bb28355804d895d522e32a7387c4ac44ae
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
2023-08-22 09:49:49 +02:00
Pablo Montenegro 15bb6d5214 [FIX] l10n_latam_check: payments marked as sent if journal "Use electronic and deferred checks"
Ticket Adhoc: 33103
Task Latam: 1074

Description of the issue/feature this PR addresses:
It is necessary to mark as sent those payments that come from a line with the check payment method and do not include other payment method if the journal "Use electronic and deferred checks". This is needed bacause it is necessary to add payment lines to a batch payment that use payment method different as "check_printing".

Current behavior before PR:
Marked as sent all payments from journal with "Use electronic and deferred checks".

Desired behavior after PR is merged:
Only mark as sent payments with payment method "check_printing".

closes odoo/odoo#132439

X-original-commit: ea71feebd2694533c656a8c2fdcef49936622817
Signed-off-by: Josse Colpaert <jco@odoo.com>
2023-08-22 09:49:45 +02:00
Adrien Minne (adrm) 83152d0bf2 [FIX] web: sprintf named placeholders regex
The function `sprintf` can use a dictionnary as second argument along with
named placeholders with the syntax `sprintf("%(argName)s", dict)`. But the
regex was wrong, making the first parenthesis optional and allowing
`sprintf("%argName)s", dict)` as a valid syntax.

closes odoo/odoo#132166

Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-08-22 09:49:40 +02:00
Aurélien Warnon fe54b6eb21 [FIX] website_event_exhibitor: fix sponsor 'midnight' opening hours
Currently, configuring opening hours for event sponsors 'at midnight' is not
handled properly.

If you set either the start time or the end time opening hours to "00:00",
the sponsor will be considered as always open.

We fix that by correctly taking into account that configuration.

(Note: if the user configures a sponsor to be open 'until midnight', we assume
it means midnight 'the next day').

Tests have been altered to take this into account.

Task-3459777

closes odoo/odoo#132605

X-original-commit: 721b996685c8f6943832acfce52b05c8773522f9
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2023-08-22 08:38:09 +02:00
Saurabh Mishra 4380e3b9cf [FIX] base_vat: log a warning when VAT is invalid
While creating a customer, if the user selects France as the customer's country
and then enters an invalid input into the VAT field, such as (FR), which is not
a valid input required, the user will encounter an error.

steps to produce:
- Install base_vat.
- Invoicing > Settings under Taxes check Verify VAT Numbers.
- Invoicing > Settings > Customers create a new customer, enter name, country
   as France, an invalid input in VAT eg. (FR)

Error: `Fault: INVALID_INPUT`

This commit changes the exception to a warning since this issue will be
encountered every time the user enters an invalid input into VAT. Although we
have handled it with a Validation Error and added a note in Odoo, a
traceback is generated everytime. Therefore, to handle this, the exception
is changed to a warning.

sentry-4234933702

closes odoo/odoo#132491

X-original-commit: a5b88f483977c478f26bc224bfea115da1e63819
Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
Signed-off-by: Saurabh Mishra (sami) <sami@odoo.com>
2023-08-22 08:37:42 +02:00
Antoine GuenetandPedro Manuel Calheiros Lima de Sousa 2ab529ed29 [FIX] web_editor: prevent error on undefined closest Node
Summary:
	page with 2 popups (newsletter popup and regular popup), cookie
	bar all justaposed. Chatbot window also open. For some reason
	closestBlock(testedNode) is undefined (testedNode) is a #text
	Node. Change already in place for 16.3

Cause:
	no preventive measure for null value before creating
	a node iterator on the value.Node in dom does not have
	an ancestor of type block.

Solution:
	backport solution from 16.3, return false when currentNodeParentBlock
	is null, since preceding and following would also be undefined,
	return false.

opw-3395673

closes odoo/odoo#132590

X-original-commit: 8a72f669813bc7d8aa9038d75e08ecef00b70e01
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Co-authored-by: Pedro Manuel Calheiros Lima de Sousa <peso@odoo.com>
2023-08-22 07:36:05 +02:00
Antoine Boonen d852a81645 [FIX] account: Fix manual tax entry display bug
Problem
---------
Fix a display bug happening when manually modifying taxes in bills.

Objective
---------
Get the same behavior as in 15.2

Solution
---------
Colspan was acting weird when clicking the tax to input. It would
expand to the full size allowed. To avoid this behavior, I made the tax
display width to 0%. This makes it impossible for the input to expand
upon clicking.

task-3397951

closes odoo/odoo#132597

X-original-commit: b955f2f448e6e7063aafb6e98985c7afe748fd26
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Signed-off-by: Antoine Boonen (aboo) <aboo@odoo.com>
2023-08-21 22:18:25 +02:00
luvi 25b992cccc [FIX] web: reduce command palette tip
Before this commit, the tip explaining how to open in a new tab was
long and innefficient.

This commit simply remove obvious "to open" text from the tip, which
makes the dialog less cluttered.

The corresponding translation file has been updated as well to update
the appropriated terms.

closes odoo/odoo#132602

X-original-commit: 871a988f91e7f4190999a89afa854f4ed83a4fa2
Signed-off-by: Florent Dardenne (dafl) <dafl@odoo.com>
Signed-off-by: Luca Vitali (luvi) <luvi@odoo.com>
2023-08-21 21:00:18 +02:00
Sébastien Theys d08a18b791 [IMP] mail, *: tests: use contains in click and insertText
* = account, calendar, im_livechat, mrp, project_todo, sms, snailmail,
    test_mail, web, website_livechat

`contains` is more efficient than `afterNextRender` as it does not wait
for several extra animation frames, and it is functionally more
meaningful.

closes odoo/odoo#130451

Related: odoo/enterprise#44999
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-08-21 21:00:03 +02:00
Sébastien Theys 9a1efcbde7 [REF] mail, im_livechat, mrp: rename waitUntil to contains
`await contains` is shorter and reads better than `await waitUntil`.

Part-of: odoo/odoo#130451
2023-08-21 21:00:02 +02:00
Sébastien Theys 3f8544d906 [IMP] mail, im_livechat: tests: add assert to waitUntil
`QUnit` tests require at least one `assert`. This change allows to write
tests that only contain `waitUntil` without extra `assert` in the test.

`waitUntil` is more efficient than `afterNextRender` as it does not wait
for several extra animation frames, and it is functionally more
meaningful.

Currently existing tests that contain `waitUntil` have been adapted
accordingly. More and more tests should make use of it in the future.

Part-of: odoo/odoo#130451
2023-08-21 21:00:00 +02:00