Monday, April 3, 2023
40 changes · master
Enhancements to existing features
Timesheet employee selections now show the employee's company when multiple companies exist. This helps users distinguish between employees with the same name across different companies and reduces selection mistakes.
Original PR description
1. hr_timesheet: use name_get to add employee's company
Currently, if both companies have employees with the same name, it is not known which
company the selected employee belongs to.
In this commit, the name of the company will only be appended by the name_get when more than
one company is present in the database.
Example
- Administrator - My Company
- Administrator - Tiny ERP
task-3101249New automated checks cover key planning template workflows, including creating templates, assigning them to shifts, and showing the right options by role and project. This helps protect planning and forecasting behavior from future regressions without changing user-facing features.
Original PR description
This commit adds some units to cover the following business cases: - the creation of a template - selection of a template for a shift - display the corresponding template on a shift - the right templates are displayed based on the selected role and project task-3051324
Project Updates now show 'N/A' in the Planned column when a sale order line is measured in units rather than hours. This avoids showing misleading planning information where planned hours cannot be calculated.
Original PR description
In Project Update's description, display 'N/A' in non-plannable cells. The column 'Planned' contains, for each sale order line, the sum of hours of planning slot related to it. When the sold product is measured in unit, this is not possible. task-2909337 related: https://github.com/odoo/odoo/pull/96104
Resolved issues and error corrections
This fix makes Odoo's internal test mock server behave more like the real system when creating records and applying default field values. It improves test reliability and helps prepare future changes to relational data handling, with no direct user-facing impact expected.
Original PR description
The mock server implementation does not exactly match the actual orm implementation. It is not really a big deal, but it makes the test suite less useful. In particular, the onchange call should return a value for all fields when we are creating a new record. Also, the default get implementation was not exactly correct. The motivation for this change is to prepare the future relational model refactoring. 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
Code cleanup and technical improvements
This update modernizes how many Odoo apps load their internal browser code, replacing an older custom approach with a standard one. It should make the platform easier to maintain and help future improvements ship with less risk, without changing day-to-day user workflows.
Miscellaneous changes
Recent Odoo versions require modern postgres (e.g. use of jsonb), the `NULLS {FIRST | LAST}` clause was added in 8.3 so should be well supported. While Odoo's use of nulls is not always consistent, the NULLS ordering clauses can be quite useful especially when sorting `DESC`: `NULLS FIRST` and `NULLS LAST` are literal positions so they put nulls at that location regardless of sort order whereas the default Postgres ordering is to consider nulls larger than every other value so they appear fir
Original PR description
Recent Odoo versions require modern postgres (e.g. use of jsonb), the `NULLS {FIRST | LAST}` clause was added in 8.3 so should be well supported.
While Odoo's use of nulls is not always consistent, the NULLS ordering clauses can be quite useful especially when sorting `DESC`: `NULLS FIRST` and `NULLS LAST` are literal positions so they put nulls at that location regardless of sort order whereas the default Postgres ordering is to consider nulls larger than every other value so they appear first when sorting DESC, which is often undesirable (putting nulls first when sorting ASC can also be useful to fill records).
Close #116466
Forward-Port-Of: odoo/odoo#116523
Forward-Port-Of: odoo/odoo#116464The Discuss sidebar once again shows the call icon after it was accidentally left out during a previous redesign. This restores an expected shortcut for users who start calls from Discuss, reducing confusion and keeping the communication flow smooth.
Original PR description
Following the discuss refactoring* the call icon in the discuss sidebar has not been reimplemented. This commit fixes this issue. \* https://github.com/odoo/odoo/pull/110188
Original PR description
This commit converts almost all odoo module by native module. The goal is to deprecate odoo.define in favor of native module and then simplify boot.js by removing the regexp that finds module dependencies. task id: 3162300
The web module loading system no longer relies on an older internal error-handling mechanism. This keeps the platform easier to maintain and aligns it with current development practices, with no expected direct impact for users.
Original PR description
guardedCatch is a legacy feature meant to differenciate promises rejected as control flow from promises rejected because of an error. In recent years we have settled on the stance that using promise rejections, which are treated as errors by the language in many ways, is a bad idea. This commit removes the dependency of the odoo module system on this legacy feature.
This update converts many Odoo Enterprise app scripts to a newer standard code format. It supports long-term maintainability and should help simplify the platform startup process without changing day-to-day user workflows.
Original PR description
This commit converts almost all odoo module by native module. The goal is to deprecate odoo.define in favor of native module and then simplify boot.js by removing the regexp that finds module dependencies. task id: 3162300
The Knowledge app has been streamlined by removing unnecessary internal dialog wrappers. This reduces code complexity and helps make future maintenance safer and more efficient, with no expected change to the user experience.
Original PR description
This PR will remove some component wrappers that we only created to open a dialog from a legacy component. One can actually open a dialog component by using the action service of the `Component` object. We will therefore remove those wrapper components to reduce the code base. task-3203287
This update replaces a legacy JavaScript helper library with built-in browser capabilities across several Enterprise apps. It should reduce technical debt and make future maintenance easier, with little expected change for end users.
Issue: In the calendar view of Time Off (Approvals / Time Off), we see the "display_name" of the events, but we don't see explicitly the name of the employees associated with the events. Solution: Change the title of the event by adding the employee's name at the beginning. opw-3239972 Forward-Port-Of: odoo/odoo#116942
Original PR description
Issue: In the calendar view of Time Off (Approvals / Time Off), we see the "display_name" of the events, but we don't see explicitly the name of the employees associated with the events. Solution: Change the title of the event by adding the employee's name at the beginning. opw-3239972 Forward-Port-Of: odoo/odoo#116942
The title attribute for font size used to be on the first child of the button. This was simplified in [1] to be on the button instead. However, having the title on the child rather than the button was actually intential because Bootstrap 5 only allows to instantiate one component by node, as specified by [2] which did move the title attribute from the button to the child in the first place. task-3253081 [1]: https://github.com/odoo/odoo/commit/e095e62f4af96d14943ebbe5f0da57c897bd44 [
Original PR description
The title attribute for font size used to be on the first child of the button. This was simplified in [1] to be on the button instead. However, having the title on the child rather than the button was actually intential because Bootstrap 5 only allows to instantiate one component by node, as specified by [2] which did move the title attribute from the button to the child in the first place. task-3253081 [1]: https://github.com/odoo/odoo/commit/e095e62f4af96d14943ebbe5f0da57c897bd44 [2]: https://github.com/odoo/odoo/commit/09b720eff1a7378351e04661d3df1c3be31ee965 Forward-Port-Of: odoo/odoo#117129
… records 'slug' cannot be called on records which are not yet saved, aka have no ID. In this commit we set the website_url to False for records that do not have any ID. Code managing those URLs is updated to be defensive, as notably when using studio you may end up trying to call methods on in-memory records. Followup of odoo/odoo@da3f4c2aff92cca23ca2d7a87fa0eb5b1d7ce5fe Task-3254382 Forward-Port-Of: odoo/odoo#117132
Original PR description
… records 'slug' cannot be called on records which are not yet saved, aka have no ID. In this commit we set the website_url to False for records that do not have any ID. Code managing those URLs is updated to be defensive, as notably when using studio you may end up trying to call methods on in-memory records. Followup of odoo/odoo@da3f4c2aff92cca23ca2d7a87fa0eb5b1d7ce5fe Task-3254382 Forward-Port-Of: odoo/odoo#117132
Before this commit, if there is a demand for quantities and they are available but reserved in transit (not yet in a stock location) they are shown as not available To reproduce: 1) Have 2/3 step incoming shipments in warehouse 2) Purchase a quantity to create the incoming transfer 3) Validate the first step so that quantity is now in Input location 4) Create a MO with the component with quantity only in Input location 5) Go to forecast report of component, the quantity is shown not
Original PR description
Before this commit, if there is a demand for quantities and they are available but reserved in transit (not yet in a stock location) they are shown as not available To reproduce: 1) Have 2/3 step incoming shipments in warehouse 2) Purchase a quantity to create the incoming transfer 3) Validate the first step so that quantity is now in Input location 4) Create a MO with the component with quantity only in Input location 5) Go to forecast report of component, the quantity is shown not available. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#116983
Before this commit: if the user wanted to generate a POS Inalterability Check statement, an IndexError was raised. This commit raises a more understandable error. opw-3237383 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#116386
Original PR description
Before this commit: if the user wanted to generate a POS Inalterability Check statement, an IndexError was raised. This commit raises a more understandable error. opw-3237383 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#116386
Currently in the survey: - If we have a conditional question and the question selection mode is random and we select the question layout as one page with all questions or one page per section, the conditional question is not visible. This happens because the random mode condition is ignored. - If we have a conditional question and the question selection mode is random and we select the question layout as one page per section, the traceback is generated when we start the survey. This is becaus
Original PR description
Currently in the survey: - If we have a conditional question and the question selection mode is random and we select the question layout as one page with all questions or one page per section, the…
Currently in the survey: - If we have a conditional question and the question selection mode is random and we select the question layout as one page with all questions or one page per section, the conditional question is not visible. This happens because the random mode condition is ignored. - If we have a conditional question and the question selection mode is random and we select the question layout as one page per section, the traceback is generated when we start the survey. This is because it is trying to get value from the "selected_answer", which does not exist in random mode. Expected behaviour is If the question selection mode is random, the conditional questions are considered normal and visible and do not generate a trace back if the question layout is one page per section. This commit fixes the above issue by adding a condition that treats the conditional question as a normal question when the question selection mode is random. task-3142209 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#111171
As rewrite the whole chart template mechanism, from here: https://github.com/odoo/odoo/commit/512574861691f425ec6a17f20fe4b586bb88a299 we need to remove chart template reference from localization module. some of them are remaining. so removed from norway localization in migration script otherwise we got this error: ``` from odoo.addons.account.models.chart_template import update_taxes_from_templates ImportError: cannot import name 'update_taxes_from_templates' from 'odoo.addons.account
Original PR description
As rewrite the whole chart template mechanism, from here: https://github.com/odoo/odoo/commit/512574861691f425ec6a17f20fe4b586bb88a299 we need to remove chart template reference from localization module. some of them are remaining. so removed from norway localization in migration script otherwise we got this error: ``` from odoo.addons.account.models.chart_template import update_taxes_from_templates ImportError: cannot import name 'update_taxes_from_templates' from 'odoo.addons.account.models.chart_template' (/home/odoo/src/odoo/saas-16.2/addons/account/models/chart_template.py) ``` 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 Forward-Port-Of: odoo/odoo#117333
Issue: - Go to website > edit mode > add a form - On one of the form fields, add a placeholder > save - Change language > translate > impossible to translate the placeholder. The fix on [1] was added to prevent interacting with inputs in editable zones. This prevents translating attributes on those inputs too (using the AttributeTranslateDialog) so the goal of this commit is to add an exception to the restriction in [1], when input attributes are translated. [1]: https://github.com/
Original PR description
Issue: - Go to website > edit mode > add a form - On one of the form fields, add a placeholder > save - Change language > translate > impossible to translate the placeholder. The fix on [1] was added to prevent interacting with inputs in editable zones. This prevents translating attributes on those inputs too (using the AttributeTranslateDialog) so the goal of this commit is to add an exception to the restriction in [1], when input attributes are translated. [1]: https://github.com/odoo/odoo/commit/3e598a8014966e1a07a08d53bf85050b458e05a6 task-3042522 Forward-Port-Of: odoo/odoo#117118 Forward-Port-Of: odoo/odoo#106198
from _snailmail_create function the value passed to error_code selection field is ATTACHMENT_ERROR and this key is not existing the selection field. adding missing selection key, value to the selection field. impacted version: 14 and above --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#108143
Original PR description
from _snailmail_create function the value passed to error_code selection field is ATTACHMENT_ERROR and this key is not existing the selection field. adding missing selection key, value to the selection field. impacted version: 14 and above --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#108143
### Description of the issue/feature this PR addresses: Prevent unnecessary & time-consuming picking updates if there is no change of product_qty. This PR can be considered an extension of this one: https://github.com/odoo/odoo/pull/109418 , where the same logic is applied to prevent a log note from being generated. ### Current behavior before PR: An update of a purchase order line can generate a write on the rest of the purchase lines with product_qty in the values, even though it didn't
Original PR description
### Description of the issue/feature this PR addresses: Prevent unnecessary & time-consuming picking updates if there is no change of product_qty. This PR can be considered an extension of this one: https://github.com/odoo/odoo/pull/109418 , where the same logic is applied to prevent a log note from being generated. ### Current behavior before PR: An update of a purchase order line can generate a write on the rest of the purchase lines with product_qty in the values, even though it didn't changed. Example on customer database: - Before: https://watch.screencastify.com/v/PgmOI2d0en5Epru39X6a - After: https://watch.screencastify.com/v/sb6V3R0PHnwb5yAqBOJH ### Desired behavior after PR is merged: Only update picking if product_qty did change --- OPW-2978569 Forward-Port-Of: odoo/odoo#117296 Forward-Port-Of: odoo/odoo#114546
When trying to add a product that requires specifying lot/serial numbers, the popup to list the numbers failed to display. This is because there is no longer `el` in component. We need to explicitly reference the element we need. This commit introduces a t-ref in the root element of the EditListPopup to have a reference to it from the useAutoFocusToLast hook to fix the issue. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#11
Original PR description
When trying to add a product that requires specifying lot/serial numbers, the popup to list the numbers failed to display. This is because there is no longer `el` in component. We need to explicitly reference the element we need. This commit introduces a t-ref in the root element of the EditListPopup to have a reference to it from the useAutoFocusToLast hook to fix the issue. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#117241
In rare cases, when the chatter is open, `getScrollableElement()` may return `null` instead of a html element, resulting in a crash when reading `.scrollHeight`. The scrollable element is an OWL `ref`, and somehow `ref.el` returns `null`, should indicate the ref no longer exists. Functionally this shouldn't happen, because the existence of the scrollable is mandatory for the `MessageList` to exist. The `willPatch` is invoked when the component still makes sense, so it shouldn't be possible t
Original PR description
In rare cases, when the chatter is open, `getScrollableElement()` may return `null` instead of a html element, resulting in a crash when reading `.scrollHeight`. The scrollable element is an OWL…
In rare cases, when the chatter is open, `getScrollableElement()` may return `null` instead of a html element, resulting in a crash when reading `.scrollHeight`. The scrollable element is an OWL `ref`, and somehow `ref.el` returns `null`, should indicate the ref no longer exists. Functionally this shouldn't happen, because the existence of the scrollable is mandatory for the `MessageList` to exist. The `willPatch` is invoked when the component still makes sense, so it shouldn't be possible to call `MessageList/willPatch` when the scrollable is no more. This crash could be an unfortunate scenario where the rendering of chatter briefly remove then add the scrollable during patching, and `MessageList/willPatch` is invoked with this non-existent ref during this short timeframe. This commit fixes the issue by not updating snapshotting scroll position of scrollable when this happens, so that it doesn't crash. Skipping the snapshot means no scroll adjustment, which is fine since there's no available scrollable to perform any scroll adjustments for the rendering in progress. <img width="981" alt="Screenshot 2023-03-24 at 17 36 28" src="https://user-images.githubusercontent.com/6569390/228607844-6238a9a5-8ddf-43a3-9155-6b93dea6946c.png"> Forward-Port-Of: odoo/odoo#117071
The following changes are made in this commit: PAKY: - swap of user_id icon in the kanban box and the removal of the allow_subtasks field and setting - change the ordering of the fields in the subtask list - make small layout changes in the project.task and project.project kanban cards - remove the "lock-icon private" sub-title of private tasks, replace it with a little lock icon on the bottom right icons of the kanban card. - removed the break tag in the project.task kanban card that wa
Original PR description
The following changes are made in this commit: PAKY: - swap of user_id icon in the kanban box and the removal of the allow_subtasks field and setting - change the ordering of the fields in the…
The following changes are made in this commit: PAKY: - swap of user_id icon in the kanban box and the removal of the allow_subtasks field and setting - change the ordering of the fields in the subtask list - make small layout changes in the project.task and project.project kanban cards - remove the "lock-icon private" sub-title of private tasks, replace it with a little lock icon on the bottom right icons of the kanban card. - removed the break tag in the project.task kanban card that was unecessary given the new display and margin style settings - lock icon is bigger - kanban icons are better aligned - state is at the right of subtask list - state is as big as avatar BVDN: - project.task kanban card > the state should have the same size as the avatar - sub-tasks list view - remove the 'remaining hours on SO' field - the deadline should be optional but hidden by default - remove the rating field - add stage option - apply the same changes to the blocked by list view - the priority and the state should not be optional - project.task kanban view > change the opacity of the tasks that are closed - the stage_id should be copied when duplicating a task, except when the task is generated through the recurrence - Field Service task > Mark as Done > should set the 'status' to 'done' and shouldn't write on the stagec - remove the tooltip of the tag_ids field - the striked should be replaced by the opacity on the kanban card ABGH: - When duplicating a task having sub-tasks, '(copy)' is not added to the name of the sub-tasks of this task. - project.task kanban view: * (+ x tasks) mention next to the name is removed * The caret is replaced with 'fa-check-square-o x/y' which should represent the number of sub-tasks open compared to the total number of sub-tasks * Only open subtasks are displayed * When changing the state of a sub-task to a closing one, the sub-task is muted and removed from the list on the view reload * The name of the parent task on the kanban card of sub-tasks is displayed except when viewing the sub-tasks of a particular task through the sub-tasks stat button * project.project kanban view: the fa-check-square-o icon of milestones is replaced with fa-flag-o * project.task kanban card: the fa-play and fa-pause icons are moved on the right of the remaining hours widge. * Allow users to edit the stage_id in batch from the list view of tasks if all of the selected tasks are part of the same project. Related PRs: (16.2) Enterprise: https://github.com/odoo/enterprise/pull/38346 (Master - deprecated) Enterprise: odoo/enterprise#38132 Task-3229873 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 Forward-Port-Of: odoo/odoo#115707
Since BS5 integration in v16.0, the pdf of the sale and purchase report have changed. Borders would be present in the body of the report and the total detail. Came back to v15 display by using the table-borderless class on those elements. Description of the issue/feature this PR addresses: **Redundant borders on pdf reports** Note: The invoice pdf report had a similar issue and had been fixed by this commit https://github.com/odoo/odoo/commit/1a46b6f9231c5d49d70bfa9eb8d434c1f092c1c7
Original PR description
Since BS5 integration in v16.0, the pdf of the sale and purchase report have changed. Borders would be present in the body of the report and the total detail. Came back to v15 display by using the…
Since BS5 integration in v16.0, the pdf of the sale and purchase report have changed. Borders would be present in the body of the report and the total detail. Came back to v15 display by using the table-borderless class on those elements. Description of the issue/feature this PR addresses: **Redundant borders on pdf reports** Note: The invoice pdf report had a similar issue and had been fixed by this commit https://github.com/odoo/odoo/commit/1a46b6f9231c5d49d70bfa9eb8d434c1f092c1c7 Impacted versions: - 16.0 Steps to reproduce: 1. Use report layout boxed. 2. Create a new sale order 3. Add a sale order line with tax. 4. Print the sale pdf report. Current behavior before PR: - See the below image, the borders of sale order lines, Untaxed Amount, and Total. <img width="762" alt="image" src="https://user-images.githubusercontent.com/32898439/229291062-5bed6eca-5029-47c5-a789-08ead4be77ec.png"> Desired behavior after PR is merged: <img width="757" alt="image" src="https://user-images.githubusercontent.com/32898439/229291157-8883a7f0-85e6-40c6-bd6b-83eb383f47b1.png"> --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#117431
This commit addresses the issue where the livechat button was hiding the buttons of the cookies bar. With this commit, when a cookies bar is open, the bottom fixed elements (such as the livechat button) will be hidden. Most issues caused by bottom fixed elements hiding buttons on a page had already been addressed in this [commit]. However, the case of a modal without a backdrop (like the cookies bar) had not yet been addressed. Steps to reproduce the bug: - Activate the livechat on a we
Original PR description
This commit addresses the issue where the livechat button was hiding the buttons of the cookies bar. With this commit, when a cookies bar is open, the bottom fixed elements (such as the livechat button) will be hidden. Most issues caused by bottom fixed elements hiding buttons on a page had already been addressed in this [commit]. However, the case of a modal without a backdrop (like the cookies bar) had not yet been addressed. Steps to reproduce the bug: - Activate the livechat on a website. - Activate the cookies bar on the website. - When both are open, the livechat button hides the buttons of the cookies bar (only if the page has a scrollbar and the page is not scrolled to the bottom). [commit]: https://github.com/odoo/odoo/commit/1cdd1f2f9a7d90fbf8e0da61116abfcbe6db5ae1 opw-3213808 Forward-Port-Of: odoo/odoo#117388 Forward-Port-Of: odoo/odoo#116235
Before this commit, the translations were loaded as soon as `account` was updated, leading to all fields being read/parsed, even from other modules. This commit delays the sync of the translations to after the registry is loaded. To reproduce: * install `l10n_in` (fails because of `python_compute`), or `l10n_mx` (fails because of `l10n_mx_tax_type`) * update `account` A traceback will be raised inside of `_update_translations`. Forward-Port-Of: odoo/odoo#117269
Original PR description
Before this commit, the translations were loaded as soon as `account` was updated, leading to all fields being read/parsed, even from other modules. This commit delays the sync of the translations to after the registry is loaded. To reproduce: * install `l10n_in` (fails because of `python_compute`), or `l10n_mx` (fails because of `l10n_mx_tax_type`) * update `account` A traceback will be raised inside of `_update_translations`. Forward-Port-Of: odoo/odoo#117269
Steps to reproduce: - install any edi l10n - create an invoice with edi xml - try to print the invoice (this adds a pdf attachment) - the attachment viewer shows whichever attachment added first - it shows only the xml file name Bug: `_message_set_main_attachment_id` only works if there are no `message_main_attachment_id` set. Fix: Override `_message_set_main_attachment_id` in the `account.move` module to alter this behavior OPW-3147811 Forward-Port-Of: odoo/odoo#116957 Forwar
Original PR description
Steps to reproduce: - install any edi l10n - create an invoice with edi xml - try to print the invoice (this adds a pdf attachment) - the attachment viewer shows whichever attachment added first - it shows only the xml file name Bug: `_message_set_main_attachment_id` only works if there are no `message_main_attachment_id` set. Fix: Override `_message_set_main_attachment_id` in the `account.move` module to alter this behavior OPW-3147811 Forward-Port-Of: odoo/odoo#116957 Forward-Port-Of: odoo/odoo#111321
Steps to reproduce: Make a sale order with a product and quantity > 1, add FedEx international shipping and validate the delivery In the document you will see that the unit cost is equal to subtotal which is wrong. There is a discrepancy between `_get_commodities_from_order` and `_get_commodities_from_stock_move_lines`, that the former makes commodities with `monetary_value` equal to the unit price, while the latter uses subtotal. in the method `commodities` in `delivery_fedex`, `monetary_va
Original PR description
Steps to reproduce: Make a sale order with a product and quantity > 1, add FedEx international shipping and validate the delivery In the document you will see that the unit cost is equal to subtotal…
Steps to reproduce: Make a sale order with a product and quantity > 1, add FedEx international shipping and validate the delivery In the document you will see that the unit cost is equal to subtotal which is wrong. There is a discrepancy between `_get_commodities_from_order` and `_get_commodities_from_stock_move_lines`, that the former makes commodities with `monetary_value` equal to the unit price, while the latter uses subtotal. in the method `commodities` in `delivery_fedex`, `monetary_value` is treated as unit price, so the right way to fix it is to do it in `_get_commodities_from_stock_move_lines`. Note that when rating a delivery, commodities are made in `_get_commodities_from_order` and then passed to `commodities`, while for sending the shipping, commodities are made in `_get_commodities_from_stock_move_lines`. Related PR in enterprise: https://github.com/odoo/enterprise/pull/38714 opw-3233369 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#117486 Forward-Port-Of: odoo/odoo#116068
In this PR (https://github.com/odoo/odoo/pull/116068), the field `monetary_value` was changed to use the unit price. This commit ensures that the subtotal is used for customs items in easypost. (see https://www.easypost.com/docs/api#customs-items) opw-3233369 Forward-Port-Of: odoo/enterprise#39214 Forward-Port-Of: odoo/enterprise#38714
Original PR description
In this PR (https://github.com/odoo/odoo/pull/116068), the field `monetary_value` was changed to use the unit price. This commit ensures that the subtotal is used for customs items in easypost. (see https://www.easypost.com/docs/api#customs-items) opw-3233369 Forward-Port-Of: odoo/enterprise#39214 Forward-Port-Of: odoo/enterprise#38714
Steps: - Install timesheet app. - Create project where allow timesheet is False and set an analytic account on it. - Go to timesheet app and search for that project. Issue: - User can see and able to timesheet on non allowed timesheet project/task from grid via group expand. Cause: - Group expand on project/task does not check record is allowing timesheet or not. Fix: - Display empty lines from group expand only for allow timesheets project and task. task-3130894 Forward-Port-
Original PR description
Steps: - Install timesheet app. - Create project where allow timesheet is False and set an analytic account on it. - Go to timesheet app and search for that project. Issue: - User can see and able to timesheet on non allowed timesheet project/task from grid via group expand. Cause: - Group expand on project/task does not check record is allowing timesheet or not. Fix: - Display empty lines from group expand only for allow timesheets project and task. task-3130894 Forward-Port-Of: odoo/enterprise#39210 Forward-Port-Of: odoo/enterprise#36420
The following changes are made in this commit: - project.task kanban card: the fa-play and fa-pause icons are moved on the right of the remaining hours widget - necessary changes are made after deprecating allow_subtasks and child_text fields in the related community PR - removed the change of stage for the action_fsm_validate (Mark as Done button) Related PRs: (16.2) Community: https://github.com/odoo/odoo/pull/115707 (Master - deprecated) Community: odoo/odoo#115099 task-3229873
Original PR description
The following changes are made in this commit: - project.task kanban card: the fa-play and fa-pause icons are moved on the right of the remaining hours widget - necessary changes are made after deprecating allow_subtasks and child_text fields in the related community PR - removed the change of stage for the action_fsm_validate (Mark as Done button) Related PRs: (16.2) Community: https://github.com/odoo/odoo/pull/115707 (Master - deprecated) Community: odoo/odoo#115099 task-3229873 Forward-Port-Of: odoo/enterprise#38346
Increase of the minimum width for the first column of all reports. This is a revert from the following bugfix PR: https://github.com/odoo/enterprise/pull/35025 As the issue of this mentioned PR was to reduce the width of the first column of the Partner Ledger report for only PDF version, this commit specifically targets this objective. The issue with the solution provided for the mentioned PR was that the width was too small and some customers were not able to read the name of the accounts in th
Original PR description
Increase of the minimum width for the first column of all reports. This is a revert from the following bugfix PR: https://github.com/odoo/enterprise/pull/35025 As the issue of this mentioned PR was to reduce the width of the first column of the Partner Ledger report for only PDF version, this commit specifically targets this objective. The issue with the solution provided for the mentioned PR was that the width was too small and some customers were not able to read the name of the accounts in the first column. task: 3211840 Forward-Port-Of: odoo/enterprise#39088 Forward-Port-Of: odoo/enterprise#38793
typo in lost reasons Forward-Port-Of: odoo/enterprise#35204
Original PR description
typo in lost reasons Forward-Port-Of: odoo/enterprise#35204
Access to ir.model.fields and ir.model was restricted in odoo/odoo#69120, thus the method to adapt the payroll report would crash when editing a salary structure for payroll admins without administrative rights. task-3254874 Forward-Port-Of: odoo/enterprise#39102
Original PR description
Access to ir.model.fields and ir.model was restricted in odoo/odoo#69120, thus the method to adapt the payroll report would crash when editing a salary structure for payroll admins without administrative rights. task-3254874 Forward-Port-Of: odoo/enterprise#39102
Steps: - Install planning and timesheets app. - Add a publish slot for current user employee and set a project on it. - Go to timesheet app. - Open All timesheet menu groupBy project. Issue: - Empty lines for project is not added in All Timesheet menu. Cause: - Empty lines from shift is not working other menus expect My Timesheet menu because of wrong fix in PR-https://github.com/odoo/enterprise/pull/31140 to remove current employee empty lines if employee field is available in grid
Original PR description
Steps: - Install planning and timesheets app. - Add a publish slot for current user employee and set a project on it. - Go to timesheet app. - Open All timesheet menu groupBy project. Issue: - Empty lines for project is not added in All Timesheet menu. Cause: - Empty lines from shift is not working other menus expect My Timesheet menu because of wrong fix in PR-https://github.com/odoo/enterprise/pull/31140 to remove current employee empty lines if employee field is available in grid domain. Fix: - Add right condition to check employee field is in griddomain or not instead of restricting code to My Timesheet menu only. task-3130894 Forward-Port-Of: odoo/enterprise#39153 Forward-Port-Of: odoo/enterprise#35708
## Current behaviour If a user that belongs to Company A, has defined workhours in Company A, generates an invite link based on workhours, when you open the link, on a website that belongs to another company, the appointment slots are ignoring the workhours of the employee. ## Expected behaviour A portal user shouldn't be able to book appointments outside workhours, when that invite link was based on the employee's workhours, regardless of the company the sites belongs to. ## Steps to re
Original PR description
## Current behaviour If a user that belongs to Company A, has defined workhours in Company A, generates an invite link based on workhours, when you open the link, on a website that belongs to another…
## Current behaviour If a user that belongs to Company A, has defined workhours in Company A, generates an invite link based on workhours, when you open the link, on a website that belongs to another company, the appointment slots are ignoring the workhours of the employee. ## Expected behaviour A portal user shouldn't be able to book appointments outside workhours, when that invite link was based on the employee's workhours, regardless of the company the sites belongs to. ## Steps to reproduce - Install Employees, Website, Appointment - Create a new company B - In Settings, for website 2, set it's company to company B - In Calendar, generate a new invite link based on workhours - Go to the link and preview it under website 2, you will see that you can book slots outside the normal 40h/workweek default schedule. ## Reason for the problem When calculating the `_slot_availability_prepare_values_workhours`, the `allowed_company_ids` in the context of `staff_users` is that of the website's company, which means that we get an empty record when getting the `employee_id`. Therefor we can't get the calendar resource of the user, which means we fallback on the generic slots, instead of the workhours. ## Fix When computing the workhours, if the user doesn't have an employee, we look at all his employees regardless of the company and we take the first one. ## Affected versions - saas-15.2 - 16.0 - saas-16.1 - master --- opw-3087872 Forward-Port-Of: odoo/enterprise#39040 Forward-Port-Of: odoo/enterprise#34927
When we create a model with Studio with the option 'Notes' enabled, the notes field in the form view is squashed on the left side of the form Steps to reproduce: 1. Install Studio 2. Toggle Studio and create a new app 3. Enter any app name and click on next 4. Give a name to the model and click on next 5. Enable Notes and click on CREATE YOUR APP 6. Close Studio 7. The notes field is squashed on the left side of the form Solution: Do not put the `x_studio_notes` field in a group
Original PR description
When we create a model with Studio with the option 'Notes' enabled, the notes field in the form view is squashed on the left side of the form Steps to reproduce: 1. Install Studio 2. Toggle Studio and create a new app 3. Enter any app name and click on next 4. Give a name to the model and click on next 5. Enable Notes and click on CREATE YOUR APP 6. Close Studio 7. The notes field is squashed on the left side of the form Solution: Do not put the `x_studio_notes` field in a group Problem: Putting the field in a group will try to render it in a column opw-3098985 Forward-Port-Of: odoo/enterprise#37209
Before this commit, the growth comparison column was missing in xlsx report. Steps: - go to balance sheet report - select comparison with 1 previous period - export to xlsx -> growth comparison column is missing opw-3232035 Forward-Port-Of: odoo/enterprise#38732
Original PR description
Before this commit, the growth comparison column was missing in xlsx report. Steps: - go to balance sheet report - select comparison with 1 previous period - export to xlsx -> growth comparison column is missing opw-3232035 Forward-Port-Of: odoo/enterprise#38732
Because of an access error for the field, the l10n_ke_mortgage field on the hr_employee model was causing some tests to fail. This fix removes that issue. Forward-Port-Of: odoo/enterprise#39120
Original PR description
Because of an access error for the field, the l10n_ke_mortgage field on the hr_employee model was causing some tests to fail. This fix removes that issue. Forward-Port-Of: odoo/enterprise#39120