mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-27 02:28:30 +00:00
fix: fetch item tax template from item group when creating item (#54258)
(cherry picked from commit b93f2350ee)
Co-authored-by: Pandiyan P <pandiyanpalani37@gmail.com>
This commit is contained in:
@@ -777,6 +777,19 @@ class Item(Document):
|
|||||||
{"company": defaults.get("company"), "default_warehouse": defaults.default_warehouse},
|
{"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):
|
def update_variants(self):
|
||||||
if self.flags.dont_update_variants or frappe.db.get_single_value(
|
if self.flags.dont_update_variants or frappe.db.get_single_value(
|
||||||
"Item Variant Settings", "do_not_update_variants"
|
"Item Variant Settings", "do_not_update_variants"
|
||||||
|
|||||||
Reference in New Issue
Block a user