This commit removes two top level await in test files and reorganises
a bit the tests setup as the module loading sequence has changed.
The commit also converts the modules that contained
these top level await to esm.
The goal of removing async modules is to simplify the
module loader in the future.
task id: 3265979
Part-of: odoo/odoo#121185
Prior to this commit, the patches done by `account_portal.js` and
`sale_portal.js` were done without any import.
This means that the widget it modifies (PortalHomeCounters) might not
already be loaded in the registry. This could lead to some issue later.
This commit uses an "import" statement on the module that defines
PortalHomeCounters to ensure that it is present in the registry.
task-3249625
closesodoo/odoo#127371
X-original-commit: 7937dbec9699e7d0f68450c469c9b742446303eb
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Due to default JS limitations, when trying to save payment method on
subscription it was automatically taking first form that it could
find which was payment form and causing an error since payment form
was empty.
task-3339230
closesodoo/odoo#127332
X-original-commit: 252320a6154ba06cc4c7f96787a39baf12329804
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Current behavior:
When selling a kit in PoS, the total cost of the kit is not computed
correctly if the product category was using fifo/avco.
Steps to reproduce:
- Create a product category using fifo
- Create a kit product with 2 products in it (Comp A with a cost of 5
and Comp B with a cost of 10). Total cost of product is 15.
- Create a PoS order with the kit product, and validate it
- Check the total cost of the product in the pos sale order, it is 0
but it should be 15.
opw-3189949
closesodoo/odoo#127325
X-original-commit: 6fd2a939651e7afc06fa9eed2eeeebc34752fc25
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
- Billing officers / HR officers have access to all bank accounts
- Internal users only have access to bank accounts that are not linked to an employee
- Portal/Public users have access to nothing.
TaskID: 3101400
Purpose
=======
It is currently impossible to display a json field on a form view without
defining a specific widget.
Allow displaying the json field in its simplest form, aka the stringified
content in readonly mode.
TaskID: 3101400
No need to hide the chatter to recruiters, as the salary configurator
has been improved to avoid posting sensitive data on the application
form itself.
TaskID: 3101400
Use the application form partner as work contact when converting him into
and employee.
Use the employee work contact as user partner on user creation.
The goal is to have only 1 partner over the whole recruitment process
flow, instead of three, thus reducing the confusion for end users who
don't really know who to choose.
TaskID: 3101400
- Improve performances, as the ir.rule restricting private partners
visibility is also applied on res.users by inheritance, on each
prefetch.
- Solve the issue of partners set as followers on records (eg: application
form) and then made private, making them impossible to contact via the
chatter.
- Solve the multiple access issues when trying to access the bank
account, or the private address for non HR people like the accountants
forcing the usage of sudo in the business code.
TaskID: 3101400
Improve usability of employee form. It is confusing for end users
to create another record to encode the employee address.
Move all the private information on the hr.employee record itself.
Remove the M2O address_home_id.
TaskID: 3101400
This commit adds an "Odoo" functions category in the top bar menu
"Insert > Function".
It allows to easily discover existing functions.
closesodoo/odoo#127372
Signed-off-by: Alexis Lacroix (laa) <laa@odoo.com>
* = im_livechat, test_discuss_full
According to stats from our production database, this query is 10 times
faster than the one generated by the ORM by using a `left join` rather
than `id in`.
closesodoo/odoo#125961
Related: odoo/enterprise#43635
Signed-off-by: Didier Debondt (did) <did@odoo.com>
Purpose:
This commit adds Emoji_picker functionality to the web_editor,
allowing users to conveniently add emojis to their text and
improving the overall user experience.
Specifications:
Now we can insert emoji in web_editor using `/emoji`.
Task id: 3253958
closesodoo/odoo#125137
Related: odoo/enterprise#42772
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
This commit fixes an issue with dialog buttons where it is possible
to trigger their action multiple times if the network is slow. This
is solved in form dialogs and x2many dialogs by disabling the buttons
when the user clicks on them.
opw-3291929
closesodoo/odoo#120151
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
This commit fixes several issues with the channel member
service patch:
- patch should be applied to prototype
- super should be provided the params given to the patch
closesodoo/odoo#127349
Signed-off-by: Didier Debondt (did) <did@odoo.com>
The timeout mechanism of the tours works as follow: When a step is
executed, the step will clear the timeout set by the previous step and
set a new timeout for itself. If the next step does not clear that
timeout in time, the callback function of the timeout will be executed
and will print an error message in the console indicating that the step
fails.
Currently, the last step we add to clear the tour state and call the
`onTourEnd` callback does not clear the latest timeout set. As a result,
the last step will eventually timeout and the system will log an error
message in the console indicating that the last step fails even if the
tour has previously been reported as successful.
To fix the issue, the last step we add to clear the tour state and
call the `onTourEnd` will now also clear the last timeout. The system
will now no longer print an error message in the console.
Steps to reproduce the error:
Go on the runbot:
1. Enable the developer mode with test assets
2. Click on the bug icon of the odoo navbar to run a test tour
3. Open the console (F12)
4. Run a test tour like `knowledge_index_command_tour` (with automatic steps).
5. Wait for the tour to finish (the test should be successful)
6. Wait 10 seconds after the end of the tour
=> An error message is shown in the console.
TOBE: If the test is reported as successful, there shouldn't be any timeout.
task-3373853
closesodoo/odoo#127317
X-original-commit: cb46032f8d74505b792b06c90565e7a4741d921c
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Steps to reproduce the bug:
- Enable the "by-product" option in the mrp settings.
- Create a product A with the following Bill of Materials:
- Component: 1 unit of Product B.
- By-product: 2 units of Product C.
- Create a Manufacturing Order to produce one unit of Product A.
- Confirm the MO.
- Set the quantity of Product A to 1.
- Set the quantity of the by-product "C" to 1 instead of 2.
- Attempt to validate the MO.
Problem:
When validating the MO, we check if the sum of the cost share in the
“move_byproduct” does not exceed 100. However, we do not exclude the
cancelled move, leading to incorrect calculations.
opw-3375388
closesodoo/odoo#127178
X-original-commit: 7fb1c9ff07f5ec05fc313283a497137327d9ce3a
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
Introduces a new group called "Dashboards / Admin within the
spreadsheet_dashboard module, replacing the existing
"Administration / Settings" group for Improved Dashboard Management
taskID = 3373509
closesodoo/odoo#125708
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
Steps to reproduce
==================
- Go into sign-in > Don't have an account
- Enter a password starting with a special character (ie: $)
Uncaught Javascript Error > Failed to set the 'value' property on 'HTMLMeterElement': The provided double value is non-finite.
Cause of the issue
==================
`(password.split(/[^\W_]+/).length - 1)` -> 0
`0 / 0` -> NaN
`Math.min(NaN, 1.0)` -> NaN
opw-3397932
closesodoo/odoo#127337
X-original-commit: e377aae101477b414d5391036477280a0c18445c
Signed-off-by: Vranckx Florian (flvr) <flvr@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Since https://github.com/odoo/odoo/pull/126713, deleting a message
would crash as the `mail/message/update_content` route is called without
passing the `partner_ids` parameter.
This commit fixes the issue by making the parameter optional.
closesodoo/odoo#127284
X-original-commit: 34abd3dc1d159962a376b248134d0cd4977f3dcb
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Before this commit, horizontal spacing in message between avatar
author and bubble was too big. This makes reading messages slightly
hard, because this small gap gives the impression that the message
and avatar are 2 distinct part of UI.
This commit fixes the issue by reducing the size of message sidebar,
so that avatar and bubble are much closer together.
Also the message avatar was too close to the border of chat windows.
This commit fixes the issue by slightly increasing the horizontal
padding of messages in chat window (`px-1` => `px-2`).
closesodoo/odoo#127341
X-original-commit: 226c6588a89bf21e8c0a47010bffb8c59cbb4e37
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit, when making an activity set at a specific date,
and then changing its deadline, the activity in chatter still displays
the old date instead of new date.
Steps to reproduce:
- schedule an activity in chatter for today
- edit activity and change deadline for tomorrow
=> Activity in chatter shows "Today" instead of "Tomorrow"
This happens because the compute of date delay in activity component
is made locally and relies on a field in activity model, which itself
is a reactive (because the activities are stored in discuss store,
which itself is reactive). This compute is made at setup and on change
of props. However, when the `deadline_date` in activity model changes
then the model is still the same, therefore it doesn't trigger the
`onWillUpdateProps`.
This would work if this part of template was fully relying on
`deadline_date`. It was the case for the icon, so the icon is working
well. But the label was computed locally, so OWL could not detect that
`state.delay` needs to be recomputed.
This commit fixes the issue by replacing `state.delay` to a getter
that reads on `activity.deadline_date`, so that this is reactive
to changes on `deadline_date`.
Also fixing a memory leak of a `setTimeout` that was not cleared on
unmounting `Activity` component.
closesodoo/odoo#127319
X-original-commit: d7e314dde8d7bb20ed83ba821cdad1009c87e4c8
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit, when opening the related thread of a
message from inbox with "Open Link in New Tab", it was not
redirecting to the thread.
This happens because the url was wrongly using message id rather
than thread id. As a result, it redirects to either bad model or
a non-existing model.
This commit fixes the issue by correctly using `resId` instead of
`id`, which is the thread id of message. Also renaming `url` field
of message to `resUrl`, to clarify this is the link of thread and
not a specific link to message.
closesodoo/odoo#127342
X-original-commit: 8270138aba7e31f5db7853fbf00be6922347a8c0
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit, message action list in chatter were always
at the very right of chatter. On small messages, the gap can
be quite big, so it's not easy to tell which message is
related to the action clicked.
This commit fixes the issue by putting message action list
in chatter close to message content, similarly to how this is done
in Discuss app.
closesodoo/odoo#127334
X-original-commit: 06aa1a89ac23fb5705e6c588ff2c91193922d4ec
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
=== ISSUE ===
If you navigate to Inventory > Manufacturing > Kanban view, there is a
color contrast issue with some badges. The text inside is black
by default but sometimes the color is dark enough to not
meet WCAG contrasts.
=== AFTER ===
We use the `.text-bg-x` class instead, which handle both `color` and
`background-color` at the same time.
task-3397937
part of task-3326263
closesodoo/odoo#127333
X-original-commit: 75c58ef8265013b39a7a9ddd55e764b2b6ff138a
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Before this commit, a tracking value message was displayed on a
single line instead of several lines. The parts of the content
of message with tracking values changes were wrapping on multiple
line.
This happens because the content of message had `d-flex`, which
affects notably tracking values that have this DOM shape:
```xml
<div class="o-mail-Message-content d-flex">
<p>Stage changed</p>
<ul>
<li><span/><i/><span/></li>
</ul>
</div>
```
Because of `d-flex`, `p` and `ul` were next to each other
horizontally, and the `span` in `li` were wrapping to take
responsive layout of `d-flex` into account.
This commit fixes the issue by removing the `d-flex`. This is
undesirable, as the content is HTMl and it should follow the
intended design of the content. `p` and `ul` next to each other,
without specifying custom `display`, should default to 2 `d-block`
next to each other, so they must be on top of each other.
closesodoo/odoo#127320
X-original-commit: c7df8a5fe0c3f785066800e77eef5a46246308dc
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Before this commit, dropdowns in chat window (chat window more menu,
message actions more menu) had no keyboard navigation support.
This happens because dropdown item navigation makes use of hotkey
service, and hotkey service intercepts keyboard in bubble phase on
window object. `ChatWindow` component had a `t-on-keydown.stop` on its
root node, which prevented the hotkey service to receive keyboard
navigation for the good working of dropdown keyboard navigation.
This commit removes the `.stop` modifier on this `t-on-keydown` root
node of `ChatWindow` template. `onKeydown` in dropdown inside chat
window have precedence over `onKeydown` on chat window: For example,
when dropdown is open, hotkey "Escape" closes the dropdown menu but
does not close the chat window.
closesodoo/odoo#127318
X-original-commit: 4b36b28bd9e426b115ffefbbc174fe2efa3dfbf3
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit, avatars in activity menu and in message reaction
menu were rounded circle, instead of rounded square.
All avatars were rounded-circle before MILK redesign in 16.3.
Since MILK in 16.3, almost all of avatars should be shown in a rounded
square. These 2 occurrences were using the old design of avatars.
closesodoo/odoo#127285
X-original-commit: ea83eb15b354470cbc104b4e0325280d5e349657
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit, when navigable list is loading data of
suggestions, the showing of "loading..." had label and icon
next to each other without any gap.
This commit adds a small gap between icon and label, so it looks
nicer.
closesodoo/odoo#127304
X-original-commit: 0aaab95cd39c50d9320dbec0417773497ebc0fcc
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit, when a user tried to print a receipt, sometimes
an additional blank page was being printed. This was due to the
printed content slightly exceeding the printable area of the page,
leading to an unintended second page.
To solve this issue, I set the height of all elements to 0 during
printing, and explicitly set the height of the receipt container
to auto.
opw-3376131
closesodoo/odoo#127278
X-original-commit: 81feb39aa937a13b69eeb401215f84a77b57ad08
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
This PR fixes the display of the rating message for the livechat
sessions. Before, break lines were incorrectly inserted before and
after the reason.
closesodoo/odoo#127267
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This commit remove the forgotten '#TODO: remove in master' that
were forgotten during the FW-port
closesodoo/odoo#125887
Signed-off-by: John Laterre (jol) <jol@odoo.com>
If a project had a single rating associated to its tasks, opening the
customer rating view would create a traceback. This happened because
both the mail.thread model and the rating.parent.mixin model have a
rating_ids field, and project inherits from both of them (mail.thread
on its own doesn't have it, but the rating mixin adds it).
In the action_view_all_rating method, we try to access the first element of the
rating_ids recordset, if the rating_count field is equal to 1. But since
the rating_ids field belonged to the mail.thread mixin, and not to
the rating.parent.mixin, there could be occurences where rating_count was equal
to 1 while the recordset was actually empty ; accessing the first element of the
recordset would then create a traceback.
To fix this, the rating.parent.mixin model was put before the
mail.thread model in the _inherit list, this way the rating_ids field
from rating.parent.mixin has the priority. A test was also added to check
if the rating_ids is working correctly.
task-3360029
closesodoo/odoo#127243
X-original-commit: 1039c80a8ff5e219e9c2679505015288c8d8dd35
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
This fix is a continuation of an old fix https://github.com/odoo/odoo/pull/121689
After fixing the display of numbers to be always on the right , The symbol also should be display the same as in english from ltr.
Also the headers and the footers are not placed well, they should be aligned with the numbers.
Steps to reproduce the issue :
1-install arabic language
2-go to accounting / customer invoices and you can see the placement of the symbol is reversed
opw-3295573
closesodoo/odoo#127231
X-original-commit: 8fcdc24abf4734d020cb41392a2e449a73433d3b
Signed-off-by: Bastien Fafchamps (bafa) <bafa@odoo.com>
Signed-off-by: Mahdi Cheikh Rouhou (macr) <macr@odoo.com>
* Remove close button from the edit banner when
testing a survey so that users can't hide it anymore.
* Reduce height of the banner to align with the
website Home/Go-to-backend button.
* Open Test survey in a new tab
Task-3374928
closesodoo/odoo#127219
X-original-commit: e312a956af52fcd0627c8d169fc86bee035e2dea
Related: odoo/enterprise#43590
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Amélie Dieudonné (amdi) <amdi@odoo.com>
Steps to reproduce (Manufacturing app):
- Configuration -> Settings -> Activate `Work Orders` and `By-products`.
- Products -> Bill of Materials
- Create 2 BoM for a single product (e.g. Product A), both with
operations and a byproduct each (e.g. BP A & BP B).
- Operations -> Manufacturing Orders.
- Create a MO for Product A and save it.
- Mo was created using the first BoM and has its operations & byproducts
set in their respective tabs.
- Update the MO from first to second BoM.
Adding another byproduct, deleting it or updating it before saving
won't persist after save (it will revert to what's defined in the BoM)
This is due to `move_finished_ids` holding the values defined in the
BoM in the call to `write()` while `move_byproduct_ids` holds the
correct (current) values. But since `move_byproduct_ids` is only a
subset of `move_finished_ids`, it's not used in the write operation.
Task-3277166
closesodoo/odoo#127143
X-original-commit: 0fb2cd02622c1670ee91df48ff22a320da1b02a0
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Quentin Wolfs (quwo) <quwo@odoo.com>
Steps to reproduce (Manufacturing app):
- Configuration -> Settings -> Activate `Work Orders`.
- Products -> Bill of Materials
- Create 2 BoM for a single product (e.g. Product A), both with
operations.
- Operations -> Manufacturing Orders.
- Create a MO for Product A and save it.
- MO was created using the first BoM and has its operations set in Work
Orders.
- Update the MO from first to second BoM.
- Components are switched but the new operations are added to the old
ones in Work Orders.
The only way for a workorder to be deleted automatically when updating a
manufacturing order is to change its product. There was no check whether
an operation was related to another bom or not.
As different BoM can have different operations (as well as components),
it makes sense to remove operations related to another BoM when
switching them.
Task-3277166
X-original-commit: 30044e5dc698e3b8822fa7094b34c28c83861d1d
Part-of: odoo/odoo#127143
When user uninstalls the module from one system but in another system same
database was active then error occurs.
Error: A traceback appears: "UndefinedColumn column res_partner.debit_limit does
not exist"
sentry-4057868584
closesodoo/odoo#127230
X-original-commit: ce7c7df7633155bf15d588fadc34901d96f250d5
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
When the `s_nb_column_fixed` class is present on the row, it should not
be possible to change the number of columns in the "Columns" option (the
option is supposed to be hidden).
However, since commit [1], this behavior is broken. It happened because
the "Columns" option needs to always be displayed in order to display
correctly the "Grid" option and this class was therefore ignored.
This commit restores this class behavior by hiding only the widget
changing the number of columns and not the complete "Columns" option, in
order to still be able to toggle between the grid and the normal modes.
[1]: https://github.com/odoo/odoo/commit/84d684d8bdf43d3db11defd8174dee44775085c2
task-3369847
closesodoo/odoo#127144
X-original-commit: 8148521f052268877f36947e0533843a25d17b83
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit removes the E-waybill tab in account.move for non-Indian
running companies. The E-waybill field is specific to Indian regulatory
requirements and is not applicable for companies operating outside of
India. By removing this tab, we provide a cleaner and more focused user
interface for our non-Indian users, enhancing their overall experience
closesodoo/odoo#127138
Task-id: 3208950
X-original-commit: 1a0b304a9ad006b54bec438fdc36319da21e08ec
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: Mohamed Erradi (moer) <moer@odoo.com>
When a URL is entered to add an attachment through the media dialog
a URL attachment is created. If the source material is removed the
attachment will not be reachable anymore.
This commit fetches the data and adds it as an uploaded file when
adding a URL image in website.
If the image binary cannot be fetched by the client (e.g. CORS), the
old approach is used instead.
This commit also adapts test tours which relied on the image's `src` to
verify if the entered URL had been taken into account by making them
rely on the image's `data-original-src` instead.
task-3129360
closesodoo/odoo#118877
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
layer.account_move_id may not be defined on 'manual' valuation.
Use layer.create_date instead which is equal to layer.account_move_id.date.
# HOW TO REPRODUCE:
- Create a product P, storable in AVCO !! MANUAL !!
- Set 'Control Policy' under Purchase to 'Ordered Quantity'
- Create a PO for 10 units of P with for $1 each.
- Create Vendor Bill -> Confirm
- Receive 5 unit of P: Create backorder
- Validate backorder
==>> Traceback
OPW-3383833
closesodoo/odoo#127218
X-original-commit: b1351ee348207283dcdf7118440b31c03f0d0b4b
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: David Fesquet (dafr) <dafr@odoo.com>
This commit adapts several spacing issues related to the formView and
alerts.
task-3355091
Part of task-332626
closesodoo/odoo#127201
X-original-commit: a137b33dbbf0d18ac6909f958d126c7922d12a61
Related: odoo/enterprise#43579
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
`_get_unusual_days()` does a search for the employee's own contract,
which was not allowed for "simple" employees, thus they got a traceback
when accessing their Time Off Dashboard.
closesodoo/odoo#126946
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
In the pos french module, it's not allowed to delete orders.
closesodoo/odoo#126537
X-original-commit: 971460830ac317a6b40f552556c5ed6cc23feb3a
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>