Pass doc while autonaming item
This commit is contained in:
parent
23fa8893a8
commit
e3f0412570
@ -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)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user