[fixes] item_code non-mandatory in item if naming_series
This commit is contained in:
parent
f2d4df975e
commit
04f888fa52
@ -66,6 +66,6 @@ class DocType:
|
||||
vouchers.append(d.voucher_id)
|
||||
|
||||
if vouchers:
|
||||
msgprint("Clearance Date updated in %s" % vouchers)
|
||||
msgprint("Clearance Date updated in %s" % ", ".join(vouchers))
|
||||
else:
|
||||
msgprint("Clearance Date not mentioned")
|
@ -47,10 +47,6 @@ class DocType:
|
||||
rate=%s, amount=qty*%s where bom_no = %s and docstatus < 2""",
|
||||
(self.doc.new_bom, current_bom_unitcost, current_bom_unitcost, self.doc.current_bom))
|
||||
|
||||
def get_parent_boms(bom_no):
|
||||
return [d[0] for d in webnotes.conn.sql("""select distinct parent from
|
||||
`tabBOM Item` where ifnull(bom_no, '')=%s and docstatus < 2""", bom_no)]
|
||||
|
||||
def get_parent_boms(self):
|
||||
return [d[0] for d in webnotes.conn.sql("""select distinct parent
|
||||
from `tabBOM Item` where ifnull(bom_no, '') = %s and docstatus < 2""",
|
||||
|
@ -31,6 +31,8 @@ class DocType(DocListController):
|
||||
if webnotes.conn.get_default("item_naming_by")=="Naming Series":
|
||||
from webnotes.model.doc import make_autoname
|
||||
self.doc.item_code = make_autoname(self.doc.naming_series+'.#####')
|
||||
elif not self.doc.item_code:
|
||||
msgprint(_("Item Code is mandatory"), raise_exception=1)
|
||||
|
||||
self.doc.name = self.doc.item_code
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
[
|
||||
{
|
||||
"creation": "2013-04-25 10:56:55",
|
||||
"creation": "2013-05-03 10:45:46",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-05-02 15:10:53",
|
||||
"modified": "2013-05-07 15:58:58",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@ -28,13 +28,14 @@
|
||||
"permlevel": 0
|
||||
},
|
||||
{
|
||||
"amend": 0,
|
||||
"doctype": "DocPerm",
|
||||
"name": "__common__",
|
||||
"parent": "Item",
|
||||
"parentfield": "permissions",
|
||||
"parenttype": "DocType",
|
||||
"permlevel": 0,
|
||||
"read": 1,
|
||||
"report": 1,
|
||||
"submit": 0
|
||||
},
|
||||
{
|
||||
@ -55,7 +56,8 @@
|
||||
"fieldname": "naming_series",
|
||||
"fieldtype": "Select",
|
||||
"label": "Naming Series",
|
||||
"options": "\nITEM"
|
||||
"options": "\nITEM",
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"description": "Item will be saved by this name in the data base.",
|
||||
@ -64,10 +66,11 @@
|
||||
"fieldtype": "Data",
|
||||
"in_filter": 0,
|
||||
"label": "Item Code",
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "item_code",
|
||||
"oldfieldtype": "Data",
|
||||
"read_only": 0,
|
||||
"reqd": 1,
|
||||
"reqd": 0,
|
||||
"search_index": 0
|
||||
},
|
||||
{
|
||||
@ -883,76 +886,27 @@
|
||||
"label": "Website Description",
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"cancel": 0,
|
||||
"create": 0,
|
||||
"doctype": "DocPerm",
|
||||
"permlevel": 1,
|
||||
"report": 0,
|
||||
"role": "Material Manager",
|
||||
"write": 0
|
||||
},
|
||||
{
|
||||
"cancel": 0,
|
||||
"create": 0,
|
||||
"doctype": "DocPerm",
|
||||
"permlevel": 0,
|
||||
"report": 1,
|
||||
"role": "Material Manager",
|
||||
"write": 0
|
||||
},
|
||||
{
|
||||
"cancel": 0,
|
||||
"create": 0,
|
||||
"doctype": "DocPerm",
|
||||
"permlevel": 1,
|
||||
"report": 0,
|
||||
"role": "Material User",
|
||||
"write": 0
|
||||
},
|
||||
{
|
||||
"cancel": 0,
|
||||
"create": 0,
|
||||
"doctype": "DocPerm",
|
||||
"permlevel": 0,
|
||||
"report": 1,
|
||||
"role": "Material User",
|
||||
"write": 0
|
||||
},
|
||||
{
|
||||
"cancel": 1,
|
||||
"create": 1,
|
||||
"doctype": "DocPerm",
|
||||
"permlevel": 0,
|
||||
"report": 1,
|
||||
"role": "Material Master Manager",
|
||||
"write": 1
|
||||
},
|
||||
{
|
||||
"amend": 0,
|
||||
"cancel": 0,
|
||||
"create": 0,
|
||||
"doctype": "DocPerm",
|
||||
"permlevel": 1,
|
||||
"report": 0,
|
||||
"role": "Material Master Manager",
|
||||
"role": "Material Manager",
|
||||
"write": 0
|
||||
},
|
||||
{
|
||||
"cancel": 1,
|
||||
"create": 1,
|
||||
"doctype": "DocPerm",
|
||||
"permlevel": 0,
|
||||
"report": 1,
|
||||
"role": "System Manager",
|
||||
"write": 1
|
||||
},
|
||||
{
|
||||
"amend": 0,
|
||||
"cancel": 0,
|
||||
"create": 0,
|
||||
"doctype": "DocPerm",
|
||||
"permlevel": 1,
|
||||
"report": 0,
|
||||
"role": "System Manager",
|
||||
"role": "Material User",
|
||||
"write": 0
|
||||
}
|
||||
]
|
Loading…
x
Reference in New Issue
Block a user