Commit Graph
164336 Commits
Author SHA1 Message Date
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
Mahdi Cheikh Rouhou (macr) c9cbd5bf58 [FIX] web : display timepicker in ltr direction for rtl lang
Issue:
======
The time display for rtl language is the sale as ltr but in the
timepicker it's displayed as seconds-minutes-hours which is wrong.

Steps to reproduce the error:
=============================
1-Install calendar
2-Change the language to Arabic
3-Go to calendar and click on create new
4-Click on the datepicker for start for example and click on select time

Solution:
=========
I made the display of the datepicker independant of the direction of
language and alwyas display it in ltr direction.

opw-3423875

closes odoo/odoo#132589

X-original-commit: 3e21b50ef51b9f3ebf06b5cd16e3b11497b56896
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Signed-off-by: Mahdi Cheikh Rouhou (macr) <macr@odoo.com>
2023-08-21 19:57:59 +02:00
Mahdi Cheikh Rouhou (macr) e43ee20eb0 [FIX] account, web: display total and subtotals correctly rtl lang
Issue :
After the last fix https://github.com/odoo/odoo/pull/124663
there is still an issue of currency placements and alignement
of numbers in rtl language at the total and subtotals.

Steps to reproduce the isse :
1-create an invoice and confirm it.
2-install accounting
3-go to accounting/customer invoices and choose the created invoice

Origin of the problem :
The fields displayed didn't have the appropriate classes and the
style for number and monetary values for rtl language is missing from
the css folder.

Fix:
I applied the class on the `td` tag and `span` tag.

opw-3295573

closes odoo/odoo#132572

X-original-commit: e3eb140fb431aa1fc08e718d79f332c50e86c079
Signed-off-by: Bastien Fafchamps (bafa) <bafa@odoo.com>
Signed-off-by: Mahdi Cheikh Rouhou (macr) <macr@odoo.com>
2023-08-21 19:57:55 +02:00
dhba-odoo 6a35f242a7 [FIX] web_editor: color pallete flicker
Before this commit:

After applying formatting styles to text that already has some color applied to
it, we encountered an issue where the color pallete would flicker when
attempting to change the color.

After this commit:

Now, the color palette will no longer flicker when trying to change the color of
text that has formatting styles applied to it.

task-3417998

closes odoo/odoo#132561

X-original-commit: 7a9977882b0e9222beba7de23f026de937a60a4d
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-08-21 19:57:50 +02:00
althaf shaik f16b92a8af [FIX] event: handle error in res partner while evaluating static map url
This traceback raises when user click 'send by email' of 'event registration'.

Error: 'Expected singleton: res.partner(20, 19)'

On '_compute_static_map_url_is_valid' method self is referenced to get
'static_map_url'.
when self is having multiple records, it is used to get
'static_map_url', which leads to above traceback.
See:
https://github.com/odoo/odoo/blob/6f45bf0f496db37b28e8c4f8cc23b0eeec683c90/addons/event/models/res_partner.py#L32-L40
sentry-4359170170

closes odoo/odoo#132560

X-original-commit: 1da387373f772c487fa7391aa24be57b464bb5f3
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-08-21 19:57:46 +02:00
niyasraphy fe593090cc [FIX] hr_attendance: error in log on exporting translation
before this commit, on exporting the translation of
hr_attendance module shows warning in the log

* XML declaration allowed only at the start of the document
* Opening and ending tag mismatch: t line 4 and templates

after this commit, no warning/error will be shown
in log

closes odoo/odoo#132530

X-original-commit: def572bc161540dc223e78805a8152b7418f5a28
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
2023-08-21 19:57:36 +02:00
Mahdi Cheikh Rouhou (macr) 0e2a431fc9 [FIX] sale_product_configurator: edit product with variants sale line
Issue:
======
When you edit an already saved product line which has variants it will
throw an error.

Steps to reproduce the error:
=============================
1-create 2 products having at least one variant each and make them
storable
2-create a sale order and add only the first product and save the SO
3-edit the sale line of the first product with the second product and
try to save it

Origin of the problem:
======================
When retrieving combination we didn't check that the variants are
associated to the product.

Solution:
=========
Try to get the variants that are associated to the product , if there is
no such variants we apply get_first_possible_combination

opw-3423065
opw-3450266

closes odoo/odoo#132527

X-original-commit: 06d18005762377c5188c5537ba4d17c4efd66948
Signed-off-by: Mahdi Cheikh Rouhou (macr) <macr@odoo.com>
2023-08-21 19:57:31 +02:00
Soukéina Bojabza eded9a301c [FIX] web_editor, *: correctly set the ProgressBar component props
*: web_unsplash

Before this commit, if we were in debug mode, when we tried to replace
or add an image, a traceback appeared when selecting an Unsplash image
for the first time or when uploading an image of size 0 (also for the
first time). Note that once the traceback was closed, it did not
reappear until the page was refreshed, but the progress bar was not
displayed anymore.

It happened because in debug mode, there is a validation of the
different owl components props and some props of the `ProgressBar`
component were not correctly set when adding Unsplash images or empty
image files, causing the props validation to fail. Those props
definition were incorrectly added with [1].
The traceback was not reappearing because the `UploadProgressToast`
component (= the parent of `ProgressBar`) has been destroyed and so the
props validation was not done anymore since the components were not
there.

This commit fixes these issues by correctly setting the `ProgressBar`
props and by adding default props, in order for them to always have a
value when omitted.

Steps to reproduce:
- Activate the debug mode.
- In edit mode, drop the Text-Image snippet.
- Double-click on the image to replace it.
- Type something in the search bar and select an Unsplash image or
upload an empty image file.
=> A traceback appears.

[1]: https://github.com/odoo/odoo/commit/886f3de768b647f4b402c97098abf274d6258f75

opw-3413299

closes odoo/odoo#132377

X-original-commit: 425dfb07f21288caf56bceea3a86e0b7ecac4a91
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-08-21 19:57:16 +02:00
Antoine Dupuis (andu) bfaccfcdae [IMP] l10n_ro: Minor changes for l10n_ro_saft
For the l10n_ro_saft module that generates the D.406 declaration, we
needed to:
- create a new export tax specifically for services (which should be
  reported separately from goods); and
- make sure the Bank, Outstanding Receipts and Outstanding Payments
  accounts are created with codes 5121xx, and the Cash account with code
  5311xx, because codes 5120 and 5130 are not available in the official
  CoA and were therefore causing validation errors in the SAF-T export.
- because the CUI number (found in the company_registry field) for
  partners is required for the SAF-T export, and it is substantially
  the same as the VAT number, re-use logic from l10n_be to automatically
  fill in the company_registry if the VAT exists.

closes odoo/odoo#132269

Task-id: 3172198
X-original-commit: 74be0779164f8cd65c399977d5f3e058c213318d
Related: odoo/enterprise#45939
Related: odoo/documentation#5532
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
Signed-off-by: Antoine Dupuis (andu) <andu@odoo.com>
2023-08-21 19:57:11 +02:00
Rémy Voet (ryv) 1bceb01ff4 [FIX] website: fix unlink page with ir.rule
Issue
=====
The previous commit forced consistency between `check_access_rule` and
`_apply_ir_rule`. Now the parent model `ir.rule` (via inherited) is also
checked before the unlinking (`check_access_rule("unlink")`). The
`website.page` unlink override sometimes calls `unlink` on its parent
view and because view_id has `ondelete="cascade"`, it will actually
deletes the `website.page` itself. Then calling to `super().unlink()`
with self will raise a MissingError.

Fix
===
Batch the old logic and remove already unlinked record from `self`
before calling `super`.

closes odoo/odoo#125916

Signed-off-by: Raphael Collet <rco@odoo.com>
2023-08-21 19:56:56 +02:00
Rémy Voet (ryv) 160acc0200 [FIX] core: fix inconsistencies between _apply_ir_rule and check_access_rule
Issues
======
- `_apply_ir_rule` applies `ir.rule` of the current model and also
`ir.rule` from the inherited model (via inherits). But
`check_access_rule` doesn't check the later one.
- `_flush_search` doesn't flush fields coming from the `ir.rule` of
the inherited model (via inherits). Then the filtering done by
`_apply_ir_rule` may be inconsistent with cached values.

Changes
=======
Because of https://github.com/odoo/odoo/blob/6ddcb448612f5d784c8e9ebb90f19077e65be3e1/odoo/osv/expression.py#L1073-L1073,
and https://github.com/odoo/odoo/blob/00e86b1552d1e5541a8dbf9411de5cfdb8990cc4/odoo/fields.py#L2895
leaf like `('<many2one_delegate>', 'any', [<sub-domain>])`,
will be translated in the same way as `_inherits_join_add` does.
We can remove `_inherits_join_add` and its usage in `_apply_ir_rule`
and change `ir.rule._compute_domain` to also return the inherited
(via inherits) `ir.rule` domain (with the new 'any' operator).
Since `_compute_domain` is used by `_apply_ir_rule` and
`_filter_access_rules_python`, everything is consistent.

Also fix `BaseModel._flush_search` to take in account 'any'/'not any'
operators (compulsory in order to flush correctly new domain
from `ir.rule._compute_domain` generated).

Part-of: odoo/odoo#125916
2023-08-21 19:56:55 +02:00
Pedram (PEBR) 330f5ddb86 [FIX] point_of_sale: always show selected partner at top of list
Before this commit, the selected partner was not shown at the top if
its id was outside those first 1000, because the partner list only
searched the first 1000 partners to display.

With this commit, the selected partner will always display at the top
of the list as expected, even if its id is outside the first 1000
partners queried.

opw-3470824

closes odoo/odoo#132510

X-original-commit: a55a5951ae97c5b702ee7cde525a24df68e1e1b1
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
2023-08-21 18:48:53 +02:00