Daily updates from Odoo
Navigate
Branch
Thursday, September 15, 2022
27 changes
Enhancements to existing features
Odoo Accounting now supports clearer setup and processing for early payment discounts, including tax treatment choices, invoice PDF display, payment registration prefill, and reconciliation handling. This helps businesses apply cash discount terms more consistently and reduce manual accounting work.
Original PR description
Purpose : Improve multiple use cases while handling the Accounting part of Cash Discounts in Odoo. When creating a Payment Term, the user can now specifically design an early payment discount through…
Purpose : Improve multiple use cases while handling the Accounting part of Cash Discounts in Odoo. When creating a Payment Term, the user can now specifically design an early payment discount through an additional part in the wizard. This will, amongst other things, allow the user to choose in which way the tax should be computed on the discounted invoice (tax included, excluded, or tax base impacted). (WIP : belgian taxation - Impact Tax Base - isn't yet functional. At terms, the taxation of the whole invoice should be adapted when an Cash Discount is st within a payment term. This option should only be available on the belgian localization. ) The discounted amount and the conditions to fulfill are printed below the invoice PDF. Registering a payment while filling the condition for an early payment discount will prefill the fields accordingly. Reconciliation --> In the reconciliation widget, the logic of Early Payments Discounts are also applied. Related : https://github.com/odoo/odoo/pull/94050 task: 2968644
Field service sales now show product prices using the customer’s assigned pricelist, including the correct currency on the task product button. This helps teams quote and review products with pricing that matches each customer’s commercial terms.
Original PR description
This PR implements the usage of the partner pricelist in the `product.product` kanban view of industry_fsm_sale as well as the usage of the partner pricelist currency in the `project.task` form `Products` stat button. task-2955983
Odoo Studio now uses the newer versions of cohort, dashboard, graph, map, and pivot views instead of older legacy versions. This simplifies the product foundation and helps ensure future improvements and maintenance focus on the modern view experience.
Products can now store the supplementary unit details needed for Intrastat reporting, instead of relying on sales units of measure that may not match legal reporting requirements. The Intrastat report also adds clearer warnings for missing or invalid information, helping businesses complete compliant EU trade declarations more reliably.
Original PR description
Linked PR in upgrade: https://github.com/odoo/upgrade/pull/3886 #### Summary Add fields to the product representing the type and amount of supplementary units the product represents for intrastat…
Linked PR in upgrade: https://github.com/odoo/upgrade/pull/3886 #### Summary Add fields to the product representing the type and amount of supplementary units the product represents for intrastat purposes, replacing the old system of trying to calculate this from the units of measure on the move lines. #### Context In intrastat, supplementary units are a way of describing the quantity of goods in a way that is more relevant than the default (kilograms) in the statistical context in which the data is utilised. For instance, when measuring the passage of commodity: code: 93012000 description: "Rocket launchers; flame-throwers; grenade launchers; torpedo tubes and similar projectors" the supplementary unit is "p/st", meaning unit (rather than kilograms). Which is to say, that when you're selling rocket launchers; flame-throwers, grenade launchers, etc to other European countries, the EU it's more statistically relevant to discuss the number of units sold than the weight. This is true of a large number of other commodities which can be measured in other ways (e.g. 100 p/st: by the hundreds of units, c/k: metric carat, 1000 kWh: thousand kilowatt hours, etc) #### The Problem Previously, the problem was that the information regarding the supplementary units was not included in the report. Since it became a legal requirement, a solution was created (in stable) that utilised odoo's units of measure to cover a number of the most common supplementary units: https://github.com/odoo-dev/enterprise/commit/2fbe4deb2051ca8e8559c8b68c66b0c245668480. However, this is inadequate for a couple of reasons: a) It provides little control to the user, who might wish to use units of measure that are not the same as the supplementary units. (e.g. Sell flamethrowers by the kilogram, though the supplementary unit is per 'unit'). b) It doesn't cover the supplementary units for which there isn't a corresponding category in odoo by default. (e.g. Sell uncut diamonds, with corresponding supplementary unit: c/k (metric carat), for which there is no corresponding unit of measure in odoo). #### The Solution The first part of the solution involves adding a field to the account.intrastat.code model. The field is a selection field called 'supplementary_unit' and represents the supplementary unit for the commodity code. This also allows us to remove the enormous dictionary currently representing the relationship between commodity codes and supplementary units in account_intrastat/models/supplementary_units_codes.py. The second part of the solution is to have a field representing the ratio of the product quantity to the number of supplementary units. This field is called intrastat_supplementary_unit_amount on the product.product model. If the currently selected commodity code field has a supplementary unit associated with it, then the intrastat_supplementary_unit_amount field is displayed below the commodity code field. If no supplementary unit is associated with the commodity code, then the weight field is displayed instead. This is the case for both the product.product, though the product.template makes use of a related field that displays the value of the intrastat_supplementary_unit_amount on the product variant (if the product variant is a singleton), and is otherwise invisible. The intrastat_variant_id (commodity code) field has been renamed on the product.product to intrastat_code_id. The intrastat_id (commodity code) field is removed from the product category and the product.category views are removed. The product template and product variant views are adapted to include these fields. Additionally, the product template view is adapted to hide the intrastat fields (including those that weren't introduced in this commit, i.e. commodity code and origin country) when there is more than one product variant, similar to the way weight and volume is displayed. The report is altered so that the SQL query now fetches the supplementary unit field and performs the logic necessary to calculate the supplementary unit column. The quantity is calculated with reference to the reference unit of measure, and then used to multiply the supplementary unit amount. This avoids the problem where, for instance, a dozen is used as a unit of measure, and the quantity is 1. Then the intrastat_supplementary_unit_amount should be multiplied by 12 rather than 1. The _intrastat_fill_supplementary_unit function and references to it are removed as the logic it performs has been superseded. The existing tests have been minimally reconfigured to work with the changes. This simply required adding the values of the 'intrastat_variant_supplementary_unit_amount' field on the product.product records used in the tests. task-id: 2884512
The partner form now places the Avatax address validation button next to the country field. This makes the validation action easier to find while users are entering address details, improving the flow without changing the underlying process.
Original PR description
The purpose of this PR is to inline the "Validate" button with the `country_id` field on the partner form view when using Avatax. task-2947705
The Enterprise notebook tab layout has been adjusted so tabs look and behave more consistently across the application, including when shown vertically. Select fields also receive a cleaner focus style by removing an unnecessary shadow, improving visual polish without changing workflows.
Original PR description
"Notebook" component had to be adapted to make the use of tabs more consistent trough the app. The component now allows a use of default tabs style in a vertical display This PR allows to style the enterprise version of the component task 2950591 Requires: https://github.com/odoo/odoo/pull/98706
The customer follow-up process has been redesigned to be easier to manage from a single guided workflow. Users can choose follow-up contacts, manually adjust follow-up levels, track actions in the customer history, and quickly access related customer, invoice, and reconciliation views.
Original PR description
**Main goal:** Rework the follow-up report to make it more user friendly **New features include:** - Process the follow-ups manually with an all-in-one wizard - Add followup contact address (contact that will receive the reminders) - Allow the user to manually set a followup level (aka followup line) - Log actions in the chatter (email sent, letter printed, ...) - Access useful views from the follow-up form (view customer, view unpaid invoices, reconcile) - Set a follow-up responsible type in the follow-up levels to select a user responsible for activities
This update adjusts how website customization options are shown across several Odoo website-related apps. It makes page editing choices clearer and more consistent for users managing appointment, helpdesk, sign, subscription, sales subscription, and Twitter wall pages.
Original PR description
*: website_appointment, website_twitter_wall, website_sign, helpdesk, sign, sale_subscription, website_sale_subscription task-2710582
Resolved issues and error corrections
The Homeworking feature is no longer marked as an application because it does not function as a standalone app. This keeps the app list clearer and prevents users from seeing it in the wrong category.
Original PR description
The homeworking was wrongfully marked as Application, which is not the case.
This fixes the placement of an employee document sharing field so it displays inside the intended employee form. It prevents confusion from the field appearing outside the form layout and keeps the HR documents screen tidy.
Original PR description
The field was added after the invisible `user_id`, hence it was showing outside of the form view.
This change makes an automated test for financial reports more reliable by adding extra checks before it proceeds. It helps reduce rare false failures in the testing system, improving confidence in release validation without changing user-facing behavior.
Original PR description
The tour was failing very rarely on runbot, probably due to some race condition.
This fixes an incorrect dependency between spreadsheet dashboard editing and document spreadsheets. Shared spreadsheet code is now placed in a common module used by both, reducing setup issues and improving reliability without changing business workflows.
Original PR description
Following 03eb62b65b5fdfe25868869f640f37ae8faa2471, spreadsheet_dashboard_edition incorrectly depends on documents_spreadsheet. This revision move the code which is common between documents_spreadsheet and spreadsheet_dashboard_edition in spreadsheet_edition, which is a dependency of both modules. Runbot-id 4993
Checkboxes and radio buttons now use their previous visual style after a recent simplification made them harder to read. This improves clarity for users when selecting options in the enterprise web interface.
Original PR description
Since https://github.com/odoo/odoo/pull/98770, the style of checkboxes and radio buttons has also been simplified. This simplification makes them less readable. To fix that, this commit restores the previous style for checkboxes and radio buttons. Requires: - https://github.com/odoo/odoo/pull/99632
This update prevents a crash when customers try to rent products that have certain configuration combinations. It helps keep the rental checkout flow stable and reduces failed rental orders caused by product setup differences.
Original PR description
Fixes a crash when trying to rent certain products with different configurations
A previously skipped spreadsheet editing test has been re-enabled. This helps ensure list autofill behavior continues to work correctly and reduces the risk of regressions in future updates.
Code cleanup and technical improvements
This update renames internal spreadsheet components to make their purpose clearer and restores a previously skipped test. It helps keep spreadsheet-related features easier to maintain without introducing major visible changes for users.
This work restructures how analytic accounting information is handled across accounting, assets, budgets, and reporting. It removes the older analytic tag approach, which may simplify future maintenance but can affect workflows and reports that relied on those tags.
Original PR description
WIP
The barcode scanner code has been moved into the core enterprise web area so it can be reused more consistently across related apps. This internal reorganization should make barcode features easier to maintain while preserving existing scanning behavior for users.
This change removes unnecessary Helpdesk setup code related to email alias domains. It should not affect day-to-day use, but it makes future improvements to multi-company email alias handling easier and safer.
Original PR description
Remove unnecessary code to ease future changes in alias management. Prepares Task-36879 (MultiCompany Aliases)
Miscellaneous changes
Steps to reproduce: - Install sale_ebay module - Create a system parameter ebay_sales_team = 4 - Uninstall the module Solution: 1- We're trying to get a record with the wrong id so we set the good one 2- We ensure that the record returned is not None opw-2952241 Forward-Port-Of: odoo/enterprise#31298
Original PR description
Steps to reproduce: - Install sale_ebay module - Create a system parameter ebay_sales_team = 4 - Uninstall the module Solution: 1- We're trying to get a record with the wrong id so we set the good one 2- We ensure that the record returned is not None opw-2952241 Forward-Port-Of: odoo/enterprise#31298
It seems in some CAMT files that the rate is sometimes rounded to 4 digits: ``` <AmtDtls> <TxAmt> <Amt Ccy="CHF">25805</Amt> </TxAmt> <CntrValAmt> <Amt Ccy="EUR">25000</Amt> <CcyXchg> <SrcCcy>CHF</SrcCcy> <TrgtCcy>EUR</TrgtCcy> <XchgRate>0.9688</XchgRate> </CcyXchg> </CntrValAmt> </AmtDtls> ``` While the real computed rate would be:
Original PR description
It seems in some CAMT files that the rate is sometimes rounded to 4 digits: ``` <AmtDtls> <TxAmt> <Amt Ccy="CHF">25805</Amt> </TxAmt> <CntrValAmt> <Amt Ccy="EUR">25000</Amt> <CcyXchg>…
It seems in some CAMT files that the rate is sometimes rounded to 4
digits:
```
<AmtDtls>
<TxAmt>
<Amt Ccy="CHF">25805</Amt>
</TxAmt>
<CntrValAmt>
<Amt Ccy="EUR">25000</Amt>
<CcyXchg>
<SrcCcy>CHF</SrcCcy>
<TrgtCcy>EUR</TrgtCcy>
<XchgRate>0.9688</XchgRate>
</CcyXchg>
</CntrValAmt>
</AmtDtls>
```
While the real computed rate would be: 25000/25805 = 0.968804495
This leads to a rounding issue:
25805 * 0.9688 = 24999.88 while we should have 25000.
We also faced another example with a batch payment and large amounts
with a rate rounded to 4 digits:
```
<Amt Ccy="CHF">19736.93</Amt>
<AmtDtls>
<TxAmt>
<Amt Ccy="EUR">19946.37</Amt>
<CcyXchg>
<SrcCcy>EUR</SrcCcy>
<TrgtCcy>CHF</TrgtCcy>
<XchgRate>0.9895</XchgRate>
</CcyXchg>
</TxAmt>
</AmtDtls>
<NtryDtls>
<Btch>
<NbOfTxs>3</NbOfTxs>
</Btch>
<TxDtls>
<Amt Ccy="EUR">21.85</Amt>
</TxDtls>
<TxDtls>
<Amt Ccy="EUR">19717.52</Amt>
</TxDtls>
<TxDtls>
<Amt Ccy="EUR">207</Amt>
</TxDtls>
</NtryDtls>
```
This leads also to a rounding issue:
21.85 * 0.9895 = 21.62
19717.52 * 0.9895 = 19510.49
207 * 0.9895 = 204.83
21.62 + 19510.49 + 207 = 19736.94 while we should have 19736.93.
In this second case, we do not have the single transaction amount in
journal's currency directly, and we need to look at batch level to
retrieve the globalized amount in journal's currency to compute the
correct rate.
We should handle these cases properly to avoid forcing the user to
manually modify the retrieved amount after.
Forward-Port-Of: odoo/enterprise#31312
Forward-Port-Of: odoo/enterprise#30121When canceling a PO, if the user only has an access to Purchase, an access error will be triggered: "Sorry, you are not allowed to delete documents of type 'Quality Check'" Cancelling a PO leads to the SM cancellation. At that step, we check if we need to unlink some QC (`/quality_control:StockMove._action_cancel`). To avoid any access issue, we consult all related QC in sudo mode and each time a QC must be deleted, we append it to an existing recordset `to_unlink`. But here is the issu
Original PR description
When canceling a PO, if the user only has an access to Purchase, an access error will be triggered: "Sorry, you are not allowed to delete documents of type 'Quality Check'" Cancelling a PO leads to the SM cancellation. At that step, we check if we need to unlink some QC (`/quality_control:StockMove._action_cancel`). To avoid any access issue, we consult all related QC in sudo mode and each time a QC must be deleted, we append it to an existing recordset `to_unlink`. But here is the issue: `to_unlink` has not been created in sudo mode. Therefore, even if the added records have the `su` flag, the recordset itself does not have it as it keeps its initial environment. More generically, if `a` and `b` are two existing records: ```py (a | b.sudo()).env.su == False (a.sudo() | b).env.su == True ``` That's the reason why, when calling `unlink` on the recordset, an access error is raised. Forward-Port-Of: odoo/enterprise#31285 Forward-Port-Of: odoo/enterprise#31260
With an MX company create an invoice, send CFDI for validation Open Accounting>Report>General Ledger Click on EXPORT(XML POLIZAS) The resulting file will not have any node PLZ:CompNal According to Anexo 20 "C" of Contabilidad electrónica "Pólizas de diario" the information is needed when we have it in invoices, vendor bills, and Complementos de Pago opw-2871127 Forward-Port-Of: odoo/enterprise#30437 Forward-Port-Of: odoo/enterprise#29091
Original PR description
With an MX company create an invoice, send CFDI for validation Open Accounting>Report>General Ledger Click on EXPORT(XML POLIZAS) The resulting file will not have any node PLZ:CompNal According to Anexo 20 "C" of Contabilidad electrónica "Pólizas de diario" the information is needed when we have it in invoices, vendor bills, and Complementos de Pago opw-2871127 Forward-Port-Of: odoo/enterprise#30437 Forward-Port-Of: odoo/enterprise#29091
To reproduce the issue: (Let WH01 be the main warehouse) 1. Create a second warehouse WH02 2. Edit WH01: - Resupply From: WH02 3. Edit the resupply route of WH01: - Edit the rule from InterWH Transit to WH01/input - Lead time: 1 4. Create a storable product P: - Type: Storable - Routes: "WH01: Supply... from WH02" 5. Add P on MPS view and enable the row "Actual Replenishment" 6. Set a positive replenish quantity for P (not in the first interval) 7. Replenish
Original PR description
To reproduce the issue: (Let WH01 be the main warehouse) 1. Create a second warehouse WH02 2. Edit WH01: - Resupply From: WH02 3. Edit the resupply route of WH01: - Edit the rule from InterWH Transit…
To reproduce the issue:
(Let WH01 be the main warehouse)
1. Create a second warehouse WH02
2. Edit WH01:
- Resupply From: WH02
3. Edit the resupply route of WH01:
- Edit the rule from InterWH Transit to WH01/input
- Lead time: 1
4. Create a storable product P:
- Type: Storable
- Routes: "WH01: Supply... from WH02"
5. Add P on MPS view and enable the row "Actual Replenishment"
6. Set a positive replenish quantity for P (not in the first interval)
7. Replenish P
Error: The actual replenishment is updated on the previous interval. It
should be on the interval defined at step 6.
When computing the date of an incoming stock move, we get and use the
delay of its dest moves but we don't consider the delay of the move
itself.
Moreover, `_get_dest_moves_delay` handles the case where a SM does not
have any dest move, so `_get_moves_and_date` can be simplified
OPW-2906741
Forward-Port-Of: odoo/enterprise#31274
Forward-Port-Of: odoo/enterprise#31067Com PR: https://github.com/odoo/odoo/pull/98910 Task ID - 2960827 opw-2954181 Forward-Port-Of: odoo/enterprise#30897 Forward-Port-Of: odoo/enterprise#30740
Original PR description
Com PR: https://github.com/odoo/odoo/pull/98910 Task ID - 2960827 opw-2954181 Forward-Port-Of: odoo/enterprise#30897 Forward-Port-Of: odoo/enterprise#30740
The discarded records were no longer showing when using the dedicated filter. task-2961886 Forward-Port-Of: odoo/enterprise#31294
Original PR description
The discarded records were no longer showing when using the dedicated filter. task-2961886 Forward-Port-Of: odoo/enterprise#31294
Steps to reproduce the bug: - Have companies A and B - Select company A as current company and B as allowed company - Go to barcode app > Operations > Select receipts of the company B - Try to create a new picking Problem: An access error is triggered because we access company B data while only company A is in the allowed companies. When we get the record `stock.picking`, we make sure that the value of `env.company` is correct with the `with_company`, but this function will also re
Original PR description
Steps to reproduce the bug: - Have companies A and B - Select company A as current company and B as allowed company - Go to barcode app > Operations > Select receipts of the company B - Try to create…
Steps to reproduce the bug: - Have companies A and B - Select company A as current company and B as allowed company - Go to barcode app > Operations > Select receipts of the company B - Try to create a new picking Problem: An access error is triggered because we access company B data while only company A is in the allowed companies. When we get the record `stock.picking`, we make sure that the value of `env.company` is correct with the `with_company`, but this function will also redefine the authorized companies with the context key `allowed_company_ids`, Except that this key is not present in the context of the record. So`with_company` will define "company A" as the current company (correct) but as the only authorized company (incorrect): https://github.com/odoo/odoo/blob/4c611efa959f8b856ef4ba1a16df664acd0cfecf/odoo/models.py#L5283-L5293 Instead, we can define the allowed companies with the `with_context` function. The ORM will be able to deduce the current company: https://github.com/odoo/odoo/blob/e902713648bca329e6821859462b2128aad62c09/odoo/api.py#L639 opw-2926638 Forward-Port-Of: odoo/enterprise#31068