* fix: copy all child fields to item variant (cherry picked from commit5deba1b6f9) * fix: only update if variant table empty (cherry picked from commitd436a40739) --------- Co-authored-by: Gursheen Anand <gursheen@frappe.io>
This commit is contained in:
@@ -280,7 +280,7 @@ class Item(Document):
|
|||||||
|
|
||||||
# add item taxes from template
|
# add item taxes from template
|
||||||
for d in template.get("taxes"):
|
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
|
# copy re-order table if empty
|
||||||
if not self.get("reorder_levels"):
|
if not self.get("reorder_levels"):
|
||||||
|
|||||||
@@ -302,7 +302,7 @@ def get_basic_details(args, item, overwrite_warehouse=True):
|
|||||||
if not item:
|
if not item:
|
||||||
item = frappe.get_doc("Item", args.get("item_code"))
|
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.update_template_tables()
|
||||||
|
|
||||||
item_defaults = get_item_defaults(item.name, args.company)
|
item_defaults = get_item_defaults(item.name, args.company)
|
||||||
|
|||||||
Reference in New Issue
Block a user