Wednesday, May 14, 2025
8 changes · 17.0
Resolved issues and error corrections
Fixed an issue where Point of Sale invoices created from settled sales orders always dropped payment terms. Payment terms are now kept unless they include an early payment discount, helping related accounting and localization processes work correctly.
Original PR description
When you settle a sale order that has a payment term, it was always ignored in the PoS. But it should only be ignored when the payment term has an early discount. Steps to reproduce: ------------------- * Create a sale order with a payment term that has no early discount * Go to the PoS and settle the sale order * Invoice and validate the order > Observation: In the backend, the sale order has the payment term applied on the invoice Why the fix: ------------ Some modules needs the invoice to have payment terms set (l10n_mx for example). But the PoS invoice was always ignoring it. We should only ignore it if the payment terms has an early discount. opw-4670234
This fixes an accounting issue where delayed Point of Sale deliveries with backorders could record the same cost of goods sold twice. Costs are now created only for the items actually delivered, helping keep margins and accounting entries accurate.
Original PR description
When using shiplater in PoS and creating a backorder from the original picking, the COGS would be duplicated when validating the backorder. Steps to reproduce: ------------------- * Create 2…
When using shiplater in PoS and creating a backorder from the original picking, the COGS would be duplicated when validating the backorder. Steps to reproduce: ------------------- * Create 2 products, one with a cost of 20 and one with a cost of 0 * Create a PoS order with 2 lines, one for each product * Validate the order using the shiplater option * Close the session and go to the picking created * Validate the delivery only for the product with a cost of 20 and make a backorder for the product with a cost of 0 * Go to the session accounting entries and check the COGS entries, you should see one entry for the product we just processed * Validate the backorder > Observation: A second COGS entry is created for the product with a cost of 20 Why the fix: ------------ Instead of creating the COGS entries based on the PoS order lines, we now create them based on the stock move lines. This way, we only create the COGS entries for the stock move lines that are actually processed. We also avoid creating COGS entries for the stock move lines that have no cost. opw-4597430
This fix stops backorders for make-to-order products from creating extra procurement demand after a partial delivery. It prevents purchase orders from being incorrectly increased, helping keep purchasing quantities aligned with actual customer orders.
Original PR description
### Steps to reproduce: - In the settings enable Multi-Step routes - Unarchive the MTO route - Create a storable product using the MTO and buy route - Create and confirm a sale order for 100 units of that product - Validate the delivery for only 30 units and backorder the rest #### > The purchase order demand was updated to 170 units ### Cause of the issue: Processing the backorder wizard will create and confirm moves for the backorder picking: https://github.com/odoo/odoo/blob/a71c0c7d1c3391beb1bf2939ae076a804a627dbd/addons/stock/models/stock_move.py#L1916-L1919 However, as these moves are `make_to_order` they are planned to create and run procurements in their respective `_action_confirm`'s: https://github.com/odoo/odoo/blob/a71c0c7d1c3391beb1bf2939ae076a804a627dbd/addons/stock/models/stock_move.py#L1379-L1388 opw-4633920 opw-4713650 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Italian e-invoicing now classifies TD05 documents more accurately in purchase and sales flows. Uploaded TD05 purchase documents are treated as vendor bills, and customer debit notes are assigned the TD05 type, helping accounting teams avoid incorrect document categorization.
Original PR description
Description of the issue/feature this PR addresses: - This PR changes the TD05 to be considered a Vendor Bill instead of a Vendor Credit Note, when uploading document in Purchase journal in Italy's…
Description of the issue/feature this PR addresses: - This PR changes the TD05 to be considered a Vendor Bill instead of a Vendor Credit Note, when uploading document in Purchase journal in Italy's localization. - This PR changes the debit note of a customer invoice to be considered a TD05 instead of a TD01. The debit note used to take the document id of the original customer invoice, which is TD01. So new override `copy` function was created in Italy `AccountMove` to check if new move is from a debit note and if yes, set document type of new move to TD05. tasks-4744444 Current behavior before PR: - When uploading TD05 in the Purchase journal, it's considered a Vendor Credit Note. - When creating a debit note from a customer invoice, the new invoice has TD01 document type Desired behavior after PR is merged: - When uploading TD05 in the Purchase journal, it's considered a Vendor Bill. - When creating a debit note from a customer invoice, the new invoice has TD05 document type --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fix prevents a system error during base module upgrades when every user type is configured as shared. It ensures the user permissions view can still be rebuilt safely, reducing the risk of upgrade interruptions for affected configurations.
Original PR description
… are share If all the user type groups have the flag `Share` as true, they will be filtered out by `get_application_groups`. While updating `user_groups_view`, the field `user_type_field_name` will…
… are share
If all the user type groups have the flag `Share` as true, they will be filtered out by `get_application_groups`. While updating `user_groups_view`, the field `user_type_field_name` will never be assigned, as the condition
`app.xml_id == 'base.module_category_user_type'` will never be fulfilled.
That means that `user_type_invisible` will be `None`, but that's not a valid value and it will break.
Steps to reproduce:
- Mark all the user type groups as Share.
- Upgrade `base`.
```
File "/home/odoo/src/odoo/18.0/odoo/addons/base/models/res_users.py", line 1801, in _update_user_groups_view
E.group(*(xml2), invisible=user_type_invisible),
File "src/lxml/builder.py", line 204, in lxml.builder.ElementMaker.__call__
File "src/lxml/builder.py", line 186, in lxml.builder.ElementMaker.__init__.add_dict
KeyError: <class 'NoneType'>
```
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-prSale Managers can now confirm subscription sale orders that include recurring service products. This prevents order processing from being blocked by internal access limits on related project recurrence records.
Original PR description
Issue: ---------- A user with Sale Manager access is unable to confirm a recurring service type sale order. Root Cause: -------- The Sale Manager lacks write access to task and recurrence records, which are updated during order confirmation. Fix: ------- Used sudo() when updating the recurrence to bypass access restrictions, allowing the Sale Manager to confirm the sale order successfully. Steps to Reproduce: ------------- - Install the project_sale_subscription module. - Create a user with Sale Manager access only. - Log in as that user and create a subscription-based sale order. - Add a recurring service product to the order line.
Backdated subscription payments using a newly saved card could be rejected by Stripe because the subscription start date was too far in the past. This fix adjusts the date sent for Stripe authorization so customers can complete payments while preserving subscription behavior.
Original PR description
## Version: 17.0+ ## Issue: Stripe payments with an unregistered card on backdated subscriptions lead to Stripe API refusal. ## Steps to reproduce: Ensure Stripe is well configured in `Test Mode`…
## Version:
17.0+
## Issue:
Stripe payments with an unregistered card on backdated subscriptions lead to Stripe API refusal.
## Steps to reproduce:
Ensure Stripe is well configured in `Test Mode` with `Credentials`; Create a new Sale Order with `Monthly Cleaning` as `Quotation Template` for any customer:
- Under `Other Info` tab, change the `Subscription` `Start Date` for a date at least 2 days before current date;
- Confirm and create regular invoice:
- Set `Invoice Date` to the same date as the subscription;
- Confirm and go to the invoice's preview and start payment process:
- Use a new card for payment;
- Check `Save my payment details` checkbox and pay.
## Cause:
The Stripe mandate needs to be filled with a start date at least equal to yesterday (https://docs.stripe.com/api/payment_intents/create#create_payment_intent-payment_method_options-card-mandate_options-start_date). Subscription app sets the start date to the SO's `start_date` via https://github.com/odoo/enterprise/blob/5642ad28919081a44bb47c0d936aa51980178d09/sale_subscription/models/payment_transaction.py#L51-L52. The values are retrieved by `_stripe_prepare_mandate_options()` via https://github.com/odoo/odoo/blob/d231565ec9054556d025b093195a934f28d067c3/addons/payment_stripe/models/payment_transaction.py#L206 and sent to Stipe under a new structure given by https://github.com/odoo/odoo/blob/d231565ec9054556d025b093195a934f28d067c3/addons/payment_stripe/models/payment_transaction.py#L209-L220
## Fix:
Initial suggestion made in the `payment_stripe` module (https://github.com/odoo/odoo/pull/207451), but later moved to the origin of the issue. As of 2025-05-12, Stripe seems to have fixed the issue, but this patch is still applied as a safety measure.
opw-4654142This fix prevents inter-company purchase-to-sales order synchronization from choosing a sales team that belongs to the wrong company. It helps companies using automated inter-company transactions avoid failed order creation when sales teams are company-specific or archived.
Original PR description
…Inter-Company sync ### Steps to reproduce: - With Company B in the settings Enable Inter-Company Transactions > Synchronize Sales and Purchase Order - Sales > Configurations > Sales Teams, Archive…
…Inter-Company sync ### Steps to reproduce: - With Company B in the settings Enable Inter-Company Transactions > Synchronize Sales and Purchase Order - Sales > Configurations > Sales Teams, Archive all sales team - With COMP A create a sales team with a set company_id: COMP A - With COMP A create and confirm a PO with COMP B as customer #### > Invalid operation: while generating the SO, the sales team belongs to COMP A and the SO to COMP B. ### Cause of the issue: The `team_id` field of the `sale.order` model is a stored pre-computed and company checked field. As such, when the SO is created and even if no sales team is provided to the create vals: https://github.com/odoo/enterprise/blob/c61ce5a8e46e706bfb2025d4c9c79a39598e8827/sale_purchase_inter_company_rules/models/purchase_order.py#L70 a default sales team will be computed and set on the SO based on the "allowed_company_ids" (including both COMP A and COMP B): https://github.com/odoo/odoo/blob/1fa8678a33ab35195005d1b65b5eecb1d089fe56/addons/sale/models/sale_order.py#L453-L460 https://github.com/odoo/odoo/blob/1fa8678a33ab35195005d1b65b5eecb1d089fe56/addons/sales_team/models/crm_team.py#L81-L88 While the domain checks that the sales team is either not tight to a company or belong to comp B, since no such teams were found, we fallback the invalid sales team of COMP A. The invalid operation is then raised during the `_check_company` of the created record. opw-4627851