Daily updates from Odoo
Monday, August 19, 2024
7 changes · 17.0
Resolved issues and error corrections
This update fixes VAT tax report calculations and carryover handling for several SYSCOHADA country localizations. It improves reliability of tax reporting by correcting formulas, labels, and validation rules so carried-forward amounts are applied consistently.
Original PR description
[IMP] l10n_{bf,bj,cd,ci,cm,ga,km,ml,ne,sn,tg}: make report definition more consistent - Doing if_above using EUR as the currency made no sense in those countries. We instead use the domestic currency…
[IMP] l10n_{bf,bj,cd,ci,cm,ga,km,ml,ne,sn,tg}: make report definition more consistent
- Doing if_above using EUR as the currency made no sense in those countries. We instead use the domestic currency (the result is equivalent, since 0 EUR = 0 in any other currency ; it's just clearer)
- specifying rounding=2 on editable monetary value had no effect (on monetary values, the rounding is always made with the decimal places of the domestic currency), and was hence misleading.
----------------------------------------------------------
[IMP] account_reports: Enforce constraint on carryover target
We need to add constraints on the expression label and the carryover_target from account report so that we ensure that it is used correctly.
Currently, it may have happened that when we used the carryover mechanism, we were using the wrong label.
That could create some issues where the carryover would simply not work or partially.
----------------------------------------------------------
[FIX] l10n_bf: tax report: fix line name and formulas
- The report contained two lines numbered 26, while one of them had 27 in its code
- Line "Net VAT amount to pay"'s formula contained BF_OTHER_DEDUCTION twice
- Line "Credit VAT to report"'s formula contained BF_OTHER_DEDUCTION twice, and BF_CANCELLED (grid 25) was missing
We fix all those problems, and rewrite the formula of "Net VAT amount to pay" in order for it to better match the expression provided in the line name (for clarity).
-----------------------------------------------------------
[FIX] l10n_{bf, bj, cd, ci, cm, ga, km, ml, ne, sn, tg}: Fix Carryover for syscohada countries
For some syscohada countries some tax report where using carryover.
The carryover on the tax reports from these countries were not working.
The cause was one, the label of the expression used to target the applied carryover was not prefixed with _carryover_.
And two, is that it had no expression dedicated for carryover with label _applied_carryover and this was causing the report to miss the info tag on the line for the carryover.
task-4110461This fix ensures that when a manufacturing order creates a backorder, any available component quantities are automatically reserved according to the warehouse's reservation rules. Previously, backorders would not reserve available components, requiring manual intervention. This improves warehouse efficiency by automating the reservation process when components become available during production.
Original PR description
**Current behavior:** If a production spawns some backorder which has available component quants in a package, the backorder will not have that quantity reserved automatically. **Expected behavior:**…
**Current behavior:**
If a production spawns some backorder which has available
component quants in a package, the backorder will not have that
quantity reserved automatically.
**Expected behavior:**
This available quantity should be reserved by rule (based on the
manufacturing picking type's reservation configuration)
automatically.
**Steps to reproduce:**
1. Enable packages and 2-step manufacturing, use the default
`at_confirm` option for the manufacturing method's
`reservation_method`
2. Create an MO for 10 of some storable product that has 10 of
some storable product as a component -> confirm the MO
3. In the generated pick operation for the MO, assign the 10
units of the storable product to the move's quantity
4. In barcode, open the picking and manually add 1 of the
components -> put it in a pack
5. Repeat step 3 an additional time
6. Validate the picking -> create the backorder
7. Open the initial manufacturing order in barcode
8. Consume one of the created packaged quants of the component,
ensuring to also add the +1 quantity to the final product
barcode line
9. Validate the MO -> create the backorder
10. In the backend, open the backorder to see that there is 0
quantity reserved
**Cause of the issue:**
In this scenario, the backorder's raw move does not gain any
availability until after the original order is marked done,
after which there is never any logic for the reservation to
occur.
**Fix:**
During the backorder generation and the mark done for the
original order, attempt to assign any backorder productions at
the instant when some component quantity becomes available.
opw-3989977This fix resolves an error that occurred when users tried to autofill pivot table data to the right when columns were grouped by date. The issue was caused by incorrect handling of date calculations during the autofill operation. This ensures users can now properly extend pivot tables with date-grouped columns without encountering errors.
Original PR description
When auofilling towards the right the last colmn of a pivot whose column are grouped by date, we got a traceback. This was due to the fact that we were trying to use the measure string as argument of `increment_date`. Task: [4045799](https://www.odoo.com/web#id=4045799&cids=1&menu_id=4720&action=333&active_id=2328&model=project.task&view_type=form)
This fix corrects a bug in the appointment booking system where the capacity calculation was incorrectly set to zero, causing appointments to be automatically accepted instead of pending when they should require manual approval based on booking thresholds. The fix preserves the original capacity value while properly allocating resources, ensuring appointments are correctly marked as pending or accepted based on your configured threshold settings.
Original PR description
A coding mistake was added in d53aae967c5b44b2ca1ed716e90e065fbbe938d4 Indeed, for resource bookings, we decrease asked capacity to allocate the full reserved capacity to available resources. However, it is decreased directly. This means that event values have a 0 asked_capacity, leading in turns to an inexact use of _get_default_appointment_attendee_status, used to determine whether the status should be 'accepted' or 'needsAction' depending on the manual treshold percentage if set, asked capacity and existing bookings. Indeed, the asked_capacity will not be counted when computing the total reserved percentage. In practice, this means that events crossing the treshold will be automatically 'accepted' instead of 'needsAction' The fix creates another variable to avoid the issue and adds a test. Task-4084727
Fixed an issue where bank statement imports involving currency exchanges were not properly accounting for fees. The system now correctly reads and includes the full amount that incorporates all applicable exchange fees, ensuring accurate financial records.
Original PR description
Ensure that, when importing amounts involving currency exchanges, the system reads the amount that includes the fees. (New behavior confirmed with CHKL) opw-3999490 Forward-Port-Of: odoo/enterprise#68385 Forward-Port-Of: odoo/enterprise#67879
This update corrects how income accounts are handled in the Dutch localization module. A test was updated to properly account for changes made to the account type selection logic in the community version, ensuring the system no longer relies on simply selecting the first available income account.
Original PR description
Test needed to be adapted as it very naively took the first income account, and we change that in community. Forward-Port-Of: odoo/enterprise#68297 Forward-Port-Of: odoo/enterprise#67637
Miscellaneous changes
Currently the amount due of a move was always sent in an email for any type of move. The condition only checked if there was an `invoice_date_due` set. This field is set for any kind of move and default to the creation date of that move. However it only makes sense to show amounts due for invoices, bills, receipts and credit notes. Showing these for miscellaneous moves like the tax closing entry causes users to be confused. The amount displayed is the total amount of the move and not the amou
Original PR description
Currently the amount due of a move was always sent in an email for any type of move. The condition only checked if there was an `invoice_date_due` set. This field is set for any kind of move and default to the creation date of that move. However it only makes sense to show amounts due for invoices, bills, receipts and credit notes. Showing these for miscellaneous moves like the tax closing entry causes users to be confused. The amount displayed is the total amount of the move and not the amount to be paid to the authorities. This fix makes sure we only show the amount due in emails for the right move types in order not to confuse users. Task link: https://www.odoo.com/odoo/project/967/tasks/4042715 opw-4042715 Forward-Port-Of: odoo/odoo#174819