Thursday, December 7, 2023
47 changes · master
Enhancements to existing features
Time off allocations now use a single description field instead of separate public and private descriptions. This reduces confusion and fixes related issues while preserving appropriate access because employees cannot view other people's allocations.
Original PR description
Change affects name field in hr_leave_allocation. So far there were two fields - name and private_name. The idea behind it was to prevent displaying description of allocation to users that are not supposed to see it (potentially private information). It wasn't necessary as users doesn't have access to others' allocations. It was simplified - now there's only one field (name). That also solves problems reported in two tasks. task-3598745 task-3552639 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Warehouse users can now update a package's location directly from its form or by dragging it to another location. Packages are easier to manage because they are grouped and filtered by location, and package moves are recorded in move history for better traceability.
Original PR description
This commit adds the ability to edit the location_id of a package by either changing the field in the form or by dragging the package to another location. The packages are now grouped by location by default and filtered by internal locations or empty locations. When a package is moved, a move is created for each of it quants to reflect in Moves History. Also, a kanban view is added to reflect package contents when on mobile as its better on the smaller screen. TaskId:3479578 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
When users clear an invalid condition in the domain selector, Odoo now restores the configured default condition instead of falling back to a generic ID-based rule. This makes the selector behave more predictably and reduces confusion when correcting filters or rules.
Original PR description
This commit changes the default value returned by the getPathEditorInfo method to match the default condition instead of being hard coded as "id". This makes the behavior of the domain selector more intuitive when one clears the path of a condition due to an invalid one. In this case, the default condition will appear instead of the generic [("id", "=", 1)].
task-3603492Timesheet approval reminder emails are now sent only to relevant approvers when there are timesheets waiting for their validation. Monthly reminders also now cover the correct previous-month period and show the correct date range, reducing unnecessary or misleading emails.
Original PR description
**prevent cron from sending approver reminder if no timesheet assigned to approver Send the reminder email if: - there are timesheets to validate - AND if the user is set as either the manager or timesheet approver of an employee with timesheets left to be validated - OR if the said employee has no manager or timesheet approver set Also fixed the monthly reminder (it was sending the last week unvalidated action) Also fixed the date displayed in the mail to be for months: - from the first of the previous month the the last day of the previous month Task-3624610** Replaced by this PR in stable: https://github.com/odoo/enterprise/pull/52355 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Demo appraisal records now better illustrate common appraisal workflows, including a feedback request, a ready status banner, and a scheduled activity. This helps users evaluating the app understand more of the appraisal process from the sample data, while also correcting the ready-state ribbon display in the kanban view.
Original PR description
Before this commit, the demo data don't set any acitivity or feedback for an appraisal. With this commit, one activity is set for Ronnie Hart appraisal and a feeback request is asked.
Resolved issues and error corrections
The Time Off approvals form now shows the Confirm button only when a request is in the 'To Submit' stage. This prevents users from seeing or using an action that should not be available later in the approval flow.
Original PR description
Current behaviour before PR: In the time off module,go to approvals form view the confirm button is visible for all the stages instead of being visible only for 'To Submit' stage fix: modifying the current condition according to the flow task-3517898
Features or functions removed from Odoo
The accounting app no longer includes the old customer payment follow-up option on sales journals. This removes an unused feature and simplifies the accounting setup without affecting current users.
Original PR description
The aim of this commit is removing all the nearly dead code that handle the Customer Payments follow up feature on sale journal. This has been added when the follow up feature was not mature enough. As no one is using this feature, we decide to remove it. task-id: 3627753 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Code cleanup and technical improvements
Messaging and live chat avatars now use Odoo's standard image delivery path in most cases, reducing duplicate code and making behavior more consistent. This cleanup should make avatar handling easier to maintain while preserving the special live chat embed route needed for browser access rules.
Original PR description
This PR cleanup the extra avatar route by moving the access right check in `_find_record_check_access`, allowing to always use the `web/image` route to get avatars. Custom route for im_livechat embed can't be removed for cors reasons. This PR also uniformise the getter avatarUrl for thread and persona model, allowing to delete the `threadservice.avatarUrl` function and `thread.imgUrl` getter. PR enterprise: https://github.com/odoo/enterprise/pull/52116
Miscellaneous changes
# Issue: A few internal developers (check related task) used file operations on IrAsset instead of IrAttachment. # Analyze: Nothing is done in order to prevent this and it should be clearer for everyone. # Fix: Assert that the instance is an IrAttachment in order to avoid a bad practice. # Related task: task-3594813 Forward-Port-Of: odoo/odoo#145156
Original PR description
# Issue: A few internal developers (check related task) used file operations on IrAsset instead of IrAttachment. # Analyze: Nothing is done in order to prevent this and it should be clearer for everyone. # Fix: Assert that the instance is an IrAttachment in order to avoid a bad practice. # Related task: task-3594813 Forward-Port-Of: odoo/odoo#145156
This fixes mail tests so conversations with more than two members are treated as group chats. The change helps keep automated checks aligned with expected chat behavior, reducing the chance of false test results during future updates.
Original PR description
Multiple test have the wrong channel type has the contains more than 2 channel members.
This update simplifies how Odoo's web framework makes server requests, making the code easier for developers to use and maintain. The change is mostly internal, but it touches many apps and may slightly affect how background requests behave when screens are closed or changed.
Original PR description
This PR aims at simplifying the way developpers can do rpcs with our framework. Before this commit, in components, they had to import the hook `useService`, and in the setup do something like…
This PR aims at simplifying the way developpers can do rpcs
with our framework. Before this commit, in components, they had to
import the hook `useService`, and in the setup do something like
`this.rpc = useService("rpc")`, and then use `this.rpc` where they
wanted. In services, they had to explicitely declare the dependency
to the rpc service. In any other functions (like helper functions),
it was a bit painful: the function had to take an env (or the rpc
function directly) in arguments, which wasn't ideal.
This PR makes doing rpcs easier. The rpc service service has
been removed. The `jsonrpc` function has been renamed into `rpc`
(and the file `rpc_service` into `rpc`). One can now simply do
`import { rpc } from "@web/core/network/rpc"` and use `rpc` where
he wants.
Note that this change has a (maybe) not insignificant side-effect.
We no longer have the "protection" on rpc. Before, when a component
used `useService("rpc")`, the returned function was tied to that
component instance. If the component was destroyed when calling the
function, it crashed (s.t. a destroyed component didn't do rpc). If
the component was destroyed during the rpc, the promise was left
pending forever (s.t. subsequent callbacks weren't executed). This
protection was sometimes annoying, and people started to bypass it
by directly calling `env.services.rpc` (i.e. a version which isn't
tied to the component). We believe this protection is not really
necessary. In the future, we may introduce an `alive` function to
wrap rpc calls, and use it at some places where it is indeed
necessary (i.e. move it user-space instead of enforced by the
framework).
Part of task~3621046This update renames an internal WhatsApp contact image field from imgUrl to avatarUrl to align with related platform changes. It does not introduce new user-facing behavior, but helps keep the codebase consistent and easier to maintain.
Original PR description
See https://github.com/odoo/odoo/pull/142010
This change updates multiple Odoo Enterprise apps to use a newer internal way of communicating with the server. It should not change day-to-day behavior for users, but it helps keep the platform aligned with the latest core architecture and reduces obsolete code.
Steps to reproduce the bug: - Create a storable produce P1 with BoM: - select any component, qty: 1 unit - Create a MO to produce one unit of P1 - Confirm the MO - Update the qty of the component to 2 - Validate the MO Problem: The quantity of the component is overwritten and reset to 1 Because, when the new qty of the component is set, only the “manual_consumption” field is updated to “True” thanks to their compute: https://github.com/odoo/odoo/blob/17.0/addons/mrp/models/stock_mo
Original PR description
Steps to reproduce the bug: - Create a storable produce P1 with BoM: - select any component, qty: 1 unit - Create a MO to produce one unit of P1 - Confirm the MO - Update the qty of the component to 2 - Validate the MO Problem: The quantity of the component is overwritten and reset to 1 Because, when the new qty of the component is set, only the “manual_consumption” field is updated to “True” thanks to their compute: https://github.com/odoo/odoo/blob/17.0/addons/mrp/models/stock_move.py#L138-L145 But the field ‘picked’, is not updated So when we check if we have to set a quantity, the condition is false and the quantity is reset to the original value: https://github.com/odoo/odoo/blob/26193fdb707a631d498cbc37d68c08497e32a31d/addons/mrp/models/mrp_production.py#L1201-L1202 opw-3616628 Forward-Port-Of: odoo/odoo#145157
__Current behavior before commit:__ The logic to regenerate assets bundles is located in the frontend (i.e. the JS is making the calls to retrieve and unlink them) which is not very clean. Furthermore, when doing so, the old assets might still be included on cached views that called them with `t-call-assets`. Therefore, regenerating assets bundles can break the CSS or the JS as long as the view cache is not cleared. __Description of the fix:__ A new backend method is implemented
Original PR description
__Current behavior before commit:__ The logic to regenerate assets bundles is located in the frontend (i.e. the JS is making the calls to retrieve and unlink them) which is not very clean. Furthermore, when doing so, the old assets might still be included on cached views that called them with `t-call-assets`. Therefore, regenerating assets bundles can break the CSS or the JS as long as the view cache is not cleared. __Description of the fix:__ A new backend method is implemented for regenerating asset bundles. This provides a dedicated and maintainable approach. Additionally, the cache is explicitly cleared during the regeneration process. __Example of steps to reproduce the issue on runbot:__ 1. Check `Disable cache` in chrome dev tools. 1. Little bug icon > Regenerate Assets Bundles Forward-Port-Of: odoo/odoo#145000 Forward-Port-Of: odoo/odoo#143124
At Odoo, we want custom models and fields to start with `x_`. However, other developers and companies might want to customize that behavior and be able to change the rule. This revision targets to factorize the rule `startswith('x_')` in a dedicated method on `ir.model` and `ir.model.fields` so they can be overridden to allow the customization of custom model and fields name in custom modules. Forward-Port-Of: odoo/odoo#145154
Original PR description
At Odoo, we want custom models and fields to start with `x_`. However, other developers and companies might want to customize that behavior and be able to change the rule.
This revision targets to factorize the rule `startswith('x_')` in a dedicated method on `ir.model` and `ir.model.fields` so they can be overridden to allow the customization of custom model and fields name in custom modules.
Forward-Port-Of: odoo/odoo#145154**Current behavior before PR:** Tab on link moves link table but the link popover stucks. **Desired behavior after PR is merged:** Tab outsided the link hides the linkpopover. task-3389015 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#140881
Original PR description
**Current behavior before PR:** Tab on link moves link table but the link popover stucks. **Desired behavior after PR is merged:** Tab outsided the link hides the linkpopover. task-3389015 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#140881
Prior to this commit some td in the list renderer were vertically align on the middle while other are aligned on top. This comes from commit: https://github.com/odoo/odoo/commit/53f605399755f9355554c2582ea0f693c8f947b4. This commit removes the vertical-align: middle to rely on the inherited alignment from the `<td>` which is inherited until the `<table>` el which set the alignment on `top`. To visually center the icons previously centered by vertical-align, a new variable: `$o-line-si
Original PR description
Prior to this commit some td in the list renderer were vertically align on the middle while other are aligned on top. This comes from commit:…
Prior to this commit some td in the list renderer were vertically align on the middle while other are aligned on top. This comes from commit: https://github.com/odoo/odoo/commit/53f605399755f9355554c2582ea0f693c8f947b4. This commit removes the vertical-align: middle to rely on the inherited alignment from the `<td>` which is inherited until the `<table>` el which set the alignment on `top`. To visually center the icons previously centered by vertical-align, a new variable: `$o-line-size` is created. This variable accounts for the total size of a line which is the font size multiplied by the line height. In our case this ensure that the icons line height in the list view is the same as the <td> that are containing text. Enterprise PR: https://github.com/odoo/enterprise/pull/49823 task-3557566 | Before | After | | -- | -- | | |  | | Affected elements | | -- | |  | |  | |  | --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#138915
Before this commit, archiving a restaurant floor caused an error when opening a PoS restaurant session. This issue originated from the `get_tables_order_count` function, which executed a search based on `restaurant.table`. Since archiving a floor does not automatically archive its tables, the function returned information for archived floors, leading to errors. With this commit, we introduce an additional search to first identify active floors in a PoS config. This refined search is then used
Original PR description
Before this commit, archiving a restaurant floor caused an error when opening a PoS restaurant session. This issue originated from the `get_tables_order_count` function, which executed a search based on `restaurant.table`. Since archiving a floor does not automatically archive its tables, the function returned information for archived floors, leading to errors. With this commit, we introduce an additional search to first identify active floors in a PoS config. This refined search is then used to filter tables, ensuring that only tables from active floors are considered. opw-3619830 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#144771 Forward-Port-Of: odoo/odoo#144551
Since 17.0, the new message separator is displayed for guests. The `set_last_seen_message` rpc is also triggered in order to save this information on the server side. However, the `_channel_seen` method does not handle guests as it should. As a consequence, the new message separator is always displayed and the rpc call is always done when a guest loads the public page. This PR enable guest support for this feature. task-3603603 enterprise: https://github.com/odoo/enterprise/pull/
Original PR description
Since 17.0, the new message separator is displayed for guests. The `set_last_seen_message` rpc is also triggered in order to save this information on the server side. However, the `_channel_seen` method does not handle guests as it should. As a consequence, the new message separator is always displayed and the rpc call is always done when a guest loads the public page. This PR enable guest support for this feature. task-3603603 enterprise: https://github.com/odoo/enterprise/pull/52188 Forward-Port-Of: odoo/odoo#142546
Accounting moved the logic of _get_reconciled_vals into _compute_payments_widget_reconciled_info but did not made the change in point_of_sale. This commit resolve this by putting the logic of the previous _get_reconciled_vals into an override of the _compute_payments_widget_reconciled_info method. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#133655
Original PR description
Accounting moved the logic of _get_reconciled_vals into _compute_payments_widget_reconciled_info but did not made the change in point_of_sale. This commit resolve this by putting the logic of the previous _get_reconciled_vals into an override of the _compute_payments_widget_reconciled_info method. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#133655
In the _order_line_field function from the pos order line model, the override doesn't set a default value for session_id in pos_sale. Now we make sure the override is correct. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#137515
Original PR description
In the _order_line_field function from the pos order line model, the override doesn't set a default value for session_id in pos_sale. Now we make sure the override is correct. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#137515
opw-3608438 Forward-Port-Of: odoo/odoo#144483
Original PR description
opw-3608438 Forward-Port-Of: odoo/odoo#144483
pos*: pos_online_payment, pos_sale, pos_self_order Prior to this commit, different tests were using the demo data to run which was causing problems when the demo data were not installed. In this commit, we add products, categories, floor, table, etc. at the setup of the test so that the test can run without demo data. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#142212 Forward-Port-Of: odoo/odoo#141958
Original PR description
pos*: pos_online_payment, pos_sale, pos_self_order Prior to this commit, different tests were using the demo data to run which was causing problems when the demo data were not installed. In this commit, we add products, categories, floor, table, etc. at the setup of the test so that the test can run without demo data. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#142212 Forward-Port-Of: odoo/odoo#141958
When shapes were extracted to configurator snippets in [1], some configurator-specific snippets were created that do not appear on pages of the specific theme. Because in [2] the call to `_generate_primary_snippet_templates` is done on a full list of themes instead of only the installed ones, the problem was not noticed: if any theme defines a block, it's website-side configurator-specific template is generated. This is not the case during an upgrade: the templates are generated only for the i
Original PR description
When shapes were extracted to configurator snippets in [1], some configurator-specific snippets were created that do not appear on pages of the specific theme. Because in [2] the call to…
When shapes were extracted to configurator snippets in [1], some configurator-specific snippets were created that do not appear on pages of the specific theme. Because in [2] the call to `_generate_primary_snippet_templates` is done on a full list of themes instead of only the installed ones, the problem was not noticed: if any theme defines a block, it's website-side configurator-specific template is generated. This is not the case during an upgrade: the templates are generated only for the installed themes. Because of this some "useless" configurator templates trigger an error when importing their XML definition because their parent template does not exist. This is fixed in design-themes by adding those templates in a pseudo page `_` in the `configurator_snippets` entry of each theme's manifest. This commit makes sure to not consider that `_` page name as an actual page name. In master, the templates will be removed instead. [1]: https://github.com/odoo/design-themes/commit/d206c119720d557c11320ebb3d7339890b8f9efa [2]: https://github.com/odoo/odoo/commit/928eeca714a161f6bc03343e4dc8af9b050b9841#diff-f49a1e9eda23df9f1d48121ba376a5fabafe70ea18b29d4eab23d737e5d4eeb6R446 Forward-Port-Of: odoo/odoo#144222
## Issue When using the command palette to assign an user to a task, a "spinning wheel" animation may show up even when everything seems to have been loaded. ## Steps to reproduce - Install Project - For testing, add a `time.sleep(5)` in the `_name_search` of `'res.users'` to simulate a slow `name_search` (instead of populating). - Open your browser's networking tab. - Open a form view of a task, press Ctrl+K, Alt+I - Start typing an user name - Notice that all `name_search` requests a
Original PR description
## Issue When using the command palette to assign an user to a task, a "spinning wheel" animation may show up even when everything seems to have been loaded. ## Steps to reproduce - Install Project -…
## Issue When using the command palette to assign an user to a task, a "spinning wheel" animation may show up even when everything seems to have been loaded. ## Steps to reproduce - Install Project - For testing, add a `time.sleep(5)` in the `_name_search` of `'res.users'` to simulate a slow `name_search` (instead of populating). - Open your browser's networking tab. - Open a form view of a task, press Ctrl+K, Alt+I - Start typing an user name - Notice that all `name_search` requests are being processed, even if only the results of the last one are used. You may also notice the loading animation on the client. ## Cause When using the cmd palette, when typing an user name, we are sending RPC requests to the `name_search` of the `'res.users'` model. The issue is that the requests are not aborted when it is superseded by a new search value. This can lead to issues in a large database where short search strings matches too many records, therefor is generally slow. This can confuse the end user, as a "spinning wheel" can show up, but the result are already present (because a subsequent request gave back results faster than the previous request, which is often the case because a more elaborate search value matches less records, therefor is faster for the DB to process). This use case also hogs workers uselessly for results that are going to be ignored. ## Fix Store the last running RPC and abort it when making a subsequent call to it with new search values and the request hadn't complete. ## Affected versions 16.0 up to master = saas-17.1 ## Reference task-3532458 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#144900 Forward-Port-Of: odoo/odoo#144617
## Before this commit: Calling `env["stock.move.line"].write({"lot_id": lot_id})` with `lot_id` as a recordset instead of an id does not work. However, this is supported by the base model `write` method. ## Steps to reproduce: 1. Create a product A without tracking 2. Set product A's quantity to 10 3. Create an internal transfer to move 10 quantities of product A from Stock to Production 4. Change product A's tracking method to track by lot 5. Create a BoM for A with component B 6. Se
Original PR description
## Before this commit:
Calling `env["stock.move.line"].write({"lot_id": lot_id})` with `lot_id` as a recordset instead of an id does not work.
However, this is supported by the base model `write` method.
## Steps to reproduce:
1. Create a product A without tracking
2. Set product A's quantity to 10
3. Create an internal transfer to move 10 quantities of product A from Stock to Production
4. Change product A's tracking method to track by lot
5. Create a BoM for A with component B
6. Set product B quantity to 10
7. Produce 10 quantities of product A by creating a manufacturing
8. A traceback prevents marking the MO as done
Side effect introduced in https://github.com/odoo/odoo/commit/a14f8989bcf37e93232baeb39d71d4c125e33fc2
opw-3620539
Forward-Port-Of: odoo/odoo#144639Description of the issue/feature this commit addresses: Currently, if the price of an expense category which has expenses posted is modified, the total amount of those expenses is modified too. This is a wanted behavior but this might surprise the user and so it would be preferable to tell him that those amount will be modified when he is editing the category's price. --- Desired behavior after the commit is merged: Adding this commit, when a user modifies the standard_price on a exp
Original PR description
Description of the issue/feature this commit addresses: Currently, if the price of an expense category which has expenses posted is modified, the total amount of those expenses is modified too. This is a wanted behavior but this might surprise the user and so it would be preferable to tell him that those amount will be modified when he is editing the category's price. --- Desired behavior after the commit is merged: Adding this commit, when a user modifies the standard_price on a expense category, if this category has posted or draft expenses linked, a warning message will appear to tell the tell the user of what is going to happen. --- task-3506770 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#144983 Forward-Port-Of: odoo/odoo#138889
Current behavior before PR: When a table is created the selection is set to the first `TD` of the table. Desired behavior after PR is merged: When a table is created the selection is set to the `P` tag inside of first `TD` of the table. task-3610536 Forward-Port-Of: odoo/odoo#144932 Forward-Port-Of: odoo/odoo#143518
Original PR description
Current behavior before PR: When a table is created the selection is set to the first `TD` of the table. Desired behavior after PR is merged: When a table is created the selection is set to the `P` tag inside of first `TD` of the table. task-3610536 Forward-Port-Of: odoo/odoo#144932 Forward-Port-Of: odoo/odoo#143518
Before this commit, using the First Expiry First Out (FEFO) removal strategy led to a traceback error during stock move confirmation if a stock quant of a product was missing its lot. This issue arose because the removal strategy's sort key was based on `removal_date`, which is a field related to `lot_id`. To address this problem, the sorting logic has been modified. Now, it uses `removal_date` or `fields.datetime.max` as the sort key. opw-3625784 --- I confirm I have signed the CLA an
Original PR description
Before this commit, using the First Expiry First Out (FEFO) removal strategy led to a traceback error during stock move confirmation if a stock quant of a product was missing its lot. This issue arose because the removal strategy's sort key was based on `removal_date`, which is a field related to `lot_id`. To address this problem, the sorting logic has been modified. Now, it uses `removal_date` or `fields.datetime.max` as the sort key. opw-3625784 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#145274
This commit fixes an issue with the product configurator where if a subproduct contains an on sale warning, the subproduct won't be added to the quotation when the main product is added. In order to fix this issue, it was needed to provide a way for the allowWarning option to be passed from the addNew method of the basic_relational_model to the _applyX2ManyChange method of the basic_model. This is done by propagating the option through the command until it reaches the basic_model. opw-3462462
Original PR description
This commit fixes an issue with the product configurator where if a subproduct contains an on sale warning, the subproduct won't be added to the quotation when the main product is added. In order to fix this issue, it was needed to provide a way for the allowWarning option to be passed from the addNew method of the basic_relational_model to the _applyX2ManyChange method of the basic_model. This is done by propagating the option through the command until it reaches the basic_model. opw-3462462 Forward-Port-Of: odoo/odoo#144167 Forward-Port-Of: odoo/odoo#143615
Since 16.0, the number of unread messages is not shown anymore on the tab title. This is due to the `set_title_part` event being sent on the wrong bus. The title service is the new preferred way to change the document title. This PR makes use of this service to restore the previous behavior. Forward-Port-Of: odoo/odoo#145329 Forward-Port-Of: odoo/odoo#144993
Original PR description
Since 16.0, the number of unread messages is not shown anymore on the tab title. This is due to the `set_title_part` event being sent on the wrong bus. The title service is the new preferred way to change the document title. This PR makes use of this service to restore the previous behavior. Forward-Port-Of: odoo/odoo#145329 Forward-Port-Of: odoo/odoo#144993
Steps to reproduce: - Install Accounting and l10n_mx_edi - Switch to a Mexican company (e.g. ESCUELA KEMPER URGATE) - Go to "Settings / Technical / Parameters / System Parameters" - Create this parameter: * Key: l10n_mx_edi.manage_invoice_negative_lines * Value: True - Create an invoice: * Customer: [a Mexican customer] (e.g. INMOBILIARIA CVA) * Invoice Lines: - Product: P1 - Price: 200 - Taxes: 16% - Product: P2 - Price: 100 - Taxes: 16% - Product: Discount - Price: -
Original PR description
Steps to reproduce: - Install Accounting and l10n_mx_edi - Switch to a Mexican company (e.g. ESCUELA KEMPER URGATE) - Go to "Settings / Technical / Parameters / System Parameters" - Create this…
Steps to reproduce:
- Install Accounting and l10n_mx_edi
- Switch to a Mexican company (e.g. ESCUELA KEMPER URGATE)
- Go to "Settings / Technical / Parameters / System Parameters"
- Create this parameter:
* Key: l10n_mx_edi.manage_invoice_negative_lines
* Value: True
- Create an invoice:
* Customer: [a Mexican customer] (e.g. INMOBILIARIA CVA)
* Invoice Lines:
- Product: P1 - Price: 200 - Taxes: 16%
- Product: P2 - Price: 100 - Taxes: 16% - Product: Discount - Price: -201 (i.e. absolute value greater than 200) - Taxes: 16%
- Confirm the invoice
- Generate "CFDI" via "Send & Print" button => A KeyError ('tax') is raised.
Cause:
When there is a negative line, its amount is distributed as a discount between the other lines and the tax data are updated. During the process, if the amount to distribute is greater than the amount of the first line, a ratio is computed using the inexistant "tax" key.
Another issue:
The distribution ratio is wrongly computed, dividing [the amount to distribute] by [the remaining amount to distribute].
In our example, the amount to distribute for the first line is 200 and the remaining amount to distribute is 1, resulting on a ratio of (200 / 1) = 200, which is not correct.
The ratio should be computed with the total amount to distribute (i.e. 201). In our example, the ratio for the first line should be (200 / 201).
opw-3614319
Forward-Port-Of: odoo/enterprise#52288
Forward-Port-Of: odoo/enterprise#52064**Steps to Reproduce** 1. Open document module. 2. Go to Configuration > Workspaces 3. Open any workspace > Action button 4. Try to archive. **Technical** The function(action_archive) is expecting a list but here we are passing the integer value(ID). **After this commit** The workspace can be archived without traceback. **Task**-3579858 Forward-Port-Of: odoo/enterprise#50896
Original PR description
**Steps to Reproduce** 1. Open document module. 2. Go to Configuration > Workspaces 3. Open any workspace > Action button 4. Try to archive. **Technical** The function(action_archive) is expecting a list but here we are passing the integer value(ID). **After this commit** The workspace can be archived without traceback. **Task**-3579858 Forward-Port-Of: odoo/enterprise#50896
Current behavior: The six_iot module wasn't correctly following the refactor, and the send button was missing. Steps to reproduce: - Setup six_iot - Open the POS, and try to pay with the six payment terminal opw-3586360 Forward-Port-Of: odoo/enterprise#52277 Forward-Port-Of: odoo/enterprise#51408
Original PR description
Current behavior: The six_iot module wasn't correctly following the refactor, and the send button was missing. Steps to reproduce: - Setup six_iot - Open the POS, and try to pay with the six payment terminal opw-3586360 Forward-Port-Of: odoo/enterprise#52277 Forward-Port-Of: odoo/enterprise#51408
According to Carvajal [specifications](https://docs.google.com/spreadsheets/d/10xf3OsECA5R-6XrwMG0Jnt1iXKYMcL-f/edit#gid=530744640&range=G364) the fields "Descripción" and "Información Adicional" can have up to 300 characters. This change lets customers create PDF documents with longer descriptions in their invoice lines.  opw-3562855 Forward-Port-Of: odoo/enterprise#49525
Original PR description
According to Carvajal [specifications](https://docs.google.com/spreadsheets/d/10xf3OsECA5R-6XrwMG0Jnt1iXKYMcL-f/edit#gid=530744640&range=G364) the fields "Descripción" and "Información Adicional" can have up to 300 characters. This change lets customers create PDF documents with longer descriptions in their invoice lines.  opw-3562855 Forward-Port-Of: odoo/enterprise#49525
After a reevaluation with a decrease, we postponed next entries. It was deemed a faulty behaviour. We decided to remake the behaviour from 15 that is, spread the remaining amount on the remaining period. While fixing this, we decided to fix the issue with lock dates, and by remaining amounts that were left after a reevaluation. To do so, we removed the dependency on asset_number_days and on dates. The problem with asset_number_days was that it is stored as an Integer, while doing c
Original PR description
After a reevaluation with a decrease, we postponed next entries. It was deemed a faulty behaviour. We decided to remake the behaviour from 15 that is, spread the remaining amount on the remaining period. While fixing this, we decided to fix the issue with lock dates, and by remaining amounts that were left after a reevaluation. To do so, we removed the dependency on asset_number_days and on dates. The problem with asset_number_days was that it is stored as an Integer, while doing computations as if it is a Float (so rounding issues). With date, it didn't take into account the fact that lock dates postpone the posting. Task - 3606047 Forward-Port-Of: odoo/enterprise#52178 Forward-Port-Of: odoo/enterprise#50152
Since 17.0, the new message separator is displayed for guests. The set_last_seen_message rpc is also triggered in order to save this information on the server side. However, the _channel_seen method does not handle guests as it should. As a consequence, the new message separator is always displayed and the rpc call is always done when a guest loads the public page. This PR enable guest support for this feature. task-3603603 community: https://github.com/odoo/odoo/pull/142546 Forward
Original PR description
Since 17.0, the new message separator is displayed for guests. The set_last_seen_message rpc is also triggered in order to save this information on the server side. However, the _channel_seen method does not handle guests as it should. As a consequence, the new message separator is always displayed and the rpc call is always done when a guest loads the public page. This PR enable guest support for this feature. task-3603603 community: https://github.com/odoo/odoo/pull/142546 Forward-Port-Of: odoo/enterprise#52118
**Steps to reproduce:** --- - install hr_contract_salary, l10n_hr_in_payroll - switch to `IN Company` - Create Employee and Contract for the same Employee (set `Salary Structure Type` as `Non-Executive` - Click on `Generate Simulation Link` or `Generate Offer` (whichever is there) - Generate it then Get the Generated URL by clicking on `Configure you Package` **Issue:** --- For the Salary Structure Type as Non-Executive, there isn't any salary_packge template like Employee. **Cause
Original PR description
**Steps to reproduce:** --- - install hr_contract_salary, l10n_hr_in_payroll - switch to `IN Company` - Create Employee and Contract for the same Employee (set `Salary Structure Type` as `Non-Executive` - Click on `Generate Simulation Link` or `Generate Offer` (whichever is there) - Generate it then Get the Generated URL by clicking on `Configure you Package` **Issue:** --- For the Salary Structure Type as Non-Executive, there isn't any salary_packge template like Employee. **Cause:** --- The data for the Salary Structure Type "Non-Executive" was missing. **Fix:** --- Added the necessary data for the Salary Structure Type "Non-Executive." task-3493469 Forward-Port-Of: odoo/enterprise#52129 Forward-Port-Of: odoo/enterprise#50365
Prior to this commit some td in the list renderer were vertically align on the middle while other are aligned on top. This comes from commit: https://github.com/odoo/odoo/commit/53f605399755f9355554c2582ea0f693c8f947b4. This commit removes the vertical-align: middle to rely on the inherited alignment from the `<td>` which is inherited until the `<table>` el which set the alignment on `top`. This commit adapts the wrench icon in planning to be centered vertically with the new `$o-lin
Original PR description
Prior to this commit some td in the list renderer were vertically align on the middle while other are aligned on top. This comes from commit: https://github.com/odoo/odoo/commit/53f605399755f9355554c2582ea0f693c8f947b4. This commit removes the vertical-align: middle to rely on the inherited alignment from the `<td>` which is inherited until the `<table>` el which set the alignment on `top`. This commit adapts the wrench icon in planning to be centered vertically with the new `$o-line-size` variable introduced in community. The new variable created a compilation error with the sign app because the `function.scss` file was not included in the assets of the module. task-3557566 Community PR: https://github.com/odoo/odoo/pull/138915 Forward-Port-Of: odoo/enterprise#49823
Before this commit, the clickAll tour crashed (https://runbot.odoo.com/runbot/build/54182109 (version 17.0 and after, but the fix is relevant before those versions) This was -- probably -- due to: - a list renderer is opened, the web_enterprise upsell studio feature listens on the actionService to determine if the current action can be editable with studio. - a client action is mounted - just before the list renderer stops listening (which happens at unmount time) the same function of the
Original PR description
Before this commit, the clickAll tour crashed (https://runbot.odoo.com/runbot/build/54182109 (version 17.0 and after, but the fix is relevant before those versions) This was -- probably -- due to: - a list renderer is opened, the web_enterprise upsell studio feature listens on the actionService to determine if the current action can be editable with studio. - a client action is mounted - just before the list renderer stops listening (which happens at unmount time) the same function of the first list renderer triggers. - at this point the action that is evaluated is the one of the client action, which crashes because res_model is not defined on client actions definitions. The fix is relevant in 16.0 because it solves a case were a second act_window action, in target new, would spawn with a list renderer too, making the first one trigger its function without crash but in the wrong conditions. Forward-Port-Of: odoo/enterprise#52173 Forward-Port-Of: odoo/enterprise#51449
Prior, when we resent the survey from appraisal, the deadline was not updated. This commit fixes the issue task - 3599707 Forward-Port-Of: odoo/enterprise#50846
Original PR description
Prior, when we resent the survey from appraisal, the deadline was not updated. This commit fixes the issue task - 3599707 Forward-Port-Of: odoo/enterprise#50846
Related to odoo/odoo#145154 Forward-Port-Of: odoo/enterprise#52205
Original PR description
Related to odoo/odoo#145154 Forward-Port-Of: odoo/enterprise#52205
When there are no work orders on a manufacturing order, the employee cost is `null`, breaking the computation of other fields. ## Steps to reproduce: 1. Install `mrp_workorder_hr_account` 2. Make a MO without work orders and validate 3. Go to Manufacturing > Reporting > Production Analysis 4. Open the pivot view and search for the MO 5. 'Average Total Cost / Unit' is 0 opw-3600343 Forward-Port-Of: odoo/enterprise#51789 Forward-Port-Of: odoo/enterprise#51303
Original PR description
When there are no work orders on a manufacturing order, the employee cost is `null`, breaking the computation of other fields. ## Steps to reproduce: 1. Install `mrp_workorder_hr_account` 2. Make a MO without work orders and validate 3. Go to Manufacturing > Reporting > Production Analysis 4. Open the pivot view and search for the MO 5. 'Average Total Cost / Unit' is 0 opw-3600343 Forward-Port-Of: odoo/enterprise#51789 Forward-Port-Of: odoo/enterprise#51303
Steps to reproduce: ------------------- - set a "Daily" period for a rented product; - go to ecommerce on the product page; Issue: ------ The default period is not correct. The dates and duration don't match. Cause: ------ For a product whose rental is counted in days, the duration is the number of days selected. For a product that can be rented by the hour, The duration is calculated using the difference between the datetimes. Solution: --------- When the product can be r
Original PR description
Steps to reproduce: ------------------- - set a "Daily" period for a rented product; - go to ecommerce on the product page; Issue: ------ The default period is not correct. The dates and duration don't match. Cause: ------ For a product whose rental is counted in days, the duration is the number of days selected. For a product that can be rented by the hour, The duration is calculated using the difference between the datetimes. Solution: --------- When the product can be rented in days, take the whole day, i.e. 00:00:00 on the first day to 23:59:59 on the last day. After this commit: If the default period is 1 day and it's the 21st of the month, the dates will be from the 22nd to the 22nd with a duration of 1 day (on the datepicker, only one day is selected). opw-3573163 Forward-Port-Of: odoo/enterprise#51878 Forward-Port-Of: odoo/enterprise#51123
Steps to reproduce: 1. Install `delivery_ups_rest` module 2. Make a new shipping method 3. Choose "UPS" as provider The UPS configuration tab that allows user to enter their credentials and configuration will not show up. The problem is that the condition for `invisible` attribute is defined in the old way. (vid https://github.com/odoo/enterprise/pull/35255) opw-3618579 Forward-Port-Of: odoo/enterprise#52144
Original PR description
Steps to reproduce: 1. Install `delivery_ups_rest` module 2. Make a new shipping method 3. Choose "UPS" as provider The UPS configuration tab that allows user to enter their credentials and configuration will not show up. The problem is that the condition for `invisible` attribute is defined in the old way. (vid https://github.com/odoo/enterprise/pull/35255) opw-3618579 Forward-Port-Of: odoo/enterprise#52144
### Steps to reproduce - Create and send an invoice (in order to get a CFDI number) - Create a new invoice and fill in the field CFDI Origin with `07|<CFDI number from invoice created above>` - attempt to save the invoice You should be met with an error. ### Cause The code '07' is not accounted for. opw-3618081 Forward-Port-Of: odoo/enterprise#52049
Original PR description
### Steps to reproduce - Create and send an invoice (in order to get a CFDI number) - Create a new invoice and fill in the field CFDI Origin with `07|<CFDI number from invoice created above>` - attempt to save the invoice You should be met with an error. ### Cause The code '07' is not accounted for. opw-3618081 Forward-Port-Of: odoo/enterprise#52049