Monday, August 12, 2024
5 changes · saas-17.4
Resolved issues and error corrections
Invoices created from Sales or Purchase orders now keep the product name on each invoice line. This makes invoice line descriptions consistent with accounting invoices and prevents confusion from missing product names.
Original PR description
Description of the issue this commit addresses: When the new product/label widget was designed on the invoice form, a compatibility patch was applied to the sale and the purchase app to make sure the…
Description of the issue this commit addresses: When the new product/label widget was designed on the invoice form, a compatibility patch was applied to the sale and the purchase app to make sure the line name contained what was needed. Since then a redesign of the feature was made and the line name contains the product name again. It's only in the Invoice Lines tab that the name is removed from the name attribute so it isn't displayed twice. The regexes that removed the product name from the label for invoices coming from the Sales and the Purchase apps are therefore causing a discordance in the behaviors from the accounting app and from those two. --- Desired behavior after this commit is merged: After this commit, creating an invoice from a Sale or a Purchase creates invoices lines with the product name inside the name attribute to keep the same behavior everywhere. --- sale PR commit: https://github.com/odoo/odoo/pull/152869/commits/dc33e2f10b44dd957836650c775840dd79f5b8bd purchase PR commit: https://github.com/odoo/odoo/pull/152869/commits/82064d84da04fca373637b37b710a6f6e02da81a no task-feedback --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Production analysis now uses a safer fallback when looking up default values, so reports are less likely to show missing or duplicated information. This helps users get the expected data when creating or reviewing bills of materials.
Original PR description
This commit fixes a small bug in the SQL. It removes an unused join with company_id to avoid adding unnecessary lines. Additionally, it uses fields_id instead of ir_prop.name and adds fallback options for ir_prop. If the res_id is not found in the database, the ir_prop without a res_id or company_id will be used. To test it, simply open the production analysis, create a BOM, and verify that the expected fields are correctly populated.
Planning shift templates now handle invalid end-hour values more safely when users create or update them. Instead of causing an application error, the system applies the existing validation logic so users can correct the input normally.
Original PR description
This traceback arises when the user gives an invalid hour value to the end date, while creating or updating a planning template. To reproduce this issue: 1) Install `Planning` 2) Create a new `shift template` from planning configuration 3) Give an invalid hour value to the end date (greater than 24) 4) Try to save the record. Error:- ``` ValueError: hour must be in 0..23 ``` When the user gives an invalid hour value to the end date and tries to save it, a compute method triggers in which hour is used to calculate the end time. https://github.com/odoo/enterprise/blob/14b37f4141f1c73712d2c5ce16e5fc815e2a6a9b/planning/models/planning_template.py#L37-L38 Which leads to the traceback. Already a condition is there to check the invalid hours for start time. By just modifying the existing condition we can resolve this issue. sentry-5655372261
Purchase order lines now show the correct budget warning color when quantities are greater than one. This prevents budgets from appearing exceeded too early, helping buyers make decisions based on accurate budget status.
Original PR description
### Steps to reproduce: - Create a new Budget with type Expense - Add budget line (ex: Administration) and a period - Open the budget - Create a new RFQ that uses the analytic distribution set on the budget - With a quantity greater than 1, the line should appear red before the budget is reached - For example with a budget of 10000 and a quantity of 2 then the line is red if the price is greater than 2500 ### Cause: Line in question : `(budget.committed_amount + line.price_subtotal * (line.product_qty - line.qty_invoiced)) > budget.budget_amount` The calculation uses `price_subtotal` which is the total amount without taxes, so it already includes the quantity. ### Solution: Use `price_unit` instead of `price_subtotal`. opw-4002330
Fixed an issue that could cause accounting reports to fail when users selected a comparison filter. This improves reliability when viewing comparative financial reports by ensuring dates are handled consistently.
Original PR description
We get an error when selecting a comparison filter in accounting reports, because we try to compare a `datetime.dateime` with a `datetime.date` object. opw-4066879