From cf7f3778d9af3de2ba7f9978a0e571e7ebb2f6ca Mon Sep 17 00:00:00 2001 From: Pandiyan P Date: Sat, 18 Apr 2026 11:58:33 +0530 Subject: [PATCH] fix: fetch item tax template from item group when creating item (#54258) (cherry picked from commit b93f2350eebf21e6e132eeff42e50f88c69e6998) --- erpnext/stock/doctype/item/item.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/erpnext/stock/doctype/item/item.py b/erpnext/stock/doctype/item/item.py index a84f49286ad..1b3919eac9a 100644 --- a/erpnext/stock/doctype/item/item.py +++ b/erpnext/stock/doctype/item/item.py @@ -791,6 +791,19 @@ class Item(Document): {"company": defaults.get("company"), "default_warehouse": defaults.default_warehouse}, ) + if not self.taxes and item_group.taxes: + for tax in item_group.taxes: + self.append( + "taxes", + { + "item_tax_template": tax.item_tax_template, + "tax_category": tax.tax_category, + "valid_from": tax.valid_from, + "minimum_net_rate": tax.minimum_net_rate, + "maximum_net_rate": tax.maximum_net_rate, + }, + ) + def update_variants(self): if self.flags.dont_update_variants or frappe.db.get_single_value( "Item Variant Settings", "do_not_update_variants"