Commit Graph
158087 Commits
Author SHA1 Message Date
Denis Ledoux fdf2f0c095 [FIX] l10n_*: missing load_translations in manifest post_init_hook
There is a code pattern in l10n modules
to create a post init hook method `load_translations` in `__init__.py`
and to add it in the `post_init_hook` of the module  manifest.

For the modules part of this revision,
the method `load_translations` was created as expected,
but then was missing in the `post_init_hook` key of the manifest,
therefore leading to the fact this `load_translations`
method was never called for these modules,
despite their `spoken_languages` were correctly
set in their charf of account template.

closes odoo/odoo#108254

Related: odoo/design-themes#631
Related: odoo/enterprise#35084
Related: odoo/upgrade#4144
Signed-off-by: Christophe Simonis <chs@odoo.com>
2023-02-01 10:25:01 +01:00
Denis Ledoux b4a7996e96 [IMP] base, *: change the API of init hooks to pass env
This is mostly a cleaning/refactoring change.

The current API for init hooks (pre, post, uninstall) is to pass
`cr, registry`.
But the first thing which was done by most
post init and uninstall hooks was to create an env using
the cr passed
e.g.
`env = api.Environment(cr, SUPERUSER_ID, {})`
and the `registry` argument was unused in all these hooks,
completely.

By changing the API of hooks to pass `env` instead
of `cr, registry`, we gain in average two lines in every
hooks:
- the line creating the env `env = api.Environment(cr, SUPERUSER_ID, {})`
- the line importing `api` and `SUPERUSER_ID`

Therefore removing ~250 lines of repeated code lines accross odoo/odoo and
odoo/enterprise.
In addition to these lines removed,
it also ease the API of init hooks for Odoo developers,
who are used to that `env` and not so much how to create an `env`
from a cursor.

Part-of: odoo/odoo#108254
2023-02-01 10:25:01 +01:00
Denis Ledoux 5bf1207c8c [IMP] base, *: re-use env during registry loading
The goal of this revision is to re-use the environment among the
different steps of the registry loading,
instead of creating a new environment for each step.

1. Simply To avoid to repeat the line
   `env = api.Environment(cr, SUPERUSER_ID, {})`
   multiple times in the code
2. This also allows to share the context among the different
   steps. This is not yet used in this revision, but it could
   be, for instance to avoid the current repetition to add the keys
   `install_module`, in `convert_csv_import` and `xml_import._tag_record`

Part-of: odoo/odoo#108254
2023-02-01 10:25:01 +01:00
Maruan Aguerdouh (magm) 74b73cee85 [FIX] point_of_sale: fix the numpad shifting when introducing numbers
Steps to reproduce:

- Install point_of_sale
- Go to Point of Sale > Payment.
- Click on the numpad for many numbers.

Issue:

The content will move which will also move the position of the number
keys, creating sometimes missclicks.

Solution:

Added some changes to the numpad and payment screen content css in order
to not shift but keep the same behavior.

This issue affects all versions until master.

opw-3089013

closes odoo/odoo#111493

X-original-commit: 6909f5d0a537449330174afb06cae87dbaa99c5b
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2023-02-01 09:20:42 +01:00
roen-odoo 2e8fe417e6 [FIX] point_of_sale: Add internal product reference to invoice
Current behavior:
The internal product reference is not added to the invoice when the
invoice is created from the POS.

Steps to reproduce:
- Create an order in the POS
- Validate the order and print the invoice
- Open the invoice, the internal product reference is not written on the
  invoice

opw-3119678

closes odoo/odoo#111543

X-original-commit: 38e93f5951528526c060832eecb5514a3ee466a8
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2023-01-31 21:16:59 +01:00
Valentin Vallaeys (vava) 956d0d26a3 [IMP] payment_stripe: prevent enabling Stripe if onboarding is ongoing
For now, you can enable the Stripe payment provider while onboarding
with Stripe Connect.

This raises two issues:
- This will raise errors in online payments because Stripe is not
completely configured;
- The button to continue the onboarding is not working anymore,
preventing the user to finish the configuration of his account from
Odoo.

This commit prevents enabling Stripe if the onboarding has been
initiated but is not finished. It also changes the way constants are
read from const.py to allow patching one of them if needed.

OPW-3149159

closes odoo/odoo#111534

X-original-commit: fa3bcac71d1699aa9b9a7bc1d6b6181a70171662
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Vallaeys Valentin (vava) <vava@odoo.com>
2023-01-31 21:16:56 +01:00
Daniel Kosky (dako) f18153b042 [FIX] l10n_ke_edi_tremol: fix naming of product HS Code fields
Although in the documentation these fields on the product are referred
to as 'HS Codes' (codes belonging to the Harmonised System), they are
not HS Codes and share nothing with HS codes excepting the
length/format.

Apparently the folks at the KRA have been referring to these internally
as 'Item Codes'.

The fiscal device itself has a list of around 260 of these item codes
preloaded, and if the data sent contains an 'Item Code' not present in
this preloaded list, then the device will throw a 'Zero Input Registers'
error.

By representing this field as an HS code field, we misguide the clients,
who will enter the wrong value and get this error. This commit adapts
the strings of these fields from HSN Code/Description to KRA Item
Code/Description in order to avoid this confusion.

closes odoo/odoo#111516

X-original-commit: e9f15804e1d613ebd7d8ce73f34b37f3ad04f940
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Daniel Kosky (dako) <dako@odoo.com>
2023-01-31 18:37:39 +01:00
Kevin Baptiste dc69cb39cb [FIX] hr_holidays: freeze time on test
The test introduced in odoo/odoo#110658 would fail when run close to
midnight.

closes odoo/odoo#111503

X-original-commit: d27516ab9fa248b1901bce69bf892719cce0cefb
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-01-31 18:37:28 +01:00
Daniel Kosky (dako) b99ec5cb3a [FIX] l10n_ke_edi_tremol: error message spacing
Since batching was introduced for posting invoices with the fiscal
device (in https://github.com/odoo/odoo/pull/107852), the error messages
that are generated when doing the pre-post validation had to be grouped
by the invoice name. However, there is no line break between the groups
of messages, and thus the "Invalid invoice configuration on (invoice
name)" can appear on the end of the previous line, which is quite
confusing.

This commit inserts a new line at the end of each error message string,
so that the error messages displayed to the user are grouped
appropriately by the invoice to which they refer.

closes odoo/odoo#111502

X-original-commit: 1a47cf066a7c8eead7e602ebcb25c010021352f3
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Daniel Kosky (dako) <dako@odoo.com>
2023-01-31 18:37:26 +01:00
roen-odoo 1253362124 [FIX] point_of_sale: correctly show image that have a little ratio
Current behavior:
When a product image has a little ratio (height > width), the image
looks like it's zoomed in.

opw-3133037

closes odoo/odoo#111496

X-original-commit: 9cd35d940f4c60401bdc2e1dd84efc950cd0e584
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2023-01-31 16:25:06 +01:00
det 6a1d60bf54 [IMP] account/purchase: automatically match PO when importing bill
When a vendor bill document is uploaded (EDI, PDF,..) the link with
the purchase order is often lost.

We want to reuse the purchase.order OCR' matching logic to enhance
vendor bill extracted from documents.

To sum up the logic;

- if we find a partner or reference match (invoice_origin)
AND the same amount, we use autocomplete and replace the line in the vendor
bill with the purchase order one.

- if we find a match with the reference and some line in the purchase order
sum up to the vendor bill total, we add those line in the vendor bill
but we set the qty to zero (the accountant can  manually remove the XML
line and link the new one afterwards).

task-id: 2828521
[community](https://github.com/odoo/odoo/pull/109093)
[enterprise](https://github.com/odoo/enterprise/pull/35436)

update master: make _find_matching_subset_invoice_lines private

closes odoo/odoo#111491

X-original-commit: ebc8b007ecb375d20c566b6e6ecc3f6749ebaa2a
Related: odoo/enterprise#36545
Signed-off-by: Josse Colpaert <jco@odoo.com>
2023-01-31 16:25:03 +01:00
Jacky (trj) 9d6607b329 [FIX] point_of_sale: wrong return value in db.js add_partners
The performance fix in e3efa7a91dd8648bf2e0632640bdb62938ecef00 added a small
typo in the return value of `add_partners` which ended up by always returning undefined.

closes odoo/odoo#111472

X-original-commit: 4b07d022c081763ce0b7c5d6efad7be922704779
Signed-off-by: Samuel Degueldre <sad@odoo.com>
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2023-01-31 16:24:48 +01:00
Pierre Masereel 42afdd13df [IMP] google_calendar: generate meeting link when creating event
When we are creating an event in odoo and synchronise it with google,
the google meet link is not automatically generated. To ease the use of
the meeting, we'll auto generate the google meet link.

closes odoo/odoo#110847

Task-id: 2945998
Signed-off-by: Masereel Pierre <pim@odoo.com>
2023-01-31 16:24:45 +01:00
Josse Colpaert f7e5c86e11 [FIX] l10n_ar: remove tagged on common test class to allow tests to run
closes odoo/odoo#110480

X-original-commit: 5e58a748c76c8c2adb2c1890da7662949ae310c9
Related: odoo/enterprise#36073
Signed-off-by: Josse Colpaert <jco@odoo.com>
2023-01-31 16:24:40 +01:00
Katherine Zaoral a3c44a7844 [ADD] l10n_ar: add demo data liquido producto
X-original-commit: 72523a110755cb7d822a96c41d545b9f3a4e61ea
Part-of: odoo/odoo#110480
2023-01-31 16:24:40 +01:00
niyasraphy 2507c8e819 [FIX] website_forum: display correct user image in forum sidebar
Before this commit, on accessing the validation queue in the website forum,
the user image shown in the sidebar is different from the logged in user image.

The cause of issue was the variable passed from the controller and the
variable used for iterating the for loop who are the same, aka user. Thus
the value for 'user' is getting changed. resolved by storing the user value
to a temporary variable and restoring it after the loop.

After this commit, in the validation queue it will show the same logged in
user image in sidebar.

closes odoo/odoo#111474

X-original-commit: 31ad927c825f0aea02b3031fa228002ca33f65fd
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-01-31 15:18:01 +01:00
Maruan Aguerdouh (magm) 54607d473f [FIX] website_mass_mailing: fix traceback when submitting a newsletter website_form
Steps to reproduce:

- Install website_mass_mailing
- Go to Website homepage and edit to add a newsletter block.
- Drag the block to add it to the page and inside it change the Template
to Form Susbscription.
- Save the page and try to fill the form logged out.

Issue:

We get an error about permission as we don't have any access.

Solution:

Added proper `sudo` to the search so we avoid the error.

opw-3145571

closes odoo/odoo#111468

X-original-commit: 3631643e0d6294d3fa6c8e1b3bb087c08bbabb4a
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-01-31 15:17:58 +01:00
miad-odoo f1cb5e6b39 [FIX] event: make scheduler respect mail template
Before this commit, the mail scheduler in event bypassed the email_from field
in the selected template, implementing instead its own logic.

With this commit, the scheduler respects the `email_from` field from the mail
template, and only implements its own logic if that field is not set.

Task-3092425

closes odoo/odoo#111462

X-original-commit: ef503e62480c774e8a0d193666cc4cce5ab90282
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-01-31 15:17:55 +01:00
mehjabinfarsana 500c555690 [FIX] purchase_mrp: constrains not working
before this commit, in BoM form view, it was allowing to select BoM product as the BoM line product , as the constrains decorator was missing in this inherited function. typo in field name

after this commit, it is not allowed to add BoM product as BoM line product, as it will show the UserError. instead of bom_lines bom_line_ids used

closes odoo/odoo#111416

X-original-commit: 6e68005b27613ce84fe54d6d2f9273aa3ccfd662
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-01-31 15:17:52 +01:00
Mylyna Hy b8e8e7de8e [FIX] stock_account: search journal by code
closes odoo/odoo#111399

X-original-commit: 78f387eca66c02c46c1f6389f3c5bd09f482e4c5
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-01-31 15:17:49 +01:00
hapa-odoo b6cf237a73 [FIX] stock: fixed route_id in replenishment
In this commit, I have fixed the behavior of route_id in replenishment.
Previously while manufacture_steps is set to pick components and then manufacture
for a warehouse and that route(My Company: Pick components and then manufacture)
Not having the products boolean set to true. So by default route_id for replenishment
was coming as a Replenish on Order (MTO). Which was not appropriate behavior.
it must be either empty or (My Company: Pick components and then manufacture).

watch the demo in the task description:
task-3113374

closes odoo/odoo#111394

X-original-commit: 2377cbd6a15ce59a50f70ebc5ca9fdb815eac207
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-01-31 15:17:46 +01:00
FrancoisGe b81c9c707a [FIX] web: html field displays an empty string for the value false
Before this commit, in the list view, the html field displayed the value
false when there was no value.

How to reproduce:
- Go to a list view with an html field with a record that has no value for
  that field

Cefore this commit:
The value false is displayed by the html field

After this commit:
An empty string is displayed by the html field

closes odoo/odoo#111447

X-original-commit: 6d9a546213db953a8ac78828bf9d0a2d885ac0fe
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-01-31 14:04:35 +01:00
niyasraphy 320b91372a [FIX] base: fix access right change warning when no category
Before this commit, if a user group has no category assigned for it, the
user group information message shows the group name in the format
False: Group name, where false is the category name.

To reproduce

  * open users form view
  * assign administrator role in sales and editor role in website
  * Access Rights Mismatch? Since Marc Demo is a/an "Website: Editor and
    Designer", they will at least obtain the right "False: Bypass HTML Field
    Sanitize"

After this commit, in the users form view, "Other" is displayed instead
of False.

closes odoo/odoo#111446

X-original-commit: 54cb5aa41d1a1f21ff5b60d92ee59c8df867f066
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-01-31 14:04:33 +01:00
Florian Charlier 00e2afcbd8 [FIX] website_slides: add id and hint to oe_structures
In these two cases, adding and id (and editor message when it is visible)
enables
1/ to retain customizations when the view is updated
2/ to better signal that the section on slides is not meant to be
customizable per-record.

In particular, it was not clear that adding a block above a slide content would
make it visible on all slides. We therefore add this hint there, and not in
other places where that scope is obvious or where it isn't shown even if added,
or where it causes crashes (above covers).

Task-3120276
opw-3106887

closes odoo/odoo#111445

X-original-commit: 24977381fc54e258fa05724a9aa69c72656ece9c
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-01-31 14:04:30 +01:00
Bruno BoiandMichaël Mattiello 568d7a9a33 [FIX] web: allday events on far from UTC timezones
**Before this commit**
- Be in a far from UTC timezone, i.e. UTC-8. You could mock this with
  the Chrome devtools and the following IANA time zone: Mexico/BajaNorte
- Open Calendar App
- Create an all day event from the calendar view: e.g. click on a date
  in the month view
- The event is written as expected in the DB, but it is displayed one
  day before.

**After this commit**
The event is properly displayed.

**What is the fix?**
The deserialization (read) of the date/time fields is now mirroring
what is done at serialization (write).
The "allday" part was missing at deserialization.

closes odoo/odoo#111432

X-original-commit: 5a1ce3644deeaebf3712280d000f618d15bd93cb
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Co-authored-by: Michaël Mattiello <mcm@odoo.com>
2023-01-31 14:04:24 +01:00
Xavier ALT a3dbd47b1f [FIX] account_edi: allow to post an invoice w/ existing edi documents
Following odoo/odoo@44a4cdb, `attachment_id` is restricted, so force
updating it's value as sudo() when posting an invoice having existing
EDI documents.

closes odoo/odoo#111426

X-original-commit: 6b101d5ff0ad78b9ae2ad312f362c2224e7af457
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Xavier Alt (xal) <xal@odoo.com>
2023-01-31 14:04:16 +01:00
Benjamin Vray 5db5206cbe [FIX] website, website_mass_mailing: fix parallax in modals
Before this commit "parallax" animation was not working in modals.

This commit adds a parameter to the animation effects to enable
animations (triggered by the scroll) in the modals.

Note that for the "Newsletter" popup we have hidden the "parallax"
options. To make them work, it would be necessary to review the
structure of the "Newsletter" popup so that the vertical scrollbar is in
the same location as the "s_popup" snippet (on the ".modal" element).

task-2971402

closes odoo/odoo#111424

X-original-commit: f369686c1b74219968746a0f0a164dd6b3c5cfc6
Signed-off-by: Outagant Mehdi (mou) <mou@odoo.com>
2023-01-31 14:04:13 +01:00
Jigar Vaghela 20fc7855d6 [IMP] l10n_in_edi_ewaybill: neutralize
add missing neutralisation for the the l10n_in_edi_ewaybill module
introduced in https://github.com/odoo/odoo/pull/109384

closes odoo/odoo#111420

X-original-commit: 3c92c168ba12fca0ac9c2ab7f60bbba604514a4a
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Jigar Vaghela (jva) <jva@odoo.com>
2023-01-31 14:04:10 +01:00
niyasraphy 72d5ca5db9 [IMP] point_of_sale: improve session action help message
closes odoo/odoo#111013

Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2023-01-31 14:03:57 +01:00
william-andre 1cde02457b [FIX] account: performance of account selector side bar
Adding a domain on the accounts before doing the lateral join helps
reducing the amount of lateral queries needed to be done, most of which
would return an empty subset.
Since an empty subset on a query with limit=1 means that we need to scan
the whole table, it can have a huge impact.

closes odoo/odoo#111415

X-original-commit: 10a5e494aa5f9328e97052289ac829aad5f80c86
Signed-off-by: Fabien Pinckaers <fp@odoo.com>
Signed-off-by: William André (wan) <wan@odoo.com>
2023-01-31 12:56:30 +01:00
Claire Bretton (clbr) 682d41ac6f [FIX] l10n_eg_edi_eta: reintroduce lost translations from 15.0/Transifex
Some translations were lost when we changed to 16.0 since there is no l10n_* project for 16.0 on Transifex. Reintroduced lost translations for Arabic, German, French, Italian, Dutch and Chinese.

closes odoo/odoo#111414

Task: 3125952
X-original-commit: d594d1d155fcd30aa972323320038608f098edbc
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Signed-off-by: Claire Bretton <clbr@odoo.com>
2023-01-31 12:56:27 +01:00
gawa-odoo 16e8f484eb [IMP] analytic: distribution model view tree multi-editable
We should allow distribution models to be to be editable top.
Then we need a new button to be able to see the form view.

t-3029083

closes odoo/odoo#111413

X-original-commit: e6b0315dc4886c40014a9d46128e841ea171b20c
Signed-off-by: John Laterre (jol) <jol@odoo.com>
Signed-off-by: Wala Gauthier (gawa) <gawa@odoo.com>
2023-01-31 12:56:24 +01:00
niyasraphy 5c0477f929 [FIX] gamification: fix comment field width in form
Before this commit, the comment field in the view_badge_wizard_grant form is
displayed with a long with higher width and thus it appears with scroll bar in
the screen.

How to reproduce
  Go to Settings -> Gamification Tools -> Badges
  Click Grand on any badge

After this commit, the comment field will properly align in the form.

closes odoo/odoo#111412

X-original-commit: 69eb431cea959270d3fb2f12ec9dbb451750ce06
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-01-31 12:56:22 +01:00
Stefan-Calin Crainiciuc (stcc) 74c684d541 [FIX] mrp: create productivity line before modifying workorder
Necessary for odoo/enterprise#35867

Steps to reproduce:
- Install Quality, Manufacturing
- Manufacturing > Settings > Enable Work Orders
- Manufacturing Orders > Create order for Table > Confirm > Work orders
tab > Open Tablet View
- Get to step 'Please encode the table legs lot number'
- Change the quantity to produce
- Pause > Continue

Issue:
The quantity to produce is reset to 4/4 Units.

Solution:
Check if the workorder is paused before applying `qty_done` changes.

opw-3032052

closes odoo/odoo#111402

X-original-commit: 4acb1781c5aedc011ba00054285f64963aa0dacc
Related: odoo/enterprise#36491
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Stefan-Calin Crainiciuc (stcc) <stcc@odoo.com>
2023-01-31 12:56:17 +01:00
Jurgen (jugj) 790ad0e961 [FIX] hr_org_chart: Count indirect subordinates correctly
task - 3142380

closes odoo/odoo#111398

X-original-commit: 23e729e5a4086cd106f3a5e825d141232c81b750
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-01-31 12:56:14 +01:00
Dylan Kiss (dyki) 9c3aa6a862 [FIX] l10n_eu_service: add new LU tax mappings
Taxes in Luxembourg have been reduced until the end of 2023: 17% -> 16%, 14% -> 13% and 8% to 7%.

This change remaps the OSS tax mappings for Luxembourg to the new tax rates.

task-3159138

closes odoo/odoo#111286

X-original-commit: e7edd71a3a4d8d7297c07f44b6b701052f2c5b7d
Related: odoo/enterprise#36477
Signed-off-by: Josse Colpaert <jco@odoo.com>
2023-01-31 12:56:06 +01:00
Nishant Jain (niai) a5465a91a2 [IMP] l10n_in: indian integration setting in one block
Before this commit
==================
all the settings of Indian integration like E-waybill,and e-invoice were
having different setting blocks.

After this commit
=================
all the Indian integration settings will be shown in one setting block.

closes odoo/odoo#111175

Related: odoo/enterprise#36382
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
2023-01-31 12:55:58 +01:00
Maximilien (malb) 65fe99ccf0 [IMP] l10n_no: translation
Before this PR, all this localisation was written in Norwegian, but all the localisation have to be written in english and then translated back in the native language. This PR correct that.

closes odoo/odoo#110986

Task-id: 3149392
Related: odoo/enterprise#36280
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
2023-01-31 12:55:52 +01:00
Xavier Morel 98dd7aba2f [FIX] *: used-before-assignment pylint warnings
Warnings show up when using a recent pylint. It's only a fraction of
what e.g. pycharm flags as "local variable might be referenced before
assignment" but seems a good idea to fix anyway in prevision of
possibly eventually updating the reference pylint.

closes odoo/odoo#107968

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2023-01-31 12:55:49 +01:00
Xavier Morel b951cb4422 [IMP] core: mark all responses as nosniff
Doesn't seem like it could hurt, and should only make CORB more
reliable by avoiding sniffing. Worst case scenario requires fixing a
few mimetypes, but aside from CORB it looks like modern (non-IE)
browsers only try to guess document mimetypes in very limited
contexts.

closes odoo/odoo#107957

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2023-01-31 12:55:46 +01:00
Romain Derie f5582e91ef [FIX] website: prevent race condition on visitor merge test
Since [1], a race condition would be faced as the dict order is not
guaranteed, sometimes failing because:
```
AssertionError: Lists differ: ['/demo', '/admin'] != ['/admin', '/demo']
```

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

runbot-15727

closes odoo/odoo#111417

X-original-commit: 3e9a1dd76ce5172c4797bc92f0351e107589c3a5
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2023-01-31 10:31:03 +01:00
Samuel Degueldre 207f15ba8b [FIX] point_of_sale: make pos usable when loading partners in background
Previously, when a database had a large amount of partners and they were
loading in the background, the PoS became progressively more slugglish
to the point of being unusable after ~10.000 partners were loaded and
for as long as all partners were not loaded. This was caused by the
client side database building a large string of text containing all
partner information to use for local searching of the partners. Any time
a batch of partner was loaded, this string would be reconstructed from
scratch, and this string would be around ~1MB by the time 10k partners
were loaded, causing a significant slowdown after every partner loading
request came back.

This commit fixes that by chunking the string by batch of 1000 partners
and only updating the string for the batches of the partners that were
just loaded, instead of updating the entire string, which brings brings
the performance of the PoS back into usable territory.

There were also some reactivity-related issues which have been fixed in
owl separately.

closes odoo/odoo#111388

X-original-commit: 4974782c61d7e283875da6ea40149072b1a36cdc
Signed-off-by: Samuel Degueldre <sad@odoo.com>
2023-01-31 10:30:57 +01:00
Sylvain LE GAL a3be1182af [FIX] base: add 'disable_shrinking' field in views
Add the field disable_shrinking in the report.paperformat form view. This
field has been added recently (see odoo/odoo@9e4c8d61ea / odoo/odoo#68188)
but only in the model.

In this commit we add it in view so that it is controllable.

Followup of task-2483393

closes odoo/odoo#111393

X-original-commit: 6fdf517ea219a021521e3fbdad540d21b5e3ba76
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-01-31 00:52:10 +01:00
Laurent Smet 65af112e2b [FIX] account_edi*: Fix access rights for account.edi.document.attachment_id field
An attachment has complex access rights. If there is no res_model/res_id, the access rights are admin (not exactly but let's say that).
When an EDI like Facturx/E-FFF generates an attachment not linked to any model, you don't have access to it except if you are admin.
However, here we have a security issue since everyone is able to write any 'id' on the 'attachment_id' field.
If you do that using Facturx, knowing this EDI will embed its attachment inside the invoice PDF report in sudo mode, you have now a way to extract any attachment from the database including the ones you shouldn't have access to.

Furthermore, a different api introduced by OWL makes the form view of account.edi.document popping from the one2many inside the invoice form.
Instead of "options={'no_open': '1'}", the new api is now to put directly "no_open='1'" on the root node.

If you combine both issues above, you currently have a way to extract any 'attachment_id' from the database and odoo is kind enough to give you the form view to do it.

closes odoo/odoo#111210

Solution: "account.edi.document.attachment_id" is now accessible to the admin only.
X-original-commit: 44a4cdb3944a4b722dcfbca5e2947a4372b8501d
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
2023-01-30 23:30:16 +01:00
Benoit Socias 3414bebed0 [FIX] website: keep existing website-specific views translations
Since [1] when the translations becames stored as JSONB, the
translations of website-specific views were lost when adding a new
language.
[2] did fix a similar problem when installing an App, but did not
solve this.

This commit makes sure to only change the requested translations
without impacting the existing ones when a language is added.

Steps to reproduce:
- Add French language to the website
- Add the number snippet on the homepage
- Translate "Useful options" -> "Options utiles"
- Go to setting -> Languages -> Activate any language (not even on a
website)
=> French translation disappeared.

[1]: https://github.com/odoo/odoo/commit/ef00294e7189359c47638c4a71626f1937395edb
[2]: https://github.com/odoo/odoo/commit/91a9c870eede96040ac49d2375fe0e18342342e1

opw-3120079

closes odoo/odoo#111378

X-original-commit: 52fd577de8e270f84e8ca23c9350f2fb3ab5a7d8
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-01-30 22:27:21 +01:00
Nicolas (vin) d4edf55949 [FIX] partner_autocomplete: fix name placeholder
The placeholder on the partner name was working for a partner that is
an individual but not company. This will fix that.

Task id #3138441

closes odoo/odoo#111324

X-original-commit: 00256249f880b1b6de3fc768beb0a2bc56191ada
Related: odoo/enterprise#36452
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
2023-01-30 22:27:15 +01:00
Nicolas (vin) af771e263c [FIX] base: partner view improvement
Improve the partner view by reorganising the city/state/zip row, making
the order of the fields dependant of the country address_format.
This is done to ease the use of these view for our users by displaying
a format they are already used to.

Task id #3138441

X-original-commit: c646f7bb80cb7f9af689082752608b554f1a648b
Part-of: odoo/odoo#111324
2023-01-30 22:27:15 +01:00
Nicolas (vin) 1688b1be4c [FIX] account: accounting date in list view
The accounting date was only visible in list view for misc entries.
For fiduciaries, we would like to have it also visible in these views.

As there is no simple way to only have the column visible when quick
edit mode is enabled, we compromise by having it always available, but
with optional=hide

Task id #3138441

X-original-commit: c208a91e926ec2a98bfbaee068284222fbc0ff05
Part-of: odoo/odoo#111324
2023-01-30 22:27:15 +01:00
Nicolas (vin) ba8cb088e3 [FIX] account_edi_ubl_cii: tax import supports rounding
A common use case for fiduciary is to use the available tax edition tool
on the tax total of an invoice to round the total of an invoice.
This is not supported by ubl, which will re-compute the taxes upon import
and thus lose that manual rounding.

This change aims to correct that, by post-processing the invoice after
creation in order to correct the tax amount to the one in the XML if the
different isn't superior to 0.05.

Task id #3138441

X-original-commit: 5bc87804bf5bba49ffd939c844439b87e08b499e
Part-of: odoo/odoo#111324
2023-01-30 22:27:14 +01:00
Nicolas (vin) b444e5671a [FIX] account: allow to delete part of a sequence chain
This was until now blocked by the_unlink_forbid_parts_of_chain ondelete.
It was still possible to do it manually by removing the
sequence name before deleting the invoice, and will now
be possible without that extra step.

Task id #3138441

X-original-commit: 6112f4f59aeb5dc5a3b698edd861b19f25da7017
Part-of: odoo/odoo#111324
2023-01-30 22:27:14 +01:00