The email_to field of the contactus form have to be dynamic except if
the user manually set it via the form options. Unfortunately, the
website signature task broke this feature. This commit fixes it and adds
a test to prevent this regression in the future.
Steps to reproduce the bug:
- Go to the contactus page
- Edit the page
- Add a field on the form
- Save the page
- Change the company email address via the settings
=> The contactus form still send the email to the old email address.
Related to task-3382195
X-original-commit: 10b4db60fbd077936b5c9586485fa40c3c890d3f
Part-of: odoo/odoo#147933
In #126914 a limit on the request size has been enforced, that limit is
by default 128MiB and can be configured via an ir.config_parameter. When
restoring a backup larger than 128MiB via the database manager, the
default limit was used and the request was cancelled with a Request
Entity Too Large (code 413) HTTP error.
It is now possible to define a default max content length per route,
that per-route limit takes over the `web.max_file_upload_size` ICP.
Moved the code from `get_http_params` to `pre_dispatch` to better align
with the httpocalypse new http stack.
Fixes: #144144
opw-3643475
closesodoo/odoo#147506
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Issue:
- In mobile when we have multiple tickets, the quantity of
selected tickets is not visible
Steps to reproduce the issue:
- Go to events
- Select any event with multiple tickets
- Go to website
- Click on register now
- Notice in mobile the quantity of selected tickets is not visible
Solution:
- Add style to the quantity of selected tickets
this it was introduced by: 469d94a
opw-3602057
closesodoo/odoo#146904
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Problem
---------
Before, the default tax for sale and purchase was: GST 5%. Commit
084408a9bb, modfied by accident the
default tax to IGST 18%.
Objective
---------
Revert the deault taxes back to GST 5%.
Solution
---------
Update the default taxes in the l10n_in template file.
task-3634577
closesodoo/odoo#146809
Signed-off-by: Josse Colpaert <jco@odoo.com>
How to reproduce:
- Create an SMS and send it
- go to the sent option and select a contact
- Click on add to list
- Select a mailing list
- then click on add and sent mailing (you will be redirected to email marketing)
- Select a template and send it
- The recipient will not be able to see the template (The email is blank)
Issue:
Template value is not stored in the body_html field
Technical reason:
When the record is saved the changes in `body_html` are discarded from _getchanges() https://github.com/odoo/odoo/blob/c2b160fe50c24e9f01d0d5b350f2422cfdbc72d4/addons/web/static/src/model/relational_model/record.js#L574-L581
because, field is set to readonly = 'true' after this commit https://github.com/odoo/odoo/pull/132247
After this commit:
The recipient will be able to see the template
Task-3556020
closesodoo/odoo#143293
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Before this commit, _get_calendar_attendances was calling
the calendar method get_work_duration_data without specifying
the company in the domain, ending up in wrong data if global
leaves that don't concern the employee are concerning the calendar.
This commit adds a domain for that method call so that only
relevent global leaves are taken into account.
closesodoo/odoo#148043
Minor fix: the background grid is not observed in the first place,
setting a z-index on it should not be observed either.
Noticed when fixing `automaticStep(Un)active()` at [1].
[1]: https://github.com/odoo/odoo/commit/c2d952689c97add74a372c90aa18787094d5d93a
Related to task-3576046
closesodoo/odoo#147970
X-original-commit: 901ed6d8c6c6bdb8aff8e9366d63bba59051019a
Signed-off-by: Guillaume Dieleman (gdi) <gdi@odoo.com>
Steps:
- Open Field Service
- Create a new task
- At first, the product stat button shows the price as 0.00
- Add task name and customer
- Save the task.
- Check product stat button
Issue:
- Now, after saving the task, the product stat button will not have the price
shown as it was displayed before.
Cause:
- The class o_field_empty is applied which has the property of display: none
and hence the price field is not displayed.
Fix:
- The o_field_empty class is applied at the wrong place, we need to apply the
o_field_empty only when o_stat_text is applied.
closesodoo/odoo#147926
Task: 3394985
X-original-commit: 9ea49b1e0be064ef4dd7dafe05aff4bd742ac135
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Steps:
- Open Field Service
- Switch to the calendar view
- Click on any task
- Notice the space in the row of the worksheet template
Issue:
- There is a weird space between the title Worksheet Template and the template
name
Cause:
- Due to the long name of Worksheet Template, it moves to the next line but
occupies a certain amount of space around it
Fix:
- By giving flex-wrap, the content is displayed properly
Task: 3394985
Explanation:
When the label 'Worksheet Template' is long and moves to the next line without
flex-wrap, it may cause unwanted spacing issues. By using `flex-wrap: wrap`,
you essentially enable the content to flow onto a new line if it exceeds the
available width, ensuring a more visually appealing and properly aligned
display without unnecessary space around the label. It allows for a more
flexible layout, accommodating varying content lengths without compromising
the overall presentation.
closesodoo/odoo#147925
X-original-commit: 9be92729eaa4bc3b3cfe9778cb2b1fcc47a8cc59
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Current behaviour:
When changing the text color in the document layout
of the company to one of the first row colors,
the text stays black in the preview of the document.
Steps to reproduce:
1. Go to Settings
2. Click on Configure Document Layout
3. In Company Details, highlight the text
4. Change the font color to any of the first row
5. (By example the color #35979c)
6. The text color in the preview is still black
7. (Same when exporting to PDF)
Cause of the issue:
The css code for colors in top row (o-color-1 to 6)
is generated in web_editor (.text-o-color-1 to 6)
and was not in the report_assets_common bundle
See https://github.com/odoo/odoo/blob/01b42c7d76c814e13325f8880dc9de765b0f43c8/addons/web_editor/static/src/scss/web_editor.common.scss#L662
opw-3360456
closesodoo/odoo#147645
X-original-commit: 0b914f3d0dc209ca87837feb15e6ec3f063be534
Signed-off-by: Antoine Demany (ande) <ande@odoo.com>
Issue:
- For GCC localization, the receipt lacked VAT details per line and
had mixed-up numbers at the bottom, and contained wrong translations.
Steps to reproduce:
- Activate the Saudi localization (l10n_sa_pos).
- Open the Point of Sale app.
- Create a new order and print the receipt.
- Notice the missing VAT per line, the mixed numbers for large amounts
at the bottom and the wrong translation.
Solution:
- patched the Orderline.prototype to display precise tax amounts with
two decimal places.
- updated the view to show tax details per line for gcc localization.
- added correct Arabic translations, and removed incorrect ones.
- See attachment for more details.
OPW-3652633
closesodoo/odoo#147859
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
To reproduce:
1. Sync the IoT with a 17 database
2. Once it is set up, force shut down the server by Ctrl+C 2 times
3. Wait a few seconds:
=> crash of `WebsocketClient` thread with the following traceback:
```
Traceback (most recent call last):
File "/usr/lib/python3.11/threading.py", line 1038, in _bootstrap_i>
self.run()
File "/home/pi/odoo/addons/hw_drivers/websocket_client.py", line 83>
self.ws.run_forever()
File "/usr/local/lib/python3.11/dist-packages/websocket/_app.py", l>
raise WebSocketException("socket is already opened")
websocket._exceptions
WebSocketException
socket is already opened
```
The IoT synchronised servers can stop in 2 ways that we need to handle:
A. Gracefully (Ctrl+C):
In this case a disconnection signal is sent to the IoT-box
The websocket is properly closed, but it needs to be established a new connection when
the server will be back.
Solution: `while True` loop as `run_forever` will return on close.
`time.sleep` for the reconnection delay
B. Forced/killed (Ctrl+C 2 times):
In this case there is no disconnection signal received
Solution: use `reconnect` that will automatically take care re-attempting a connection
This will also happen with the graceful quit as `reconnect` will trigger if the server
is offline while attempting the new connection
In both case, we perform a reconnection attempt with a delay of 10 seconds to avoid
spamming the database
After this commit:
The websocket will reconnect itself automatically after 10 seconds
if the connection is disrupted
opw-3612528
closesodoo/odoo#147858
Signed-off-by: Yaroslav Soroko (yaso) <yaso@odoo.com>
Steps to reproduce
==================
Go to Maintenance > Studio > Website > New Form
Click on the website editor
Click on the name field
UncaughtPromiseError > KeyNotFoundError
Cause of the issue
==================
Starting from 17, the FormEditorRegistry is not the legacy one.
If the key is not present in the registry, it will fail, unless we pass
a default value.
In this case, the key `website_form_key` is false.
Solution
========
Pass null as the default value.
opw-3652423
closesodoo/odoo#147840
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Following quantitypocalypse (odoo/odoo#137864), a couple of
`reserved_uom_qty` and `reserved_qty` references were left over. This
was partially due to no tests for these tricky parts of the code,
therefore we both fix these references to use the newer
`quantity`/`quantity_product_uom` fields and add/update tests to ensure
we avoid breaking these 2 use cases again.
Also discovered during this fix, the remaining assigned qtys when
unassigning done incoming moves from already reserved outgoing moves
(i.e. the "1. batch reserved + individual picking unreserved" use case
in the code comments) was NOT being calculated correctly. This also
fixes that + adds a test for it.
closesodoo/odoo#147815
Related: odoo/enterprise#53536
Signed-off-by: Steve Van Essche <svs@odoo.com>
Since odoo/odoo#140898 the pickings detailed operation view has been
moved to a smart button instead of showing in a picking tab. This
included the removal of the `force_detailed_view` context since there
was no longer a detailed view to force show. This commit removes some
leftover references to this context within tests.
Part-of: odoo/odoo#147815
Internal code doesn't need to use reactive when reading store or Model,
especially not in `insert` that is not meant to access anything observed
except when actually writing records (in which case `_proxy` is used).
The `get` part of `preinsert` (and its full chain) must be kept with the
full proxy however, to ensure proper trigger of reactive callback when
returned record changes.
Part-of: odoo/odoo#147814
There is no need to go through the proxy to assign localId as nothing
should observe it at this step, and it shouldn't change anyway.
Part-of: odoo/odoo#147814
This mechanism is only used for lazy fields to determine when they stop
being observed, there's no need to constantly observe eager fields like
that.
Part-of: odoo/odoo#147814
Access `proxy[key]` only once to avoid triggering reactive `get()` many
times, as this will be triggered in cascade to all elements in the chain
in internal code, saving possibly dozens of uncessary calls per
callback.
Part-of: odoo/odoo#147814
The internal reactive is only necessary to trigger outer reactives when
writing on it. As it has no callback, reading through it has no effect,
except slowing down performance and complexifying the stack.
This change removes reactive from the stack as soon as possible.
Part-of: odoo/odoo#147814
Mismatch of str and Markup led to escaping everything. Now properly
Markup code and escape the rest.
closesodoo/odoo#146399
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Spanish translation has been modified by commit
bf81596aa7
This behavior makes spanish variant (maxico, uruguay, columbia, etc.)
use the es_419.po instead of es.po.
This commit renames the po files for the LATAM localizations so that
translations work as expected.
Initiated by customer issue:
opw-3627465
closesodoo/odoo#146125
Related: odoo/enterprise#52694
Signed-off-by: Josse Colpaert <jco@odoo.com>
This issue occurs when a customer creates multiple companies. Then, after
installing the attendance module, after selecting the kiosk mode, an error
is generated. This is because, before installing the attendance module,
if the customer created a company, a single kiosk key is generated. This
key is different for each company, but it is the same.
step to reproduce-
- First created two company.
- Install the `Attendances` & Open it.
- Click on the Kiosk Mode from Menu.
- Error will be generated.
Error-ValueError
Expected singleton: res.company(2, 1, 4, 3)
after this commit,Each attendance kiosk key generated during the company's
creation is unique.
sentry-4617967282
closesodoo/odoo#145382
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
Steps:
- Install `website_hr_recruitment`
- Try to add a file in `Resume`
- Click on Apply
A traceback is raised because we use `.val()` instead of `files.length`
to check if the user has uploaded
closesodoo/odoo#145008
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
These test rely on default generated name of account invoice
that contains the year, e.g. `INV2023`. These tests were passing
in 2023 but no longer on January 1 2024.
closesodoo/odoo#147873
X-original-commit: 94f093c9ae532eb12ef17dc0f37dc5da64a6d7ed
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit presents UI improvements:
Renamed the back button to "Change Table."
Increased idle table closure time from 1 minute to 3 minutes.
Implemented a restriction preventing users from transferring orders to table already in use.
Displayed the attributes of an order line in the order widget.
closesodoo/odoo#147677
Signed-off-by: Adrien Guilliams (adgu) <adgu@odoo.com>
Enable TOTP on your account and create yourself an API key. Connect in
xmlrpc using that API key. Traceback `request` is not bound.
Fixes: odoo/documentation#6919
See also: #147475closesodoo/odoo#146270
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
Steps
=====
- Install module project
- Open the form view of a project
- Set a planned date
- Click anywhere on the page to remove the focus from the date picker
Issue
=====
The chosen date disappeared without any explanation to the user
Cause
=====
odoo#123268 introduced some changes related
to the planned dates of projects.
1. the write method is modified to avoid the write of only a start/end
date (both date should be set or none of them)
2. a required is added on the start date field in the form view of
project
3. an onchange is added to avoid to have one of both field set and not
the other
This last change is problematic as it overrides the required behavior of
the date fields.
On top of that, https://github.com/odoo/odoo/pull/143509 changed the
behavior of the datepicker widget that only display the full range by
default if both fields are required (which is not the case here if they
are empty).
The combination of those changes have the consequence that the planned
date field is unusable in the form view of projects.
Fix
===
The onchange being only useful in form view, it is deprecated as the
required attribute is sufficient for this usecase and provide the user
warnings if he forget a field. On top of that a required attribute is
also set on the end date field.
task-3628069
closesodoo/odoo#145167
Related: odoo/enterprise#52280
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
always_range option on the daterange widget allows to always display this
widget as a range (two inputs separated by an arrow) even if both
start/end date are empty and not required.
task-3628069
Part-of: odoo/odoo#145167
This commit adds the possibility for the `.o_horizontal` class to wrap,
which is especially interesting in mobile.
When using a `radio` widget, you can choose to use two options :
- `horizontal` which will add a `.o_horizontal` class to the radios
and allow them to display with a `flex-row`
- `vertical` which will add a `.o_vertical` class to the radios
and allow them to display with a `flex-column`
Prior to this commit, the `.o_horizontal` class was not allowing elements
to wrap, which would cause overflow issues on small devices.
To fix this issue, we add a `flex-wrap` property to the class, to ensure
that if the buttons are larger than the breakpoint, they will wrap
and stay inside the container.
task-3580082
closesodoo/odoo#140651
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
The Settings page lacks a default search context key, because it lacks
the `<search>` arch.
We add a context key to make actions target some settings.
closesodoo/odoo#147149
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
242: These future expenses must be deferred on the company’s balance
sheet until the moment in time they can be recognized, at once or over a
defined period, on the Profit and Loss statement.
6274, 6414, 6424: Fixed asset depreciation not expense
closesodoo/odoo#146802
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
- Replaces a randomly failing test by a simpler test.
As reported by XDO (https://github.com/odoo/odoo/pull/123237#discussion_r1410620206), executing web requests asynchronously during the execution of a tour which does an RPC is randomly failing.
The fix consists in not testing the full online payment flow with the cashier frontend interface, but instead simulate an order saved on the server and simulate real customer web requests for paying online for that order.
- Simplifies the way payment portal URLs are build.
closesodoo/odoo#145595closesodoo/odoo#146029
Task-id: 3632217
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Théo Vincent (thvi) <thvi@odoo.com>
There are various cases where we observe crons which systematically
face a CPU / memory limit. In a setup where a single worker cron is
launched, a failing cron will prevent subsequent crons to run.
This happens because the limits are evaluated at the worker level: the
worker is killed, then starts over with the same job list order.
If the vacuum cron cannot be run anymore, it leads to tables not
garbage collected anymore (e.g. `bus_bus`), causing performance issues.
To avoid this, we give a higher priority to the vacuum cron.
closesodoo/odoo#144210
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Before this commit, since we are no longer in 2023, the test failed
because there is no longer 2021 in the filters dynamically added in the
dropdown of the date filter. The reason is now we have the current year,
the previous one, and the one before, that is, 2024, 2023, 2022.
This commit adds a patchDate to be sure we will start the test in 2023,
to get the expected filters displayed (2023, 2022, 2021).
closesodoo/odoo#147809
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
This is breaking since 2024-01-01, disabling the test waiting for a
proper fix.
closesodoo/odoo#147846
X-original-commit: 56cdb8a4ad4a4650df2399305ed6210833b325b5
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
When we have more than one draft move for the same journal,
it shows the gap sequence warning on the dashboard. Even if there
is no gap sequence.
It is caused by the fact that we used the sequence_prefix field
on account move to check if a sequence exists.
The aim of this commit is fixing the part of the sql
query modified in 61c9bd69bb0342d845608ad0671e36c70f64fbd3 by
verifying that the name != '/' like we did for the sql query
that computes the made_sequence_hole field.
task-3648745
closesodoo/odoo#147792
X-original-commit: 90ec2ed2043d90e5632d02416b9806c2c87e69c7
Signed-off-by: William André (wan) <wan@odoo.com>
For countries where the financial year is not from January to December
so the sequence may contain two years like 2022-2023 where 2022 is the financial year start and 2023 is the financial year end and this sequence is reset when the financial year ends.
so in this commit, we add support for this type of sequence
* INV/2022-2023/00001
* INV/22-23/00001
* INV/2022-23/00001
closesodoo/odoo#147785
X-original-commit: 072085b32c435fa88d6765469cb0908b9b5c3074
Signed-off-by: William André (wan) <wan@odoo.com>
The kanban view used to display message history of livechats sessions is
replaced by Discuss for a smooth and consistent user experience.
Minimum viable version for Task-3497801
closesodoo/odoo#146800
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Since commit [1], we've applied a style to the badges (Bootstrap badge)
which display extra prices next to a product's variants.
However, this style unintentionally affected certain badges that should
not have been affected since this other commit [2].
Steps to reproduce the bug:
- Open the Website app.
- Go to "Configuration" in the main navbar.
- Select "Payment Providers" in the dropdown.
- Pick the "Demo" payment provider.
- Change the state to "Test Mode."
- Set "Bank" as the "Payment Journal".
- Go to the "/shop" page.
- Click on a product.
- Click on "Add to Cart" on the product page.
- Go to the cart and click on "Process Checkout".
- Bug: On the "/shop/payment" page, notice a slight text misalignment in
the badges next to the Payment Providers selector.
In this commit, we've adjusted the CSS rule to ensure that only product
configurator "extra price" badges receive this styling.
[1]: https://github.com/odoo/odoo/commit/3e03bd9a399d607d0f36c7e7652ee743a7cfe61a
[2]: https://github.com/odoo/odoo/commit/611e2f20f975c590eb75d64379be84dd4cc472ef
task-3626728
closesodoo/odoo#147755
X-original-commit: d30a081016d8547dd9bc7bff1d47d78ef2ceb2cb
Signed-off-by: Guillaume Dieleman (gdi) <gdi@odoo.com>
This reverts the following commits : https://github.com/odoo/odoo/commit/fe508c6b2cb1b92d7b063cc194a3dad37f4eb255
The behavior for tracked products is different; the quantity is modified
in a wizard by adding other `stock.move.line`, which does not trigger
the change of the 'picked' field to true and makes the behavior
different from non-tracked products.
We prefer to remove this fix and keep the same behavior for all types
of products. The user can manually select the checkbox for the 'picked'
field.
Update the optional show for the field “picked” in the MO form
closesodoo/odoo#147695
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
An ormcache has been added to a method that takes lists as parameters but
lists are not hashable.
steps to reproduce:
- go to apps and click on on 'Industries'
before this commit:
- a warning is raised in the logs:
WARNING industry odoo.tools.cache: cache lookup error on ('ir.module.module', <function IrModule._get_modules_from_apps at 0x7f99e842fc70>, ['icon', 'icon_flag', 'to_buy', 'name', 'state', 'summary', 'website', 'application', 'module_type', 'shortdesc'], 'industries', False, ['&', '!', ['name', '=like', 'theme_%'], '&', ['application', '=', True], ['module_type', '=', 'industries']], 80, 0)
Traceback (most recent call last):
File "/home/nda/dev/odoo/17.0/odoo/odoo/tools/cache.py", line 99, in lookup
r = d[key]
File "<decorator-gen-5>", line 2, in __getitem__
File "/home/nda/dev/odoo/17.0/odoo/odoo/tools/func.py", line 87, in locked
return func(inst, *args, **kwargs)
File "/home/nda/dev/odoo/17.0/odoo/odoo/tools/lru.py", line 34, in __getitem__
a = self.d[obj]
TypeError: unhashable type: 'list'
after this commit:
- ormcache is properly used
opw-3660052
closesodoo/odoo#147730
Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
step to reproduce:
- go to recruitment
- create a job with a title with a abnormally long title
-> the title is not limited & overflows
Bug explaination:
The parent has no defined width, so the title cannot be limited by
the original css rule.
Expected behavior:
The title size should be limited or be able to wrapped.
Bug resolution:
Remove the o_text_overflow class and thus permit the title to be
wrapped.
behavior after this commit:
The title is able to be wrapped.
task-3598895
closesodoo/odoo#142480
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
Threads are automatically marked as pinned when they are opened but this
behavior is not always desirable. They are now implicitly pinned when it
makes sense to do so.
closesodoo/odoo#146841
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>