When Odoo is installed with the latest version of the PostgreSQL client (postgres-client or postgres-client-16) and running in Docker (possibly other environments as well but not reproduced so far), executing `pg_dump` via `exec_pg_command` fails with
Database backup error: Postgres subprocess ('/usr/bin/pg_dump', '--no-owner', '--file=/tmp/tmpmnqiktog/dump.sql', '15TEST') error 1
This seems to be because `os.devnull` is being opened in *read* mode which is incorrect (as it's written to). It's not entirely clear if older `pg_dump` simply ignored the non-writable stdout or if docker adds some restrictions which cause the failure.
Either way this can be solved by either opening `os.devnull` in write mode or switching to the `DEVNULL` constant. While the function is deprecated in 16.0 (7f14631fe8) and removed in master (ae3056f3f4fca82c6aee69bf201532e14829c45e) the latter is not a huge change and it a touch cleaner.
fixes#139687closesodoo/odoo#143198
Forward-port-of: odoo/odoo#142987
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
When removing an item in x2many fields from the res.config.settings form, the
client interprets it as a set of link commands for the remaining items, as a
result, the items that should have been removed are not removed.
This generalizes the fix made for the splash screen images in pos_self_order by
which this issue was first observed.
The test is also moved to the point_of_sale module as it is not specific to
pos_self_order. Also note that the test is manually doing what is observed from
the client.
closesodoo/odoo#143165
Signed-off-by: Adrien Guilliams (adgu) <adgu@odoo.com>
In commit b47be9f254b2f7327ea3e0e92c6b1b97bff016d0 we changed the
background of the popover selector making the title unreadable in
white mode.
This commit applies the text-dark color to make sure the title is
readable. It also removes the primary background on hover behind the
btns to use a color change instead. We will later on improve this
component with the btn-link + contextual class to manage the hover
effect in another task.
When a field is selected the active class is added on the parent <li>
rather than the <button>. This commit applies it on the button to
display an active state on the selected element.
task-3577065
closesodoo/odoo#143164
X-original-commit: 3d664d6e7daedecc5e995636bfe055c9ba800bb2
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
After this fix, UBL now uses the same helper as Factur-X for the import
of the product. Also clean some dead code in UBL.
task-3559040
closesodoo/odoo#143160
X-original-commit: 59f2736023d6065522c4e89deebfa580fda0afd8
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Signed-off-by: Julien Van Roy (juvr) <juvr@odoo.com>
Description of the bug:
task field is displayed in leave type form when company field is False
Steps to reproduce:
- install time off app
- open a leave type form
Source:
When installling time off app,
_compute_{timesheet_project_id, timesheet_task_id, timesheet_generate}
work perfectly, when company = False => project/task = False
and timesheet_generate = True
Then, the post_init is executed. it will set the project and task
according to env.company when company is False. so now project and
task can have values even that the leave company is False.
Then in the xml, we hide project if company is null and task if project is null,
that's why project is not displayed but not task
Solution:
- In post_init method, we only get leaves types with a company set
and stop using env.company to be coherent with the compute methods.
closesodoo/odoo#143016
X-original-commit: e647374
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Step to reproduce the bug:
-Go to the employee app
-Go to an employee form view
-Click on the archive button
-Put a description
-Click on the archive button
-> Odoo error
Bug explaination:
The tracking is not implemented for the html field, so when we archive
an employee the tracking cannot work.
Expected behavior:
The employee is archived and the tracking is done without errors.
Bug resolution:
The tracking has been removed from the html field.
The tracking is now replaced by a message in the chatter
in the write method.
Behavior after this commit:
The employee is archived and the tracking is done without errors
with a mesage in the chatter if a value is entered for the
departure_description field has a value.
task-3576659
closesodoo/odoo#140527
Signed-off-by: Bertrand Dossogne (bedo) <bedo@odoo.com>
Add a condition that check if the DB is connected to the iot box before
the start of the websocket client, before, if no DB was connected the
Thread was lauched for nothing
closesodoo/odoo#143132
Signed-off-by: Yaroslav Soroko (yaso) <yaso@odoo.com>
* Create a tax of type `group` and with a `tax_scope` set
* Add a child tax without `tax_scope` set
This will raise an error because the `tax_scope` is not exactly the same
since it doesn't have a value.
We should be able to share sub taxes without a scope, exactly like for
`type_tax_use`. This is also what the message suggests.
closesodoo/odoo#143089
X-original-commit: 6101b2bbeaf996d4c3472ad36d740243bb0a5aa8
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: William André (wan) <wan@odoo.com>
Previously, 'amount_currency' was calculated using data from the purchase line. However, numerous variables could interfere with the accurate computation of 'purchase_price_unit' (e.g., taxes, taxes without account, standard costing method, kit product, and potentially more).
This commit revises the approach by utilizing the pre-calculated value and converting it to the desired currency. This maintains coherence between the balance and 'amount_currency' without necessitating the recreation of a function like '_get_price_unit()' in 'purchase_stock.'
## Reproduce Errors ##
### Tax Included in price without Account:
- Create a currency, CTest, with a conversion factor of 10 (10 CTest = 1 USD).
- Define a new tax:
° No accounts in repartition lines
° Rate: 15%
° Included in the price
- Create a Purchase Order:
° 1 unit | 100 CTest | Tax applied
- Receive the product.
-> SVL value is 10 USD, because tax without account increments the stock value. Refer to 'test_valuation_multicurrency_with_tax'.
-> Check SVL journal entry: credit / debit is 10, but amount currency is 86.96 CTest instead of 100 CTest.
### Reproduce With Kit:
- Create a currency, CTest, with a conversion factor of 10 (10 CTest = 1 USD).
- Create a Kit (storable, fifo), with 5 unit of CPM (storable fifo) in it's BoM
- Create a Purchase Order:
° Kit: 1 unit | 100 CTest
- Receive product
-> Check SVL journal entry: credit / debit is 10, but amount currency is 500 CTest instead of 100 CTest.
OPW-3453703
closesodoo/odoo#143033
X-original-commit: 5ea188fb65507d4bd06ab3361241d121ac2a468b
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: David Fesquet (dafr) <dafr@odoo.com>
- add populate for mail.notification
- add batch processing and logging for a more pleasant waiting
- adapt existing numbers to find a better balance between usefulness of
data and waiting time
closesodoo/odoo#142734
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This makes the "medium" populate of `res.users` take few seconds rather
than 2min30 on my machine.
The issue was that `write` (not in batch) is calling
`_subscribe_users_automatically` not in batch, which is particularly
slow.
`discuss_channel_nosubscribe` is removed because it was uneffective. The
condition was only on create, but the group change in
`_inverse_notification_type` was systematically triggering the
auto-subscribe outside of create anyway, which is what we want.
Part-of: odoo/odoo#142734
This reverts commit 430f4904ed.
This should not be done in stable, for 3 reasons:
1: There is no migration scripts, so every people that will migrate from previous version will have a second product discount created in their DB
2: Existing DB that will activate discount will have 2 products discounts
3: It breaks an industry module that depends of this data
For those reasons, I'll revert this commit before it is deployed next week.
To correctly do your changes, you just need to do it in master and create a migration script that will rename the xml_id.
closesodoo/odoo#143104
Signed-off-by: Pierre Masereel (pim) <pim@odoo.com>
Before this commit:
Format and style are lost when copying content that has some style or format
applied on it.
After this commit:
Now, able to copy content with its format and style.
Task-3263360
closesodoo/odoo#142984
X-original-commit: 8083b990845eeb5b1fa6aaaa21617f16d4d5a780
Signed-off-by: Geelen Sébastien (sge) <sge@odoo.com>
Without it, like in no-demo testing conditions, tests with rights
depending on Karma fail.
Task-3575692
closesodoo/odoo#142785
X-original-commit: c1ca12f4bf090761fc8c63eafc70ac47ae6851fe
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
To reproduce
============
on POS (without having a connected print), make an order and print the
receipt, the preview will show the receipt not well rendered
Problem
=======
we add the element that contains the receipt to the page, so we have
two copies of the receipt (the page using CSS `@media print` and the added
element)
Solution
========
hide the original element on the page while printing, and bring it back
after
opw-3596341
closesodoo/odoo#142699
Signed-off-by: Vlad Stroia (vlst) <vlst@odoo.com>
If you have a survey of several pages, but don't valid all, you don't
have any survey_input_line for some question, so the [0] will crash.
Since the method wait only one input_line maximum, instead to force to
take the first one withtout take care if no reply, we just use the
browser record that will work in both case. If it is empty it will enter
in the 4th case, 'skipped' what is expected and was dead code before.
closesodoo/odoo#142500
X-original-commit: 02f49b726a40dc97f065ca40225411a208d65302
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
withholdings is a legal requirement for many companies in AR that are withholding agents,
where the company is meant to compute, create and share the Vendor WTHs (in this case the WTH
is not electronic, but a PDF report with the details of the WTHs created need to be
shared with the Vendor)
Task :
latam 690
adhoc 27675
closesodoo/odoo#140607
Signed-off-by: Josse Colpaert <jco@odoo.com>
Before the commit, there was a small issue where a foldable badge would be
slightly smaller in height than A4 paper.
This commit fixes this by giving foldable badges more height.
Task-3389338
closesodoo/odoo#143079
X-original-commit: 0bca59b43bb195f8fc5feef315c7694eba6df326
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Suppose a user who imports a new picking thanks to this:
```csv
location_id,location_dest_id,picking_type_id
WH/Stock,Partners/Customers,YourCompany: Delivery Orders
```
Then, on the inferface, for one of the fields, he sets the value as
"Database ID" (for instance "Destination Location/Database ID").
When trying to import the file, an error is raised, which could make
sense since the provided value is not a DB identifier, but the error
is actually incorrect:
> Odoo Server Error. Current transaction is aborted, commands ignored
> until end of transaction block
When looking for the destination location in the database, it will
raise a legit error since the domain does not make sense:
`[('id', '=', tentative_id)]`
Hence this:
> ERROR: invalid input syntax for type integer: "Partners/Customers"
The good point is that everything in the code already handles this:
we catch the error and add some detailed explanations in the import
error report, but... The SQL transaction is now broken. So, as soon
as another SQL request is executed, it will trigger an
`InFailedSqlTransaction` error, we will not catch it and this error
will be returned to the frontend (we lose the import report).
sentry-3969379125
closesodoo/odoo#143010
X-original-commit: b0e86e5c6d4b54134b91dbde3a145b551158b76d
Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
Before this commit, when changing the event organizer to a new one, if the new organizer was not synced with Odoo a ValidationError was being thrown requesting that the new organizer must be added as attendee when it shouldn't (since the new organizer is not synced with Outlook). Additionaly, there was an extra call being made to the method `_is_microsoft_calendar_valid()` in the user synchronization checking which should be removed.
After this commit, this restriction is removed: the new organizer won't need to be added as attendee during this change of event organizers and the extra call to `_is_microsoft_calendar_valid()` is removed.
Issue from: 3450045
closesodoo/odoo#142989
X-original-commit: 79ec916580452a49147600441eb8d09a98322665
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
Before this commit, when Odoo faced an internal error and lost the current synchronization token with Microsoft, after fetching events from Graph API an `410 Gone` was being thrown carrying the `SyncStateNotFound` code.
Since we didn't handle this error code, we were experiencing a traceback after the request:
```
2023-11-15 09:16:15,046 4 ERROR report-one-16-0-staging-1-10315840 odoo.addons.microsoft_account.models.microsoft_service: Bad microsoft request : b'{"error":{"code":"SyncStateNotFound","message":"The sync state generation is not found; generation=25;[highest=28][28][26][27]."}}' !
Traceback (most recent call last):
File "/home/odoo/src/odoo/addons/microsoft_account/models/microsoft_service.py", line 154, in _do_request
res.raise_for_status()
File "/usr/lib/python3/dist-packages/requests/models.py", line 943, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 410 Client Error: Gone for url: https://graph.microsoft.com/v1.0/me/calendarView/delta?%24deltatoken=MOCK_TOKEN_HERE
2023-11-15 09:16:15,051 4 ERROR report-one-16-0-staging-1-10315840 odoo.http: Exception during request handling.
Traceback (most recent call last):
File "/home/odoo/src/odoo/odoo/http.py", line 2003, in __call__
response = request._serve_db()
File "/home/odoo/src/odoo/odoo/http.py", line 1589, in _serve_db
return service_model.retrying(self._serve_ir_http, self.env)
File "/home/odoo/src/odoo/odoo/service/model.py", line 133, in retrying
result = func()
File "/home/odoo/src/odoo/odoo/http.py", line 1616, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "/home/odoo/src/odoo/odoo/http.py", line 1820, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "/home/odoo/src/odoo/addons/website/models/ir_http.py", line 237, in _dispatch
response = super()._dispatch(endpoint)
File "/home/odoo/src/odoo/odoo/addons/base/models/ir_http.py", line 154, in _dispatch
result = endpoint(**request.params)
File "/home/odoo/src/odoo/odoo/http.py", line 697, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "/home/odoo/src/odoo/addons/microsoft_calendar/controllers/main.py", line 55, in sync_data
need_refresh = request.env.user.sudo().with_context(sync_context)._sync_microsoft_calendar()
File "/home/odoo/src/odoo/addons/microsoft_calendar/models/res_users.py", line 99, in _sync_microsoft_calendar
events, next_sync_token = calendar_service.get_events(self.microsoft_calendar_sync_token, token=token)
File "/home/odoo/src/odoo/addons/microsoft_calendar/utils/microsoft_calendar.py", line 20, in wrapped
return func(self, *args, **kwargs)
File "/home/odoo/src/odoo/addons/microsoft_calendar/utils/microsoft_calendar.py", line 152, in get_events
events, next_sync_token = self._get_events_delta(sync_token=sync_token, token=token, timeout=timeout)
File "/home/odoo/src/odoo/addons/microsoft_calendar/utils/microsoft_calendar.py", line 20, in wrapped
return func(self, *args, **kwargs)
File "/home/odoo/src/odoo/addons/microsoft_calendar/utils/microsoft_calendar.py", line 111, in _get_events_delta
raise e
File "/home/odoo/src/odoo/addons/microsoft_calendar/utils/microsoft_calendar.py", line 105, in _get_events_delta
events, next_sync_token = self._get_events_from_paginated_url(
File "/home/odoo/src/odoo/addons/microsoft_calendar/utils/microsoft_calendar.py", line 20, in wrapped
return func(self, *args, **kwargs)
File "/home/odoo/src/odoo/addons/microsoft_calendar/utils/microsoft_calendar.py", line 76, in _get_events_from_paginated_url
_, data, _ = self.microsoft_service._do_request(
File "/home/odoo/src/odoo/addons/microsoft_account/models/microsoft_service.py", line 173, in _do_request
raise error
File "/home/odoo/src/odoo/addons/microsoft_account/models/microsoft_service.py", line 154, in _do_request
res.raise_for_status()
File "/usr/lib/python3/dist-packages/requests/models.py", line 943, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 410 Client Error: Gone for url: https://graph.microsoft.com/v1.0/me/calendarView/delta?%24deltatoken=MOCK_TOKEN_HERE
```
After this commit, everytime we receive the `SyncStateNotFound` code from Microsoft, we will trigger the full synchronization with Graph API. This way, the outdated token will be replaced with a brand new token. A function which checks if the full sync is required was added in order to be mocked by the new unit test, since it is necessary mocking its return value for testing if a given `HTTPError` with the 'SyncStateNotFound' error code will call the all events fetching.
closesodoo/odoo#142982
Task-id: 3597211
X-original-commit: 54ae2f2b469e3bd5294386b882e57d7519dc044a
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
- Have a delivery order sent to a shipper and done
- Return this delivery order completely (without a shipper, might not be important)
- Return of the return to resend to the customer (with a shipper and therefore a tracking number)
This will lead to a endless loop as the move_origin_ids say so (might be a bug or not)
Anyway, we make sure that the logic makes sure that we do not process twice the same stock move.
closesodoo/odoo#143076
X-original-commit: 73b41f5fa403f2737302441ce0039ee138a408c0
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Wolfgang Taferner <w.taferner@wtioit.at>
Steps to reproduce:
- Install modules: 'account_accountant', 'l10n_eg', 'l10n_eg_edi_eta'.
- Switch company to "EG Company".
- Configure "Large Cabinet Accounting" with ETA item code "10001138" and set Customer Taxes to "VAT 14%".
- In "Journal Customer Invoices", disable "Factur-X (FR)" under Advanced Settings -> Electronic invoicing. Also, set Branch to "Deco Addict", ETA Activity Code to "Accounting, auditing, bookkeeping and tax advice activities", and ETA Branch ID to 0.
- Update "Deco Addict" with Tax ID "204899053" and set building number to 2.
- Update "Azure Interior" with Tax ID "204899052" and set building number to 2.
- In Accounting -> Configuration -> Thumb Drive, create a new record using "EG Company" with 123 as both the ETA USB Pin and Access Token.
- Manually set the certificate in the Thumb Drive record.
- Create a new Customer Invoice with Customer set to "Azure Interior", Invoice Date as today, add a line item "Large Cabinet", set the Price to 0, remove "0% taxes" and add "VAT 14%", and set Journal to "Customer invoices in EUR".
- Confirm the invoice and attempt to "Sign Invoice".
Issue:
A traceback occurs with a divide by zero error in the invoice calculation when different currencies are involved.
Solution:
Refined _l10n_eg_edi_exchange_currency_rate function to calculate the currency exchange rate. Now, it ensures the division by amount_currency only occurs when it's not zero, preventing divide by zero errors during currency conversion in invoices.
opw-3580529
closesodoo/odoo#143064
X-original-commit: 14af8243188b86a0d654298feca6dc0980cbebeb
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
Before this commit, when creating a move with a product having no label. The
label will be automatically fill with "Bacon Burger" in the report.
By adding a condition on the span, the span will be empty if the label is empty
and can still be modified in studio if needed.
closesodoo/odoo#143050
Task: 3604617
X-original-commit: c0ddba176e9837ed1808b772237dff51c99a430d
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Maximilien La Barre (malb) <malb@odoo.com>
Before this commit, the modified test sometimes failed on runbot
because it couldn't click on "Create and edit..." in the many2one
dropdown. Here's what happened:
1) call editInput to write something in the many2one input
2) call selectDropdownItem to select "Create and edit..."
This was done without mocking setTimeout.
The problem is that editInput triggers the opening of the dropdown,
but as setTimeout wasn't mocked, that opening was delayed. Then,
selectDropdownItem first clicked on the input to open the dropdown,
and then clicked on the requested item. It might happen that the
click on the input actually closed the dropdown instead of opening
it, if it had been already opened via editInput. In that case, the
test failed because it couldn't click later on on "Create and edit".
This commit also improves the test utils to better log what really
happens: in this case, the dropdown isn't open at all, so we
detect that specific issue and log it with a proper message (which
is different than "the dropdown is open, but I can find the item
you're looking found).
Runbot issue 28207
closesodoo/odoo#143044
X-original-commit: 220d4325866330235ceccd61b8d1d00d8c919ba8
Signed-off-by: Francois Georis (fge) <fge@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Issue:
======
When using l10n_ar company , the public user (without sign in) will have
an access error on the address page when clicking on process checkout
from the website.
Steps to reproduce the issue:
=============================
- Install ecommerce + l10n_ar
- Go to website without signing in and add any product to cart and
process checkout
Origin of the issue:
====================
Public user doesn't have the right to read
`l10n_ar.afip.responsibility.type` and `l10n_latam.identification.type`
opw-3591440
closesodoo/odoo#142997
X-original-commit: ed020ce2942c8fb2ef43ea44bd3768fcc14cb45f
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Mahdi Cheikh Rouhou (macr) <macr@odoo.com>
Issue:
======
When we have 1 delivery method enabled that have pickup locations, it
will be selected by default and the pickup locations will never be
displayed.
Steps to reproduce the issue:
=============================
- Set up pickup locations carried for sendcloud (like mondial relay)
- Go through the website with just that shipping method available and
add a product to cart valid with the configuration of sendcloud.
- Go to checkoutout you will get the shipping method selected but no
pick up options
Origin of the issue:
====================
If the delivery method is already selected it will skip showing pickup
locations.
Solutions:
==========
Now there is another check to make sure that it will be skipped only
when the pick up locations are displayed.
opw-3569497
closesodoo/odoo#142958
X-original-commit: 7beb8767cd82f2938ffbb53ec496e1f817af8730
Signed-off-by: Steve Van Essche <svs@odoo.com>
Signed-off-by: Mahdi Cheikh Rouhou (macr) <macr@odoo.com>
Steps to reproduce:
-------------------
- add an alternative product B for a product A;
- go to product A page on ecommerce;
Issue:
------
The alternative product B is not displayed below
the product A.
Solution:
---------
Use the `o_dynamic_empty` instead of `d-none` to manage
display of the snippet.
opw-3568699
closesodoo/odoo#143032
X-original-commit: a90cf72bed889424eceef4643c53434d1ab3bf51
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Thomas Lefebvre (thle) <thle@odoo.com>
Update the japanese tax group template names to
better fit the needs.
Task id #3315696closesodoo/odoo#143091
X-original-commit: 580495a53cf61bd57c609856b48772c6b5c9fe25
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
Steps to reproduce:
- New DB
- Switch to russian
- Install stock app
Bug:
throw back is raised when setting up the data caused by a duplicate
operation type (Sequence Packing/Picking)
Fix:
apply the correct translation
note:
manual PR created since there's no russian translation on transifex
after 16.0
opw-3589539
closesodoo/odoo#143007
X-original-commit: 1486a08fd18fceba8c632141511354e9610f6dcc
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
Steps to reproduce:
1. Create a new product with a cost of 10 (std, manual)
2. Create an inventory adjustment to set the quantity to -3
3. Change the product's category to real-time
Now the valuation for this product is -30€ but the accounting part
has 30€, creating a difference of 60€.
Before this commit:
Changing the valuation to real-time while having a negative
quantity/value gives a positive value in accounting.
After this commit:
Changing the valuation to real-time while having a negative
quantity/value gives a negative value in accounting.
opw-3390692
closesodoo/odoo#143000
X-original-commit: 9a0e620d2fa1d5e55d73bc4920f26ef2ba82ce9d
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Walravens Mathieu (wama) <wama@odoo.com>
Test for 0c19497a482efe39a2c7778df4735ba548a847b4
Use case already covered since 16.0 but test was missing
opw-3600605
closesodoo/odoo#142986
X-original-commit: d9505dacffc045a24d77da75e8d3956703e0fbf3
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Guillaume Vanleynseele (guva) <guva@odoo.com>
The editor has specific behaviors when it comes to icons. For instance,
marking them as `contenteditable="false"` so no text can end up into
their container element. Those behaviors were only enabled for fa icons,
this commit enables them for the new Odoo icons introduced at [1].
[1]: https://github.com/odoo/odoo/commit/546477dafab327d9990a5176bed4a9c2565eef74closesodoo/odoo#142985
X-original-commit: 4e33b5e4956da53558b0a36ae2e6da13220290ab
Signed-off-by: Geelen Sébastien (sge) <sge@odoo.com>
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
To Reproduce
============
- enable a currency and make it for example = 0.01$
- create pricelist for that currency
- make sale order with that pricelist (let's say 1000 = 10$)
- on dashboards the Revenue will be 1 000$
Problem
========
on spreadsheet we use the field `amount_untaxed` from `sale.order`, which
contains the amount in the currency of the sale order and not the company.
Solution
========
as `sale.oder` module doesn't have any field containing the converted amount,
we will use the field `price_subtotal` from `sale.report`
opw-3527802
closesodoo/odoo#142930
X-original-commit: 99a6389905785ab7cb3a1b2b0d546170caaa28c9
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
Signed-off-by: Abdelouahab Laaroussi (abla) <abla@odoo.com>
Issue:
The hr_referral application can not be installed with demo data.
Analyze:
The db is being auto locked. And transaction is not rollback due to the
xml failure.
Fix:
Add corresponding line into hr_demo.xml instead of hr_referral_demo.xml
Note:
It does not fix the root cause, but until the root cause is well defined
and fix, it is the best workaround.
Related ticket:
opw-3547638
Affected version:
16.0 and above
closesodoo/odoo#142928
X-original-commit: 436772ff0af5ae21043e4c0d60761c4f4149f7e7
Related: odoo/enterprise#51163
Signed-off-by: Benjamin Hanquin (beha) <beha@odoo.com>
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
Steps to reproduce:
1. Create a database in demo mode with only Invoicing installed
2. Create a new company
3. Set any accounting localization package in Settings
4. Traceback because User doesn't have access rights on account.bank.statement
closesodoo/odoo#142915
Task-id: 3584244
X-original-commit: 7dd7fc9012a0738089c89a507dcd893e0ffdc09a
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Claire Bretton (clbr) <clbr@odoo.com>
Description:
Since 54857ec409 , the results of the
expensive recursive CTE on `res.partner` were never used. So the query
doesn't do anything at all, besides slowing down the whole process
for minutes on databases with a large volume of `res.partner` entries.
Fix:
Removing the dead code
Reference:
task-3601394
closesodoo/odoo#142914
X-original-commit: 29223533f625d579e424bdc133d0cfc472946b6b
Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
Signed-off-by: Piryns Victor (pivi) <pivi@odoo.com>
Since the refactoring to owl, the stats in the left zone were not shown
anymore and the hover was missing.
This was because the method that fixes the xpath to match line by line
the qweb, was done on a getter and not on the data itself.
Now we replace in the prop value, from this way, in every place we use
the getter, we have fixed the data with the xpath.
/t/div -> /t[1]/div[1]
closesodoo/odoo#142912
X-original-commit: 2124057052255d86591b9f3345bf7e62fcd8d3b3
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Francois Georis (fge) <fge@odoo.com>
Before this commit, some tests of the SwitchCompanyMenu sometimes
failed:
- "companies can be logged in even if some toggled within delay"
- "can toggle multiple companies at once"
They failed because the debounce delay between the first click to
toggle a company and the moment the company service is notified to
actually select the companies was sometimes too short for the 2 or
3 clicks on the menu to toggle companies to occur, as those clicks
are separated by nextTick(), i.e. a mix of calls to setTimeout and
requestAnimationFrame.
In tests, we patch the debounce delay to 0 by default, and before
this commit we set a delay of 50 in the two faulty tests. This
commit fixes the issue by keeping the real delay in those tests (1s),
as they aim at testing the fact that the user has the time to do
multiple clicks before committing the company changes and reloading.
Fixes runbot error 29962
closesodoo/odoo#142904
X-original-commit: 2ec65691ac11cb4216d873dcab77a84e2c35ba17
Signed-off-by: Francois Georis (fge) <fge@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
po_uom_id and uom_id should be from similar uom_group. It
was not the case by default using `'default_detailed_type': 'service'`.
This fix the issue
closesodoo/odoo#142887
X-original-commit: b557cc0831e2c6d0967c3d4420c1b89a0f5ce191
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
The test 'buttons with attr "special" in dialog close the dialog'
sometimes fail on runbot because it can't click on 'Create and edit...'
inside the many2one dropdown. Before this commit, the test edited
the many2one as follows:
1) edit input to write a new value (with editInput)
2) click on the input to open the dropdown
3) click on 'Create and edit...' in the input
But calling editInput opens the dropdown (even though the opening
is a bit debounced, which is why it only failed sometimes). So it
might happens, in rare cases, that the dropdown is already opened
when we click in the input (step 2), which closes it and makes
step 3 fail.
This commit changes the test to do something similar as what we do
in many2one_tests.js: we patch setTimeout to execute the callback
directly, and thus remove the opening delay. We call editInput
which triggers the opening of the dropdown, and we click inside
the dropdown.
Runbot issue 24739
closesodoo/odoo#142863
X-original-commit: 4a011149cba968585d5e74ee4f4fff7212c729e3
Signed-off-by: Francois Georis (fge) <fge@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
When we save a many2one in a dialog opened by the external button, we
trigger a "read" of the "display_name" to update it if the changes made
in the dialog have had an impact on it.
Before this commit, the context used for this "read" was completely wrong,
it was an unevaluated string. This commit will therefore allow you to use
the evaluated context.
closesodoo/odoo#142862
X-original-commit: 7e9c8d41f5d035a00117198539ddebdbd8b4aa7c
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Francois Georis (fge) <fge@odoo.com>
Since commit 3d218e1, clicking outside
a popover closes the popover and performs a preventDefault on the event.
As a consequence, changes made in the property definition popover are no
longer applied when the popover is closed by clicking outside.
Problem:
The preventDefault has the consequence of cancelling the input change
event allowing the change to be applied to the property definition when
the popover is closed.
Solution:
Remove the preventDefault by default and only use it in the case of the
calendar view, which is the only use case that wants to prevent the click
event so as not to open a record creation dialog (see commit 3d218e1).
How to reproduce the PropertyField bug:
- Go to a form view with a properties field
- Click on the edit property button
- A popover opens so that you can edit the field definition
- Type a few characters in the label input
- Click outside the popover
Before this commit:
The value inserted in the popover is ignored
After this commit:
The value inserted in the popover is applied to the property.
It is not possible to write a test reproducing this native browser behaviour.
closesodoo/odoo#142842
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
Prior to this commit, the discount product was created at
the installation of the point_of_sale module which does not make sense
as this product is only used in the pos_discount module. We change this
in this commit to also prevent the discount product to be shown in the
frontend of the PoS when the user does not have the pos_discount module
installed and abling him to download demo data on the flight if he does
not have other products available.
closesodoo/odoo#142831
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
To reproduce:
1. on your windows computer, add a system environment variable with:
- Key: ODOO_RC
- Value: (path to any file except the `$INSTDIR\server\odoo.log`)
2. Install Odoo Windows version
Notice that the log are stored into the `$INSTDIR\server\odoo.log` file
3. Restart Odoo's service
=> Odoo's log file does not log anything anymore
Cause:
As odoo will use in priority the environment variable as the config file path.
This will save the config change into that file instead of the intended one at
`$INSTDIR\server\odoo.conf`.
Due to this, the config file remain the default one created by the previous commands
but the log_file information get save to the wrong config file.
On restart of the service, as the parameter is not present,
it does not log in the intended way
After this commit:
Logs are logged into the log file as intended
Was discovered accidentally while reviewing an IoT PR:
https://github.com/odoo/odoo/pull/137547closesodoo/odoo#142796
X-original-commit: bbd06814a7e42c22206087c0df1e06d14dbba74e
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
Signed-off-by: Loan Sens (lse) <lse@odoo.com>