Merge pull request #53708 from aerele/fetch_item_tax_template

fix: fetch get_item_tax_template while update items
This commit is contained in:
rohitwaghchaure
2026-04-20 12:17:22 +05:30
committed by GitHub
2 changed files with 20 additions and 6 deletions

View File

@@ -72,6 +72,7 @@ from erpnext.stock.get_item_details import (
NOT_APPLICABLE_TAX,
ItemDetailsCtx,
_get_item_tax_template,
_get_item_tax_template_from_item_group,
get_conversion_factor,
get_item_details,
get_item_tax_map,
@@ -3682,7 +3683,12 @@ def set_child_tax_template_and_map(item, child_item, parent_doc):
}
)
child_item.item_tax_template = _get_item_tax_template(ctx, item.taxes)
item_tax_template = _get_item_tax_template(ctx, item.taxes)
if not item_tax_template:
item_tax_template = _get_item_tax_template_from_item_group(ctx, item.item_group)
child_item.item_tax_template = item_tax_template
child_item.item_tax_rate = get_item_tax_map(
doc=parent_doc,
tax_template=child_item.item_tax_template,