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.
closesodoo/odoo#111415
X-original-commit: 10a5e494aa5f9328e97052289ac829aad5f80c86
Signed-off-by: Fabien Pinckaers <fp@odoo.com>
Signed-off-by: William André (wan) <wan@odoo.com>
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.
closesodoo/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>
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
closesodoo/odoo#111413
X-original-commit: e6b0315dc4886c40014a9d46128e841ea171b20c
Signed-off-by: John Laterre (jol) <jol@odoo.com>
Signed-off-by: Wala Gauthier (gawa) <gawa@odoo.com>
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.
closesodoo/odoo#111412
X-original-commit: 69eb431cea959270d3fb2f12ec9dbb451750ce06
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
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
closesodoo/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>
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
closesodoo/odoo#111286
X-original-commit: e7edd71a3a4d8d7297c07f44b6b701052f2c5b7d
Related: odoo/enterprise#36477
Signed-off-by: Josse Colpaert <jco@odoo.com>
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.
closesodoo/odoo#111175
Related: odoo/enterprise#36382
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
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.
closesodoo/odoo#110986
Task-id: 3149392
Related: odoo/enterprise#36280
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
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.
closesodoo/odoo#107968
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
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.
closesodoo/odoo#107957
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
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
closesodoo/odoo#111417
X-original-commit: 3e9a1dd76ce5172c4797bc92f0351e107589c3a5
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
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.
closesodoo/odoo#111388
X-original-commit: 4974782c61d7e283875da6ea40149072b1a36cdc
Signed-off-by: Samuel Degueldre <sad@odoo.com>
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
closesodoo/odoo#111393
X-original-commit: 6fdf517ea219a021521e3fbdad540d21b5e3ba76
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
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.
closesodoo/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>
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
closesodoo/odoo#111378
X-original-commit: 52fd577de8e270f84e8ca23c9350f2fb3ab5a7d8
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
The placeholder on the partner name was working for a partner that is
an individual but not company. This will fix that.
Task id #3138441closesodoo/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>
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
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
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
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
To that end, we will now do the VIES and regular VAT
check separately.
The VAT check stays as a constrains, while the VIES
check will now be done in an onchange and simply
display a warning if it fails.
We will also now allow VAT with a single character to
ignore the checks. This will allow users to better
distinguish partners for which they didn't enter VAT
against partners which are not subject to VAT by setting
the later's VAT to '/' or any other characters.
Task id #3138441
X-original-commit: eff3b140cc88dd48b77948a577f195f2e1910fd8
Part-of: odoo/odoo#111324
Since the migration from bootsrap 4 to bootstrap 5 and more precisely
since [this commit], the tooltips on too-long titles are not displayed
anymore in the mail editor.
Steps to reproduce the bug:
- Go to the email marketing application
- Create a new mail (other than plain text)
- Go to the design tab of the editor
- Put your mouse over the title "Secondary Butt..."
=> The tooltip to display the entire title does not appear. This commit
allows to correct this bug and to display the tooltip as it was the case
before the change of version of bootstrap.
[this commit]: https://github.com/odoo/odoo/commit/23facbfb76c6e8b23137cddda5f5113273555498
task-2777738
closesodoo/odoo#111032
X-original-commit: 1e5c945f462e4a9903f64fd59c89319f9f2589c1
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
All the localisation should be written in english and then translated to the native language of the country. In this case, the Guatemala localisation was written is Spanish, this PR translate the module in english and add the corresponding PO file in spanish.
closesodoo/odoo#110661
Task-id: 3145295
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
- Ignore anchors, those are not sent to the server anyway, no way to
compare even if we wanted to
- Ensure query string (qs) are the same to be considered equals
On top of that, it also fixes the case when the user inserted an
absolute URL instead of a relative one, it will now match.
task-3096367
opw-3091427
closesodoo/odoo#107782
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
- `clean_url` method was wrongly flag as `api.model`
- the `unslug_url` was not called for the URL comparison in the dropdown
case, meaning that `/shop/prod-1` would not match `/shop/product-1` as
it should (and as it does for regular non dropdown menu)
- the `active` class was actually never working for the dropdown case,
as the class was added on the wrong element (`li` instead of `a`)
The code was hard to read (mainly because huge python conditions in XML)
and kinda redundant, going through an util method should be clearer and
help reading the template XML.
task-3096367
opw-3091427
Part-of: odoo/odoo#107782
Due to the end part of the regex `(?=$|/)`, it will not find and thus
not unslug string if they end up with a query string or and anchor
except if there is a trailing slash before.
First, it's unlikely that there will be a trailing slash as it's not
common and on top of that, Odoo try to enforce non trailing slash in
URL.
Second, it's not that hard to makes those cases work.
Before this commit, the following string would "match" and be unslug:
- /blog-1
- /blog-1/
- /blog-1/register
- /blog-1/?qs=2
- /blog-1/#anchor
But those would not:
- /blog-1?qs=2
- /blog-1#anchor
Part-of: odoo/odoo#107782
Steps to reproduce the bug:
- Go to the warehouse and enable the “2 steps” in the
“Outgoing Shipments”
- Create a So:
- add a storable product
- 2 pickings are created (pick and a delivery)
- Go to pos and open a session:
- Select the created quotation
- Click on payment
- select “Cash”
- Click on Validate
Problem:
The delivery order linked to the SO is correctly cancelled, but the
pick order remains in the “ready” state
opw-3117002
closesodoo/odoo#111270
X-original-commit: 7f7668db9d015464c629bb4d617199993dbfcdd8
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
When trying to duplicate a service in sale > products with "Subcontract
Service" enabled, a error message will appear. This is due to the fact
that when you are duplicating a product, every vendor in the purchase
tab are not carried over to the copy. To fix this easily, we need to
disable the "Subcontract Service" on duplicates entry during their
creations.
opw-3115827
closesodoo/odoo#111221
X-original-commit: 731e1ec09839129f8d7ab3fa71257974e68263ec
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Before this PR, all this localisation was written in spanish, but all the localisation have to be written in english and then translated back in the native language. This PR correct that.
closesodoo/odoo#110938
Task-id: 3149182&
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
The fiscal device is refered to as the 'fiscal device' in some places,
and 'control unit' in others. This commit changes the references to the
fiscal device to always be 'fiscal device'.
This commit was accidentaly dropped when fixing a forward-port rebase
https://github.com/odoo/odoo/pull/109434, and has thus been reintroduced
in v16 in its own PR.
closesodoo/odoo#110182
X-original-commit: 9049516a0d45ae537f976622f2709e0c098a3003
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Daniel Kosky (dako) <dako@odoo.com>
When unlinking or writing a tax report line, the related tags that are no longer relevant were not archived.
We now archive tags if they are still used in account.move.line and display a banner
in report that let the user know there might be a problem and invite him to correct tax tags.
closesodoo/odoo#111287
Task: 3084028
X-original-commit: 8fb35df6225f8c8f7c3aa7fec56acb3bec23d25f
Related: odoo/enterprise#36432
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Signed-off-by: Claire Bretton <clbr@odoo.com>
In the forward-port to 15.0 of https://github.com/odoo/odoo/commit/b4cd54a3c9227370667913ff2e170e24539c6328 the migration folder was renamed from 5.1 to 15.0.5.1, which causes the forward-port to 16.0 to not take into account this migration.
This change renames the folder back to 5.1, such that the migration will run in 16.0 as well.
Related to task-2993087
closesodoo/odoo#111280
X-original-commit: 86343618a4d6bd7f8e30c30fefdc0f1c2c73f315
Signed-off-by: Christophe Simonis <chs@odoo.com>
Signed-off-by: Dylan Kiss (dyki) <dyki@odoo.com>
Install MX CoA
"Cash" and "Bank Suspense Account" are missing the tag
"Transferencias bancarias moneda extranjera" account is using the wrong
tag
opw-3033611
closesodoo/odoo#111273
X-original-commit: 4860a77a51f72bbb51b435766733b3c0a74c9a32
Related: odoo/enterprise#36422
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
Prior to this commit and on Firefox 109, clicking on a link while in
edit mode on the website app would trigger a traceback.
This is caused by the fact that the LinkPopover widget is contained
inside the iframe while use the ClipboardJS global defined in the top
window.
Indeed, ClipboardJS checks if the target (the button to copy the link)
is an HTMLElement. To do so, it uses the "instanceof" keyword. However,
the __proto__ (what is used for computing instanceof) of the target is
different depending on the browser.
For Chrome, the HTMLElement's __proto__ depends on which "document" it
was created. On Firefox, when attaching an element to a parent, it will
switch __proto__ to the one from the frame from which it is attached.
To fix this, we use the ClipboardJS from the element's instance window.
In any case, using instanceof when working with iframe is a bad idea,
see [1]. In this case, the fix is made because ClipboardJS is an
external library.
Steps to reproduce:
- Download Firefox 109+
- Go on Website and switch to edit mode
- Click on a Link : A traceback appears.
[1]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/instanceof#instanceof_and_multiple_realmsclosesodoo/odoo#111266
X-original-commit: 732848f2b52bea4ebae18cb5adedf581d5112aa6
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Arthur Detroux (ard) <ard@odoo.com>
Checking company_id=False on records having a required company is useless and leads to more complex queries.
closesodoo/odoo#111197
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Update of taxes could create name collision due to uniqueness of
(name, company, scope, type) on taxes.
We add "[old]" before the tax name to avoid this problem.
closes odoo/odoo#111124
Related: #108571
X-original-commit: e50be0ed9d8ae32f85380b9239de7f3c93d71a93
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Signed-off-by: Claire Bretton <clbr@odoo.com>
Before this PR, all this localisation was written in spanish, but all the localisation have to be written in english and then translated back in the native language. This PR correct that.
closesodoo/odoo#109147
Task-id: 3119934
Signed-off-by: Laurent Smet <las@odoo.com>
Before this PR, all this localisation was written in Danish, but all the localisation have to be written in english and then translated back in the native language. This PR correct that.
closesodoo/odoo#111044
Task-id: 3151027
Related: odoo/enterprise#36310
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
when bill to is registered person but ship to is unregistered person then we need to set this
X-original-commit: c53ff49428df2ae02183f7d0eb2c3fbf7f2d108f
Part-of: odoo/odoo#111248
The previous commit solved the issues for the Belgian, ... case, but not
for l10n_latam_invoice_document.
We saw two extra problems we solved:
- As the name is readonly you can not even store the new name easily, so
we needed a force_save on that field.
- As the _compute_name is inherited in this module as well, there is a
logic that recomputes the name when the document type is changed and the
invoice is in draft to recompute that initial value.
However, when you confirm and the date gets set, that logic
is also triggered, while we do not want to recompute but keep
our old document number.
closesodoo/odoo#111294
X-original-commit: 7edee80545daf29b3a46947838a23e1f4458f12d
Related: odoo/enterprise#36434
Signed-off-by: William André (wan) <wan@odoo.com>
Before:
- Create a new sales journal
- Create a new first invoice
- Do not put an invoice date yet
- Change the name from 2023/000001 to e.g. 2023/000010
- Confirm the invoice
- The name will change back to 2023/000001 (which is not the wanted behaviour)
After:
We avoid the change back by adding a condition in the _compute_name, which
is triggered by the invoice_date being set while confirming.
X-original-commit: e31c5767c894a92d22fa8201bc1ccf34b052a336
Part-of: odoo/odoo#111294
This commit adds an attribute in kanban and list archs that
fixes performance issues.
Some tables are very huge and depending of the searched domain,
the search_count made in web_search_read takes much more time
than the search_read. For 10M records, the search_count could take
more than 10x the time of search.
This commit allows to set the count_limit in the arch to override
the hardcoded 10k value.
closesodoo/odoo#111284
X-original-commit: 699215ec9a71b8c9b6a53fe96e924a400d216729
Related: odoo/enterprise#36431
Signed-off-by: Géry Debongnie <ged@odoo.com>
Co-authored-by: Aaron Bohy <aab@odoo.com>
The aim of this commit is to fix an issue where the settings fields for the Indonesian localization were visible in all companies of a database.
Context:
In a multi-company environment, a company may have its fiscal country set to Indonesia and have the Indonesian localization activated, but this should only affect the options shown in the accounting settings for that specific company.
Previous to this commit:
When a user activates the Indonesian localization, the settings fields for the localization would be visible in the accounting settings for all companies of the database.
After this commit:
The settings fields for the Indonesian localization will now only be visible in the accounting settings for the specific companies located in Indonesia.
closesodoo/odoo#111285
Task-id: 2854025
X-original-commit: 045e18a624e9261b8650c71cc9999126320648ff
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
Before this commit, when the user wants to edit the parent task and
clicks on Search more button, the search view has no project by default
however, the default project to display in the search view could be the
one set on the task.
This commit adds a default project in the search view and this project
will be the one set on the task in which the user wants to set a parent
task.
closesodoo/odoo#111125
X-original-commit: 8c3a4e7dff719b8f47ed289aabb4405a401655a4
Related: odoo/enterprise#36348
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Since odoo#106015, the "Project" field is missing from the list view
opened when clicking on "Add a line" in the "Sub-tasks" or "Blocked By"
tabs in the task form view.
This commit readds this field.
X-original-commit: 925a57a41c335f76a0f2c354b3bb2999e0d970bf
Part-of: odoo/odoo#111125