fix: resolve item tax template from item group in update items

This commit is contained in:
ervishnucs
2026-04-05 11:16:37 +05:30
parent 97e7916b66
commit ad22256b2d
2 changed files with 15 additions and 10 deletions

View File

@@ -71,6 +71,7 @@ from erpnext.stock.doctype.packed_item.packed_item import make_packing_list
from erpnext.stock.get_item_details import (
ItemDetailsCtx,
_get_item_tax_template,
_get_item_tax_template_from_item_group,
get_conversion_factor,
get_item_details,
get_item_tax_map,
@@ -3671,11 +3672,7 @@ def set_child_tax_template_and_map(item, child_item, parent_doc):
item_tax_template = _get_item_tax_template(ctx, item.taxes)
if not item_tax_template:
item_group = item.item_group
while item_group and not item_tax_template:
item_group_doc = frappe.get_cached_doc("Item Group", item_group)
item_tax_template = _get_item_tax_template(ctx, item_group_doc.taxes)
item_group = item_group_doc.parent_item_group
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(