Wednesday, July 31, 2024
3 changes · saas-17.2
Resolved issues and error corrections
Indian invoice previews now calculate the HSN Summary taxable value after applying line discounts. This prevents overstated taxable amounts in customer invoice documents and helps keep tax reporting figures accurate.
Original PR description
### Steps to reproduce: - Install l10n_in module and switch to an Indian company - Create a new customer invoice - Add a line with a discount - Click "Preview" - In the document under HSN Summary the "Taxable Value" does not take the discount into account ### Cause: To form the hsm_summary table, only the price_unit is given without taking the discount into account. ### Solution: Instead of giving the price_unit, we can calculate the price_unit with discount. opw-4045609
This fix ensures that when a service product is added to an already confirmed sales order, the related project receives the required analytic account for tracking costs and revenue. This prevents missing project financial tracking in cases where the original order only contained non-service products.
Original PR description
### Steps to reproduce: - Install Sale and Project modules - Create a Service product that creates a project when ordered - Create a SO with a non-service product and confirm it - Add a SOL with a…
### Steps to reproduce: - Install Sale and Project modules - Create a Service product that creates a project when ordered - Create a SO with a non-service product and confirm it - Add a SOL with a service product - Navigate to the created project settings and check AA ### Current behavior before PR: No AA is generated for the project when adding a SOL with a service product to a confirmed SO. This issue has been introduced after this commit https://github.com/odoo/odoo/pull/154934/commits/ffb3fe1b81a41b6462fd6eaae837f8e806da0d51 as it is now generating AA only when we confirm the SO 'action_confirm' so if you are confirming the SO with no service products it won't generate an AA so self.order_id.analytic_account_id will be false and when add a service product and preparing the values to create its project https://github.com/odoo/odoo/blob/saas-17.2/addons/sale_project/models/sale_order_line.py#L176 there will be no AA in SO ### Desired behavior after PR is merged: with reverting this diff https://github.com/odoo/odoo/pull/154934/commits/ffb3fe1b81a41b6462fd6eaae837f8e806da0d51#diff-54515e6934b8a75befb26b76cc09b04f898281f6fcfc3f32ac4b1afdd17004b2 we are no checking before creating the project if we have a service product in the SO and there is not AA already generated we will create it before creating the project. opw-4045976
India HSN summaries now use the discounted item price instead of the original unit price. This ensures tax and invoice summaries better match the actual amounts charged, including in point-of-sale orders.
Original PR description
*Before this commit:* - The HSN summary was calculated based on the unit price of the line items, even if a discount was applied. *After this commit:* - The HSN summary is now calculated based on the discounted price of the line items. opw: 4040478