mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-26 10:08:30 +00:00
Pass doc while autonaming item
This commit is contained in:
@@ -44,7 +44,7 @@ class Item(WebsiteGenerator):
|
||||
self.item_code = make_variant_item_code(self.variant_of, template_item_name, self)
|
||||
else:
|
||||
from frappe.model.naming import make_autoname
|
||||
self.item_code = make_autoname(self.naming_series+'.#####')
|
||||
self.item_code = make_autoname(self.naming_series+'.#####', doc=self)
|
||||
elif not self.item_code:
|
||||
msgprint(_("Item Code is mandatory because Item is not automatically numbered"), raise_exception=1)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user