Commit Graph
151076 Commits
Author SHA1 Message Date
Pierre Rousseau aee53b0d48 [FIX] web: ensure realpath is installed
With this commit, if realpath is not available (for exemple on macos),
the script is directly stopped.

closes odoo/odoo#90522

X-original-commit: 7857c577948d55842a5697ca6d91bb6ea656ef6e
Signed-off-by: Samuel Degueldre <sad@odoo.com>
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
2022-05-04 19:17:45 +02:00
Pierre Rousseau 9e65c6a00b [FIX] web: fix tooling for enterprise repo
Since fcf2e2210a639adfcdb9236c24cfb31046b6dead, the path of enterprise
is derived from the tooling path instead of the community path.

X-original-commit: 4ff8f62aa1e10d27189ebbdd22a01711c700ea32
Part-of: odoo/odoo#90522
2022-05-04 19:17:44 +02:00
David Monjoie f3372799ae [FIX] web_editor: fix traceback on paste
When fakeEl is empty, firstChild and lastChild both equal null.

task-2842638

closes odoo/odoo#90523

X-original-commit: 626caa89cf290f226b19dfa73bc4ab41c7f95fc0
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-05-04 17:46:41 +02:00
Sébastien Geelen (sge) d8fd724cb3 [FIX] web_editor: transform orphan LI into P
Avoid living `<li>` tags without a `<ul>` or `<ol>` parent
in the editable html.

task-2842638

closes odoo/odoo#90518

X-original-commit: c6660d9ae1c931da3ad442b30f610db463ede894
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-05-04 17:46:35 +02:00
roen-odoo f48da4335b [FIX] point_of_sale: prevent multiple click on print invoice
Current behavior:
When clicking multiple times on the print invoice button of an order
the customer rank would not update correctly

Steps to reproduce:
- Have PoS installed
- Start a PoS session, and select customer A
- Create an order, make the payment
- Go in the order tab and select the order you just made
- Click on the Print invoice button multiple times
- Customer rank isn't updated correctly

opw-2813512

closes odoo/odoo#90515

X-original-commit: 695c3dfd46d4e421a06f6dd33861e42bdb03efe0
Signed-off-by: Masereel Pierre <pim@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2022-05-04 17:46:27 +02:00
Julien Van Roy a3473ae7d6 [FIX] l10n_za: tax report, fix missing line in computation
The field 19 (Total Input Tax) should be equal to:
14 + 14A + 15 + 15A + 16 + 17 + 18 as specified in:
https://www.sars.gov.za/wp-content/uploads/Ops/Guides/GEN-ELEC-04-G01-Guide-for-completing-the-Value-Added-Tax-VAT201-Declaration-External-Guide.pdf,
page 26, but 15A was missing.

opw-2832895
task-2841115

closes odoo/odoo#90507

X-original-commit: 0da6980b1bfcfb38ddbc2d0f63bd1986ae277609
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Julien Van Roy <juvr@odoo.com>
2022-05-04 17:46:19 +02:00
Odoo's Mergebot 9ad47e6be2 [MERGE][IMP] base,website_profile: improve the rank layout
Currently if a user is having huge number of karma/xp (for example
10000), when viewing the website profile, these numbers overlap the
design of a next rank layout card.

This commit formats the karma/xp into decimal number (allowing up
to two decimal points so that the information is meaningful) and
thus reducing the space being occupied by large numbers.

task-2792149

closes odoo/odoo#87996

Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2022-05-04 17:46:14 +02:00
MAHAMADASIF ANSARI 1e2d8cf44a [IMP] base: website_profile: improve the rank layout
Currently if a user is having huge number of karma/xp (for example
10000), when viewing the website profile, these numbers overlap the
design of a next rank layout card.

This commit formats the karma/xp into decimal number (allowing up
to two decimal points so that the information is meaningful) and
thus reducing the space being occupied by large numbers.

task-2792149

Part-of: odoo/odoo#87996
2022-05-04 17:46:12 +02:00
MAHAMADASIF ANSARI e246bf1448 [IMP] base: allow to specify decimal points with format_decimalized_number
Currently, we can format the number into decimal points with help of
the `format_decimalized_number` option of `ir.qweb.field.integer`
class. However, sometimes we need to decide how many decimal points
we need to display, which is not possible with current implementation.

This commit improves the above option and now allows to pass the number
of decimal points, with a new option `precision_digits`, which defaults
to one decimal point.

task-2792149

Part-of: odoo/odoo#87996
2022-05-04 17:46:12 +02:00
Alexandre Kühn 5c1e7a6f5d [IMP] mail: introduce view models (step 5)
This commit introduces models that define records being 1:1 map with components,
as a step to move further to having essentially all business code in models.

Having code in models is desirable to have very maintainable code, thanks to
robust and declarative code with an ORM-like architecture.

Task-2831082

closes odoo/odoo#90427

Related: odoo/enterprise#26928
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-05-04 16:43:44 +02:00
Alexandre Kühn 23962f3d4b [IMP] mail, *: remove this.async()
*: calendar, hr, snailmail

Task-2837854

closes odoo/odoo#90230

Related: odoo/enterprise#26790
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-05-04 15:38:25 +02:00
Nicolas (vin) 1ff279f11c [FIX] account_facturx: make factur-x xml compliant
The xml we generate for factur-x is no longer compliant with all
the latest standards. With these changes, we are providing the tools
to make it work once again and make sure it is validated by the
factur-x and zugferd validators in all aspect (PDFA/3, XMP, XML)
It should also be valid to be sent to Chorus pro if applicable.

This adds a mapping to the UNECE unit of measure codes for uom, that
are required for factur-x.

It will also calculate a category for each taxes as such:
    - If the tax is an export from EU to outside EU, G.
    - If the supplier and customer are both in EU but different country,
        K
    - If both are in EU, in the same country but the tax amount is 0, E
    - Otherwise, it will be S.
See https://unece.org/fileadmin/DAM/trade/untdid/d16b/tred/tred5305.htm

opw-2714544

closes odoo/odoo#90105

X-original-commit: e1bfb363bccd7b84f660d1e6c5b1e4d4fe02d398
Signed-off-by: Laurent Smet <las@odoo.com>
2022-05-04 13:53:42 +02:00
Pablo Montenegro 075152d1a0 [FIX] l10n_ar: Delete “Unified Book” option on sale journals
Before this change, we bringed to the user the posibility to select the option “Unified Book” (boolean) on journals with type “Sales” and Pre-printed Invoice “AFIP POS System”. This allowed all documents with the same letter document to use the same sequence, and it does not matter if they are invoices, credit notes or debit notes for example.
Now that functionality is deleted and all documents will have their own sequence regardless of the letter document of each receipt.

closes odoo/odoo#88129

Signed-off-by: Josse Colpaert <jco@odoo.com>
2022-05-04 11:53:45 +02:00
Benoit Socias af5bf85d34 [FIX] web_editor, website: increase stability of ace test tour
This is an attempt at fixing a runbot race condition.
It was executed succesfully without any error on Multi build around
200 times on runbot.

Since [1] the reset button could be clicked before the HTML editor was
reloaded.
The `MutationObserver` in `tour_service.js` is debounced. Because of
this the states used to detect tour steps triggers might differ between
executions.
With the Reset button of the HTML editor not being hidden in the
rendered template, it might be detected before it gets hidden during
the `start` of `ace.js`.

This commit makes sure the the editor is both closed then reopened with
the Reset button visible before clicking on it, and also makes sure the
Reset button is not visible by default upon rendering.

[1]: https://github.com/odoo/odoo/commit/d20468c3463927a54c34688769a22b3949c5c465

runbot-3674

closes odoo/odoo#90453

X-original-commit: b35f127c86c1d271a76dae7186a96190e8558c73
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-05-04 10:55:59 +02:00
Julien Castiaux d9608b1932 [FIX] core: skip debugger for JSON-RPC in --dev=werkzeug
When started with the CLI option --dev=werkzeug, errors in controllers
are caught by a friendly web debugger. This debugger should not be
started in case of error in a JSON-RPC controller.

closes odoo/odoo#90420

Task: 2837457
X-original-commit: 711a29e76f55e87d73dad89ddbef889dd5c7af10
Signed-off-by: Julien Castiaux <juc@odoo.com>
2022-05-04 10:55:55 +02:00
thcl-odoo b6e08d662d [FIX] google_calendar: add show_as on sync
Current behavior :
When a Google Agenda event is created with "Show as" set to Available,
Show as (`show_as`) isn't set accordingly

Steps :
- Install Calendar
- setup and activate Google Calendar sync
- Create an event and set "Show as" on Available
- Refresh Odoo calendar to sync it
-> Created event "show as" is set to Busy

OPW-2805096

closes odoo/odoo#90261

X-original-commit: ff56f8126e105f2196843fed1646a3081f25aff3
Signed-off-by: Arnaud Joset <arj@odoo.com>
Signed-off-by: Claude Thibault (thcl) <thcl@odoo.com>
2022-05-04 10:55:47 +02:00
thcl-odoo a784ddab33 [FIX] google_calendar: add Meeting URL on sync
Current behavior :
When a Google Agenda event is created with a meeting, the Meeting URL
(`videocall_location`) isn't set at creation.

Steps :
- Install Calendar
- setup and activate Google Calendar sync
- Create an event with a meeting via Google Calendar
- Refresh Odoo calendar to sync it
-> Created event doesn't contains a Meeting URL

OPW-2805096

X-original-commit: f85dfa2b3cb1fa03dcaa10b93fc5309b3a04eae6
Part-of: odoo/odoo#90261
2022-05-04 10:55:46 +02:00
clesgow 4468d18615 [FIX] stock_picking_batch: fix cancel in batch
As done with the "done" state, if a single picking in a batch is
cancelled while the other pickings aren't, this picking is removed from
the batch, as it would create inconsistencies between the states of the
pickings in a single batch.

closes odoo/odoo#90449

X-original-commit: 1f2813e59970cd2eb078b514cd7d563837f175a1
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Signed-off-by: Quentin Wolfs (quwo) <quwo@odoo.com>
2022-05-04 10:02:24 +02:00
Lucas Perais (lpe) 53fc6ea691 [FIX] web: owlCompatibility: standaloneAdapter can trigger DOM events
Before this commit, when spawning a LegacyWidget with the standaloneAdapter,
the legacyWidget couldn't re-trigger an OdooEvent (trigger_up) in the DOM
forbidding any attempts to, for instance, execute an action button (a stat button in form view)

After this commit, not only standaloneAdapter takes an optional owl ref to trigger onto
(defaults to document.body), but the last resort legacy_provider handles execute-action
DOM event.

closes odoo/odoo#90172

X-original-commit: 616d0761a8e15dfe49db9bacdfa6f7df75587dff
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-05-04 09:02:04 +02:00
Julien Mougenot 88aada39e9 [FIX] web: Datepicker uses static date format
The current datepicker implementation uses Luxon to send and receive
dates from the client and Moment to create and communicate with the
bootstrap datepicker.

Before this commit: the current database date/time format was used to
convert dates from one system to the other. However there are
inconsistencies in notation for some formats, for which the conversion
could not be made properly.

Now: a static format is used to translate dates and the actual database
format is applied only after both systems have been notified of a date
change.

Tasks 2794506, 2797949

closes odoo/odoo#90422

X-original-commit: 174bc1dfa7b2894f35c288373f5130ec2992a8e8
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-05-04 08:07:00 +02:00
Xavier Morel f0fe59dcf7 [FIX] web/lib: backport jquery bugfixes
opw-2793379

closes odoo/odoo#90463

X-original-commit: 684e3fc983e91168dfaef8536fcd1f71ce7f7fdc
2022-05-04 00:05:02 +02:00
Xavier Morel 9ac8050de8 [REV] web/lib: Revert: backport jquery bugfixes
This reverts commit 0dd7c78b06726543825008a48d3dc004d2af4557.

X-original-commit: b50cd480d3f40ab084689587e6cbed311c09fb2f
Part-of: odoo/odoo#90463
2022-05-04 00:05:01 +02:00
Zelong Lin 97ef347724 [IMP] mail, im_livechat: remove public check for anonymous sending
task-2841797

closes odoo/odoo#90424

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-05-03 17:54:09 +02:00
Raphael Collet 68aa10fc24 [FIX] base: do not load translations twice
This fixes former pull request odoo/odoo#78287.

The language installation wizard was invoking toggle_active() on the
target languages, which loads translations for those languages (with
overwrite=False), and then loading translations again (with expected
parameter overwrite).

Simply don't use toggle_active(), and directly set the active field
instead, in order to load translations once with the expected parameter
overwrite.

closes odoo/odoo#90421

X-original-commit: 3e4733859fbe2465c386ec65b7be995b152c8c48
Signed-off-by: Raphael Collet <rco@odoo.com>
2022-05-03 17:53:58 +02:00
Kartik Chavda c0da9d934c [IMP] (sale_,)project,hr_timesheet: improve generic ux of project
Purpose of this commit to improve generic usage of project
app.

So, in this commit done following changes:

- add 'my department' filter in project search view.
- add 'my department's tasks' and 'my department's projects filter
  in task search view.
- add quick search, filter and groupby in task analysis report search view
  to make task analysis report search view same as task's search view.
- improve portal template of my/tasks page.
- project.task form view > timesheets: display the employee avatar
  on mobile.
- make 'Task: Rating Request' template auto_delete false.
- settings: make following features disabled by default: sub-tasks,
  task dependencies, recurring tasks.
- project.update kanban list: align the stat buttons with the kanban
  list cards.
- add sample data to the project stages > list view.
- project.task quickcreate: enable the creation of new users on the
  fly.
- move tags quick search below project.
- add title to show  project full name on hover of project name in kanban
  view of project.
- copy user_ids for task in recurrence.
- improve UI visibility of planned_hours and subtask_planned_hours field in
  timesheet page of task form view.
- improve project sharing wizard and project.collaborator tree
  view.
- add grid,kanban,pivot and graph views to 'hours spent on
  sub-tasks' button's action.

closes: #83482
task-2742725

Related: odoo/enterprise#23788
Related: odoo/upgrade#3480
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-05-03 17:53:45 +02:00
Nicolas Bayet a05874f808 [FIX] web_editor: prevent loading toolbar twice in translate mode
task-2802733

closes odoo/odoo#90416

X-original-commit: ee62ad02875fa79e4f91186d73b969e138419eab
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-05-03 16:55:05 +02:00
tsm-odoo 4549de3b61 [IMP] mail_bot: don't use session for odoobot initialization
This PR prepares the ground for the one introducing the new environment in the
mail module. Indeed, the mail_bot messaging_initializer relies on the session
in order to known when to initiaze odoobot. With the new env, we won't be able
to access the session but will instead override init_messaging to automatically
initialize odoobot. Doing this first reduces the noise in the main PR.

task-2582313

closes odoo/odoo#90291

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-05-03 16:55:00 +02:00
Mitul Shah 1061109f8c [IMP] sms: sms composer promenade
Before this Commit,
There is an extra space at the top of the SMS composer.

After this Commit,
we have improved the UX of the SMS composer.

1/ Remove additional space on top of the SMS composer.
2/ Remove the additional space below the validation message.
3/ Improve the validation message of the invalid phone number.

Task-2710478

closes odoo/odoo#83062

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-05-03 16:54:51 +02:00
Hiral Bhavsar 5f9ba2435b [FIX] web_editor: reverted useful code which had been put as a comment by mistake at https://github.com/odoo/odoo/commit/344d82ca251bbba8f54e85d6b881cc92f8823f13
closes odoo/odoo#90401

X-original-commit: 6e990b6d13699e347275383b703dec34ddac3197
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-05-03 15:44:23 +02:00
Deepak Shah 223491036a [FIX] web_editor: traceback after clicking crop button.
Before this commit:

After selecting an image and clicking on crop button, crop widget displays and
vanish immediately and crop does not work. After clicking on screen, it raises
an error (Cannot read properties of null (reading 'removeChild').

After this commit:

The crop button works fine without raising any traceback.

Task-2804892

X-original-commit: 1ab1c15386f778b04eb78f26b1e0934f3329c6af
Part-of: odoo/odoo#90401
2022-05-03 15:44:22 +02:00
Nicolas Bayet ef14f80790 [FIX] web_editor: set max-height on header logo
task-2727617

closes odoo/odoo#90394

Forward-port-of: #81064
X-original-commit: f20596963f232f70cba18b1490284028a3c60528
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-05-03 14:38:48 +02:00
Nicolas Bayet b23c9217e5 [FIX] mass_mailing: use the company logo
Task-2678999

Forward-port-of: #81064
X-original-commit: f1ffd49998e963e687cb6621b78ddbdfd1b3e939
Part-of: odoo/odoo#90394
2022-05-03 14:38:47 +02:00
Nicolas Bayet 260a57684f [FIX] mass_mailing: enable background color on bigBox div
As the "Big Box" snippet contain two divs that have a background
it is invisible to change the background of the "Big Box"
Instead of choosing a background for the "Big Box", choose a background
for it's child divs.

Task-2678999

Forward-port-of: #81064
X-original-commit: e495544722a5d96f390d84452d0c84869a34391c
Part-of: odoo/odoo#90394
2022-05-03 14:38:46 +02:00
Nicolas Bayet 007368e50b [FIX] mass_mailing: set the background of footer center equivalent as the layout
Task-2678999

Forward-port-of: #81064
X-original-commit: b2fc0e6222d5f4c5f9c257c97819f52b55bebc42
Part-of: odoo/odoo#90394
2022-05-03 14:38:46 +02:00
Christophe Monniez 00e210396a [FIX] web: let clickbot properly find modal dialogs
When clickbot opens a modal dialog, it should be detected and closed
properly. The `open` attribute was removed from the modal dialogs but
the clickbot test were successful by accident. Even though the modal was
not found, the script was still able to continue by clicking on other
elements.

By disabling the ability to click on other elements while a dialog is
open , this 590fa18cafe2c commit revealed the truth.

closes odoo/odoo#90393

X-original-commit: c5e2300cbb89519e002cf1784a8d6c6f68197742
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2022-05-03 14:38:34 +02:00
Dossogne Bertrand 605a3c1e44 [IMP] hr_*: uniformize group category
*:
approvals
hr_apprasaisal
hr_payroll
hr_referral
fleet
hr
hr_attendance
hr_holidays
hr_recruitment
lunch

Change various access rights names to improve understandability for users.
Addition of an officer role in fleet with intermediate accesses

TaskID 2742855

closes odoo/odoo#87545

Related: odoo/enterprise#25741
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-05-03 14:38:19 +02:00
Samuel Degueldre c032acbcea [FIX] web: set componentRef in onRendered instead of onPatched
Previously, we were setting the ref to a component on ComponentWrapper
inside the onPatched hook, however, when mounting a component outside
the document (eg in a fragment) the patched hook is not supposed to be
called, but we need the ref to be set.

This commit fixes the issue by setting the componentRef in onRendered so
that it's available even when the component is mounted in a fragment.

closes odoo/odoo#90375

X-original-commit: 3013d89bcfe04be0207932b237d0e8ff8fb1d52b
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-05-03 13:31:40 +02:00
Moens Alexandre 8e77e397fd [FIX] website_sale : ref before assignment
Before this commit:
redirect_url may have never been asssigned before being read

opw-2827002

closes odoo/odoo#90374

X-original-commit: 1aa35cba14528f413e9813707c406f31bfb07967
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-05-03 13:31:36 +02:00
Victor Feyens e151251009 [FIX] core: docstring of new get_view method
Fixing docstring of new get_view method (odoo/odoo#87522),
to include it in the doc (and replace reference to the deprecated
method fields_view_get).

models.py:docstring of odoo.models.BaseModel.get_view:8: WARNING: Unexpected indentation.
models.py:docstring of odoo.models.BaseModel.get_view:9: WARNING: Block quote ends without a blank line; unexpected unindent.

+ some little improvements to the docstring

closes odoo/odoo#90372

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-05-03 13:31:31 +02:00
Florian Damhaut f87662e5b0 [FIX] hr_holidays: remove timeoff warning when unecessary
Step to reproduce:
- As mitchell admin
- Change user's/employee tz to something != UTC
- Go to time off
- Click on the calendar

Current behaviour:
- Wizard Popup with a timezone warning
- If the same thing is done with the 'New Time Off' button, the
warning is not present

Behaviour after PR:
- No Warning
- `request_unit_custom` should be False if `holiday_status_id` is
set which might happen in default_values.

opw-2828936

closes odoo/odoo#90357

X-original-commit: 5565eb9f3dc4259f1304373eff83f7d54a0db7be
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-05-03 13:31:26 +02:00
Victor Feyens 42bad1a6d2 [IMP] *: remove useless keys from manifests
Remove most values uselessly specified because giving the same value as 
the default one (see _DEFAULT_MANIFEST in odoo/modules/module.py)

* auto_install is Falsy by default
* author is Odoo SA by default
* summary & description are empty strings by default
* application is False by default
* test, demo, depends and data are empty lists by default

This will reduce noise/inconsistencies between manifests specifications, 
simplify analysis of manifests content, ...

closes odoo/odoo#90209

Related: odoo/enterprise#26807
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-05-03 13:31:16 +02:00
tsm-odoo 7e5a71ab71 [IMP] mail, *: always mount discuss/chatWindow/dialog during tests
*: hr, im_livechat, snailmail, website_livechat.

This PR prepares the ground for  the one introducing the new environment in the
discuss app. Indeed, tests will now use the mainComponentRegistry in order to mount
those components. Doing so, the parameters has{Discuss/Dialog/ChatWindow} will become
obsolete. Removing those parameters now helps reducing the noise in the main PR.

task-2582313

closes odoo/odoo#90120

Related: odoo/enterprise#26759
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-05-03 13:31:08 +02:00
Xavier Morel 7bce4c19f3 [IMP] web_editor: cleanup channels regex
Model pattern was too permissive, separator is the literal `.`
character, not any random thing.

Also remove unnecessary bracket expression, it's unnecessary when
matching a single item.

OPW-2836106

closes odoo/odoo#90107

X-original-commit: 320cdb4e85cb86915fa25cfda8f17e0a372e765e
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Signed-off-by: Raphael Collet <rco@odoo.com>
2022-05-03 13:31:03 +02:00
roen-odoo d28b17f5d3 [FIX] pos_gift_card: keep focus on the current input field
Current behavior:
When opening the giftcard popup in a PoS the focus would always
always go back to the first input field after typing in any other
input field.

Steps to reproduce:
- Install PoS and activate gift card
- Activate option "Scan an existing barcode and set a price"
- Start a PoS session
- Access the giftcard popup
- Select "Scan and set price on gift card"
- Type anything in the second input field
- The focus will go back on the first input field

opw-2825163

closes odoo/odoo#90081

X-original-commit: 84c129c7e05bb22e5dde272ab0a7cf8d4e1c2011
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2022-05-03 13:30:58 +02:00
Camille Spiritus c9ce81c253 [FIX] account: allow batch payment for different clients
Description of the bug :
Registering a payment for two confirmed bills/invoices from different partners would result in a stack trace.

Steps to reproduce :
Create a bill from a specific partner and confirm it.
Create another from another partner, confirm it.
From the list view, select both those documents, click Register Payment.
The StackTrace appears.

FIX :
handled the case by setting the payment_difference field to 0.0 if the wizard contains multiple payment batches.
Modified some tests to detect this behaviour in the future.

closes odoo/odoo#89757

X-original-commit: def467e82b12c5ec7284ed9c966bb13ab3a77298
Signed-off-by: Laurent Smet <las@odoo.com>
2022-05-03 13:30:54 +02:00
Gorash fd1c982a40 [IMP] core: handle recordset comparison with lazy() recordset
The base model is modified in order to be able to make comparisons between
recordsets contained in lazy values. The isinstance method will always
return an error, so we consider that we receive a recordset and try to
access the `_name` and `_ids`. If an error is triggered, it was not a
recordset.
This way of doing it involves little change in performance (improvement
when it is good and decrease when there is an error) because we do not
test if it is a recordset before comparing it.

closes odoo/odoo#89141

Signed-off-by: Rémy Voet <ryv@odoo.com>
2022-05-03 13:30:49 +02:00
Julien Van Roy 6ec316930d [FIX] product: fix wrong value for product type in test
The test 'test_inactive_related_product_update' raises a ValueError
"Wrong value for product.template.detailed_type: 'product'".
(which causes the L10n nightly build many fails)

See https://github.com/odoo/odoo/pull/89468

closes odoo/odoo#90339

X-original-commit: d0ff5fe311cd69a3068593142aff66b09f13c43d
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Julien Van Roy <juvr@odoo.com>
2022-05-03 12:28:41 +02:00
Samuel Degueldre 8603d13d19 [FIX] web, test_assetsbundle: make useAssets work in owl 2
Previously, the useAssets hook would load the templates from the given
bundles into the qweb instance that was in the environment. In owl 2,
qweb is no longer in the environment, and templates need to be loaded in
the app.

This commit fixes that by exporting a function to load templates in the
main app from assets.js, when the main app is created, it should be
written on the function in a similar vein to renderToString, so that all
further calls to the function will load the templates in that app.

This commit also adds an actual lazy-loading test in the
test_assetsbundle module, as we don't want to pollute the manifest of
web with bundles that only exist for one specific test.

closes odoo/odoo#90122

Related: odoo/enterprise#26776
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-05-03 11:20:52 +02:00
Ivan Yelizariev 95eaaf7e71 [FIX] account: create sequence index for account.move
missed call of the super method leads to missed initialization of mixins.
Particually, the sequence indexes [1] were not created, which led to perofrmance
issues [2]

[1]
https://github.com/odoo/odoo/blame/8b8c94ca90c9d1faa4d735d357af316736b43562/addons/account/models/sequence_mixin.py#L38-L39
[2] opw-2825975

closes odoo/odoo#90351

X-original-commit: aa5778582a332a481339483c4d432d1c535dbc83
Signed-off-by: William André (wan) <wan@odoo.com>
2022-05-03 08:38:52 +02:00
Sébastien Alix 8f748a212e [FIX] auth_totp_mail: user view should depend on 'auth_totp'
closes odoo/odoo#90346

X-original-commit: 03e7efc8134ff2eab70bf12a42661f3be4dfd0d0
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-05-03 08:38:45 +02:00