Skip to content
Snippets Groups Projects
Commit 18a823e3 authored by Jigar Vaghela's avatar Jigar Vaghela
Browse files

[FIX] l10n_in: HSN report not have right quantity and UOM

This is already there before refactoring in saas-12.4
you can check here https://github.com/odoo/odoo/blob/saas-12.3/addons/l10n_in/models/account_invoice.py\#L73



also add id in group by becouse if there is invoice line have same product,qty and uom then qty is wrong.

For example:
we have there is the same product with the same quantity and UOM like

```
 Product | quantity | UOM
 =========================
 Mobile  | 2        | Unit
 Mobile  | 2        | Unit
```
then tax line is not split so report count qty is 2

opw-2563120

closes odoo/odoo#73803

X-original-commit: 49e6bc9c
Signed-off-by: default avatarJosse Colpaert <jco@openerp.com>
Signed-off-by: default avatarJigar Vaghela <jva-odoo@users.noreply.github.com>
parent f63fed5c
No related branches found
No related tags found
No related merge requests found
......@@ -57,6 +57,8 @@ class AccountMove(models.Model):
res = super()._get_tax_grouping_key_from_tax_line(tax_line)
if tax_line.move_id.journal_id.company_id.account_fiscal_country_id.code == 'IN':
res['product_id'] = tax_line.product_id.id
res['product_uom_id'] = tax_line.product_uom_id
res['quantity'] = tax_line.quantity
return res
@api.model
......@@ -65,6 +67,9 @@ class AccountMove(models.Model):
res = super()._get_tax_grouping_key_from_base_line(base_line, tax_vals)
if base_line.move_id.journal_id.company_id.account_fiscal_country_id.code == 'IN':
res['product_id'] = base_line.product_id.id
res['product_uom_id'] = base_line.product_uom_id
res['quantity'] = base_line.quantity
res['id'] = base_line.id
return res
@api.model
......@@ -73,6 +78,9 @@ class AccountMove(models.Model):
tax_key += [
line.product_id.id,
line.product_uom_id,
line.quantity,
line.id,
]
return tax_key
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment