Monday, August 5, 2024
11 changes · master
Enhancements to existing features
This update simplifies how translatable text is defined across several Odoo Enterprise screens and dialogs. It helps reduce duplicated code and makes future translation maintenance easier without changing the user experience.
Original PR description
To make it translatable, the content of some props was sometimes placed in the JavaScript code of the component to be wrapped in a call to gettext. With the introduction of the .translate modifier for props, this indirection by the JS code is no longer necessary. This commit converts the code to use .translate as much as possible. It is believed that avoiding indirection is better for code readability, and less prone to result in dead code. Community: https://github.com/odoo/odoo/pull/175378
The payroll accounting test flows now use the newer, human-readable URL format. This keeps automated checks aligned with the updated navigation style and helps maintain smoother validation of Belgian payroll processes.
Original PR description
This commit modifies existing URLs to the new format so that the URL's become more human readable. Community PR: https://github.com/odoo/odoo/pull/174304 Task-3820230
WhatsApp templates must now include a category before they can be saved or used. This aligns Odoo with WhatsApp API requirements and helps prevent template submission issues caused by missing category information.
Original PR description
Since whatsapp category is required by whatsapp API, we should modify the field definition and make it required. task-4080578
Miscellaneous changes
The global filter entries of the side panel were not keeping their "light" theme because we relied on the BS class `bg-white` which is adapted when using the dark mode. Task-4081249 Forward-Port-Of: odoo/enterprise#67537
Original PR description
The global filter entries of the side panel were not keeping their "light" theme because we relied on the BS class `bg-white` which is adapted when using the dark mode. Task-4081249 Forward-Port-Of: odoo/enterprise#67537
In TimerTimesheetGridRenderer, super.onWillStart was not awaited. We take the opportunity to factorize some code and parallelize some rpcs. Forward-Port-Of: odoo/enterprise#67918 Forward-Port-Of: odoo/enterprise#67864
Original PR description
In TimerTimesheetGridRenderer, super.onWillStart was not awaited. We take the opportunity to factorize some code and parallelize some rpcs. Forward-Port-Of: odoo/enterprise#67918 Forward-Port-Of: odoo/enterprise#67864
Before this commit, the subquery provided in _number_of_days_without_weekend() was executed multiple times in _select(), which was decreasing the performance by a lot. After this commit, we build a CTE to ensure that we only execute this subquery once and use its result every time it's needed. task-3902302 Forward-Port-Of: odoo/enterprise#67880
Original PR description
Before this commit, the subquery provided in _number_of_days_without_weekend() was executed multiple times in _select(), which was decreasing the performance by a lot. After this commit, we build a CTE to ensure that we only execute this subquery once and use its result every time it's needed. task-3902302 Forward-Port-Of: odoo/enterprise#67880
To reproduce: Activate Avatax (in Sandbox mode) Create an invoice to a partner from Colorado Put the 0F4000000 code on the Avatax Category of a product Create a line with this product Click on "Compute Taxes" => A tax named "Retail Delivery Fee [08] (29.0000 %)" is created The issue is that if you look on Avatax, it's supposed a fixed 0.29 tax. opw-4036105 Forward-Port-Of: odoo/enterprise#67882 Forward-Port-Of: odoo/enterprise#66973
Original PR description
To reproduce: Activate Avatax (in Sandbox mode) Create an invoice to a partner from Colorado Put the 0F4000000 code on the Avatax Category of a product Create a line with this product Click on "Compute Taxes" => A tax named "Retail Delivery Fee [08] (29.0000 %)" is created The issue is that if you look on Avatax, it's supposed a fixed 0.29 tax. opw-4036105 Forward-Port-Of: odoo/enterprise#67882 Forward-Port-Of: odoo/enterprise#66973
When creating an asset from sub company when both sub company and parent company are selected, the asset's depreciation moves have the parent company instead of the child one. Steps: - Have a parent company P and a child company C - With companies set to P + C, and company set to C - Create an asset and compute board - Click on "Posted Entries" smart button -> Entries have P as company instead of C opw-4059496 Forward-Port-Of: odoo/enterprise#67856 Forward-Port-Of: odoo/enterprise#67126
Original PR description
When creating an asset from sub company when both sub company and parent company are selected, the asset's depreciation moves have the parent company instead of the child one. Steps: - Have a parent company P and a child company C - With companies set to P + C, and company set to C - Create an asset and compute board - Click on "Posted Entries" smart button -> Entries have P as company instead of C opw-4059496 Forward-Port-Of: odoo/enterprise#67856 Forward-Port-Of: odoo/enterprise#67126
To reproduce: ============= - on Salary structure type "Worker" change its "Default Scheduled Pay" to another value than monthly (bi-weekly). - on the contract templates, create a new one for that structure and set hourly Wage = 10$ - onrecruitment applications, generate an offer with that template Check the link > It should show 800$ (which is 10$ an hour * 40 hours a week * 2 for the bi-wkeely frequency) but still mention it is the monthly Salary (which should be 1600$) Problem
Original PR description
To reproduce: ============= - on Salary structure type "Worker" change its "Default Scheduled Pay" to another value than monthly (bi-weekly). - on the contract templates, create a new one for that structure and set hourly Wage = 10$ - onrecruitment applications, generate an offer with that template Check the link > It should show 800$ (which is 10$ an hour * 40 hours a week * 2 for the bi-wkeely frequency) but still mention it is the monthly Salary (which should be 1600$) Problem: ======== - the salary displayed on the salary configurator doesn't take into account the frequency of the salary structure Solution: ========= - change the label to mention the frequency of the salary structure opw-3963698 Forward-Port-Of: odoo/enterprise#64105
The message to buy extra credits is escaped and instead of displaying the message with a link it displays the message with a html and a url, not very human user like. We have to unescape the < and > symbols so that the frontend can properly display the message Ticket [link](https://www.odoo.com/web#model=project.task&id=3864033) opw-3864033 Forward-Port-Of: odoo/enterprise#63364
Original PR description
The message to buy extra credits is escaped and instead of displaying the message with a link it displays the message with a html and a url, not very human user like. We have to unescape the < and > symbols so that the frontend can properly display the message Ticket [link](https://www.odoo.com/web#model=project.task&id=3864033) opw-3864033 Forward-Port-Of: odoo/enterprise#63364
When attempting to create a new template in WhatsApp, leaving the ``Category`` field empty results in an error. Steps to reproduce: - Install the ``WhatsApp`` module - Create a ``WhatsApp Business Account`` - Create a new template and leave the ``Category`` field empty - Click on ``Submit for Approval`` Traceback: ``AttributeError: 'bool' object has no attribute 'upper'`` This error occurs at [1] because ``template_type`` is not found in self. This commit will fix the above err
Original PR description
When attempting to create a new template in WhatsApp, leaving the ``Category`` field empty results in an error. Steps to reproduce: - Install the ``WhatsApp`` module - Create a ``WhatsApp Business Account`` - Create a new template and leave the ``Category`` field empty - Click on ``Submit for Approval`` Traceback: ``AttributeError: 'bool' object has no attribute 'upper'`` This error occurs at [1] because ``template_type`` is not found in self. This commit will fix the above error by raising an error if ``template_type`` is not found in self. [1]- https://github.com/odoo/enterprise/blob/d6e3dcc5a37c82a0c1bfc1267c4e088aedfe8632/whatsapp/models/whatsapp_template.py#L512 sentry-5642705166 Forward-Port-Of: odoo/enterprise#67768 Forward-Port-Of: odoo/enterprise#67359