Wednesday, May 29, 2024
20 changes
9 changes
New functionality added to Odoo
Users trying the sample receipt flow in Expenses now see an animation that makes the feature feel clearer and more engaging. This improves the first-use experience by showing progress when a sample receipt is launched.
Original PR description
[ADD] hr_expense_extract: add sample receipt animation Add an animation when the user clicks on `Try Sample Receipt`. Task-id: 3946155
This adds a guided animation when users choose to try a sample receipt in Expenses. It helps users better understand the receipt scanning experience before using their own documents.
Enhancements to existing features
Users can now configure automated server actions to send WhatsApp messages, just like they already can for email and SMS. This makes it easier to automate customer communication using approved WhatsApp templates directly from business workflows.
Original PR description
PURPOSE: This commit enables the sending of WhatsApp messages from the server actions, similar to the existing functionalities for emails and SMS. SPECIFICATIONS: This commit adds support for creating server actions of the WhatsApp type. Users can now select `Send WhatsApp` as the action type and specify a WhatsApp template under `ACTION DETAILS` to send WhatsApp messages using Server Action. Task - 3510887
11 changes
Enhancements to existing features
This update significantly improves the speed of finding contacts by phone number in the VoIP system. Previously, searching for numbers starting with 0 was slow because the system had to scan through millions of records. The fix uses a smarter search approach that leverages existing database indexes, reducing search time from over 12 seconds to just 270 milliseconds—a 46x improvement.
Original PR description
The attendance planning view now shows each employee's schedule directly in the Gantt view, making it easier to understand expected working times. The creation form has also been simplified by showing fewer fields, helping users create attendance entries faster with less confusion.
This update makes it easier to tailor the action buttons shown in Gantt popovers, such as adding delete or custom workflow buttons. It also simplifies related customization code in Appointment and Project, helping teams adapt Gantt interactions with less development effort.
Original PR description
We make several changes in the gantt view in order to ease the customization of the gantt popover buttons: - a tag "footer" can be used inside the template "gantt-popover" to define buttons like it…
We make several changes in the gantt view in order to ease the customization of the gantt popover buttons:
- a tag "footer" can be used inside the template "gantt-popover" to define buttons like it is done in a form view arch:
```xml
<templates>
<div t-name="gantt-popover">
<footer>
<button name="unlink" type="object" string="Delete" icon="fa-trash" />
</footer>
</div>
</templates>
```
By default the buttons defined in the footer will be rendered after the generic buttons (e.g. the "Edit" button). An attribute "replace" can be set to true on the footer to make the generic buttons to be removed.
- buttons can also be used in the popover body itself like in a form view arch:
```xml
<templates>
<div t-name="gantt-popover">
<button name="unlink" type="object" string="Delete" icon="fa-trash" />
</div>
</templates>
```
- if js code is necessary, it is also easier to add new generic buttons via the new prop buttons of the gantt popover. This has been used to simplify the code of the gantt view extensions in appointment and project_enterprise.
Task ID: `3684499`
Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>Rental receipt transfers are now linked to their original delivery transfers, making it easier to manage repair orders for returned rental items. Users can select a rental return as the return transfer for a repair order, and eligible receipt transfers can start a repair order directly from the form.
Original PR description
Enable users to select a rental return transfer as a return transfer of a repair order. COM PR: odoo/odoo#162070 Task-3848611
Appointment-related products are now identified with a dedicated flag instead of a separate booking fee product type. This simplifies product setup and reduces technical complexity across appointments, sales, services, and reporting flows.
Original PR description
### [IMP] website_appointment_sale,*: remove booking_fees type Purpose of this commit to clean up product types. In this commit remove `booking_fees` and create `is_booking_fees` field to check this product is connected to appointment. ### [IMP] product: remove detailed_type field Purpose of this commit to remove `detailed_type` field references. task-3938213
The SODA mapping button is now part of the SODA module, so Belgian payroll accounting users can access it without installing CodaBox. Unmapped or missing account mappings now use the suspense account 499, reducing import issues and keeping entries easier to review.
Original PR description
Decoupled the button "Open SODA Mapping" from the module l10n_be_codabox and moved its view and functionality to the module l10n_be_soda. Moreover, the suspense account (499) is now used for accounts that are not mapped or whose mapping is not found. The button 'Open SODA Mapping" was only visible after installing CodaBox module. It should be visible if only SODA module was installed. task-3813212 Upgrade PR: https://github.com/odoo/upgrade/pull/6074
Attendance and payroll Gantt views now open on the most relevant current period instead of showing extra future periods. This makes planning screens less cluttered and better aligned with how these apps are used day to day.
Original PR description
Following the gantt view rework, you see directly 3 periods of time on your selection, 3 months, 3 days, 3 years, ... But, in attendance and payroll apps, there is no use of that. The current changes address this. In attendance, the start and stop dates are now set to today instead of having the start date as today and the stop date 2 days after. In payroll, the start date is now set to the start of the current month and the end date is now set to the end of the current month instead of having the start date as the start of the current month and the end date as the end of the month that comes after the current month by 2. task-3950880
## Description When calling `get_contact_info` searching with a number that starts with `0` will try to do a pattern match with an `=like` + prefix `%`. The problem is that there is only a `btree`…
## Description When calling `get_contact_info` searching with a number that starts with `0` will try to do a pattern match with an `=like` + prefix `%`. The problem is that there is only a `btree` index defined to support the searching that happens via `phone_mobile_search`, but a `btree` index cannot be used with pattern matching `%`/`_` at the *beginning* of the search term. Therefor Postgres will do a `Seq.Scan`, since it's the only criteria there is for this domain. ## Solution To support pattern searching starting with a wildcard, it's required that there is a defined `gin` index with the proper expression (`regexp_replace` support). Since this is the only instance where such searching is needed, adding a whole index for it is overkill. An alternative solution is to do exact matches for all possible country code we have. This is a *sane* operation, as the number of countries is small and fixed. We avoid the `Seq.Scan` by hitting the defined `btree` index. Sadly the `phone_mobile_search` field doesn't implement the `in/not in` operator, so we are forced to use `OR` for each domain leaf, as implementing the `in/not in` ops on the search field is not feasible in a small diff for a stable patch. The where clause from the generated query from the domain will be a disjunction of a bunch of `OR FALSE` or `OR res_partner.id IN (<ids>)`. Thankfully, this is an SQL structure that Postgres can optimize out (removing the redundant `OR FALSE` clauses), reducing the query to a simple `id IN (...)`, which will hit the Pkey index. The only regression is the number of queries executed to resolve the domain of the search field, which +1 query count for each OR leaf of the domain. (would be avoided if the search field implemented the `in` ops). ## Benchmark On a staging database with over 5M `res.partner`, the time taken for the resolution of the searchable field `phone_mobile_search` takes: | | Before | After | |---------|---------|--------| | Timings | 12.43 s | 270 ms | ## Reference task-3942852
This update modifies the 5% VAT tax codes and reporting lines for Ecuador's localization module to comply with May 2024 tax regulations. The changes update tax code references for both goods sales and purchases, and add new standardized report lines for local transactions subject to the 5% VAT rate. This ensures accurate tax reporting and compliance with current Ecuadorian tax requirements.
Original PR description
Update tax codes: - IVA 5% (411, Bienes) -> _IVA 5% (435, Bienes) (code_base: 435, code_applied: 445)_ - IVA 5% (510, Crédito IVA) -> _IVA 5% (550, Crédito IVA) (code_base: 550, code_applied: 560)_ Create Report lines: - _Ventas locales (excluye activos fijos) gravadas tarifa 5%_ - _Adquisiciones y pagos locales (excluye activos fijos) gravados con tarifa 5% (con derecho a crédito tributario)_
This update improves the tax system for Turkish users by adding new accounts, restructuring tax categories and groups, and creating a new tax report. These changes enhance the user experience and make tax management more efficient for businesses operating in Turkey.
Original PR description
[IMP] l10n_tr: improve turkey's tax structure - Adding new accounts. - Adding entirly new taxes - Restructure the tax and tax group - Create new tax report Reason: Enhance the user-experience in turkey Task-3924220 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Resolved issues and error corrections
This fix resolves an issue where scanning a different destination location in batch picking operations would only update the last picked item instead of all items with the same product. Now when a new destination is scanned, all related items in the batch are properly synchronized to the new location, ensuring consistent and predictable barcode scanning behavior.
Original PR description
**Current behavior:** If we have a picking batch with some pickings all for the same product, while enforcing mandatory scans on source location, products, and destination location, there is some…
**Current behavior:**
If we have a picking batch with some pickings all for the same product, while enforcing mandatory scans on source location, products, and destination location, there is some unexpected behavior if a different destination barcode is scanned after the similar-product pickings have all been scanned.
**Expected behavior:**
With this specific configuration, pickings with the same product should all be changed when a different destination is scanned.
**Steps to reproduce:**
1. In the Internal Transfers picking type, configure the barcode settings like so:
`Source Location: Mandatory Scan`
`Product: True`
`Destination Location: After each product`
2. Create some new internal location (e.g., .../Stock/shelf)
3. Create a new batch picking with 2 internal transfer pickings for the same product
4. Go to the batch operation barcode menu, select the created batch picking
5. Scan the source location, scan the first product code and then manually add the second picking quantity with the add quantity button, scan the newly created internal location
6. Observe that the last picking destination location has changed and the first has not- furthermore trying to change the second's destination location via scan does not work (manual changes via the edit button/form still possible)
**Cause of the issue:**
The method of changing destination does not account for this setup, so there is no specific handling for it. Only the selected line will be modified by a new destination scan.
**Fix:**
Extract the line modification code into a new function and override it in the batch_picking module to change the entire current batch of lines that have been scanned (that all have the same product).
opw-3733870This fix ensures that the subscription modal dialog and its trigger button are always displayed together using the same visibility conditions. Previously, there was a mismatch that could cause the button to appear without the corresponding modal, creating a broken user experience. This fix prevents users from clicking a button that doesn't open anything.
Original PR description
Use the same condition for the modal and button to ensure both are always rendered at the same time and the button cannot be rendered if the modal is not.
This update corrects when the global filter option appears in spreadsheet context menus. Previously, the option was showing up for all pivot formulas, but it should only appear for header-level pivot formulas. This fix ensures users see the global filter option only when it's actually applicable to their spreadsheet data.
Original PR description
The context menu (and clickable cell) `use_global_filter` should take the value of the underlying pivot formula, and apply it to the matching global filters. This works, but was supposed to work only for `ODOO.PIVOT.HEADER` formulas, and not simple `ODOO.PIVOT` formulas. This commit fixes the visibility of the `use_global_filter` option in the context menu, so that it is only visible for `ODOO.PIVOT.HEADER`. Also removed/changed tests that were testing that the menu was visible for positional `ODOO.PIVOT` formulas. Task: [3714696](https://www.odoo.com/odoo/2328/tasks/3714696?cids=1)
This fix resolves an error that occurred when users clicked on the contracts button in job applications that had multiple contracts (one active and one archived). The system was trying to process multiple contracts at once instead of handling them individually, causing the application to crash. Now users can safely view and manage contracts without encountering errors.
Original PR description
When user clicks on contracts smart button in application and if application has two contracts (one archived and one active), a traceback will appear. Steps to reproduce the error: - Install…
When user clicks on contracts smart button in application and if application has
two contracts (one archived and one active), a traceback will appear.
Steps to reproduce the error:
- Install "hr_contract_salary" module
- Go to Recruitment > Applications > All Applications > Create new application >
Generate Offer > Select Contract Template > Send By Email > Send
- Click on Offers > Salary Configurator > Fill all required fields >
Review Contract & Sign > Validate & Send Completed Document
- Open that application > Contracts > Create new contract > Save
- Archived one contract > Click on Contract smart button
Traceback:
```
ValueError: Expected singleton: hr.contract(27, 29)
File "odoo/http.py", line 2253, in __call__
response = request._serve_db()
File "odoo/http.py", line 1829, in _serve_db
return self._transactioning(_serve_ir_http, readonly=ro)
File "odoo/http.py", line 1849, in _transactioning
return service_model.retrying(func, env=self.env)
File "odoo/service/model.py", line 134, in retrying
result = func()
File "odoo/http.py", line 1827, in _serve_ir_http
return self._serve_ir_http(rule, args)
File "odoo/http.py", line 1834, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 2059, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "odoo/addons/base/models/ir_http.py", line 220, in _dispatch
result = endpoint(**request.params)
File "odoo/http.py", line 740, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "addons/web/controllers/dataset.py", line 42, in call_button
action = self._call_kw(model, method, args, kwargs)
File "addons/web/controllers/dataset.py", line 34, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "odoo/api.py", line 458, in call_kw
result = getattr(recs, name)(*args, **kwargs)
File "home/odoo/src/enterprise/saas-17.2/hr_contract_salary/models/hr_applicant.py", line 59, in action_show_proposed_contracts
"res_id": self.env['hr.contract'].search([["applicant_id", "=", self.id], '|', ["active", "=", False], ["active", "=", True]]).id,
File "odoo/fields.py", line 5182, in __get__
raise ValueError("Expected singleton: %s" % record)
```
https://github.com/odoo/enterprise/blob/504b3c66a9a8d142b89f9c873675ec65fdb43dd0/hr_contract_salary/models/hr_applicant.py#L59
Here when application has two contracts (one is archived and one is active),
So when it tries to access the id of 2 records.
It will lead to the above traceback.
sentry-5350130147
Forward-Port-Of: odoo/enterprise#62627This fix resolves an incorrect tax validation warning that appeared when generating the Ecuadorian ATS (Anexo Transaccional Simplificado) tax report for invoices with section lines and product taxes. Previously, users would see a misleading "Invoice lines should have exactly one VAT tax" error even though the ATS file would still download successfully. The fix ensures proper tax handling for these invoice configurations.
Original PR description
Create an Invoice for an EC customer hading a section line and a tax on the product line Confirm the invoice Add Withholding move Go to Accounting>Reporting>Tax report Generate ATS Warning will be shown "Invoice lines should have exactly one VAT tax." ATS file will download anyway opw-3896076 Forward-Port-Of: odoo/enterprise#63363
This update fixes a crash that occurred in spreadsheets when users simultaneously deleted a list and updated its filter criteria. The fix adds missing technical logic to properly handle these concurrent operations, ensuring spreadsheets remain stable during collaborative editing.
Original PR description
Before this commit, deleting a list and updating its domain concurrently would lead to a crash. This was due to the fact that the transformation of `UPDATE_ODOO_LIST_DOMAIN` was missing. This commit adds the missing transformation. This commit also fix a test that checked the number of pivots instead of the number of lists. Task: 3908657 Forward-Port-Of: odoo/enterprise#63332 Forward-Port-Of: odoo/enterprise#63246
This fix corrects how the bank reconciliation widget collects financial data to properly recognize when a user has access to multiple companies. Previously, the system only checked the current company context, which could cause issues for users managing accounts across different company entities. The fix ensures the system correctly identifies the appropriate company associated with each journal and returns properly formatted data.
Original PR description
The aim of this commit is checking that the function `collect_global_info_data` properly checks if one of the user's companies is the one on the journal and not necessarily the one from the current company (`self.env.company`). In the mean time, we're now returning an empty string instead of a False for the balance_amount's value in the returned dict because we have a props validation on this field. no task id
This fix corrects an error in the payment registration wizard that occurred when processing multiple bills together where some qualified for early payment discounts and others did not. Previously, the payment amount and difference were calculated incorrectly in these scenarios. Now the amounts are calculated correctly, ensuring accurate payment processing for grouped bills with mixed discount eligibility.
Original PR description
Description of the issue/feature this PR addresses: If the user has two invoices/bills selected where one falls within the parameters of a discounted payment and the other does not, the calculated…
Description of the issue/feature this PR addresses: If the user has two invoices/bills selected where one falls within the parameters of a discounted payment and the other does not, the calculated payment total and payment difference will be wrong. Current behavior before PR: If I have two Bills, both for $25.00 where one falls within the parameters of a discount for 2% in 10 Days and the other doesn't, and I select both of them and click register payment, and the select "Group Payments" (group_payment), the "Amount" (amount) will be $0.50 and the Payment Difference (payment_difference) will be $49.50. Desired behavior after PR is merged: In the same scenario, I would expect the "Amount" to be $49.50 and the "Payment Difference" to be $0.50 To Reproduce: - Create Payment Term "2% 10, Net 30" this payment term should be configured to have a discount of 2% if paid in the first 10 days, and then 100% of the bill is due in 30 Days. - Create two Purchase Orders (doesn't matter which products you purchase), receive products, and create bills. Make sure one has the new payment term you created and its bill date puts it within the discount parameters. The other bill should either have a different payment term that doesn't have a discount or the same term but not be within the parameters to have the discount apply (bill is older than 10 days in this case) - Go to Accounting --> Vendors --> Bills and select both of these new bills and click "Register Payment" - In the wizard, click "Group Payments" and you will see the amount and payment difference are incorrect. **This process can also be done with sale orders instead, you will get the same result with two invoices for customers. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr