Thursday, January 2, 2025
5 changes · 18.0
Enhancements to existing features
This change improves how Odoo counts expenses linked to a sales order by making the lookup more efficient. Users should see faster loading of the related expenses smart button on sales order forms, especially where many expenses exist.
Original PR description
## Description `sale.order._compute_expense_count` does a `_read_group` with a domain only based on `sale_order_id`, which is an unindexed FKey, leading to a guaranteed `Seq.Scan`. This `_compute_expense_count` is used to compute the count of related expenses for a `sale.order`, shown as a smart button on the form view, which is a frequent operation. ## Reference task-3977983 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update cleans up and reorganizes Argentina withholding and perception tax records so they are easier to use and better aligned with current tax terminology. It also removes outdated duplicate taxes, corrects tax grouping, and relaxes a form requirement when a tax is not an Argentina withholding tax.
Original PR description
_l10n_ar_withholding_: 1) Make not required "WTH Tax" (l10n_ar_tax_type) field in account.tax form view if "Argentina Tax Type" (l10n_ar_type_tax_use) is 'customer' or 'supplier'. So, if the tax is…
_l10n_ar_withholding_: 1) Make not required "WTH Tax" (l10n_ar_tax_type) field in account.tax form view if "Argentina Tax Type" (l10n_ar_type_tax_use) is 'customer' or 'supplier'. So, if the tax is not for argentina withholding then the "WTH Tax" field will not be required. 2) "Earnings WTH A" tax is deleted because is not used any more. 3) Earnings WTH taxes have "VAT 21%" as "Tax Group", in this pr is changed to "Withholding" tax group. 4) Change IIBB Withholding and Earnings 'name' and 'description' fields on account.tax model. Delete words "incurred" or "applied", change word 'earnings' to 'profits'. Also adapt translations. WTH SUSS and WTH Earnings taxes are duplicated, delete both taxes from addons/l10n_ar_withholding/data/template/account.tax-ar_ri.csv. IIBB withholdings and perception state names abreviations are changed, for example: old name --> IIBB WTH Chubut I, new name --> IIBB WTH CHT 0%. 5) Update addons/l10n_ar_withholding/data/template/account.tax-ar_ex.csv external ids with new state name abreviations and also profits withholding taxes (example: old id --> ex_tax_withholding_profits_regimen_31_insc, new id: ex_tax_withholding_profits_regimen_31_insc). 6) Change 'amount_type' from 'fixed' to 'percent' on taxes on addons/l10n_ar/data/template/account.tax-ar_ex.csv 7) Create file addons/l10n_ar_withholding/data/template/account.tax-ar_base.csv with iibb withholding iibb incurred taxes and delete those taxes from addons/l10n_ar_withholding/data/template/account.tax-ar_ri.csv 8) Add on file addons/l10n_ar_withholding/data/template/account.tax-ar_ex.csv iibb withholding applied taxes and profits withholding applied taxes . Delete those taxes from addons/l10n_ar_withholding/data/template/account.tax-ar_ri.csv . 9) Rename tax group file from addons/l10n_ar_withholding/data/template/account.tax.group-ar_ri.csv to addons/l10n_ar_withholding/data/template/account.tax.group-ar_base.csv 10) Adapt addons/l10n_ar_withholding/demo/account_demo.py and addons/l10n_ar_withholding/tests/test_withholding_ar_ri.py with the new external ids. _l10n_ar_: Change perception 'name', 'description' and 'invoice_label' fields on account.tax model. On field 'name' set the same state abbreviation as abbreviations applied on withholding ar taxes. On the field 'description' delete the word "applied or incurred". On field 'invoice_label' delete the last letter (I or A). Also translations are adapted. _**Task Adhoc side**_: 43411 _**Task Latam side**_: 1289 --- 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 prevents production spreadsheets from blocking copies of older versions when referenced fields or data sources have since changed or been removed. Development and testing environments still keep the validation checks so dashboard issues can be caught before release.
Original PR description
Following #184846, the data validation is no longer necessary in a production context. Moreover, it currently limits some capacities for the user to user the history of the spreadsheets. Eg: - Create…
Following #184846, the data validation is no longer necessary in a production context. Moreover, it currently limits some capacities for the user to user the history of the spreadsheets. Eg: - Create a new field with studio - Add a datasouce in a spreadsheet which relies on that field - make a bunch of revision - Delete the field you created - Go back to the spreadsheet - Open the version history and try to "make a copy" of some recent revision => it will throw as you try to create a spreadsheet with invalid fields However, the data validation still make sense to alert developpers to adapts dashboards when they change the schema of some tables. This revision deactivates the data validation on production which ensures that the last point is still respected while developping (will be detected by runbot tests). Task: 4363803 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-pr
The sales product catalog now keeps the discounted pricelist price visible after a product is added to an order. This prevents customers or sales teams from seeing the price jump from the discounted amount back to the original price when using pricelists and discounts.
Original PR description
Steps: - install sale and activate pricelists - activate discounts from setting - create a product with price 100 - create a pricelist with of 2% discount on the product - create a sale order with the new pricelist - open the new product in catalog and add 1 quantity Issue: - the price for the product changes from 98 to 100 after adding quantity Cause: - the display price in catalog comes from either SOL price unit or computed from SO pricelist_id. When discounts setting is active the SOL price_unit is pricelist price without discount else with discount. Hence when first time the catalog is loaded it is computed from SO's pricelist and after adding a quantity it takes pricelist price without discount from SOL Fix: - Updated `_update_order_line_info` so it will always take the pricelist computed price and not SOL unit_price opw - 4345503 opw - 4406373 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The Partner Ledger no longer crashes when partner names start with special characters such as '~' and report grouping is enabled. This ensures accounting users can open and review ledgers normally even when customer or vendor names contain unusual characters.
Original PR description
Steps --------- 1. Debug mode 2. Go to Accounting 3. Configuration > Management > Accounting Reports 4. Open "Partner Ledger" 5. In the Options tab, set the "Prefix Groups Threshold to 3" 6. Create 3…
Steps
---------
1. Debug mode
2. Go to Accounting
3. Configuration > Management > Accounting Reports
4. Open "Partner Ledger"
5. In the Options tab, set the "Prefix Groups Threshold to 3"
6. Create 3 different partners, each having their name starting with a '\~'
7. Create an invoice for each of the partners created in previous steps
8. Open the partner ledger -> Traceback
Problem
---------
When there are more lines in the report than the prefix group value, the partners are grouped by names: P -> PA -> PAR, etc.
However, some partners could have a '\~' in their names making the groupby line_id \~account.report\~14|{"groupby_prefix_group": "\~"}\~\~. The line ID being split using the | and \~ characters, it causes some issues.
Solution
---------
Since the line ID format is fixed: markup\~model\~id|markup\~model\~id|... We can split from the back and hard limit the split to 2 to make sure we always have (markup, model and ID) no matter the content of the markup.
task-4420258