Monday, March 18, 2024
15 changes · master
Enhancements to existing features
This update standardizes the wording from “canceled” to “cancelled” across Helpdesk, Field Service, timesheet-related Helpdesk sales views, and Sales Planning. It improves consistency in customer-facing labels and messages without changing functionality.
Original PR description
*=helpdesk_fsm,helpdesk_sale_timesheet This PR renames the remaining occurrences of "canceled" to "cancelled". Task-3713873
The product catalog has been adjusted so it can better support more complex business flows, such as adding catalog items into different sections that share the same parent or base record. This makes it easier for future Odoo features and customizations to reuse the catalog in manufacturing, field service, and sales-related scenarios without duplicating logic.
Original PR description
- Take arguments passed into product catalog related rpc calls into a separate function to make them patchable. - Add kwargs to product catalog mixin methods in order to allow more versatility with passing arguments Use cases: - Adding product catalog to sections having same parent (e.g. components and byproducts inside mrp.bom) - Adding product catalog to sections having same base model (e.g. components and byproducts inside mrp.production are both stock.move) - etc In such cases it is convenient to pass an extra arguments referring to child model or parent model to handle differences on the backend. Task: 3640422
Chilean and Dutch accounting reports were updated to keep working after underlying account fields were changed from stored values to calculated values. This helps maintain accurate reporting while also standardizing related accounting query handling to avoid formatting issues.
Original PR description
The fields `include_initial_balance` and `internal_group` are not stored anymore.
Resolved issues and error corrections
The project sharing list now hides the customer/partner column when it does not apply to the project type. This reduces confusion for users viewing shared field service projects by only showing relevant information.
Original PR description
Before this commit, the `hide_partner` context was passed by the python method returning the main action for project sharing feature to be able to hide the `partner_id` column in the main view when the project is not billable and nor fsm one. This commit overrides the list view to add that condition in `column_invisible` attribute of `partner_id` field. task-3615844
Miscellaneous changes
Replace outdated realpath usage with odoo tools.file_open. Allows file_open to locate file from addons path rather than looking up through realpath. This will resolve potential issues with realpath not finding the proper path of files in certain situations (like a symlink). Worth noting that file_open uses abspath instead of realpath anyway. Forward-Port-Of: odoo/enterprise#58766 Forward-Port-Of: odoo/enterprise#58305
Original PR description
Replace outdated realpath usage with odoo tools.file_open. Allows file_open to locate file from addons path rather than looking up through realpath. This will resolve potential issues with realpath not finding the proper path of files in certain situations (like a symlink). Worth noting that file_open uses abspath instead of realpath anyway. Forward-Port-Of: odoo/enterprise#58766 Forward-Port-Of: odoo/enterprise#58305
The preparation display tests were reorganized so each screen only loads the test files it actually needs. This prevents unnecessary dependencies from causing errors and helps keep point of sale and preparation display checks stable.
Original PR description
The `pos_preparation_display` launches tours both in the `point_of_sale` and in `pos_preparation_display` interfaces. Previously, it was importing all the tours files from pos, which is not needed and which lead to erros. For example if one of the tours in pos has a dependency in a different folder, than the preparation display would have to bring this dependency too. The solution is to split the test files in the `pos_preparation_display` module into `point_of_sale` and `pos_preparation_display` folders.
Issue ---- This commit fixes an argument passed in the wrong format, resulting in isFlexibleHours always returning False. isFlexibleHours is expecting a resource's id as an argument in order to find whether the resource's working calendar is flexible or not. However, the argument passed to the function was not the resource id, but the resource itself. As the `!!` operator was used in the function, the returning value was always False (!!undefiend == False) This commit fixes this by passi
Original PR description
Issue ---- This commit fixes an argument passed in the wrong format, resulting in isFlexibleHours always returning False. isFlexibleHours is expecting a resource's id as an argument in order to find whether the resource's working calendar is flexible or not. However, the argument passed to the function was not the resource id, but the resource itself. As the `!!` operator was used in the function, the returning value was always False (!!undefiend == False) This commit fixes this by passing the id instead of the object. related Task: 3762895 Forward-Port-Of: odoo/enterprise#58750
Steps to reproduce: - - Go to Field Service app and create a new task. - Use the smart button to access the catalog and add a product. - Go back to the task and use the smart button to access the SO. - Set the unit price of the added product to zero. - Create the associated invoice. **You are allowed to create the invoice and aline will be displayed for the SOL corresponding to the products with a unit price of zero.** Notes: This is the expected behavior for invoices generated from
Original PR description
Steps to reproduce: - - Go to Field Service app and create a new task. - Use the smart button to access the catalog and add a product. - Go back to the task and use the smart button to access the SO.…
Steps to reproduce: - - Go to Field Service app and create a new task. - Use the smart button to access the catalog and add a product. - Go back to the task and use the smart button to access the SO. - Set the unit price of the added product to zero. - Create the associated invoice. **You are allowed to create the invoice and aline will be displayed for the SOL corresponding to the products with a unit price of zero.** Notes: This is the expected behavior for invoices generated from regular SO. However, AJU the PO of the Field Service application decided to change this behavior for invoices generated from SO coming from field services see task 3266856 and commit 849241e (the SOL invoice status should be 'no'). Cause of the Issue: - When you create an invoice from a sale order, the `invoiceable_lines` are computed at this point: https://github.com/odoo/odoo/blob/96a06df867fcef1fd24a1798bd5d6decc423933b/addons/sale/models/sale_order.py#L1251-L1258 by the `_get_invoiceable_lines` method. As one can see in this method: https://github.com/odoo/odoo/blob/96a06df867fcef1fd24a1798bd5d6decc423933b/addons/sale/models/sale_order.py#L1220 if the `qty_to_invoice` of SOL is positive, the SOL will therefore appear in the `invoiceable_lines` and the associated invoice line will be created a few lines below to appear on the invoice: https://github.com/odoo/odoo/blob/96a06df867fcef1fd24a1798bd5d6decc423933b/addons/sale/models/sale_order.py#L1276-L1279 Fix: - In order for the SOL to not generate an`invoiceable_line` we set the `qty_to_invoice` to zero when the SOL comes from a field service task and display a product with a unit price of zero. Notes: To keep the flow coherent between the `qty_to_invoice` and the `invoice_status` of SOL for field services SO and since `price_unit` is a float that should not be compared using an `==` we also changed the float comparaison of the `_compute_invoice_status` method introduced in the commit 849241e. opw-3776475 --- Forward-Port-Of: odoo/enterprise#58609 Forward-Port-Of: odoo/enterprise#58057
Steps to Reproduce: - install helpdesk module - under configuration, click on helpdesk teams - In helpdesk teams form view enable automatic assignment Issue: - under automatic assignment, the 'team members' label is misaligned Cause: - in member_ids field class contains overflow-hidden, because of that it is misaligned Solution: - if we remove that overflow-hidden, the issue is solved. task-3683976 Forward-Port-Of: odoo/enterprise#54399
Original PR description
Steps to Reproduce: - install helpdesk module - under configuration, click on helpdesk teams - In helpdesk teams form view enable automatic assignment Issue: - under automatic assignment, the 'team members' label is misaligned Cause: - in member_ids field class contains overflow-hidden, because of that it is misaligned Solution: - if we remove that overflow-hidden, the issue is solved. task-3683976 Forward-Port-Of: odoo/enterprise#54399
Before this commit, when a salesperson canceled a renewal quotation, and reset it to draft, the subscription_state '2_renewal' was lost. It would affect the sale_order_log upon confirmation of that renewal and the sale.order.log would not be correct. In that case, there would be a missign transfer log. taskid: 3651477 Forward-Port-Of: odoo/enterprise#58490
Original PR description
Before this commit, when a salesperson canceled a renewal quotation, and reset it to draft, the subscription_state '2_renewal' was lost. It would affect the sale_order_log upon confirmation of that renewal and the sale.order.log would not be correct. In that case, there would be a missign transfer log. taskid: 3651477 Forward-Port-Of: odoo/enterprise#58490
Steps to reproduce: - Create a child company/branch - Create a child Bank Journal for the Child Company - Set on demo use the default company as the child company - Connect with demo - In the Accounting Dashboard try to open the Child Bank Issue: Access Error opw-3746324 Forward-Port-Of: odoo/enterprise#57145
Original PR description
Steps to reproduce: - Create a child company/branch - Create a child Bank Journal for the Child Company - Set on demo use the default company as the child company - Connect with demo - In the Accounting Dashboard try to open the Child Bank Issue: Access Error opw-3746324 Forward-Port-Of: odoo/enterprise#57145
Forward-Port-Of: odoo/enterprise#58592
Original PR description
Forward-Port-Of: odoo/enterprise#58592
Steps to reproduce: ------------------- - being in Europe/Brussel timezone; - create a contract based on attendance from 1st to 31st January; - create two attendancescfot the employee linked to this contract: - 5th January from 8am to 4pm for example (A) - 31st January from 00:30am to 8:30pm (B) - create a payslip for the employee from 1st to 30th January; Issue: ------ The attendance count on the smart button on the payslip and the number of records on the list view (when th
Original PR description
Steps to reproduce: ------------------- - being in Europe/Brussel timezone; - create a contract based on attendance from 1st to 31st January; - create two attendancescfot the employee linked to this…
Steps to reproduce:
-------------------
- being in Europe/Brussel timezone;
- create a contract based on attendance from 1st to 31st January;
- create two attendancescfot the employee linked to this contract:
- 5th January from 8am to 4pm for example (A)
- 31st January from 00:30am to 8:30pm (B)
- create a payslip for the employee from 1st to 30th January;
Issue:
------
The attendance count on the smart button on the payslip and the number of records on the list view (when the smart button is clicked) are not the same.
Cause:
------
The domain that determines attendance uses a condition on the `check_in` field, which is a datetime field, and compares it with a date. For attendance B, we will compare 2024-30-01 23:30:00 with 2024-30-01 23:59:59.
As a result, attendance B will validate this condition.
Solution:
---------
Make this information consistent by using the same logic and taking account of timezones.
Add a method that allows you to retrieve all attendances linked to a payslip. Use this to generate the domain that will select the correct records (based on their id) in the list view.
Note:
-----
`_read_group` manages timezones and therefore
`check_in:day` for attendance B returns 2024-31-01.
opw-3794161
Forward-Port-Of: odoo/enterprise#58587
Forward-Port-Of: odoo/enterprise#58431`discount` field on `sale.order.line` model is configured in sale_subscription to be recomputed when the order `subscription_state` is modified. Therefore, updates to that field should be avoided unless necessary. Nevertheless, in the override of `action_confirm`, the subscription state was always updated to False for non subscription orders, leading to an unexpected recomputation of discounts. opw-3740645 See also: https://github.com/odoo/odoo/pull/157699 Forward-Port-Of: odoo/ent
Original PR description
`discount` field on `sale.order.line` model is configured in sale_subscription to be recomputed when the order `subscription_state` is modified. Therefore, updates to that field should be avoided unless necessary. Nevertheless, in the override of `action_confirm`, the subscription state was always updated to False for non subscription orders, leading to an unexpected recomputation of discounts. opw-3740645 See also: https://github.com/odoo/odoo/pull/157699 Forward-Port-Of: odoo/enterprise#58673
Steps to reproduce: - Install l10n_hk_hr_payroll Current behaviour: - Time off type name contain year value Expected behaviour: - Time off type name should not contain year value Explanation: - Year changed will not update the time off type name, therefore better to not include the year value inside the name X-original-commit: 224aa76 Forward-Port-Of: odoo/enterprise#58717
Original PR description
Steps to reproduce: - Install l10n_hk_hr_payroll Current behaviour: - Time off type name contain year value Expected behaviour: - Time off type name should not contain year value Explanation: - Year changed will not update the time off type name, therefore better to not include the year value inside the name X-original-commit: 224aa76 Forward-Port-Of: odoo/enterprise#58717