mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-31 18:59:08 +00:00
production order naming series patch
This commit is contained in:
@@ -33,11 +33,6 @@ class DocType:
|
||||
self.doc = doc
|
||||
self.doclist = doclist
|
||||
|
||||
|
||||
def autoname(self):
|
||||
self.doc.name = make_autoname('PRO/' + self.doc.fiscal_year[2:5] +
|
||||
self.doc.fiscal_year[7:9] + '/.######')
|
||||
|
||||
def validate(self):
|
||||
if self.doc.production_item :
|
||||
item_detail = sql("select name from `tabItem` where name = '%s' and docstatus != 2"
|
||||
|
||||
@@ -2,12 +2,13 @@
|
||||
{
|
||||
"owner": "Administrator",
|
||||
"docstatus": 0,
|
||||
"creation": "2012-12-19 22:39:06",
|
||||
"creation": "2012-12-20 14:31:18",
|
||||
"modified_by": "Administrator",
|
||||
"modified": "2012-12-20 13:57:10"
|
||||
"modified": "2012-12-20 15:50:43"
|
||||
},
|
||||
{
|
||||
"is_submittable": 1,
|
||||
"autoname": "naming_series:",
|
||||
"in_create": 0,
|
||||
"doctype": "DocType",
|
||||
"module": "Manufacturing",
|
||||
@@ -22,18 +23,33 @@
|
||||
"parentfield": "fields"
|
||||
},
|
||||
{
|
||||
"name": "__common__",
|
||||
"parent": "Production Order",
|
||||
"read": 1,
|
||||
"cancel": 1,
|
||||
"name": "__common__",
|
||||
"amend": 1,
|
||||
"create": 1,
|
||||
"doctype": "DocPerm",
|
||||
"submit": 1,
|
||||
"write": 1,
|
||||
"parenttype": "DocType",
|
||||
"role": "Manufacturing User",
|
||||
"permlevel": 0,
|
||||
"parentfield": "permissions"
|
||||
},
|
||||
{
|
||||
"name": "Production Order",
|
||||
"doctype": "DocType"
|
||||
},
|
||||
{
|
||||
"default": "PRO",
|
||||
"doctype": "DocField",
|
||||
"label": "Series",
|
||||
"fieldname": "naming_series",
|
||||
"fieldtype": "Select",
|
||||
"reqd": 1,
|
||||
"options": "\nPRO"
|
||||
},
|
||||
{
|
||||
"read_only": 1,
|
||||
"depends_on": "eval:!doc.__islocal",
|
||||
@@ -171,14 +187,6 @@
|
||||
"reqd": 1,
|
||||
"options": "Company"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"label": "Fiscal Year",
|
||||
"fieldname": "fiscal_year",
|
||||
"fieldtype": "Select",
|
||||
"reqd": 1,
|
||||
"options": "link:Fiscal Year"
|
||||
},
|
||||
{
|
||||
"read_only": 1,
|
||||
"no_copy": 1,
|
||||
@@ -190,16 +198,6 @@
|
||||
"fieldtype": "Data"
|
||||
},
|
||||
{
|
||||
"amend": 1,
|
||||
"create": 1,
|
||||
"doctype": "DocPerm",
|
||||
"submit": 1,
|
||||
"write": 1,
|
||||
"cancel": 1,
|
||||
"permlevel": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocPerm",
|
||||
"permlevel": 1
|
||||
"doctype": "DocPerm"
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user