mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-31 18:59:08 +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)
|
self.item_code = make_variant_item_code(self.variant_of, template_item_name, self)
|
||||||
else:
|
else:
|
||||||
from frappe.model.naming import make_autoname
|
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:
|
elif not self.item_code:
|
||||||
msgprint(_("Item Code is mandatory because Item is not automatically numbered"), raise_exception=1)
|
msgprint(_("Item Code is mandatory because Item is not automatically numbered"), raise_exception=1)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user