Thursday, July 18, 2024
22 changes · saas-17.1
Miscellaneous changes
`* = {'web', 'project', 'hr_timesheet', 'hr_holidays', 'hr_attendance', 'analytic'}` Before this Commit: The Graph view was not adaptable to the use of widgets, leading to issues with the representation of time. Specifically, hours were shown as float values in the graph view. For example, 5 hours and 30 minutes were displayed as 5.50 instead of the more intuitive hh:mm format. Although widgets like "float_time" or "timesheet_uom" were available to format these values, they were ineffe
Original PR description
`* = {'web', 'project', 'hr_timesheet', 'hr_holidays', 'hr_attendance', 'analytic'}` Before this Commit: The Graph view was not adaptable to the use of widgets, leading to issues with the…
`* = {'web', 'project', 'hr_timesheet', 'hr_holidays', 'hr_attendance',
'analytic'}`
Before this Commit:
The Graph view was not adaptable to the use of widgets, leading to issues with
the representation of time. Specifically, hours were shown as float values in
the graph view. For example, 5 hours and 30 minutes were displayed as 5.50
instead of the more intuitive hh:mm format. Although widgets like "float_time"
or "timesheet_uom" were available to format these values, they were ineffective
in the Graph view due to the architecture parser's limitations. This caused
confusion for users trying to interpret the time accurately.
After this Commit:
The Graph view is now adaptable to the use of widgets. This means that when a
widget is applied to format a field's value, the value will be displayed in the
specified format. For example, hours can now be shown in the hh:mm format
instead of as a float.
Widget `timesheet_uom` is used at places where the module is related/depended
on `hr_timesheet` otherwise `float_time`.
This improvement also ensures that the formatted values
are reflected in the Y-axis (Ticks/Intervals) of the Graph view, enhancing the
user's ability to interpret the data accurately.
Enterprise PR: https://github.com/odoo/enterprise/pull/66050
Task-3861721
Forward-Port-Of: odoo/odoo#164280[IMP] point_of_sale: load company fiscal_country in the client The `account_fiscal_country_id` is required in the client to trigger l10n_* specific behaviour. task-3801234 [IMP] point_of_sale: add hook in onDoRefund Allows to add extra behaviour when clicking on the "Refund" button (when refunding a previous order). task-3801234 https://github.com/odoo/enterprise/pull/64761 Forward-Port-Of: odoo/odoo#169597
Original PR description
[IMP] point_of_sale: load company fiscal_country in the client The `account_fiscal_country_id` is required in the client to trigger l10n_* specific behaviour. task-3801234 [IMP] point_of_sale: add hook in onDoRefund Allows to add extra behaviour when clicking on the "Refund" button (when refunding a previous order). task-3801234 https://github.com/odoo/enterprise/pull/64761 Forward-Port-Of: odoo/odoo#169597
Current behavior: In hr_expenses, list and kanban views have different buttons being shown: list view displays 'New', 'Scan' and 'Create Report', while kanban view displays only 'New' and 'Upload'. In mobile, list view shows only 'New', and kanban shows 'Scan' and 'New'. Expected behavior: 'Create Report' button should be displayed in both list and kanban view, in mobile or desktop. In mobile list view, 'Scan' should also be displayed. Cause of the issue: The static view for list includ
Original PR description
Current behavior: In hr_expenses, list and kanban views have different buttons being shown: list view displays 'New', 'Scan' and 'Create Report', while kanban view displays only 'New' and 'Upload'.…
Current behavior: In hr_expenses, list and kanban views have different buttons being shown: list view displays 'New', 'Scan' and 'Create Report', while kanban view displays only 'New' and 'Upload'. In mobile, list view shows only 'New', and kanban shows 'Scan' and 'New'. Expected behavior: 'Create Report' button should be displayed in both list and kanban view, in mobile or desktop. In mobile list view, 'Scan' should also be displayed. Cause of the issue: The static view for list includes only button 'Scan' with display utility classes that hide the button in mobile. Similarly for 'Create Report' button in list. In Kanban, the button 'Create Report' has not been added. Fix: In the list view, 'Upload' button was added for desktop view, and the classes of the 'Scan' button were changed to display it in mobile view. The display utility classes for 'Create Report' were removed, so the button is displayed in mobile. In kanban view, button 'Create Report' was added. The main div of web.KanbanView.Buttons is replaced to ensure that the mobile view buttons are also displayed correctly. Without replacing it, the buttons 'New' and 'Scan' do not match the height of 'Create Report'. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#172442 Forward-Port-Of: odoo/odoo#169396
Before this commit, translations in data modules were not taken into account as there were not extracted nor loaded. This commit adds the possibility to add a i18n folder that contains the translations for the imported module task-3734243 To-do in master: - Merge `get_po_paths` and `get_po_paths_env` - Add an argument `env` to `_load_module_terms` so that `_import_module` (in base_import_module) calls `_load_module_terms` directly. Forward-Port-Of: odoo/odoo#165449
Original PR description
Before this commit, translations in data modules were not taken into account as there were not extracted nor loaded. This commit adds the possibility to add a i18n folder that contains the translations for the imported module task-3734243 To-do in master: - Merge `get_po_paths` and `get_po_paths_env` - Add an argument `env` to `_load_module_terms` so that `_import_module` (in base_import_module) calls `_load_module_terms` directly. Forward-Port-Of: odoo/odoo#165449
To recreate the bug: 1- Create a loyalty program with a reward of $ per point and a fixed required amount. 2- Test the loyalty program and observe the rewards and points consumed. 3- We see that whenever we have an amount of points exceeding the required amount, they get consumed entirely, and the reward is calculated as total points * ($ per point). The problem here is that when using a loyalty reward with points, it is possible to give partial rewards. This commit prevents partial rewar
Original PR description
To recreate the bug: 1- Create a loyalty program with a reward of $ per point and a fixed required amount. 2- Test the loyalty program and observe the rewards and points consumed. 3- We see that whenever we have an amount of points exceeding the required amount, they get consumed entirely, and the reward is calculated as total points * ($ per point). The problem here is that when using a loyalty reward with points, it is possible to give partial rewards. This commit prevents partial rewards. Example: - Rule: Grant 1 point per product bought; - Reward: 1.5$ per point in exchange of 2 points (3$) Before this commit, if you buy 3 products, you get 4.5$ by using 3 points. After, you only use 2 points and get 3$ (no partial reward). opw-3922835 Forward-Port-Of: odoo/odoo#173354 Forward-Port-Of: odoo/odoo#170129
Purchase IRPF 19% Spanish tax has 2 target models: 111 and 123. New law requires a more specific breakdown. Now, the tax for 111 is relabeled as "Retenciones IRPF 19% (Compra consejero de persona física)" to be more accurate, and the new one for model 123 is named "Retenciones IRPF 19% (Compra consejero de sociedad)". Since Odoo doesn't implement model 123 yet, that new tax includes no repartition lines. See https://github.com/OCA/l10n-spain/issues/3520 for more context. ---
Original PR description
Purchase IRPF 19% Spanish tax has 2 target models: 111 and 123. New law requires a more specific breakdown. Now, the tax for 111 is relabeled as "Retenciones IRPF 19% (Compra consejero de persona física)" to be more accurate, and the new one for model 123 is named "Retenciones IRPF 19% (Compra consejero de sociedad)". Since Odoo doesn't implement model 123 yet, that new tax includes no repartition lines. See https://github.com/OCA/l10n-spain/issues/3520 for more context. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr @moduon MT-5767 Ticket link: https://www.odoo.com/web#model=project.task&id=3864840 opw-3864840 Forward-Port-Of: odoo/odoo#170293 Forward-Port-Of: odoo/odoo#161633
16.0 update changes the back-end design interpretation, leading to a width display issue with mailing_list_view_form_simplified. I remove some useless <group> tags in order to fix the width of the fields in the form task-4042993 Forward-Port-Of: odoo/odoo#173348
Original PR description
16.0 update changes the back-end design interpretation, leading to a width display issue with mailing_list_view_form_simplified. I remove some useless <group> tags in order to fix the width of the fields in the form task-4042993 Forward-Port-Of: odoo/odoo#173348
Current behavior: After settling the payment of an order, the order remains in the orders list Steps to reproduce: - Install "Point of Sale" and "Sales" apps - Start a shop session, select an order and proceed to the payment - Go back to the orders list and see the paid order still there Note: Forward the test of https://github.com/odoo/odoo/pull/171609 opw-4019204 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/
Original PR description
Current behavior: After settling the payment of an order, the order remains in the orders list Steps to reproduce: - Install "Point of Sale" and "Sales" apps - Start a shop session, select an order and proceed to the payment - Go back to the orders list and see the paid order still there Note: Forward the test of https://github.com/odoo/odoo/pull/171609 opw-4019204 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#173331 Forward-Port-Of: odoo/odoo#173103
Currently, invoices cannot be sent to TicketBAI if the invoice sequence does not end with `/<sequence_number>`. ### Steps to Reproduce * Install `l10n_es_edi_tbai`. * Ensure your invoice has a sequence that does not contain a `/`. * Attempt to send the invoice through TicketBAI. A traceback error occurs: `ValueError: not enough values to unpack (expected 2, got 1)` ### Cause When parsing invoice sequence numbers for TicketBAI, the system splits the sequence number by the rightm
Original PR description
Currently, invoices cannot be sent to TicketBAI if the invoice sequence does not end with `/<sequence_number>`. ### Steps to Reproduce * Install `l10n_es_edi_tbai`. * Ensure your invoice has a sequence that does not contain a `/`. * Attempt to send the invoice through TicketBAI. A traceback error occurs: `ValueError: not enough values to unpack (expected 2, got 1)` ### Cause When parsing invoice sequence numbers for TicketBAI, the system splits the sequence number by the rightmost `/`. This fails when the sequence number does not contain a `/`. opw-3959956 Forward-Port-Of: odoo/odoo#168654
Current behavior: --- On a mobile phone, using Chrome, when scanning a barcode that begins with the FNC1 character, ']C1' will be added to the final code. Expected behavior: --- ']C1' should be removed from the final code Steps to reproduce: --- 1. On a mobile phone, with chrome 2. Go to the barcode module 3. Scan a barcode starting with FNC1 4. Code will begin with ]C1 Cause of the issue: --- https://github.com/odoo/odoo/blob/321d16950ee9dcf4d722ecbfe0a49ca8f7d855a6/addons
Original PR description
Current behavior: --- On a mobile phone, using Chrome, when scanning a barcode that begins with the FNC1 character, ']C1' will be added to the final code. Expected behavior: --- ']C1' should be removed from the final code Steps to reproduce: --- 1. On a mobile phone, with chrome 2. Go to the barcode module 3. Scan a barcode starting with FNC1 4. Code will begin with ]C1 Cause of the issue: --- https://github.com/odoo/odoo/blob/321d16950ee9dcf4d722ecbfe0a49ca8f7d855a6/addons/web/static/lib/zxing-library/zxing-library.js#L6928 zxing-library is adding ']C1' to barcodes starting with a FNC1 character opw-3853913 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#163404
Steps to reproduce: - Add a product to your cart (not a service) - Try to pay with express checkout with payment_demo - Validation Error:No shipping method is selected. After this PR the first available shipping method will be assigned to the order when payment with demo express checkout. opw-4010925 Forward-Port-Of: odoo/odoo#171180
Original PR description
Steps to reproduce: - Add a product to your cart (not a service) - Try to pay with express checkout with payment_demo - Validation Error:No shipping method is selected. After this PR the first available shipping method will be assigned to the order when payment with demo express checkout. opw-4010925 Forward-Port-Of: odoo/odoo#171180
Before this commit: When you click `Send & Print` for an invoice with removing the attachments => It shows an error with a traceback `psycopg2.errors.SyntaxError: syntax error at or near ")" LINE 1: UPDATE ir_attachment SET res_id = NULL WHERE id IN ()` After this commit: `Send & Print` process works properly with removing attachments. opw-4047545 Forward-Port-Of: odoo/odoo#173371
Original PR description
Before this commit: When you click `Send & Print` for an invoice with removing the attachments => It shows an error with a traceback `psycopg2.errors.SyntaxError: syntax error at or near ")" LINE 1: UPDATE ir_attachment SET res_id = NULL WHERE id IN ()` After this commit: `Send & Print` process works properly with removing attachments. opw-4047545 Forward-Port-Of: odoo/odoo#173371
Before this commit, the absence of `fiscal_position_template_3` would result in an AttributeError, hindering the opening of the PoS. opw-4052324 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#173464
Original PR description
Before this commit, the absence of `fiscal_position_template_3` would result in an AttributeError, hindering the opening of the PoS. opw-4052324 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#173464
This fixes the syntax error on function _perform_analytic_distribution of the model AccountAnalyticAccount. opw-3907439 Description of the issue/feature this PR addresses and current behavior before PR: - The _perform_analytic_distribution function on model AccountAnalyticAccount has a syntax error causing a UnboundLocalError Desired behavior after PR is merged: - No UnboundLocalError --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr For
Original PR description
This fixes the syntax error on function _perform_analytic_distribution of the model AccountAnalyticAccount. opw-3907439 Description of the issue/feature this PR addresses and current behavior before PR: - The _perform_analytic_distribution function on model AccountAnalyticAccount has a syntax error causing a UnboundLocalError Desired behavior after PR is merged: - No UnboundLocalError --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#168582
This homogenizes the address format we send for each location and adds the terms and conditions and delivery date. This makes the customer invoice PDF that Avatax generates more complete and less confusing for users and their customers. task-3894745 Forward-Port-Of: odoo/enterprise#66868
Original PR description
This homogenizes the address format we send for each location and adds the terms and conditions and delivery date. This makes the customer invoice PDF that Avatax generates more complete and less confusing for users and their customers. task-3894745 Forward-Port-Of: odoo/enterprise#66868
Steps to reproduce ================== - Install account_accountant,l10n_fr_invoice_addr,web_studio,website_sale - Go to invoices - Open studio ``` enterprise/web_studio/models/ir_ui_view.py:103 in _postprocess_access_rights 100 │ │ │ for node in tree.xpath('//*[@groups]'): 101 │ │ │ │ node_groups[node] = node.get('groups') ❱ 103 │ │ │ │ if not self.user_has_groups(node.get('groups')): odoo/odoo/models.py:1550 in user_has_groups ❱ 1550 │ │ │ if
Original PR description
Steps to reproduce ================== - Install account_accountant,l10n_fr_invoice_addr,web_studio,website_sale - Go to invoices - Open studio ``` enterprise/web_studio/models/ir_ui_view.py:103 in…
Steps to reproduce
==================
- Install account_accountant,l10n_fr_invoice_addr,web_studio,website_sale
- Go to invoices
- Open studio
```
enterprise/web_studio/models/ir_ui_view.py:103 in _postprocess_access_rights
100 │ │ │ for node in tree.xpath('//*[@groups]'):
101 │ │ │ │ node_groups[node] = node.get('groups')
❱ 103 │ │ │ │ if not self.user_has_groups(node.get('groups')):
odoo/odoo/models.py:1550 in user_has_groups
❱ 1550 │ │ │ if group_ext_id[0] == '!':
1551 │ │ │ │ not_has_groups.append(group_ext_id[1:])
IndexError: string index out of range
```
Cause of the issue
==================
The l10n_fr_invoice_addr sets an [empty group] attribute on a node. When opening studio, user_has_groups is called with the groups attribute value. In this case, it's an empty string and it fails.
Solution
========
Since an empty group is [allowed] by the ORM, we simply check that the value is not empty before calling user_has_groups
---
[empty group]: https://github.com/odoo/odoo/blob/00a78373f87c84dfa8ffa97ca255cf01368cd423/addons/l10n_fr_invoice_addr/models/account_move.py#L17
[allowed]: https://github.com/odoo/odoo/blob/a913272136182e6f4b1e28337686dd14616ea0ca/odoo/addons/base/tests/test_views.py#L2791
opw-4046078
Forward-Port-Of: odoo/enterprise#66682
Forward-Port-Of: odoo/enterprise#66595`* = {'helpdesk', 'hr_payroll', 'planning', 'project_timesheet_forecast', 'project_timesheet_forecast_sale'}` Before this Commit: The Graph view was not adaptable to the use of widgets, leading to issues with the representation of time. Specifically, hours were shown as float values in the graph view. For example, 5 hours and 30 minutes were displayed as 5.50 instead of the more intuitive hh:mm format. Although widgets like "float_time" or "timesheet_uom" were available to format these
Original PR description
`* = {'helpdesk', 'hr_payroll', 'planning', 'project_timesheet_forecast', 'project_timesheet_forecast_sale'}` Before this Commit: The Graph view was not adaptable to the use of widgets, leading to…
`* = {'helpdesk', 'hr_payroll', 'planning', 'project_timesheet_forecast',
'project_timesheet_forecast_sale'}`
Before this Commit:
The Graph view was not adaptable to the use of widgets, leading to issues with
the representation of time. Specifically, hours were shown as float values in
the graph view. For example, 5 hours and 30 minutes were displayed as 5.50
instead of the more intuitive hh:mm format. Although widgets like "float_time"
or "timesheet_uom" were available to format these values, they were ineffective
in the Graph view due to the architecture parser's limitations. This caused
confusion for users trying to interpret the time accurately.
After this Commit:
The Graph view is now adaptable to the use of widgets. This means that when a widget is applied to format a field's value, the value will be displayed in the specified format. For example, hours can now be shown in the hh:mm format instead of as a float.
Widget `timesheet_uom` is used at places where the module is related/depended
on `hr_timesheet` otherwise `float_time`.
This improvement also ensures that the formatted values are reflected in the Y-axis (Ticks/Intervals) of the Graph view, enhancing the user's ability to interpret the data accurately.
Community PR: https://github.com/odoo/odoo/pull/164280
Task-3861721
Forward-Port-Of: odoo/enterprise#66050This PR adds a wizard in the POS to select a `l10n_pe_edi_refund_reason` when refunding an invoice/boleta (e.g. "Anulación de la operación", "Anulación de la operación"...). NB: according to PO feedback, it is not possible to refund several invoices/boletas at once (but it is possible to refund one invoice/boleta with multiple credit notes). task-3801234 https://github.com/odoo/odoo/pull/169597 Forward-Port-Of: odoo/enterprise#64761
Original PR description
This PR adds a wizard in the POS to select a `l10n_pe_edi_refund_reason` when refunding an invoice/boleta (e.g. "Anulación de la operación", "Anulación de la operación"...). NB: according to PO feedback, it is not possible to refund several invoices/boletas at once (but it is possible to refund one invoice/boleta with multiple credit notes). task-3801234 https://github.com/odoo/odoo/pull/169597 Forward-Port-Of: odoo/enterprise#64761
- Go to Dashboards > Configuration > Dashboards - Open the Human Resources section - Open the payroll dashboard - Open the Period filter configuration panel - the field matching period offset of pivot 3 and 4 are inverted. In the Data sheet, the column named "current" (pivot 3) is filtering on previous, and the one called "previous" (pivot 4) is not filtering on anything. Note that this fix is only active on new databases or if the dashboard is deleted then the module "spreadsheet_das
Original PR description
- Go to Dashboards > Configuration > Dashboards - Open the Human Resources section - Open the payroll dashboard - Open the Period filter configuration panel - the field matching period offset of pivot 3 and 4 are inverted. In the Data sheet, the column named "current" (pivot 3) is filtering on previous, and the one called "previous" (pivot 4) is not filtering on anything. Note that this fix is only active on new databases or if the dashboard is deleted then the module "spreadsheet_dashboard_hr_payroll" is updated. Task: 4056412 Forward-Port-Of: odoo/enterprise#66760
Necessary modules: hr_contract, hr_referral Steps to reproduce: - Employees > Employees > Contracts - Click header to sort by job position What happens: Job positions are not sorted by alphabetical order What was done: Make sure referral does not override the ordering rules of hr_job, so the alphabetical sorting is kept. opw-4037409 Forward-Port-Of: odoo/enterprise#66340
Original PR description
Necessary modules: hr_contract, hr_referral Steps to reproduce: - Employees > Employees > Contracts - Click header to sort by job position What happens: Job positions are not sorted by alphabetical order What was done: Make sure referral does not override the ordering rules of hr_job, so the alphabetical sorting is kept. opw-4037409 Forward-Port-Of: odoo/enterprise#66340
The current code is taking the residual amount instead of the statement line amount. When doing a reco model 'percentage_st_line' on 1000: Line 1 - 74% Line 2 - 24% Line 3 - 2% We get: 1000 * 0.74 = 740 (1000 - 740) * 0.24 = 62.4 (1000 - 740 - 62.4) * 0.02 = 3.95 Instead of: 1000 * 0.74 = 740 1000 * 0.24 = 240 1000 * 0.02 = 20 task_id: 3940370 Forward-Port-Of: odoo/enterprise#66366 Forward-Port-Of: odoo/enterprise#62884
Original PR description
The current code is taking the residual amount instead of the statement line amount. When doing a reco model 'percentage_st_line' on 1000: Line 1 - 74% Line 2 - 24% Line 3 - 2% We get: 1000 * 0.74 = 740 (1000 - 740) * 0.24 = 62.4 (1000 - 740 - 62.4) * 0.02 = 3.95 Instead of: 1000 * 0.74 = 740 1000 * 0.24 = 240 1000 * 0.02 = 20 task_id: 3940370 Forward-Port-Of: odoo/enterprise#66366 Forward-Port-Of: odoo/enterprise#62884
Before this commit, in about 8% of the time for some test tours, some edition of the report was triggered before the OdooEditor had a chance to start, so the concerned step failed. After this commit, there is no such race condition, as we add OdooEditor's specific class to the step selectors. runbot-error-29949 (and all linked error) Forward-Port-Of: odoo/enterprise#66815
Original PR description
Before this commit, in about 8% of the time for some test tours, some edition of the report was triggered before the OdooEditor had a chance to start, so the concerned step failed. After this commit, there is no such race condition, as we add OdooEditor's specific class to the step selectors. runbot-error-29949 (and all linked error) Forward-Port-Of: odoo/enterprise#66815