Merge pull request #37674 from GursheenK/item-variant-tax-template

fix(minor): set tax values for item variants
This commit is contained in:
Deepesh Garg 2023-10-29 10:33:03 +05:30 committed by GitHub
commit 1081df3d7e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -255,7 +255,7 @@ class Item(Document):
# add item taxes from template
for d in template.get("taxes"):
self.append("taxes", {"item_tax_template": d.item_tax_template})
self.append("taxes", d)
# copy re-order table if empty
if not self.get("reorder_levels"):

View File

@ -268,7 +268,7 @@ def get_basic_details(args, item, overwrite_warehouse=True):
if not item:
item = frappe.get_doc("Item", args.get("item_code"))
if item.variant_of:
if item.variant_of and not item.taxes:
item.update_template_tables()
item_defaults = get_item_defaults(item.name, args.company)