Friday, October 11, 2024
11 changes · 18.0
Enhancements to existing features
This change makes the delete action in Planning’s Gantt popover easier to customize, enabling better handling of recurring planning entries. It supports a smoother user experience when deleting repeated shifts or slots, especially in planning workflows connected to sales.
Original PR description
As of now the gantt popover delete button is added through gantt-popover template which is making it harder to extend its functionality. In this PR we move the button to the ganttPopoverProps. We can pass the button through JS side, thus being to extend it's functionality of reccurence deletion. task-4224792
Resolved issues and error corrections
Paid point-of-sale orders can no longer be deleted before they have been synced to the backend. This helps prevent lost sales records and reduces the risk of discrepancies between the register and central system.
Original PR description
Before this commit it was possible to delete a paid order that wasn't yet synced to the backend. This commit adds a check to prevent this behavior. taskId: 4250522
This fixes an issue that prevented users from printing quotations when working with a Brazilian company. The Brazilian sales tax totals template now receives the needed quotation values correctly, avoiding the error during report generation.
Original PR description
Currently, you can't print quotations with a Brazilian company. ### Steps to reproduce * install `l10n_br_sales` * switch to a Brazilian company * attempt to print a quotation You should be met with…
Currently, you can't print quotations with a Brazilian company.
### Steps to reproduce
* install `l10n_br_sales`
* switch to a Brazilian company
* attempt to print a quotation
You should be met with the following traceback:
```
TypeError: 'NoneType' object is not subscriptable
Template: l10n_br_sales.document_tax_totals_brazil
Path: /t/tr[1]
Node: <tr t-if="\'cash_rounding_base_amount_currency\' in tax_totals"/>
```
### Cause
The `l10n_br_sales.document_tax_totals_brazil` currently overrides `sale.document_tax_totals` using the following code:
```xml
<xpath expr="//t[@t-call='sale.document_tax_totals']" position="replace">
<t t-call="l10n_br_sales.document_tax_totals_brazil"/>
</xpath>
```
However, there was a recent update (d0e7be7832672d476f1b289af52d3a425990d719) to the `sale.document_tax_totals` call, as shown below:
```diff
- <t t-set="tax_totals" t-value="doc.tax_totals"/>
- <t t-call="sale.document_tax_totals"/>
+ <t t-call="sale.document_tax_totals">
+ <t t-set="tax_totals" t-value="doc.tax_totals"/>
+ <t t-set="currency" t-value="doc.currency_id"/>
+ </t>
```
With this change, the override in `l10n_br_sales.document_tax_totals_brazil` will no longer have access to the `tax_totals` and `currency` values because they are now passed inside the `t-call` block of `sale.document_tax_totals`.
opw-4239563Kiosk ordering now stops gracefully when an order cannot be created, such as during an offline connection. Instead of showing a technical error, users see an appropriate message, improving the self-ordering experience.
Original PR description
Traceback is shown when making an order in kiosk because we try to proceed even if no order is created in the backend. In this fix, we return early in the `confirmOrder` procedure when no order is created (e.g. when offline). The following is shown instead of the traceback: 
This fixes a form validation issue where fields that were no longer required could remain marked as invalid after a related field was filled in. Users can now save records normally without entering and removing temporary values, improving reliability in forms such as approval rules.
Original PR description
Have a form view with two fields A and B, which are both required if the other one is unset: ```xml <form> <field name="A" required="not B"/> <field name="B" required="not A"/> </form> ``` Open a…
Have a form view with two fields A and B, which are both required if the other one is unset:
```xml
<form>
<field name="A" required="not B"/>
<field name="B" required="not A"/>
</form>
```
Open a form view and unset A and B. Try to save: both fields are marked as invalid (highlighted in red). Fill one of them and click out.
Before this commit, the other field was still marked as invalid. Worse: the save button was still disabled. One thus had to fake a value in that field, then remove it, to be able to save the record.
The issue occurred because when a field changed, we only removed that field from the list of invalid field. We didn't considerer other invalid fields (unset, but required) that could become valid with the change because they are no longer required. With this commit, we remove from the list of invalid fields those that were unset and required, but are no longer required now.
The issue could be reproduced in the `studio.approval.rule` form view with fields `approver_ids` and `approval_group_id`.
Followup of task~4122644
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-prThis fix restores invoice printing for Saudi companies after a recent internal tax calculation change caused an error. Businesses using Saudi e-invoicing can generate and print invoices again without hitting a traceback.
Original PR description
### Steps to reproduce * install `l10n_sa_edi` * switch to a Saudi company * create an invoice and attempt to print it You should be met with a traceback: ``` odoo.addons.base.models.ir_qweb.QWebException: Error while render the template KeyError: 'id' Template: l10n_gcc_invoice.arabic_english_invoice Path: /t/t/div/table/tbody/t[3]/tr/t[1]/td[2]/span Node: <span class="text-nowrap" t-field="line.l10n_gcc_invoice_tax_amount"/> ``` ### Cause The calculation of `l10n_gcc_invoice_tax_amount` relies on code that was recently refactored, and therefore doesn't work anymore opw-4243831
This fix ensures additional Ecuadorian companies can be created without running into journal access errors. It also sets up default withholding accounts automatically, reducing manual configuration and setup issues for new companies.
Original PR description
In v18 I installed the EC localization and the first EC company was created. I try to create the second EC company. Cannot create and I get the following error Solution Use `@template` annotation to create journals in l10n_ec_edi Additionally, we call the method `_l10n_ec_configure_default_withhold_accounts` in load() to set accounts by default 
This fix prevents an error when saving Ecuadorian vendor bills that include reimbursement lines. It helps accounting users complete reimbursement-related bills reliably without interruption.
Original PR description
- Replicate error in runbot v18: 1. Create a Vendor Bill with partner 'Instituto Ecuatoriano de Seguridad Social' 2. Add a reimbursement line with all the fields set up 3. Press the save button - Solution: Call the method _round_base_lines_tax_details before the _get_tax_totals_summary method to add the raw base amount in the base lines dictionary - Screenshot 18.0 runbot 
Creating an employee from a candidate with skills no longer triggers an error caused by duplicate skill records. This ensures recruiters can complete the candidate-to-employee conversion smoothly without manual workarounds.
Original PR description
Steps --- * Create a candidate * Give them a skill * *Create Employee* * => Traceback -> "Two levels for the same skill is not allowed" Cause --- * on `hr.employee.skill` we have a unique constraint on the skill employee pair * but when creating an employee we would attepmt to create the skills twice, once through regualr create and once from the override of `_update_employee_from_candidate` call in the write Fix --- Remove the `_update_employee_from_candidate` method, which seems unnecessary. task-4207776
Subscription invoice tracking has been cleaned up so the latest invoiced date is recalculated when invoices change, such as being reset or refunded. This helps keep subscription billing information accurate and reduces ambiguity in the underlying process.
Original PR description
In this commit we try to clean some ambiguity to improve the code readability.
The mobile web interface now avoids triggering native mobile app communication and related permission prompts unless the feature is actually used. This reduces unnecessary Bluetooth permission requests and prevents startup error noise in the mobile app, improving the first-use experience.
Original PR description
This commit adds a system to enable the loop communication with the native Odoo Mobile App only when the bus is actually used.