Commit Graph
164380 Commits
Author SHA1 Message Date
Xavier Morel 489566d4bb [FIX] website: don't error on inaccessible model
When deleting a page, `search_url_dependencies` tries to trawl through
all models to see if they might have a link to the page being deleted.

However if the user invoking that function does not have access to a
model with an HTML field, it raises an error. Given pages are managed
by website designers which are *not administrators* there is no reason
to believe the current user has access to every model in the
database (not that even admins do these days). Since
`search_url_dependencies` is a best-effort search anyway, just ignore
any model to which the current user doesn't have access.

An alternative would be to do the search in sudo mode, but that
doesn't seem necessary, and could even be problematic if a match is
found:

- it might leak information the user should not access (because the
  record name is returned, as well as the model & field names)
- it will trigger further access errors (because links to problematic
  records are provided, on which the user might want to click)

closes odoo/odoo#127973

X-original-commit: 47a69a186bc415bf61a523da9686ca96c0beb74e
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-07-10 18:16:31 +02:00
Robin Lejeune (role) b29733ce37 [FIX] website: add test for website filter in list view
With the Milk redesign in [1], the possibility to select a website on
the filter/search view on our custom list views (e.g. on website.pages)
to filter out the ones not related to a website and only keep the ones
with a website_id or no website_id (and not shadowed by a website_id
one) disappeared.

It has been fixed in [2], but in order to prevent future breaks, this
commit tests this functionality.

task-3355253

[1]: https://github.com/odoo/odoo/commit/caef16ee4e5351142ef04f02798999ccb38a56bc
[2]: https://github.com/odoo/odoo/commit/9237ca777fb9c5e9bda03c2d0dbe0deed8e1b2e5

closes odoo/odoo#127911

X-original-commit: d4a77cb112d3596b4313fcc4962d9d9d5af99d1d
Related: odoo/design-themes#670
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-07-10 18:16:24 +02:00
william-andre 111843361c [FIX] account: currency change not propagated
Create an invoice and without saving it:
- Add a line
- Switch currency

Issue: currency change of the move is not propagated to the move line.
Not even after saving and confirming the invoice

opw-3267497

closes odoo/odoo#127878

X-original-commit: 4774a66771d66c20011ed4d8b543b007ec21e059
Signed-off-by: Andrea Grazioso (agr) <agr@odoo.com>
Signed-off-by: William André (wan) <wan@odoo.com>
2023-07-10 18:16:22 +02:00
Raphael Collet 884522ebd1 [FIX] core: infinite recursion when accessing Html field on new record
closes odoo/odoo#127718

Related: odoo/enterprise#43815
Signed-off-by: Raphael Collet <rco@odoo.com>
2023-07-10 18:16:19 +02:00
Raphael Collet 59afbf6686 [FIX] web: web_read() on new records with _inherits
Part-of: odoo/odoo#127718
2023-07-10 18:16:19 +02:00
Raphael Collet b3e8560c9c [FIX] tests: make first call to onchange2() return complete x2many value
The use-case is a first call to onchange2() where:
 - a one2many field has a default value with a new line
 - some onchange method discards that line

The diff should not return a "delete" command for the discarded line,
since the client does not know about it.  Instead, for that first call,
it should behave like if the initial value of the field was empty.

Part-of: odoo/odoo#127718
2023-07-10 18:16:18 +02:00
abd-msyukyu-odoo 4c111c1324 [FIX] web_editor: properly close all connections during PTP stop
Ensure to close all connections before setting the flag that prevents any
notification (notably the notification to disconnect).

task-3392096

closes odoo/odoo#127953

X-original-commit: 905307e8d08ed3595a1f965fe846f1fe6ebe9d5c
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-07-10 16:59:58 +02:00
Victor Feyens f96c5a61a9 [FIX] website_sale: unable to confirm zero-amount cart
When the cart has a zero amount (because of pricelist, coupons, ...),
providers are not loaded nor displayed.
Furthermore, if there is no need for delivery (because the cart only
contains services), delivery carriers logic is not loaded either.

In this case, without carriers nor providers managing the disabling/enabling
of the confirmation button (o_payment_submit_button), the base logic handling
the T&C checkbox didn't properly enable the button when it should have.

Introduced by 608e90e998, already fixed
for payment form by 04059d09dfd7dc57a5c86c842d6fea300e1441aa

opw-3418472

closes odoo/odoo#127950

X-original-commit: d3bcf03adb93d2727ed81e1b9ffe0a2bbc5707b0
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-07-10 16:59:55 +02:00
Soam (sold) e1295ee65f [FIX] sale: fix amount to invoice for credit notes
Issue:
The `_compute_amount_to_invoice` computation wasn't taking
into account the fact that invoices have a direction (i.e. either
going outbound(+) or coming inbound(-) (cf. `_compute_direction_sign`)).
This, in turn, makes the value of `amount_to_invoice` incorrect
for sales order with a credit note.

Solution:
In  `_compute_amount_to_invoice`, multiply the value of
`invoice_amount_currency` with the opposite of  the
`direction_sign` of the invoice, to account for the invoice direction.

opw-3360439

X-original-commit: 06ef17f2eefe89abfca64721185ac053fa8de820

[FIX] sale: fix amount to invoice for credit notes

Issue:
The `_compute_amount_to_invoice` computation wasn't taking
into account the fact that invoices have a direction (i.e. either
going outbound(+) or coming inbound(-) (cf. `_compute_direction_sign`)).
This, in turn, makes the value of `amount_to_invoice` incorrect
for sales order with a credit note.

Solution:
In  `_compute_amount_to_invoice`, multiply the value of
`invoice_amount_currency` with the opposite of  the
`direction_sign` of the invoice, to account for the invoice direction.

opw-3360439

closes odoo/odoo#127914

X-original-commit: d258774f120fb470d969e68c05cf0d8da0c4557a
Signed-off-by: John Laterre (jol) <jol@odoo.com>
2023-07-10 16:59:45 +02:00
Xavier ALT 26bbabb1cb [FIX] website_slides: fix access error when user lists its own courses
To reproduce (on runbot):

- as admin, open "Furniture Technical Specifications" course
- click on "Add attendees" and select "Joel Willis" and "Send" it

- as "Joel Willis" ('portal' user) go to eLearning (/slides)
- click on "All Courses" (/slides/all?my=1)
- user get a 403 Forbidden error.

As `slide.channel.partner` is restricted to only "eLearning / Officer"
group, do the subquery as sudo() so that user can filter on it's own
courses

closes odoo/odoo#127913

X-original-commit: 085b42ea512859bda979dd566295cd8f9394c913
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Xavier Alt (xal) <xal@odoo.com>
2023-07-10 16:59:39 +02:00
paso-odoo 3810ce75a0 [FIX] l10n_es_edi_facturae: certificates deleted for facturae EDI
When the user deletes the certificate of facturae EDI invoices on Spain and
tries to send an invoice from the `Send & Print`, button error will be produced
says, the local variable 'xml_content' referenced before the assignment.

Steps to produce:
- Install the 'l10n_es_edi_facturae' module and change the company to ES Company.
- Accounting > Configuration > Spain Facturae EDI > Certificates.
- Delete all the certificate(s).
- Now create one Invoice > Confirm > Send & Print > Click on `Send & Print`
a button from the wizard.
- Error will be produced.

Fix this issue by handling the error from the
`_l10n_es_edi_facturae_render_facturae` method. If the certificate is not found,
`userError` will be raised.

Sentry-4265566923

closes odoo/odoo#127910

X-original-commit: 14e6954bf35c19f5415ad71e52591dd25794e47b
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Parth Solanki (paso) <paso@odoo.com>
2023-07-10 16:59:36 +02:00
Yolann Sabaux b970caef22 [FIX] hr_expense: set correct account_id on upload
Steps to reproduce:
- On the expense product by default, set an account_id
- Upload an expense

Issue:
The account_id that we set is not the one on the newly created expense

Cause:
We don't give any account_id during creation. Therefore, the account_id by default is set:
https://github.com/odoo/odoo/blob/7bcd64c51b2e87ece462c75a528c9ad6e1601633/addons/hr_expense/models/hr_expense.py#L31-L32

opw-3343007

closes odoo/odoo#127891

X-original-commit: c6b048196be92392ee34e50cc7ab13107632b87e
Signed-off-by: John Laterre (jol) <jol@odoo.com>
2023-07-10 16:59:33 +02:00
Denis Ledoux 3d2f76671c [FIX] core: missing escaping in sql constraint name_manual_field
Oversight in revision
8c38baee85

In SQL,
The underscore character ( _ ) represents a single character
to match a pattern from a word or string.

Meaning
`name LIKE 'x_%'`
allows names starting by `x`, and not names starting by `x_` as expected.

Add the escape in the constraint to enforce starting by `x_`
and not just `x`

closes odoo/odoo#127883
2023-07-10 16:59:24 +02:00
Didier (did) 5e18390858 [IMP] mail: add missing type def
closes odoo/odoo#127868

Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
2023-07-10 16:59:21 +02:00
Romain Derie a1aa2db7c5 [FIX] web_editor: avoid fetching optimized images which can't be shown
Before this commit, when opening the media dialog, the optimized images
would be fetched too.
An optimized image is an image related to an original one which received
some modification (crop etc).
Those optimized images are hidden by default, and can only be shown when
toggling the "Show optimized" option, which can be shown only in debug
mode.

So, fetching those images outside debug mode is:
1. Useless, as we don't do anything with those and never show them
2. Buggy sometimes, as a full patch of "Load more" images could be
   composed of only optimized images, meaning the "load more" will
   actually look like it did nothing, as all received images are (and
   will remain) hidden.

There is a tiny exception: if the edited image is an optimized one, we
still need to fetch it's attachment so we can show this image in the
media dialog as selected.

This fix thus filter out all the optimized images (except the one from
the explained exception) from the `search_read()`.

opw-3372811

closes odoo/odoo#127853

X-original-commit: 24177b5e2b56a94a51ac4b922d555beda9347611
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-07-10 16:59:18 +02:00
Julien Carion (juca) 3cc9836400 [FIX] web: fix checkbox component's width
This commit simply restricts the clickable with of any checkbox component
to be restricted to the checkbox (or toggle) itself so that the user can
no longer toggle it from possibly a long range.

opw-3378955

closes odoo/odoo#127118

Signed-off-by: Luca Vitali (luvi) <luvi@odoo.com>
2023-07-10 16:59:14 +02:00
Odoo's Mergebot 10c9f07523 [IMP] base, mail: split company email colors from document colors
PURPOSE

Settings allow to change colors used in emails (primary and secondary colors). Those are used for headers and buttons. They are currently shared with colors used for documents and reporting: changing email colors change documents colors, which is not expected nor clearly indicated.

SPECIFICATIONS

Split configuration: colors used in documents may differ from colors used in emails. Duplicate color fields (primary and secondary). To ease setup when updating documents colors, update mail colors accordingly. Inverse is not true as we consider documents being the main configuration, and emails a more fine-grain configuration.

Task-3346388

closes odoo/odoo#123678

Related: odoo/upgrade#4735
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2023-07-10 16:59:12 +02:00
Thibault Delavallée 50762307e4 [IMP] base, mail: split company email colors from document colors
PURPOSE

Settings allow to change colors used in emails (primary and secondary colors).
Those are used for headers and buttons. They are currently shared with colors
used for base documents and reports layout: changing email colors change
documents colors, which is not expected nor clearly indicated.

SPECIFICATIONS

Split configuration: colors used in documents may differ from colors used in
emails. Duplicate color fields (primary and secondary). To ease setup when
updating documents colors, update mail colors accordingly. Inverse is not
true as we consider documents being the main configuration, and emails a
more fine-grain configuration.

Task-3346388

Part-of: odoo/odoo#123678
2023-07-10 16:59:11 +02:00
Thibault Delavallée 3d4cf03ca6 [MOV] bus, mail: move and regroup some tests
Purpose of this commit is to regroup some tests, or rename some too specific
files in order to avoid explosion of files, making tests hard to find when
looking for feature-specific tests.

Task-3346388

Part-of: odoo/odoo#123678
2023-07-10 16:59:11 +02:00
Romain Derie 3fec4bb448 [FIX] website: allow load_menus_root to force action
The website frontend apps menu list is not working when the user has a
`Home Action` defined on his user.
The `Home Action` is meant to redirect to the defined action whenever
that user is login in.
But since the backend menu links on the website have most of the time
no `action` defined but just a `menu_id` defined, the `Home Action` will
kick in and take over the redirection, the same way as if the user just
type `/web` without any params.

To solve that, we simply force the `action` of those links (if they
don't already have one).

This will make sure that the redirect is working as it should for users
having a `Home Action` set.

Step to reproduce:
- Set a Home Action for any user, like "Contacts"
- Go to the website frontend, eg on `/`.
- Click on the top left button to show the backend app menus list
- Click on any menu (CRM, Invoicing, Calendar..)
-> Most of those menu will not redirect you were you are supposed to be
   but on your Home Action instead.
   You can figure which one will be buggy or not by just mouseovering
   the link and see if the URL param `action` is set to something or
   not.

--- Technical hints ---

There is multiple methods to get the list of menus in Odoo:
- `load_web_menus`: called by the web client rpc, calling `load_menus`.
  If a top/app menu has no action defined on it, it sets the first found
  action of their children menus to it.
  It returns the full (flat) list of menus, not only the top/app ones.
  This method is not ormcached but is calling an ormcached method and
  just doing some tiny work on the data.
- `load_menus_root`: called only by website backend template to add the
  app list on the website (in the frontend) to jump to the backend.
  It does not force the action if a menu has no action set on it.
  It returns only the top/app menus.
  This method is ormcached.
  Note that this method seems only used by the website module.
- `load_menus`: returns the full (flat) list of menus without a force
  action
  This method is ormcached.

Fixes https://github.com/odoo/odoo/issues/119971
task-3378963

closes odoo/odoo#127840

X-original-commit: f28a349aa40b2ea48ef8f2b71e806b965777014f
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-07-10 15:33:09 +02:00
Sébastien Theys 6dacefd50a [FIX] mail: standardize way to get guest from context
Backport of `_get_guest_from_context`.

Prevent crash when unexpected (not recordset) values are in the context.

Ensure the mere existence of a value (example integer) does not lead to
executing flows where an actual guest is expected.

task-2819597

closes odoo/odoo#127831

X-original-commit: 3d1890e88b99f059377d8b227b56d77798157397
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-07-10 15:33:06 +02:00
Brieuc-brd f90253d3a3 [FIX] website: change translate btn to lowercase
Prior to this commit, the translate button was in uppercase.

To maintain consistency with other buttons, this commit changes the
button to lowercase.

task-3414983
Part of task-3326263

closes odoo/odoo#127828

X-original-commit: 52f0bf2f2581b77a32d5e92fe1ae03d9787db5b4
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-07-10 15:33:03 +02:00
Antoine (anso) 615c5ed6a5 [FIX] web: kanban header vertical padding
This commit reduces the vertical padding of `.o_kanban_header` to
display more kanban cards at a time in the view vertically

part of task-3326263

closes odoo/odoo#127827

X-original-commit: dc5f4f7cef67b256eb50cb15e1ae1f22aa124966
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-07-10 15:32:56 +02:00
Antoine Guenet e47bc1115f [FIX] web_editor: prevent traceback on convert single-col align stretch
When converting a row with items that are supposed to be stretch-aligned
we need to set each of its column's height. However this failed when
the row contained less than two columns.

opw-3371134

closes odoo/odoo#127813

X-original-commit: 7df4cc0d9aaccf0dabcc4a7863549b276efaa403
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-07-10 15:32:53 +02:00
Renilkumar Kajavadra 88ac225011 [FIX] website: hide publish and unpublish actions
If user tries to publish or unpublish the forum post from forum posts list view,
a traceback will appear.

Steps to reproduce the issue:
- Install website_forum
- Configure website
- Go to Website -> site -> Forum Posts
- Select any post -> Action -> 'Publish' or 'Unpublish'

Error: A traceback appears:
"ValueError: Invalid field 'is_published' on model 'forum.post'"

https://github.com/odoo/odoo/blob/551685368971161975d64f480e9bec326db8931e/
addons/website/static/src/components/views/page_list.js#L69
Here we will receive 'forum.post' in this.props.resModel.
is_published field is not present in the 'forum.post' model,
So it will lead to above traceback.

sentry-4256037237

closes odoo/odoo#127476

X-original-commit: 16943c482c9ba8e12eab697ceb48a3ef6ee6c2fb
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Renilkumar Kajavadra (reka) <reka@odoo.com>
2023-07-10 15:32:38 +02:00
Maximilien (malb) a638c06f8e [IMP] l10n_dk: invoice label translate
In the translation PR (#111044), we translated the tax group and
invoice label but for the invoice label we didn't added to translation it needed
to have. This commit fix that.

closes odoo/odoo#125017

Task: 3369579
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
2023-07-10 15:32:29 +02:00
Maximilien (malb) 5d9ee9f0d2 [IMP] l10n_es: invoice label translate
In the translation PR (odoo#115968), we translated the tax group and
invoice label but for the invoice label we didn't added to translation it needed
to have. This commit fix that.

Task: 3369579
Part-of: odoo/odoo#125017
2023-07-10 15:32:29 +02:00
Maximilien (malb) bd632c6872 [IMP] l10n_nl: invoice label translate
In the translation PR (odoo#108954), we translated the tax group and
invoice label but for the invoice label we didn't added to translation it needed
to have. This commit fix that.

Task: 3369579
Part-of: odoo/odoo#125017
2023-07-10 15:32:29 +02:00
Maximilien (malb) 24c8000335 [IMP] l10n_ve: invoice label translate
In the translation PR (odoo#109494), we translated the tax group and
invoice label but for the invoice label we didn't added to translation it needed
to have. This commit fix that.

Task: 3369579
Part-of: odoo/odoo#125017
2023-07-10 15:32:28 +02:00
Maximilien (malb) 221e8af75a [IMP] l10n_gt: invoice label translate
In the translation PR (odoo#110661), we translated the tax group and
invoice label but for the invoice label we didn't added to translation it needed
to have. This commit fix that.

Task: 3369579
Part-of: odoo/odoo#125017
2023-07-10 15:32:28 +02:00
Maximilien (malb) 2553bbb1fd [IMP] l10n_hn: invoice label translate
In the translation PR (odoo#110938), we translated the tax group and
invoice label but for the invoice label we didn't added to translation it needed
to have. This commit fix that.

Task: 3369579
Part-of: odoo/odoo#125017
2023-07-10 15:32:28 +02:00
Maximilien (malb) 16245f3f3a [IMP] l10n_ec: invoice label translate + taxonomy
In the translation PR (odoo#109147), we translated the tax group and
invoice label but for the invoice label we didn't added to translation it needed
to have. This commit fix that.

Also in this commit i've redone the taxonomy that has been overwritten by another
PR.

Task: 3369579
Part-of: odoo/odoo#125017
2023-07-10 15:32:28 +02:00
Maximilien (malb) 25c3f8ea96 [IMP] l10n_no: invoice label translate
In the translation PR (odoo#110986), we translated the tax group and
invoice label but for the invoice label we didn't added to translation it needed
to have. This commit fix that.

Task: 3369579
Part-of: odoo/odoo#125017
2023-07-10 15:32:27 +02:00
Maximilien (malb) 950c87cdab [IMP] l10n_cl: invoice label translate
In the translation PR (odoo#112160), we translated the tax group and
invoice label but for the invoice label we didn't added to translation it needed
to have. This commit fix that.

Task: 3369579
Part-of: odoo/odoo#125017
2023-07-10 15:32:27 +02:00
Maximilien (malb) fc3144eed4 [IMP] l10n_jp: invoice label translate
In the translation PR (odoo#111656), we translated the tax group and
invoice label but for the invoice label we didn't added to translation it needed
to have. This commit fix that.

Task: 3369579
Part-of: odoo/odoo#125017
2023-07-10 15:32:27 +02:00
Maximilien (malb) 3922148442 [IMP] l10n_cr: invoice label translate
In the translation PR (#110930), we translated the tax group and
invoice label but for the invoice label we didn't added to translation it needed
to have. This commit fix that.

Task: 3369579
Part-of: odoo/odoo#125017
2023-07-10 15:32:26 +02:00
Maximilien (malb) 6bd3e2bb31 [IMP] l10n_skr04: invoice label translate
In the translation PR (odoo#106324), we translated the tax group and
invoice label but for the invoice label we didn't added to translation it needed
to have. This commit fix that.

Task: 3369579
Part-of: odoo/odoo#125017
2023-07-10 15:32:26 +02:00
Maximilien (malb) aaae983296 [IMP] l10n_skr03: invoice label translate
In the translation PR (odoo#106324), we translated the tax group and
invoice label but for the invoice label we didn't added to translation it needed
to have. This commit fix that.

Task: 3369579
Part-of: odoo/odoo#125017
2023-07-10 15:32:26 +02:00
Maximilien (malb) 16a9483835 [IMP] l10n_uy: invoice label translate
In the translation PR (odoo#109504), we translated the tax group and invoice
label
but for the invoice label we didn't added to translation it needed to have.
This commit fix that.

Task: 3369579
Part-of: odoo/odoo#125017
2023-07-10 15:32:26 +02:00
Maximilien (malb) 1347abbe89 [IMP] l10n_fi: invoice label translate
In the translation PR (odoo#111107), we translated the tax group and invoice
label
but for the invoice label we didn't added to translation it needed to have.
This commit fix that.

Task: 3369579
Part-of: odoo/odoo#125017
2023-07-10 15:32:25 +02:00
Maximilien (malb) 11f8ba6160 [IMP] l10n_pa: invoice label translate
In the translation PR (#110656), we translated the tax group and invoice label
but for the invoice label we didn't added to translation it needed to have.
This commit fix that.

Task: 3369579
Part-of: odoo/odoo#125017
2023-07-10 15:32:25 +02:00
Maximilien (malb) 6ef8808d4d [IMP] l10n_mx: invoice label translate
In the translation PR (odoo#108725), we translated the tax group and invoice label
but for the invoice label we didn't added to translation it needed to have.
This commit fix that.

Task: 3369579
Part-of: odoo/odoo#125017
2023-07-10 15:32:25 +02:00
Maximilien (malb) 71db3ba8b9 [IMP] l10n_fr: invoice label translate
In the translation PR (odoo/enterprise#35296), we translated the tax group and invoice label
but for the invoice label we didn't added to translation it needed to have.
This commit fix that.

Task: 3369579
Part-of: odoo/odoo#125017
2023-07-10 15:32:24 +02:00
Maximilien (malb) 843b004ba4 [IMP] account: invoice label translate
This commit allow the invoice label to be translated

Task: 3369579
Part-of: odoo/odoo#125017
2023-07-10 15:32:24 +02:00
Maximilien (malb) 5c1e4a325e [IMP] l10n_ar: invoice label translate
In the translation PR (#112803), we translated the tax group and invoice label
but for the invoice label we didn't added to translation it needed to have.
This commit fix that.

Task: 3369579
Part-of: odoo/odoo#125017
2023-07-10 15:32:24 +02:00
Maximilien (malb) dab9b3d349 [FIX] account: Error when installing module demo data
Before this commit, when trying to install the l10n_sa or l10n_ae localization,
we get an error in the chart template resulting in no demo data installed. In
fact, when doing a Command.update to link the account to the journal in the
files template_sa and template_ae. The "values" dict was always filled no matter
 the Command, this mistake had repercussion on the "deref" method.

 In the deref method we do a loop on values items, but in the case we are facing
 the last_part variable was filled with an integer.
 When doing the recursion in case command is a "create" or an "update", the new
 values is the last_part, so the loop on values items raised an error since we
 cannot do a .items() on an integer.

closes odoo/odoo#116643

Related: odoo/upgrade#4687
Signed-off-by: John Laterre (jol) <jol@odoo.com>
2023-07-10 15:32:08 +02:00
det a5801a12b5 [IMP] l10n_hu, l10n_sa, account: delivery date + hu brush up
In this pr, we have improved the l10n_hu localization by adding a Tax rounding
(global) by default.

Also, a lot of localization will need a delivery date on invoices. We added a
field in account that can be overridden if needed. In this pr, we did an
override on l10n_sa and l10n_hu.

When creating a sale order and that the effective date is fill, we take this
value for the delivery date.

The delivery date field will always be displayed in the other info tab, and if
there is a delivery data, the field is also display in the header of the form
view. Exception for l10n_sa and l10n_hu where the delivery date is always
present.

Also for l10n_sa company there was a problem with the vat number, it was not in
the right format.

Task-id: 3191530
Part-of: odoo/odoo#116643
2023-07-10 15:32:07 +02:00
luvi a3b0e9a3c4 [IMP] web: use useAutoFocus hook in SelectMenu
This commit makes use of the useAutoFocus hook to focus the input
when the SelectMenu opens. This usage of the hook can replace the
manual focus that was applied when the dropdown opened.

The feature can hardly be tested with newer tests, since the behavior
is identical, and the focus on the input was already tested.

closes odoo/odoo#127864

Signed-off-by: Bastien Fafchamps (bafa) <bafa@odoo.com>
2023-07-10 14:08:39 +02:00
Deependra Solanki 6b09924147 [FIX] web_editor: change icon of table menu
Before this commit:

- The icon of table menu is fa-bars which looks like drag 'n' drop handle.
- Menu width is not 100%.

After this commit:

- Changed the icons to fa-ellipsis-h and fa-ellipsis-v.
- Made the menu 100% width so it's easier to intuit it's not a drag 'n'
  drop handle.

Task - 3297710

closes odoo/odoo#127843

X-original-commit: 479c0a87b0b676f5fa9252efdef3ede99f6d7ea7
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-07-10 14:08:37 +02:00
Achraf 80246ab857 [FIX] l10n_eg_edi_eta, l10n_sa: Adapting barcode API to the new one
This commit change `/report/barcode/?type=` to  `/report/barcode/?barcode_type`

See https://github.com/odoo/odoo/commit/ee324e8374536cebca4d7302210b07e8f33d3852#diff-8f0bbb50491623995fba965c3d64585c6cbfdbbe519ec95473e472826d253826R1977-R1979

sentry-3965574308

closes odoo/odoo#127290

X-original-commit: 638b61114d8148557cdbcc30a1272e1b3da79880
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-07-10 11:48:57 +02:00