[fixes] production, added qty transferred, fix gantt, fiscal year (set fiscal year, instead of validation
diff --git a/erpnext/accounts/doctype/budget_detail/budget_detail.json b/erpnext/accounts/doctype/budget_detail/budget_detail.json
index d63b001..227e7e1 100644
--- a/erpnext/accounts/doctype/budget_detail/budget_detail.json
+++ b/erpnext/accounts/doctype/budget_detail/budget_detail.json
@@ -1,5 +1,5 @@
{
- "autoname": "CBD/.######",
+ "autoname": "hash",
"creation": "2013-03-07 11:55:04",
"docstatus": 0,
"doctype": "DocType",
@@ -44,7 +44,7 @@
],
"idx": 1,
"istable": 1,
- "modified": "2014-05-09 02:12:39.595788",
+ "modified": "2015-02-19 01:06:59.471417",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Budget Detail",
diff --git a/erpnext/accounts/doctype/gl_entry/gl_entry.py b/erpnext/accounts/doctype/gl_entry/gl_entry.py
index 49893da..fffe420 100644
--- a/erpnext/accounts/doctype/gl_entry/gl_entry.py
+++ b/erpnext/accounts/doctype/gl_entry/gl_entry.py
@@ -53,7 +53,7 @@
def validate_posting_date(self):
from erpnext.accounts.utils import validate_fiscal_year
- validate_fiscal_year(self.posting_date, self.fiscal_year, "Posting Date")
+ validate_fiscal_year(self.posting_date, self.fiscal_year, _("Posting Date"), self)
def check_pl_account(self):
if self.is_opening=='Yes' and \
diff --git a/erpnext/accounts/doctype/journal_entry_account/journal_entry_account.json b/erpnext/accounts/doctype/journal_entry_account/journal_entry_account.json
index 84a5643..b336d49 100644
--- a/erpnext/accounts/doctype/journal_entry_account/journal_entry_account.json
+++ b/erpnext/accounts/doctype/journal_entry_account/journal_entry_account.json
@@ -1,5 +1,5 @@
{
- "autoname": "JVD.######",
+ "autoname": "hash",
"creation": "2013-02-22 01:27:39",
"docstatus": 0,
"doctype": "DocType",
@@ -206,7 +206,7 @@
],
"idx": 1,
"istable": 1,
- "modified": "2014-12-25 15:44:03.077639",
+ "modified": "2015-02-19 01:07:00.388689",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Journal Entry Account",
diff --git a/erpnext/accounts/doctype/monthly_distribution_percentage/monthly_distribution_percentage.json b/erpnext/accounts/doctype/monthly_distribution_percentage/monthly_distribution_percentage.json
index aac6a30..eaff49c 100644
--- a/erpnext/accounts/doctype/monthly_distribution_percentage/monthly_distribution_percentage.json
+++ b/erpnext/accounts/doctype/monthly_distribution_percentage/monthly_distribution_percentage.json
@@ -1,5 +1,5 @@
{
- "autoname": "BDD/.#####",
+ "autoname": "hash",
"creation": "2013-02-22 01:27:38",
"docstatus": 0,
"doctype": "DocType",
@@ -27,7 +27,7 @@
],
"idx": 1,
"istable": 1,
- "modified": "2014-12-25 15:45:11.173204",
+ "modified": "2015-02-19 01:07:00.800015",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Monthly Distribution Percentage",
diff --git a/erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.json b/erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.json
index 2bb3220..33ccb27 100755
--- a/erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.json
+++ b/erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.json
@@ -1,5 +1,5 @@
{
- "autoname": "EVD.######",
+ "autoname": "hash",
"creation": "2013-05-22 12:43:10",
"docstatus": 0,
"doctype": "DocType",
@@ -399,7 +399,7 @@
],
"idx": 1,
"istable": 1,
- "modified": "2015-01-01 14:29:58.851242",
+ "modified": "2015-02-19 01:07:01.060411",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Purchase Invoice Item",
diff --git a/erpnext/accounts/doctype/purchase_taxes_and_charges/purchase_taxes_and_charges.json b/erpnext/accounts/doctype/purchase_taxes_and_charges/purchase_taxes_and_charges.json
index 6079fa2..8244d12 100644
--- a/erpnext/accounts/doctype/purchase_taxes_and_charges/purchase_taxes_and_charges.json
+++ b/erpnext/accounts/doctype/purchase_taxes_and_charges/purchase_taxes_and_charges.json
@@ -1,164 +1,164 @@
{
- "autoname": "PVTD.######",
- "creation": "2013-05-21 16:16:04",
- "docstatus": 0,
- "doctype": "DocType",
+ "autoname": "hash",
+ "creation": "2013-05-21 16:16:04",
+ "docstatus": 0,
+ "doctype": "DocType",
"fields": [
{
- "default": "Valuation and Total",
- "fieldname": "category",
- "fieldtype": "Select",
- "in_list_view": 0,
- "label": "Consider Tax or Charge for",
- "oldfieldname": "category",
- "oldfieldtype": "Select",
- "options": "Valuation and Total\nValuation\nTotal",
- "permlevel": 0,
- "read_only": 0,
+ "default": "Valuation and Total",
+ "fieldname": "category",
+ "fieldtype": "Select",
+ "in_list_view": 0,
+ "label": "Consider Tax or Charge for",
+ "oldfieldname": "category",
+ "oldfieldtype": "Select",
+ "options": "Valuation and Total\nValuation\nTotal",
+ "permlevel": 0,
+ "read_only": 0,
"reqd": 1
- },
+ },
{
- "default": "Add",
- "fieldname": "add_deduct_tax",
- "fieldtype": "Select",
- "label": "Add or Deduct",
- "oldfieldname": "add_deduct_tax",
- "oldfieldtype": "Select",
- "options": "Add\nDeduct",
- "permlevel": 0,
- "read_only": 0,
+ "default": "Add",
+ "fieldname": "add_deduct_tax",
+ "fieldtype": "Select",
+ "label": "Add or Deduct",
+ "oldfieldname": "add_deduct_tax",
+ "oldfieldtype": "Select",
+ "options": "Add\nDeduct",
+ "permlevel": 0,
+ "read_only": 0,
"reqd": 1
- },
+ },
{
- "fieldname": "charge_type",
- "fieldtype": "Select",
- "in_list_view": 1,
- "label": "Type",
- "oldfieldname": "charge_type",
- "oldfieldtype": "Select",
- "options": "\nActual\nOn Net Total\nOn Previous Row Amount\nOn Previous Row Total",
- "permlevel": 0,
- "read_only": 0,
+ "fieldname": "charge_type",
+ "fieldtype": "Select",
+ "in_list_view": 1,
+ "label": "Type",
+ "oldfieldname": "charge_type",
+ "oldfieldtype": "Select",
+ "options": "\nActual\nOn Net Total\nOn Previous Row Amount\nOn Previous Row Total",
+ "permlevel": 0,
+ "read_only": 0,
"reqd": 1
- },
+ },
{
- "depends_on": "eval:[\"On Previous Row Amount\", \"On Previous Row Total\"].indexOf(doc.charge_type)!==-1",
- "fieldname": "row_id",
- "fieldtype": "Data",
- "hidden": 0,
- "label": "Reference Row #",
- "oldfieldname": "row_id",
- "oldfieldtype": "Data",
- "permlevel": 0,
+ "depends_on": "eval:[\"On Previous Row Amount\", \"On Previous Row Total\"].indexOf(doc.charge_type)!==-1",
+ "fieldname": "row_id",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "label": "Reference Row #",
+ "oldfieldname": "row_id",
+ "oldfieldtype": "Data",
+ "permlevel": 0,
"read_only": 0
- },
+ },
{
- "fieldname": "description",
- "fieldtype": "Small Text",
- "in_list_view": 1,
- "label": "Description",
- "oldfieldname": "description",
- "oldfieldtype": "Small Text",
- "permlevel": 0,
- "print_width": "300px",
- "read_only": 0,
- "reqd": 1,
+ "fieldname": "description",
+ "fieldtype": "Small Text",
+ "in_list_view": 1,
+ "label": "Description",
+ "oldfieldname": "description",
+ "oldfieldtype": "Small Text",
+ "permlevel": 0,
+ "print_width": "300px",
+ "read_only": 0,
+ "reqd": 1,
"width": "300px"
- },
+ },
{
- "fieldname": "col_break1",
- "fieldtype": "Column Break",
+ "fieldname": "col_break1",
+ "fieldtype": "Column Break",
"permlevel": 0
- },
+ },
{
- "fieldname": "account_head",
- "fieldtype": "Link",
- "in_list_view": 0,
- "label": "Account Head",
- "oldfieldname": "account_head",
- "oldfieldtype": "Link",
- "options": "Account",
- "permlevel": 0,
- "read_only": 0,
+ "fieldname": "account_head",
+ "fieldtype": "Link",
+ "in_list_view": 0,
+ "label": "Account Head",
+ "oldfieldname": "account_head",
+ "oldfieldtype": "Link",
+ "options": "Account",
+ "permlevel": 0,
+ "read_only": 0,
"reqd": 1
- },
+ },
{
- "default": ":Company",
- "fieldname": "cost_center",
- "fieldtype": "Link",
- "in_list_view": 0,
- "label": "Cost Center",
- "oldfieldname": "cost_center",
- "oldfieldtype": "Link",
- "options": "Cost Center",
- "permlevel": 0,
+ "default": ":Company",
+ "fieldname": "cost_center",
+ "fieldtype": "Link",
+ "in_list_view": 0,
+ "label": "Cost Center",
+ "oldfieldname": "cost_center",
+ "oldfieldtype": "Link",
+ "options": "Cost Center",
+ "permlevel": 0,
"read_only": 0
- },
+ },
{
- "fieldname": "rate",
- "fieldtype": "Float",
- "in_list_view": 1,
- "label": "Rate",
- "oldfieldname": "rate",
- "oldfieldtype": "Currency",
- "permlevel": 0,
- "read_only": 0,
+ "fieldname": "rate",
+ "fieldtype": "Float",
+ "in_list_view": 1,
+ "label": "Rate",
+ "oldfieldname": "rate",
+ "oldfieldtype": "Currency",
+ "permlevel": 0,
+ "read_only": 0,
"reqd": 0
- },
+ },
{
- "fieldname": "tax_amount",
- "fieldtype": "Currency",
- "in_list_view": 1,
- "label": "Amount",
- "oldfieldname": "tax_amount",
- "oldfieldtype": "Currency",
- "options": "Company:company:default_currency",
- "permlevel": 0,
- "read_only": 1,
+ "fieldname": "tax_amount",
+ "fieldtype": "Currency",
+ "in_list_view": 1,
+ "label": "Amount",
+ "oldfieldname": "tax_amount",
+ "oldfieldtype": "Currency",
+ "options": "Company:company:default_currency",
+ "permlevel": 0,
+ "read_only": 1,
"reqd": 0
- },
+ },
{
- "fieldname": "total",
- "fieldtype": "Currency",
- "label": "Total",
- "oldfieldname": "total",
- "oldfieldtype": "Currency",
- "options": "Company:company:default_currency",
- "permlevel": 0,
+ "fieldname": "total",
+ "fieldtype": "Currency",
+ "label": "Total",
+ "oldfieldname": "total",
+ "oldfieldtype": "Currency",
+ "options": "Company:company:default_currency",
+ "permlevel": 0,
"read_only": 1
- },
+ },
{
- "fieldname": "item_wise_tax_detail",
- "fieldtype": "Small Text",
- "hidden": 1,
- "label": "Item Wise Tax Detail ",
- "oldfieldname": "item_wise_tax_detail",
- "oldfieldtype": "Small Text",
- "permlevel": 0,
- "print_hide": 1,
+ "fieldname": "item_wise_tax_detail",
+ "fieldtype": "Small Text",
+ "hidden": 1,
+ "label": "Item Wise Tax Detail ",
+ "oldfieldname": "item_wise_tax_detail",
+ "oldfieldtype": "Small Text",
+ "permlevel": 0,
+ "print_hide": 1,
"read_only": 1
- },
+ },
{
- "fieldname": "parenttype",
- "fieldtype": "Data",
- "hidden": 1,
- "in_filter": 1,
- "label": "Parenttype",
- "oldfieldname": "parenttype",
- "oldfieldtype": "Data",
- "permlevel": 0,
- "print_hide": 1,
- "read_only": 0,
+ "fieldname": "parenttype",
+ "fieldtype": "Data",
+ "hidden": 1,
+ "in_filter": 1,
+ "label": "Parenttype",
+ "oldfieldname": "parenttype",
+ "oldfieldtype": "Data",
+ "permlevel": 0,
+ "print_hide": 1,
+ "read_only": 0,
"search_index": 0
}
- ],
- "hide_heading": 1,
- "idx": 1,
- "istable": 1,
- "modified": "2014-05-30 03:43:32.494112",
- "modified_by": "Administrator",
- "module": "Accounts",
- "name": "Purchase Taxes and Charges",
- "owner": "Administrator",
+ ],
+ "hide_heading": 1,
+ "idx": 1,
+ "istable": 1,
+ "modified": "2015-02-19 01:07:01.581115",
+ "modified_by": "Administrator",
+ "module": "Accounts",
+ "name": "Purchase Taxes and Charges",
+ "owner": "Administrator",
"permissions": []
-}
+}
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.json b/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.json
index ba93b88..b87c632 100644
--- a/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.json
+++ b/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.json
@@ -1,5 +1,5 @@
{
- "autoname": "INVD.######",
+ "autoname": "hash",
"creation": "2013-06-04 11:02:19",
"docstatus": 0,
"doctype": "DocType",
@@ -439,7 +439,7 @@
],
"idx": 1,
"istable": 1,
- "modified": "2015-01-01 14:29:59.027192",
+ "modified": "2015-02-19 01:07:01.862525",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Sales Invoice Item",
diff --git a/erpnext/accounts/doctype/sales_taxes_and_charges/sales_taxes_and_charges.json b/erpnext/accounts/doctype/sales_taxes_and_charges/sales_taxes_and_charges.json
index d820c87..06c981f 100644
--- a/erpnext/accounts/doctype/sales_taxes_and_charges/sales_taxes_and_charges.json
+++ b/erpnext/accounts/doctype/sales_taxes_and_charges/sales_taxes_and_charges.json
@@ -1,5 +1,5 @@
{
- "autoname": "INVTD.######",
+ "autoname": "hash",
"creation": "2013-04-24 11:39:32",
"docstatus": 0,
"doctype": "DocType",
@@ -147,7 +147,7 @@
"hide_heading": 1,
"idx": 1,
"istable": 1,
- "modified": "2014-12-10 12:26:41.222471",
+ "modified": "2015-02-19 01:07:02.165094",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Sales Taxes and Charges",
diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py
index 415a51a..b8ffa87 100644
--- a/erpnext/accounts/utils.py
+++ b/erpnext/accounts/utils.py
@@ -41,10 +41,13 @@
raise FiscalYearError, error_msg
return fy
-def validate_fiscal_year(date, fiscal_year, label="Date"):
+def validate_fiscal_year(date, fiscal_year, label=_("Date"), doc=None):
years = [f[0] for f in get_fiscal_years(date, label=label)]
if fiscal_year not in years:
- throw(_("{0} '{1}' not in Fiscal Year {2}").format(label, formatdate(date), fiscal_year))
+ if doc:
+ doc.fiscal_year = years[0]
+ else:
+ throw(_("{0} '{1}' not in Fiscal Year {2}").format(label, formatdate(date), fiscal_year))
@frappe.whitelist()
def get_balance_on(account=None, date=None, party_type=None, party=None):
diff --git a/erpnext/buying/doctype/purchase_order_item/purchase_order_item.json b/erpnext/buying/doctype/purchase_order_item/purchase_order_item.json
index 0df7c8b..b0ba316 100755
--- a/erpnext/buying/doctype/purchase_order_item/purchase_order_item.json
+++ b/erpnext/buying/doctype/purchase_order_item/purchase_order_item.json
@@ -1,5 +1,5 @@
{
- "autoname": "POD/.#####",
+ "autoname": "hash",
"creation": "2013-05-24 19:29:06",
"docstatus": 0,
"doctype": "DocType",
@@ -484,7 +484,7 @@
],
"idx": 1,
"istable": 1,
- "modified": "2015-02-12 15:11:13.784588",
+ "modified": "2015-02-19 01:07:01.224244",
"modified_by": "Administrator",
"module": "Buying",
"name": "Purchase Order Item",
diff --git a/erpnext/buying/doctype/quality_inspection_reading/quality_inspection_reading.json b/erpnext/buying/doctype/quality_inspection_reading/quality_inspection_reading.json
index 21712ef..9618d04 100644
--- a/erpnext/buying/doctype/quality_inspection_reading/quality_inspection_reading.json
+++ b/erpnext/buying/doctype/quality_inspection_reading/quality_inspection_reading.json
@@ -1,6 +1,6 @@
{
- "autoname": "QASD/.#####",
- "creation": "2013-02-22 01:27:43.000000",
+ "autoname": "hash",
+ "creation": "2013-02-22 01:27:43",
"docstatus": 0,
"doctype": "DocType",
"fields": [
@@ -120,9 +120,10 @@
],
"idx": 1,
"istable": 1,
- "modified": "2013-12-20 19:23:39.000000",
+ "modified": "2015-02-19 01:07:01.658125",
"modified_by": "Administrator",
"module": "Buying",
"name": "Quality Inspection Reading",
- "owner": "Administrator"
+ "owner": "Administrator",
+ "permissions": []
}
\ No newline at end of file
diff --git a/erpnext/buying/doctype/supplier_quotation_item/supplier_quotation_item.json b/erpnext/buying/doctype/supplier_quotation_item/supplier_quotation_item.json
index 08d5871..4e736de 100644
--- a/erpnext/buying/doctype/supplier_quotation_item/supplier_quotation_item.json
+++ b/erpnext/buying/doctype/supplier_quotation_item/supplier_quotation_item.json
@@ -1,5 +1,5 @@
{
- "autoname": "SQI-.#####",
+ "autoname": "hash",
"creation": "2013-05-22 12:43:10",
"docstatus": 0,
"doctype": "DocType",
@@ -360,7 +360,7 @@
],
"idx": 1,
"istable": 1,
- "modified": "2015-02-12 15:16:13.616428",
+ "modified": "2015-02-19 01:07:02.403267",
"modified_by": "Administrator",
"module": "Buying",
"name": "Supplier Quotation Item",
diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py
index 744a0eb..c0a63cd 100644
--- a/erpnext/controllers/accounts_controller.py
+++ b/erpnext/controllers/accounts_controller.py
@@ -69,7 +69,7 @@
if date_field and self.get(date_field):
validate_fiscal_year(self.get(date_field), self.fiscal_year,
- label=self.meta.get_label(date_field))
+ self.meta.get_label(date_field), self)
def validate_due_date(self):
from erpnext.accounts.party import validate_due_date
diff --git a/erpnext/crm/doctype/opportunity/opportunity.py b/erpnext/crm/doctype/opportunity/opportunity.py
index 39dd614..30139c2 100644
--- a/erpnext/crm/doctype/opportunity/opportunity.py
+++ b/erpnext/crm/doctype/opportunity/opportunity.py
@@ -29,7 +29,7 @@
self.validate_cust_name()
from erpnext.accounts.utils import validate_fiscal_year
- validate_fiscal_year(self.transaction_date, self.fiscal_year, "Opportunity Date")
+ validate_fiscal_year(self.transaction_date, self.fiscal_year, _("Opportunity Date"), self)
def on_submit(self):
if self.lead:
@@ -52,11 +52,11 @@
def has_quotation(self):
return frappe.db.get_value("Quotation Item", {"prevdoc_docname": self.name, "docstatus": 1})
-
+
def has_ordered_quotation(self):
- return frappe.db.sql("""select q.name from `tabQuotation` q, `tabQuotation Item` qi
+ return frappe.db.sql("""select q.name from `tabQuotation` q, `tabQuotation Item` qi
where q.name = qi.parent and q.docstatus=1 and qi.prevdoc_docname =%s and q.status = 'Ordered'""", self.name)
-
+
def validate_cust_name(self):
self.customer_name = self.customer or self.lead
diff --git a/erpnext/hr/doctype/appraisal_goal/appraisal_goal.json b/erpnext/hr/doctype/appraisal_goal/appraisal_goal.json
index a40b2bc..6075ea2 100644
--- a/erpnext/hr/doctype/appraisal_goal/appraisal_goal.json
+++ b/erpnext/hr/doctype/appraisal_goal/appraisal_goal.json
@@ -1,6 +1,6 @@
{
- "autoname": "APRSLD.#####",
- "creation": "2013-02-22 01:27:44.000000",
+ "autoname": "hash",
+ "creation": "2013-02-22 01:27:44",
"docstatus": 0,
"doctype": "DocType",
"fields": [
@@ -59,9 +59,10 @@
],
"idx": 1,
"istable": 1,
- "modified": "2013-12-20 19:22:53.000000",
+ "modified": "2015-02-19 01:06:59.212681",
"modified_by": "Administrator",
"module": "HR",
"name": "Appraisal Goal",
- "owner": "ashwini@webnotestech.com"
+ "owner": "ashwini@webnotestech.com",
+ "permissions": []
}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/appraisal_template_goal/appraisal_template_goal.json b/erpnext/hr/doctype/appraisal_template_goal/appraisal_template_goal.json
index f23ec8c..12e640d 100644
--- a/erpnext/hr/doctype/appraisal_template_goal/appraisal_template_goal.json
+++ b/erpnext/hr/doctype/appraisal_template_goal/appraisal_template_goal.json
@@ -1,6 +1,6 @@
{
- "autoname": "KSHEET.#####",
- "creation": "2013-02-22 01:27:44.000000",
+ "autoname": "hash",
+ "creation": "2013-02-22 01:27:44",
"docstatus": 0,
"doctype": "DocType",
"fields": [
@@ -32,9 +32,10 @@
],
"idx": 1,
"istable": 1,
- "modified": "2013-12-20 19:22:54.000000",
+ "modified": "2015-02-19 01:06:59.356774",
"modified_by": "Administrator",
"module": "HR",
"name": "Appraisal Template Goal",
- "owner": "ashwini@webnotestech.com"
+ "owner": "ashwini@webnotestech.com",
+ "permissions": []
}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/attendance/attendance.py b/erpnext/hr/doctype/attendance/attendance.py
index dbab097..b703451 100644
--- a/erpnext/hr/doctype/attendance/attendance.py
+++ b/erpnext/hr/doctype/attendance/attendance.py
@@ -29,10 +29,6 @@
frappe.throw(_("Employee {0} was on leave on {1}. Cannot mark attendance.").format(self.employee,
self.att_date))
- def validate_fiscal_year(self):
- from erpnext.accounts.utils import validate_fiscal_year
- validate_fiscal_year(self.att_date, self.fiscal_year)
-
def validate_att_date(self):
if getdate(self.att_date) > getdate(nowdate()):
frappe.throw(_("Attendance can not be marked for future dates"))
@@ -45,8 +41,9 @@
def validate(self):
from erpnext.utilities import validate_status
+ from erpnext.accounts.utils import validate_fiscal_year
validate_status(self.status, ["Present", "Absent", "Half Day"])
- self.validate_fiscal_year()
+ validate_fiscal_year(self.att_date, self.fiscal_year, _("Attendance Date"), self)
self.validate_att_date()
self.validate_duplicate_record()
self.check_leave_record()
diff --git a/erpnext/hr/doctype/employee_leave_approver/employee_leave_approver.json b/erpnext/hr/doctype/employee_leave_approver/employee_leave_approver.json
index 76335fb..962ad6a 100644
--- a/erpnext/hr/doctype/employee_leave_approver/employee_leave_approver.json
+++ b/erpnext/hr/doctype/employee_leave_approver/employee_leave_approver.json
@@ -1,6 +1,6 @@
{
"allow_import": 0,
- "autoname": "LAPPR-/.#####",
+ "autoname": "hash",
"creation": "2013-04-12 06:56:15",
"description": "Users who can approve a specific employee's leave applications",
"docstatus": 0,
@@ -21,7 +21,7 @@
],
"idx": 1,
"istable": 1,
- "modified": "2014-08-27 06:21:36.887205",
+ "modified": "2015-02-19 01:07:00.128600",
"modified_by": "Administrator",
"module": "HR",
"name": "Employee Leave Approver",
diff --git a/erpnext/hr/doctype/expense_claim/expense_claim.py b/erpnext/hr/doctype/expense_claim/expense_claim.py
index b2b9b95..5e7e2fc 100644
--- a/erpnext/hr/doctype/expense_claim/expense_claim.py
+++ b/erpnext/hr/doctype/expense_claim/expense_claim.py
@@ -7,6 +7,7 @@
from frappe.utils import get_fullname
from frappe.model.document import Document
from erpnext.hr.utils import set_employee_name
+from erpnext.accounts.utils import validate_fiscal_year
class InvalidExpenseApproverError(frappe.ValidationError): pass
@@ -16,7 +17,7 @@
self.employee_name, self.total_claimed_amount)
def validate(self):
- self.validate_fiscal_year()
+ validate_fiscal_year(self.posting_date, self.fiscal_year, _("Posting Date"), self)
self.validate_exp_details()
self.validate_expense_approver()
set_employee_name(self)
@@ -25,10 +26,6 @@
if self.approval_status=="Draft":
frappe.throw(_("""Approval Status must be 'Approved' or 'Rejected'"""))
- def validate_fiscal_year(self):
- from erpnext.accounts.utils import validate_fiscal_year
- validate_fiscal_year(self.posting_date, self.fiscal_year, "Posting Date")
-
def validate_exp_details(self):
if not self.get('expenses'):
frappe.throw(_("Please add expense voucher details"))
diff --git a/erpnext/hr/doctype/leave_block_list/leave_block_list.py b/erpnext/hr/doctype/leave_block_list/leave_block_list.py
index e9bc6ab..67f498a 100644
--- a/erpnext/hr/doctype/leave_block_list/leave_block_list.py
+++ b/erpnext/hr/doctype/leave_block_list/leave_block_list.py
@@ -11,41 +11,41 @@
from frappe.model.document import Document
class LeaveBlockList(Document):
-
+
def validate(self):
dates = []
for d in self.get("leave_block_list_dates"):
# validate fiscal year
validate_fiscal_year(d.block_date, self.year, _("Block Date"))
-
+
# date is not repeated
if d.block_date in dates:
frappe.msgprint(_("Date is repeated") + ":" + d.block_date, raise_exception=1)
dates.append(d.block_date)
@frappe.whitelist()
-def get_applicable_block_dates(from_date, to_date, employee=None,
+def get_applicable_block_dates(from_date, to_date, employee=None,
company=None, all_lists=False):
block_dates = []
for block_list in get_applicable_block_lists(employee, company, all_lists):
- block_dates.extend(frappe.db.sql("""select block_date, reason
- from `tabLeave Block List Date` where parent=%s
- and block_date between %s and %s""", (block_list, from_date, to_date),
+ block_dates.extend(frappe.db.sql("""select block_date, reason
+ from `tabLeave Block List Date` where parent=%s
+ and block_date between %s and %s""", (block_list, from_date, to_date),
as_dict=1))
-
+
return block_dates
-
+
def get_applicable_block_lists(employee=None, company=None, all_lists=False):
block_lists = []
-
+
if not employee:
employee = frappe.db.get_value("Employee", {"user_id":frappe.session.user})
if not employee:
return []
-
+
if not company:
company = frappe.db.get_value("Employee", employee, "company")
-
+
def add_block_list(block_list):
if block_list:
if all_lists or not is_user_in_allow_list(block_list):
@@ -61,9 +61,9 @@
for block_list in frappe.db.sql_list("""select name from `tabLeave Block List`
where ifnull(applies_to_all_departments,0)=1 and company=%s""", company):
add_block_list(block_list)
-
+
return list(set(block_lists))
-
+
def is_user_in_allow_list(block_list):
return frappe.session.user in frappe.db.sql_list("""select allow_user
- from `tabLeave Block List Allow` where parent=%s""", block_list)
\ No newline at end of file
+ from `tabLeave Block List Allow` where parent=%s""", block_list)
diff --git a/erpnext/manufacturing/doctype/bom/bom.js b/erpnext/manufacturing/doctype/bom/bom.js
index 22bddaa..2ec74f2 100644
--- a/erpnext/manufacturing/doctype/bom/bom.js
+++ b/erpnext/manufacturing/doctype/bom/bom.js
@@ -164,6 +164,8 @@
frappe.ui.form.on("BOM Operation", "operation", function(frm, cdt, cdn) {
var d = locals[cdt][cdn];
+ if(!d.operation) return;
+
frappe.call({
"method": "frappe.client.get",
args: {
@@ -206,4 +208,4 @@
cur_frm.cscript.image = function() {
refresh_field("image_view");
-}
\ No newline at end of file
+}
diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py
index 6c50c86..8ff0a83 100644
--- a/erpnext/manufacturing/doctype/bom/bom.py
+++ b/erpnext/manufacturing/doctype/bom/bom.py
@@ -14,10 +14,9 @@
def autoname(self):
last_name = frappe.db.sql("""select max(name) from `tabBOM`
- where name like "BOM/%s/%%" """ % cstr(self.item).replace('"', '\\"'))
+ where name like "BOM/%s/%%" """ % frappe.db.escape(self.item))
if last_name:
idx = cint(cstr(last_name[0][0]).split('/')[-1].split('-')[0]) + 1
-
else:
idx = 1
self.name = 'BOM/' + self.item + ('/%.3i' % idx)
diff --git a/erpnext/manufacturing/doctype/bom_explosion_item/bom_explosion_item.json b/erpnext/manufacturing/doctype/bom_explosion_item/bom_explosion_item.json
index 59ef647..14f091a 100644
--- a/erpnext/manufacturing/doctype/bom_explosion_item/bom_explosion_item.json
+++ b/erpnext/manufacturing/doctype/bom_explosion_item/bom_explosion_item.json
@@ -1,5 +1,5 @@
{
- "autoname": "FBD/.######",
+ "autoname": "hash",
"creation": "2013-03-07 11:42:57",
"default_print_format": "Standard",
"docstatus": 0,
@@ -140,7 +140,7 @@
],
"idx": 1,
"istable": 1,
- "modified": "2015-02-12 15:16:56.092124",
+ "modified": "2015-02-19 01:06:59.399382",
"modified_by": "Administrator",
"module": "Manufacturing",
"name": "BOM Explosion Item",
diff --git a/erpnext/manufacturing/doctype/production_order/production_order.js b/erpnext/manufacturing/doctype/production_order/production_order.js
index 8ab6237..f7f3e87 100644
--- a/erpnext/manufacturing/doctype/production_order/production_order.js
+++ b/erpnext/manufacturing/doctype/production_order/production_order.js
@@ -1,41 +1,142 @@
// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
// License: GNU General Public License v3. See license.txt
-$.extend(cur_frm.cscript, {
- onload: function (doc, dt, dn) {
- if (!doc.status) doc.status = 'Draft';
- cfn_set_fields(doc, dt, dn);
+frappe.ui.form.on("Production Order", "onload", function(frm) {
+ if (!frm.doc.status)
+ frm.doc.status = 'Draft';
- this.frm.add_fetch("sales_order", "delivery_date", "expected_delivery_date");
+ frm.add_fetch("sales_order", "delivery_date", "expected_delivery_date");
- if(doc.__islocal) {
- cur_frm.set_value({
+ if(frm.doc.__islocal) {
+ frm.set_value({
"actual_start_date": "",
"actual_end_date": ""
- });
+ });
+ }
+
+ erpnext.production_order.set_custom_buttons(frm);
+ erpnext.production_order.setup_company_filter(frm);
+ erpnext.production_order.setup_bom_filter(frm);
+});
+
+frappe.ui.form.on("Production Order", "refresh", function(frm) {
+ erpnext.toggle_naming_series();
+ frm.set_intro("");
+ erpnext.production_order.set_custom_buttons(frm);
+
+ if (frm.doc.docstatus === 0 && !frm.doc.__islocal) {
+ frm.set_intro(__("Submit this Production Order for further processing."));
+ }
+});
+
+frappe.ui.form.on("Production Order", "additional_operating_cost", function(frm) {
+ erpnext.production_order.calculate_total_cost(frm);
+});
+
+frappe.ui.form.on("Production Order Operation", "workstation", function(frm, cdt, cdn) {
+ var d = locals[cdt][cdn];
+ frappe.call({
+ "method": "frappe.client.get",
+ args: {
+ doctype: "Workstation",
+ name: d.workstation
+ },
+ callback: function (data) {
+ frappe.model.set_value(d.doctype, d.name, "hour_rate", data.message.hour_rate);
+ erpnext.production_order.calculate_cost(frm.doc);
+ erpnext.production_order.calculate_total_cost(frm);
}
- },
+ })
+});
- before_submit: function() {
- cur_frm.toggle_reqd(["fg_warehouse", "wip_warehouse"], true);
- },
+frappe.ui.form.on("Production Order Operation", "time_in_mins", function(frm, cdt, cdn) {
+ erpnext.production_order.calculate_cost(frm.doc);
+ erpnext.production_order.calculate_total_cost(frm)
+});
- refresh: function(doc, dt, dn) {
- this.frm.dashboard.reset();
- erpnext.toggle_naming_series();
- this.frm.set_intro("");
- cfn_set_fields(doc, dt, dn);
+erpnext.production_order = {
+ set_custom_buttons: function(frm) {
+ var doc = frm.doc;
+ if (doc.docstatus === 1) {
- if (doc.docstatus === 0 && !doc.__islocal) {
- this.frm.set_intro(__("Submit this Production Order for further processing."));
- } else if (doc.docstatus === 1) {
- var percent = flt(doc.produced_qty) / flt(doc.qty) * 100;
- this.frm.dashboard.add_progress(cint(percent) + "% " + __("Complete"), percent);
+ if (doc.material_transferred_for_qty < doc.qty) {
+ frm.add_custom_button(__('Transfer Materials for Manufacture'),
+ cur_frm.cscript['Transfer Raw Materials'], frappe.boot.doctype_icons["Stock Entry"]);
+ }
- if(doc.status === "Stopped") {
- this.frm.dashboard.set_headline_alert(__("Stopped"), "alert-danger", "icon-stop");
+ if (doc.produced_qty < doc.material_transferred_for_qty) {
+ frm.add_custom_button(__('Update Finished Goods'),
+ cur_frm.cscript['Update Finished Goods'], frappe.boot.doctype_icons["Stock Entry"]);
+ }
+
+ if(doc.status==="Completed") {
+ frm.add_custom_button(__("Show Stock Entries"), function() {
+ frappe.route_options = {
+ production_order: frm.doc.name
+ }
+ frappe.set_route("List", "Stock Entry");
+ });
+ }
+
+ if (doc.status != 'Stopped' && doc.status != 'Completed') {
+ frm.add_custom_button(__('Stop'), cur_frm.cscript['Stop Production Order'],
+ "icon-exclamation", "btn-default");
+ } else if (doc.status == 'Stopped') {
+ frm.add_custom_button(__('Unstop'), cur_frm.cscript['Unstop Production Order'],
+ "icon-check", "btn-default");
}
}
+
+ },
+ calculate_cost: function(doc) {
+ if (doc.operations){
+ var op = doc.operations;
+ doc.planned_operating_cost = 0.0;
+ for(var i=0;i<op.length;i++) {
+ planned_operating_cost = flt(flt(op[i].hour_rate) * flt(op[i].time_in_mins) / 60, 2);
+ frappe.model.set_value('Production Order Operation',op[i].name, "planned_operating_cost", planned_operating_cost);
+
+ doc.planned_operating_cost += planned_operating_cost;
+ }
+ refresh_field('planned_operating_cost');
+ }
+ },
+
+ calculate_total_cost: function(frm) {
+ var variable_cost = frm.doc.actual_operating_cost ?
+ flt(frm.doc.actual_operating_cost) : flt(frm.doc.planned_operating_cost)
+ frm.set_value("total_operating_cost", (flt(frm.doc.additional_operating_cost) + variable_cost))
+ },
+
+ setup_company_filter: function(frm) {
+ var company_filter = function(doc) {
+ return {
+ filters: {
+ 'company': frm.doc.company
+ }
+ }
+ }
+
+ frm.fields_dict.fg_warehouse.get_query = company_filter;
+ frm.fields_dict.wip_warehouse.get_query = company_filter;
+ },
+
+ setup_bom_filter: function(frm) {
+ frm.set_query("bom_no", function(doc) {
+ if (doc.production_item) {
+ return{
+ query: "erpnext.controllers.queries.bom",
+ filters: {item: cstr(doc.production_item)}
+ }
+ } else msgprint(__("Please enter Production Item first"));
+ });
+ }
+}
+
+
+$.extend(cur_frm.cscript, {
+ before_submit: function() {
+ cur_frm.toggle_reqd(["fg_warehouse", "wip_warehouse"], true);
},
production_item: function(doc) {
@@ -105,29 +206,9 @@
"production_order_id": doc.name
}
});
- }
+ },
});
-var cfn_set_fields = function(doc, dt, dn) {
- if (doc.docstatus == 1) {
-
- if (doc.status == 'Submitted' || doc.status == 'Material Transferred' || doc.status == 'In Process'){
- cur_frm.add_custom_button(__('Transfer Raw Materials'),
- cur_frm.cscript['Transfer Raw Materials'], frappe.boot.doctype_icons["Stock Entry"]);
- cur_frm.add_custom_button(__('Update Finished Goods'),
- cur_frm.cscript['Update Finished Goods'], frappe.boot.doctype_icons["Stock Entry"]);
- }
-
- if (doc.status != 'Stopped' && doc.status != 'Completed') {
- cur_frm.add_custom_button(__('Stop'), cur_frm.cscript['Stop Production Order'],
- "icon-exclamation", "btn-default");
- } else if (doc.status == 'Stopped') {
- cur_frm.add_custom_button(__('Unstop'), cur_frm.cscript['Unstop Production Order'],
- "icon-check", "btn-default");
- }
- }
-}
-
cur_frm.cscript['Stop Production Order'] = function() {
var doc = cur_frm.doc;
var check = confirm(__("Do you really want to stop production order: " + doc.name));
@@ -167,67 +248,6 @@
}
}
-cur_frm.set_query("bom_no", function(doc) {
- if (doc.production_item) {
- return{
- query: "erpnext.controllers.queries.bom",
- filters: {item: cstr(doc.production_item)}
- }
- } else msgprint(__("Please enter Production Item first"));
-});
-var calculate_total_cost = function(frm) {
- var variable_cost = frm.doc.actual_operating_cost ? flt(frm.doc.actual_operating_cost) : flt(frm.doc.planned_operating_cost)
- frm.set_value("total_operating_cost", (flt(frm.doc.additional_operating_cost) + variable_cost))
-}
-frappe.ui.form.on("Production Order", "additional_operating_cost", function(frm) {
- calculate_total_cost(frm);
-});
-
-frappe.ui.form.on("Production Order Operation", "workstation", function(frm, cdt, cdn) {
- var d = locals[cdt][cdn];
- frappe.call({
- "method": "frappe.client.get",
- args: {
- doctype: "Workstation",
- name: d.workstation
- },
- callback: function (data) {
- frappe.model.set_value(d.doctype, d.name, "hour_rate", data.message.hour_rate);
- calculate_cost(frm.doc);
- calculate_total_cost(frm);
- }
- })
-});
-
-var calculate_cost = function(doc) {
- if (doc.operations){
- var op = doc.operations;
- doc.planned_operating_cost = 0.0;
- for(var i=0;i<op.length;i++) {
- planned_operating_cost = flt(flt(op[i].hour_rate) * flt(op[i].time_in_mins) / 60, 2);
- frappe.model.set_value('Production Order Operation',op[i].name, "planned_operating_cost", planned_operating_cost);
-
- doc.planned_operating_cost += planned_operating_cost;
- }
- refresh_field('planned_operating_cost');
- }
-}
-
-frappe.ui.form.on("Production Order Operation", "time_in_mins", function(frm, cdt, cdn) {
- calculate_cost(frm.doc);
- calculate_total_cost(frm)
-});
-
-var company_filter = function(doc) {
- return{
- filters: {
- 'company': doc.company
- }
- }
-}
-
-cur_frm.fields_dict.fg_warehouse.get_query = company_filter
-cur_frm.fields_dict.wip_warehouse.get_query = company_filter
diff --git a/erpnext/manufacturing/doctype/production_order/production_order.json b/erpnext/manufacturing/doctype/production_order/production_order.json
index ce24ec2..f820aa8 100644
--- a/erpnext/manufacturing/doctype/production_order/production_order.json
+++ b/erpnext/manufacturing/doctype/production_order/production_order.json
@@ -66,6 +66,14 @@
"reqd": 1
},
{
+ "default": "1",
+ "description": "Plan material for sub-assemblies",
+ "fieldname": "use_multi_level_bom",
+ "fieldtype": "Check",
+ "label": "Use Multi-Level BOM",
+ "permlevel": 0
+ },
+ {
"fieldname": "column_break1",
"fieldtype": "Column Break",
"oldfieldtype": "Column Break",
@@ -86,6 +94,15 @@
"reqd": 1
},
{
+ "description": "Automatically updated via Stock Entry",
+ "fieldname": "material_transferred_for_qty",
+ "fieldtype": "Int",
+ "label": "Material Transferred for Qty",
+ "permlevel": 0,
+ "precision": "",
+ "read_only": 1
+ },
+ {
"default": "0",
"depends_on": "eval:doc.docstatus==1",
"description": "Automatically updated via Stock Entry of type Manufacture or Repack",
@@ -99,14 +116,38 @@
"read_only": 1
},
{
- "default": "1",
- "description": "If checked, BOM for sub-assembly items will be considered for getting raw materials. Otherwise, all sub-assembly items will be treated as a raw material.",
- "fieldname": "use_multi_level_bom",
- "fieldtype": "Check",
- "label": "Use Multi-Level BOM",
+ "fieldname": "warehouses",
+ "fieldtype": "Section Break",
+ "label": "Warehouses",
+ "options": "icon-building",
"permlevel": 0
},
{
+ "fieldname": "wip_warehouse",
+ "fieldtype": "Link",
+ "label": "Work-in-Progress Warehouse",
+ "options": "Warehouse",
+ "permlevel": 0,
+ "reqd": 0
+ },
+ {
+ "fieldname": "column_break_12",
+ "fieldtype": "Column Break",
+ "permlevel": 0
+ },
+ {
+ "depends_on": "",
+ "description": "",
+ "fieldname": "fg_warehouse",
+ "fieldtype": "Link",
+ "in_list_view": 0,
+ "label": "Target Warehouse",
+ "options": "Warehouse",
+ "permlevel": 0,
+ "read_only": 0,
+ "reqd": 0
+ },
+ {
"fieldname": "time",
"fieldtype": "Section Break",
"label": "Time",
@@ -159,38 +200,6 @@
"read_only": 1
},
{
- "fieldname": "warehouses",
- "fieldtype": "Section Break",
- "label": "Warehouses",
- "options": "icon-building",
- "permlevel": 0
- },
- {
- "depends_on": "",
- "description": "Manufactured quantity will be updated in this warehouse",
- "fieldname": "fg_warehouse",
- "fieldtype": "Link",
- "in_list_view": 0,
- "label": "For Warehouse",
- "options": "Warehouse",
- "permlevel": 0,
- "read_only": 0,
- "reqd": 0
- },
- {
- "fieldname": "column_break_12",
- "fieldtype": "Column Break",
- "permlevel": 0
- },
- {
- "fieldname": "wip_warehouse",
- "fieldtype": "Link",
- "label": "Work-in-Progress Warehouse",
- "options": "Warehouse",
- "permlevel": 0,
- "reqd": 0
- },
- {
"depends_on": "",
"fieldname": "operations_section",
"fieldtype": "Section Break",
@@ -351,7 +360,7 @@
"idx": 1,
"in_create": 0,
"is_submittable": 1,
- "modified": "2015-02-05 05:11:42.851377",
+ "modified": "2015-02-19 03:58:23.460022",
"modified_by": "Administrator",
"module": "Manufacturing",
"name": "Production Order",
diff --git a/erpnext/manufacturing/doctype/production_order/production_order.py b/erpnext/manufacturing/doctype/production_order/production_order.py
index 3e9b710..480d5ef 100644
--- a/erpnext/manufacturing/doctype/production_order/production_order.py
+++ b/erpnext/manufacturing/doctype/production_order/production_order.py
@@ -120,16 +120,20 @@
if status != self.status:
self.db_set("status", status)
- def update_produced_qty(self):
- produced_qty = frappe.db.sql("""select sum(fg_completed_qty)
- from `tabStock Entry` where production_order=%s and docstatus=1
- and purpose='Manufacture'""", self.name)
- produced_qty = flt(produced_qty[0][0]) if produced_qty else 0
+ def update_production_order_qty(self):
+ """Update **Manufactured Qty** and **Material Transferred for Qty** in Production Order
+ based on Stock Entry"""
+ for status, fieldname in (("Manufacture", "produced_qty"),
+ ("Material Transfer for Manufacture", "material_transferred_for_qty")):
+ qty = flt(frappe.db.sql("""select sum(fg_completed_qty)
+ from `tabStock Entry` where production_order=%s and docstatus=1
+ and purpose=%s""", (self.name, status))[0][0])
- if produced_qty > self.qty:
- frappe.throw(_("Manufactured quantity {0} cannot be greater than planned quanitity {1} in Production Order {2}").format(produced_qty, self.qty, self.name), StockOverProductionError)
+ if qty > self.qty:
+ frappe.throw(_("{0} ({1}) cannot be greater than planned quanitity ({2}) in Production Order {3}").format(\
+ self.meta.get_label(fieldname), qty, self.qty, self.name), StockOverProductionError)
- self.db_set("produced_qty", produced_qty)
+ self.db_set(fieldname, qty)
def on_submit(self):
if not self.wip_warehouse:
@@ -223,10 +227,6 @@
def validate_delivery_date(self):
if self.docstatus==1:
- if self.planned_start_date and self.expected_delivery_date \
- and getdate(self.expected_delivery_date) < getdate(self.planned_start_date):
- frappe.throw(_("Expected Delivery Date cannot be greater than Planned Start Date"))
-
if self.planned_end_date and self.expected_delivery_date \
and getdate(self.expected_delivery_date) < getdate(self.planned_end_date):
frappe.msgprint(_("Production might not be able to finish by the Expected Delivery Date."))
@@ -280,12 +280,12 @@
if filters[key]:
conditions += " and " + key + ' = "' + filters[key].replace('"', '\"') + '"'
- data = frappe.db.sql("""select name,production_item, production_start_date, production_end_date
+ data = frappe.db.sql("""select name, production_item, planned_start_date, planned_end_date
from `tabProduction Order`
- where ((ifnull(production_start_date, '0000-00-00')!= '0000-00-00') \
- and (production_start_date between %(start)s and %(end)s) \
- or ((ifnull(production_start_date, '0000-00-00')!= '0000-00-00') \
- and production_end_date between %(start)s and %(end)s)) {conditions}
+ where ((ifnull(planned_start_date, '0000-00-00')!= '0000-00-00') \
+ and (planned_start_date between %(start)s and %(end)s) \
+ or ((ifnull(planned_start_date, '0000-00-00')!= '0000-00-00') \
+ and planned_end_date between %(start)s and %(end)s)) {conditions}
""".format(conditions=conditions), {
"start": start,
"end": end
diff --git a/erpnext/manufacturing/doctype/production_order/production_order_calendar.js b/erpnext/manufacturing/doctype/production_order/production_order_calendar.js
index 3509d32..1310687 100644
--- a/erpnext/manufacturing/doctype/production_order/production_order_calendar.js
+++ b/erpnext/manufacturing/doctype/production_order/production_order_calendar.js
@@ -3,10 +3,10 @@
frappe.views.calendar["Production Order"] = {
field_map: {
- "start": "production_start_date",
- "end": "production_end_date",
+ "start": "planned_start_date",
+ "end": "planned_end_date",
"id": "name",
- "title": "production_item",
+ "title": "name",
"allDay": "allDay"
},
gantt: true,
diff --git a/erpnext/manufacturing/doctype/production_order/production_order_list.js b/erpnext/manufacturing/doctype/production_order/production_order_list.js
index b38581b..f08158c 100644
--- a/erpnext/manufacturing/doctype/production_order/production_order_list.js
+++ b/erpnext/manufacturing/doctype/production_order/production_order_list.js
@@ -1,15 +1,18 @@
frappe.listview_settings['Production Order'] = {
add_fields: ["bom_no", "status", "sales_order", "qty",
"produced_qty", "expected_delivery_date"],
- filters: [["status", "!=", "Completed"], ["status", "!=", "Stopped"]],
+ filters: [["status", "!=", "Stopped"]],
get_indicator: function(doc) {
- return [__(doc.status), {
- "Draft": "red",
- "Submitted": "blue",
- "Stopped": "red",
- "In Process": "orange",
- "Completed": "green",
- "Cancelled": "darkgrey"
- }[doc.status], "status,=," + doc.status];
+ if(doc.status==="Submitted") {
+ return [__("Not Started"), "orange", "status,=,Submitted"];
+ } else {
+ return [__(doc.status), {
+ "Draft": "red",
+ "Stopped": "red",
+ "In Process": "orange",
+ "Completed": "green",
+ "Cancelled": "darkgrey"
+ }[doc.status], "status,=," + doc.status];
+ }
}
};
diff --git a/erpnext/manufacturing/doctype/production_plan_item/production_plan_item.json b/erpnext/manufacturing/doctype/production_plan_item/production_plan_item.json
index cb5d24f..7134938 100644
--- a/erpnext/manufacturing/doctype/production_plan_item/production_plan_item.json
+++ b/erpnext/manufacturing/doctype/production_plan_item/production_plan_item.json
@@ -1,6 +1,6 @@
{
- "autoname": "PPID/.#####",
- "creation": "2013-02-22 01:27:49.000000",
+ "autoname": "hash",
+ "creation": "2013-02-22 01:27:49",
"docstatus": 0,
"doctype": "DocType",
"fields": [
@@ -104,9 +104,10 @@
],
"idx": 1,
"istable": 1,
- "modified": "2013-12-20 19:23:25.000000",
+ "modified": "2015-02-19 01:07:00.936590",
"modified_by": "Administrator",
"module": "Manufacturing",
"name": "Production Plan Item",
- "owner": "Administrator"
+ "owner": "Administrator",
+ "permissions": []
}
\ No newline at end of file
diff --git a/erpnext/manufacturing/doctype/production_plan_sales_order/production_plan_sales_order.json b/erpnext/manufacturing/doctype/production_plan_sales_order/production_plan_sales_order.json
index 39634fe..087acdd 100644
--- a/erpnext/manufacturing/doctype/production_plan_sales_order/production_plan_sales_order.json
+++ b/erpnext/manufacturing/doctype/production_plan_sales_order/production_plan_sales_order.json
@@ -1,5 +1,5 @@
{
- "autoname": "PP/.SO/.#####",
+ "autoname": "hash",
"creation": "2013-02-22 01:27:49",
"docstatus": 0,
"doctype": "DocType",
@@ -59,7 +59,7 @@
],
"idx": 1,
"istable": 1,
- "modified": "2015-02-17 14:29:14.479541",
+ "modified": "2015-02-19 01:07:00.991795",
"modified_by": "Administrator",
"module": "Manufacturing",
"name": "Production Plan Sales Order",
diff --git a/erpnext/patches.txt b/erpnext/patches.txt
index 1c366d2..e444eec 100644
--- a/erpnext/patches.txt
+++ b/erpnext/patches.txt
@@ -118,3 +118,4 @@
erpnext.patches.v5_0.update_material_transfer_for_manufacture
erpnext.patches.v5_0.manufacturing_activity_type
erpnext.patches.v5_0.update_item_description_and_image
+erpnext.patches.v5_0.update_material_transferred_for_qty
diff --git a/erpnext/patches/v5_0/new_crm_module.py b/erpnext/patches/v5_0/new_crm_module.py
index ecf20e5..b102261 100644
--- a/erpnext/patches/v5_0/new_crm_module.py
+++ b/erpnext/patches/v5_0/new_crm_module.py
@@ -21,4 +21,3 @@
user_desktop_items.append("CRM")
frappe.db.set_default(key, json.dumps(user_desktop_items), parent=user)
-
diff --git a/erpnext/patches/v5_0/update_material_transferred_for_qty.py b/erpnext/patches/v5_0/update_material_transferred_for_qty.py
new file mode 100644
index 0000000..45b4889
--- /dev/null
+++ b/erpnext/patches/v5_0/update_material_transferred_for_qty.py
@@ -0,0 +1,9 @@
+import frappe
+
+def execute():
+ frappe.reload_doctype("Production Order")
+ frappe.db.sql("""update `tabProduction Order` set material_transferred_for_qty=
+ (select sum(fg_completed_qty) from `tabStock Entry`
+ where docstatus=1
+ and production_order=`tabProduction Order`.name
+ and purpose = "Material Transfer for Manufacture")""")
diff --git a/erpnext/projects/doctype/time_log/time_log.js b/erpnext/projects/doctype/time_log/time_log.js
index 3e28e70..8172650 100644
--- a/erpnext/projects/doctype/time_log/time_log.js
+++ b/erpnext/projects/doctype/time_log/time_log.js
@@ -22,6 +22,12 @@
frm._setting_hours = false;
});
+// clear production order if making time log
+frappe.ui.form.on("Time Log", "before_save", function(frm) {
+ frm.doc.production_order && frappe.model.remove_from_locals("Production Order",
+ frm.doc.production_order);
+});
+
// set hours if to_time is updated
frappe.ui.form.on("Time Log", "to_time", function(frm) {
if(frm._setting_hours) return;
@@ -69,7 +75,7 @@
}
});
},
-
+
time_log_for: function(doc) {
if (doc.time_log_for == 'Manufacturing') {
cur_frm.set_value("activity_type", "Manufacturing")
diff --git a/erpnext/projects/doctype/time_log/time_log.json b/erpnext/projects/doctype/time_log/time_log.json
index 9dc2d59..bc68805 100644
--- a/erpnext/projects/doctype/time_log/time_log.json
+++ b/erpnext/projects/doctype/time_log/time_log.json
@@ -17,15 +17,6 @@
"reqd": 1
},
{
- "fieldname": "time_log_for",
- "fieldtype": "Select",
- "label": "Time Log For",
- "options": "\nProject\nManufacturing",
- "permlevel": 0,
- "precision": "",
- "reqd": 0
- },
- {
"fieldname": "from_time",
"fieldtype": "Datetime",
"in_list_view": 0,
@@ -52,6 +43,14 @@
"read_only": 0
},
{
+ "fieldname": "billable",
+ "fieldtype": "Check",
+ "in_list_view": 0,
+ "label": "Billable",
+ "permlevel": 0,
+ "read_only": 0
+ },
+ {
"fieldname": "column_break_3",
"fieldtype": "Column Break",
"permlevel": 0,
@@ -68,6 +67,15 @@
"reqd": 0
},
{
+ "fieldname": "time_log_for",
+ "fieldtype": "Select",
+ "label": "Time Log For",
+ "options": "\nProject\nManufacturing",
+ "permlevel": 0,
+ "precision": "",
+ "reqd": 0
+ },
+ {
"depends_on": "",
"fieldname": "activity_type",
"fieldtype": "Link",
@@ -89,6 +97,13 @@
},
{
"depends_on": "eval:doc.time_log_for == 'Manufacturing'",
+ "fieldname": "section_break_11",
+ "fieldtype": "Section Break",
+ "permlevel": 0,
+ "precision": ""
+ },
+ {
+ "depends_on": "eval:doc.time_log_for == 'Manufacturing'",
"fieldname": "production_order",
"fieldtype": "Link",
"label": "Production Order",
@@ -106,6 +121,12 @@
"precision": ""
},
{
+ "fieldname": "column_break_14",
+ "fieldtype": "Column Break",
+ "permlevel": 0,
+ "precision": ""
+ },
+ {
"depends_on": "eval:doc.time_log_for == 'Manufacturing'",
"fieldname": "workstation",
"fieldtype": "Link",
@@ -116,6 +137,7 @@
"read_only": 1
},
{
+ "depends_on": "eval:doc.time_log_for == 'Manufacturing'",
"description": "Operation completed for how many finished goods?",
"fieldname": "completed_qty",
"fieldtype": "Float",
@@ -124,14 +146,6 @@
"precision": ""
},
{
- "fieldname": "billable",
- "fieldtype": "Check",
- "in_list_view": 0,
- "label": "Billable",
- "permlevel": 0,
- "read_only": 0
- },
- {
"fieldname": "section_break_7",
"fieldtype": "Section Break",
"permlevel": 0,
@@ -199,7 +213,7 @@
"icon": "icon-time",
"idx": 1,
"is_submittable": 1,
- "modified": "2015-02-05 05:11:48.252723",
+ "modified": "2015-02-19 04:16:33.756377",
"modified_by": "Administrator",
"module": "Projects",
"name": "Time Log",
diff --git a/erpnext/selling/doctype/installation_note/installation_note.py b/erpnext/selling/doctype/installation_note/installation_note.py
index 4aba9ab..fb6e9b6 100644
--- a/erpnext/selling/doctype/installation_note/installation_note.py
+++ b/erpnext/selling/doctype/installation_note/installation_note.py
@@ -10,6 +10,7 @@
from erpnext.stock.utils import get_valid_serial_nos
from erpnext.utilities.transaction_base import TransactionBase
+from erpnext.accounts.utils import validate_fiscal_year
class InstallationNote(TransactionBase):
def __init__(self, arg1, arg2=None):
@@ -30,17 +31,13 @@
}]
def validate(self):
- self.validate_fiscal_year()
+ validate_fiscal_year(self.inst_date, self.fiscal_year, _("Installation Date"), self)
self.validate_installation_date()
self.check_item_table()
from erpnext.controllers.selling_controller import check_active_sales_items
check_active_sales_items(self)
- def validate_fiscal_year(self):
- from erpnext.accounts.utils import validate_fiscal_year
- validate_fiscal_year(self.inst_date, self.fiscal_year, "Installation Date")
-
def is_serial_no_added(self, item_code, serial_no):
ar_required = frappe.db.get_value("Item", item_code, "has_serial_no")
if ar_required == 'Yes' and not serial_no:
diff --git a/erpnext/selling/doctype/installation_note_item/installation_note_item.json b/erpnext/selling/doctype/installation_note_item/installation_note_item.json
index 0e94d10..36c3358 100644
--- a/erpnext/selling/doctype/installation_note_item/installation_note_item.json
+++ b/erpnext/selling/doctype/installation_note_item/installation_note_item.json
@@ -1,6 +1,6 @@
{
- "autoname": "IID/.#####",
- "creation": "2013-02-22 01:27:51.000000",
+ "autoname": "hash",
+ "creation": "2013-02-22 01:27:51",
"docstatus": 0,
"doctype": "DocType",
"fields": [
@@ -100,9 +100,10 @@
],
"idx": 1,
"istable": 1,
- "modified": "2013-12-20 19:23:14.000000",
+ "modified": "2015-02-19 01:07:00.200686",
"modified_by": "Administrator",
"module": "Selling",
"name": "Installation Note Item",
- "owner": "Administrator"
+ "owner": "Administrator",
+ "permissions": []
}
\ No newline at end of file
diff --git a/erpnext/selling/doctype/quotation_item/quotation_item.json b/erpnext/selling/doctype/quotation_item/quotation_item.json
index 401842e..23b0b18 100644
--- a/erpnext/selling/doctype/quotation_item/quotation_item.json
+++ b/erpnext/selling/doctype/quotation_item/quotation_item.json
@@ -1,5 +1,5 @@
{
- "autoname": "QUOD/.#####",
+ "autoname": "hash",
"creation": "2013-03-07 11:42:57",
"docstatus": 0,
"doctype": "DocType",
@@ -349,7 +349,7 @@
],
"idx": 1,
"istable": 1,
- "modified": "2015-02-12 15:18:41.236797",
+ "modified": "2015-02-19 01:07:01.742936",
"modified_by": "Administrator",
"module": "Selling",
"name": "Quotation Item",
diff --git a/erpnext/selling/doctype/sales_order_item/sales_order_item.json b/erpnext/selling/doctype/sales_order_item/sales_order_item.json
index 853a7a3..131ec4d 100644
--- a/erpnext/selling/doctype/sales_order_item/sales_order_item.json
+++ b/erpnext/selling/doctype/sales_order_item/sales_order_item.json
@@ -1,455 +1,455 @@
{
- "autoname": "SOD/.#####",
- "creation": "2013-03-07 11:42:58",
- "docstatus": 0,
- "doctype": "DocType",
+ "autoname": "hash",
+ "creation": "2013-03-07 11:42:58",
+ "docstatus": 0,
+ "doctype": "DocType",
"fields": [
{
- "fieldname": "item_code",
- "fieldtype": "Link",
- "in_filter": 1,
- "in_list_view": 1,
- "label": "Item Code",
- "oldfieldname": "item_code",
- "oldfieldtype": "Link",
- "options": "Item",
- "permlevel": 0,
- "print_width": "150px",
- "read_only": 0,
- "reqd": 1,
- "search_index": 1,
+ "fieldname": "item_code",
+ "fieldtype": "Link",
+ "in_filter": 1,
+ "in_list_view": 1,
+ "label": "Item Code",
+ "oldfieldname": "item_code",
+ "oldfieldtype": "Link",
+ "options": "Item",
+ "permlevel": 0,
+ "print_width": "150px",
+ "read_only": 0,
+ "reqd": 1,
+ "search_index": 1,
"width": "150px"
- },
+ },
{
- "fieldname": "customer_item_code",
- "fieldtype": "Data",
- "hidden": 1,
- "label": "Customer's Item Code",
- "permlevel": 0,
- "print_hide": 1,
+ "fieldname": "customer_item_code",
+ "fieldtype": "Data",
+ "hidden": 1,
+ "label": "Customer's Item Code",
+ "permlevel": 0,
+ "print_hide": 1,
"read_only": 1
- },
+ },
{
- "fieldname": "col_break1",
- "fieldtype": "Column Break",
+ "fieldname": "col_break1",
+ "fieldtype": "Column Break",
"permlevel": 0
- },
+ },
{
- "fieldname": "item_name",
- "fieldtype": "Data",
- "in_list_view": 1,
- "label": "Item Name",
- "oldfieldname": "item_name",
- "oldfieldtype": "Data",
- "permlevel": 0,
- "print_hide": 1,
- "print_width": "150",
- "read_only": 0,
- "reqd": 1,
+ "fieldname": "item_name",
+ "fieldtype": "Data",
+ "in_list_view": 1,
+ "label": "Item Name",
+ "oldfieldname": "item_name",
+ "oldfieldtype": "Data",
+ "permlevel": 0,
+ "print_hide": 1,
+ "print_width": "150",
+ "read_only": 0,
+ "reqd": 1,
"width": "150"
- },
+ },
{
- "fieldname": "section_break_5",
- "fieldtype": "Section Break",
- "permlevel": 0,
+ "fieldname": "section_break_5",
+ "fieldtype": "Section Break",
+ "permlevel": 0,
"precision": ""
- },
+ },
{
- "fieldname": "description",
- "fieldtype": "Small Text",
- "in_filter": 1,
- "in_list_view": 1,
- "label": "Description",
- "oldfieldname": "description",
- "oldfieldtype": "Small Text",
- "permlevel": 0,
- "print_width": "300px",
- "read_only": 0,
- "reqd": 1,
- "search_index": 1,
+ "fieldname": "description",
+ "fieldtype": "Small Text",
+ "in_filter": 1,
+ "in_list_view": 1,
+ "label": "Description",
+ "oldfieldname": "description",
+ "oldfieldtype": "Small Text",
+ "permlevel": 0,
+ "print_width": "300px",
+ "read_only": 0,
+ "reqd": 1,
+ "search_index": 1,
"width": "300px"
- },
+ },
{
- "fieldname": "column_break_7",
- "fieldtype": "Column Break",
- "permlevel": 0,
+ "fieldname": "column_break_7",
+ "fieldtype": "Column Break",
+ "permlevel": 0,
"precision": ""
- },
+ },
{
- "fieldname": "image",
- "fieldtype": "Attach",
- "hidden": 1,
- "label": "Image",
- "permlevel": 0,
- "precision": "",
+ "fieldname": "image",
+ "fieldtype": "Attach",
+ "hidden": 1,
+ "label": "Image",
+ "permlevel": 0,
+ "precision": "",
"print_hide": 1
- },
+ },
{
- "fieldname": "image_view",
- "fieldtype": "Image",
- "label": "Image View",
- "options": "image",
- "permlevel": 0,
+ "fieldname": "image_view",
+ "fieldtype": "Image",
+ "label": "Image View",
+ "options": "image",
+ "permlevel": 0,
"precision": ""
- },
+ },
{
- "fieldname": "quantity_and_rate",
- "fieldtype": "Section Break",
- "label": "Quantity and Rate",
+ "fieldname": "quantity_and_rate",
+ "fieldtype": "Section Break",
+ "label": "Quantity and Rate",
"permlevel": 0
- },
+ },
{
- "fieldname": "qty",
- "fieldtype": "Float",
- "in_list_view": 1,
- "label": "Quantity",
- "oldfieldname": "qty",
- "oldfieldtype": "Currency",
- "permlevel": 0,
- "print_width": "100px",
- "read_only": 0,
- "reqd": 1,
+ "fieldname": "qty",
+ "fieldtype": "Float",
+ "in_list_view": 1,
+ "label": "Quantity",
+ "oldfieldname": "qty",
+ "oldfieldtype": "Currency",
+ "permlevel": 0,
+ "print_width": "100px",
+ "read_only": 0,
+ "reqd": 1,
"width": "100px"
- },
+ },
{
- "fieldname": "price_list_rate",
- "fieldtype": "Currency",
- "label": "Price List Rate",
- "oldfieldname": "ref_rate",
- "oldfieldtype": "Currency",
- "options": "currency",
- "permlevel": 0,
- "print_hide": 1,
- "print_width": "70px",
- "read_only": 1,
- "reqd": 0,
+ "fieldname": "price_list_rate",
+ "fieldtype": "Currency",
+ "label": "Price List Rate",
+ "oldfieldname": "ref_rate",
+ "oldfieldtype": "Currency",
+ "options": "currency",
+ "permlevel": 0,
+ "print_hide": 1,
+ "print_width": "70px",
+ "read_only": 1,
+ "reqd": 0,
"width": "70px"
- },
+ },
{
- "fieldname": "discount_percentage",
- "fieldtype": "Percent",
- "in_list_view": 1,
- "label": "Discount(%)",
- "oldfieldname": "adj_rate",
- "oldfieldtype": "Float",
- "permlevel": 0,
- "print_hide": 1,
- "print_width": "70px",
- "read_only": 0,
+ "fieldname": "discount_percentage",
+ "fieldtype": "Percent",
+ "in_list_view": 1,
+ "label": "Discount(%)",
+ "oldfieldname": "adj_rate",
+ "oldfieldtype": "Float",
+ "permlevel": 0,
+ "print_hide": 1,
+ "print_width": "70px",
+ "read_only": 0,
"width": "70px"
- },
+ },
{
- "fieldname": "col_break2",
- "fieldtype": "Column Break",
+ "fieldname": "col_break2",
+ "fieldtype": "Column Break",
"permlevel": 0
- },
+ },
{
- "fieldname": "stock_uom",
- "fieldtype": "Link",
- "hidden": 0,
- "in_list_view": 1,
- "label": "UOM",
- "oldfieldname": "stock_uom",
- "oldfieldtype": "Data",
- "options": "UOM",
- "permlevel": 0,
- "print_width": "70px",
- "read_only": 1,
- "reqd": 0,
+ "fieldname": "stock_uom",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "in_list_view": 1,
+ "label": "UOM",
+ "oldfieldname": "stock_uom",
+ "oldfieldtype": "Data",
+ "options": "UOM",
+ "permlevel": 0,
+ "print_width": "70px",
+ "read_only": 1,
+ "reqd": 0,
"width": "70px"
- },
+ },
{
- "fieldname": "base_price_list_rate",
- "fieldtype": "Currency",
- "label": "Price List Rate (Company Currency)",
- "oldfieldname": "base_ref_rate",
- "oldfieldtype": "Currency",
- "options": "Company:company:default_currency",
- "permlevel": 0,
- "print_hide": 1,
- "print_width": "100px",
- "read_only": 1,
+ "fieldname": "base_price_list_rate",
+ "fieldtype": "Currency",
+ "label": "Price List Rate (Company Currency)",
+ "oldfieldname": "base_ref_rate",
+ "oldfieldtype": "Currency",
+ "options": "Company:company:default_currency",
+ "permlevel": 0,
+ "print_hide": 1,
+ "print_width": "100px",
+ "read_only": 1,
"width": "100px"
- },
+ },
{
- "fieldname": "section_break_simple1",
- "fieldtype": "Section Break",
+ "fieldname": "section_break_simple1",
+ "fieldtype": "Section Break",
"permlevel": 0
- },
+ },
{
- "fieldname": "rate",
- "fieldtype": "Currency",
- "in_list_view": 1,
- "label": "Rate",
- "oldfieldname": "export_rate",
- "oldfieldtype": "Currency",
- "options": "currency",
- "permlevel": 0,
- "print_width": "100px",
- "read_only": 0,
- "reqd": 0,
+ "fieldname": "rate",
+ "fieldtype": "Currency",
+ "in_list_view": 1,
+ "label": "Rate",
+ "oldfieldname": "export_rate",
+ "oldfieldtype": "Currency",
+ "options": "currency",
+ "permlevel": 0,
+ "print_width": "100px",
+ "read_only": 0,
+ "reqd": 0,
"width": "100px"
- },
+ },
{
- "fieldname": "amount",
- "fieldtype": "Currency",
- "in_list_view": 1,
- "label": "Amount",
- "no_copy": 0,
- "oldfieldname": "export_amount",
- "oldfieldtype": "Currency",
- "options": "currency",
- "permlevel": 0,
- "print_width": "100px",
- "read_only": 1,
- "reqd": 0,
+ "fieldname": "amount",
+ "fieldtype": "Currency",
+ "in_list_view": 1,
+ "label": "Amount",
+ "no_copy": 0,
+ "oldfieldname": "export_amount",
+ "oldfieldtype": "Currency",
+ "options": "currency",
+ "permlevel": 0,
+ "print_width": "100px",
+ "read_only": 1,
+ "reqd": 0,
"width": "100px"
- },
+ },
{
- "fieldname": "col_break3",
- "fieldtype": "Column Break",
+ "fieldname": "col_break3",
+ "fieldtype": "Column Break",
"permlevel": 0
- },
+ },
{
- "fieldname": "base_rate",
- "fieldtype": "Currency",
- "label": "Basic Rate (Company Currency)",
- "oldfieldname": "basic_rate",
- "oldfieldtype": "Currency",
- "options": "Company:company:default_currency",
- "permlevel": 0,
- "print_hide": 1,
- "print_width": "100px",
- "read_only": 1,
- "reqd": 0,
+ "fieldname": "base_rate",
+ "fieldtype": "Currency",
+ "label": "Basic Rate (Company Currency)",
+ "oldfieldname": "basic_rate",
+ "oldfieldtype": "Currency",
+ "options": "Company:company:default_currency",
+ "permlevel": 0,
+ "print_hide": 1,
+ "print_width": "100px",
+ "read_only": 1,
+ "reqd": 0,
"width": "100px"
- },
+ },
{
- "fieldname": "base_amount",
- "fieldtype": "Currency",
- "label": "Amount (Company Currency)",
- "no_copy": 0,
- "oldfieldname": "amount",
- "oldfieldtype": "Currency",
- "options": "Company:company:default_currency",
- "permlevel": 0,
- "print_hide": 1,
- "print_width": "100px",
- "read_only": 1,
- "reqd": 0,
+ "fieldname": "base_amount",
+ "fieldtype": "Currency",
+ "label": "Amount (Company Currency)",
+ "no_copy": 0,
+ "oldfieldname": "amount",
+ "oldfieldtype": "Currency",
+ "options": "Company:company:default_currency",
+ "permlevel": 0,
+ "print_hide": 1,
+ "print_width": "100px",
+ "read_only": 1,
+ "reqd": 0,
"width": "100px"
- },
+ },
{
- "fieldname": "pricing_rule",
- "fieldtype": "Link",
- "label": "Pricing Rule",
- "options": "Pricing Rule",
- "permlevel": 0,
+ "fieldname": "pricing_rule",
+ "fieldtype": "Link",
+ "label": "Pricing Rule",
+ "options": "Pricing Rule",
+ "permlevel": 0,
"read_only": 1
- },
+ },
{
- "fieldname": "warehouse_and_reference",
- "fieldtype": "Section Break",
- "label": "Warehouse and Reference",
+ "fieldname": "warehouse_and_reference",
+ "fieldtype": "Section Break",
+ "label": "Warehouse and Reference",
"permlevel": 0
- },
+ },
{
- "fieldname": "warehouse",
- "fieldtype": "Link",
- "in_list_view": 1,
- "label": "Reserved Warehouse",
- "no_copy": 0,
- "oldfieldname": "reserved_warehouse",
- "oldfieldtype": "Link",
- "options": "Warehouse",
- "permlevel": 0,
- "print_hide": 1,
- "print_width": "150px",
- "read_only": 0,
- "reqd": 0,
+ "fieldname": "warehouse",
+ "fieldtype": "Link",
+ "in_list_view": 1,
+ "label": "Reserved Warehouse",
+ "no_copy": 0,
+ "oldfieldname": "reserved_warehouse",
+ "oldfieldtype": "Link",
+ "options": "Warehouse",
+ "permlevel": 0,
+ "print_hide": 1,
+ "print_width": "150px",
+ "read_only": 0,
+ "reqd": 0,
"width": "150px"
- },
+ },
{
- "fieldname": "prevdoc_docname",
- "fieldtype": "Link",
- "hidden": 0,
- "in_filter": 1,
- "label": "Quotation",
- "no_copy": 1,
- "oldfieldname": "prevdoc_docname",
- "oldfieldtype": "Link",
- "options": "Quotation",
- "permlevel": 0,
- "print_hide": 1,
- "read_only": 1,
+ "fieldname": "prevdoc_docname",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "in_filter": 1,
+ "label": "Quotation",
+ "no_copy": 1,
+ "oldfieldname": "prevdoc_docname",
+ "oldfieldtype": "Link",
+ "options": "Quotation",
+ "permlevel": 0,
+ "print_hide": 1,
+ "read_only": 1,
"search_index": 1
- },
+ },
{
- "fieldname": "brand",
- "fieldtype": "Link",
- "hidden": 1,
- "in_filter": 1,
- "label": "Brand Name",
- "oldfieldname": "brand",
- "oldfieldtype": "Link",
- "options": "Brand",
- "permlevel": 0,
- "print_hide": 1,
- "read_only": 1,
+ "fieldname": "brand",
+ "fieldtype": "Link",
+ "hidden": 1,
+ "in_filter": 1,
+ "label": "Brand Name",
+ "oldfieldname": "brand",
+ "oldfieldtype": "Link",
+ "options": "Brand",
+ "permlevel": 0,
+ "print_hide": 1,
+ "read_only": 1,
"search_index": 1
- },
+ },
{
- "description": "",
- "fieldname": "item_group",
- "fieldtype": "Link",
- "hidden": 1,
- "in_filter": 1,
- "label": "Item Group",
- "oldfieldname": "item_group",
- "oldfieldtype": "Link",
- "options": "Item Group",
- "permlevel": 0,
- "print_hide": 1,
- "read_only": 1,
+ "description": "",
+ "fieldname": "item_group",
+ "fieldtype": "Link",
+ "hidden": 1,
+ "in_filter": 1,
+ "label": "Item Group",
+ "oldfieldname": "item_group",
+ "oldfieldtype": "Link",
+ "options": "Item Group",
+ "permlevel": 0,
+ "print_hide": 1,
+ "read_only": 1,
"search_index": 1
- },
+ },
{
- "allow_on_submit": 1,
- "fieldname": "page_break",
- "fieldtype": "Check",
- "label": "Page Break",
- "oldfieldname": "page_break",
- "oldfieldtype": "Check",
- "permlevel": 0,
- "print_hide": 1,
- "read_only": 0,
+ "allow_on_submit": 1,
+ "fieldname": "page_break",
+ "fieldtype": "Check",
+ "label": "Page Break",
+ "oldfieldname": "page_break",
+ "oldfieldtype": "Check",
+ "permlevel": 0,
+ "print_hide": 1,
+ "read_only": 0,
"report_hide": 1
- },
+ },
{
- "fieldname": "col_break4",
- "fieldtype": "Column Break",
+ "fieldname": "col_break4",
+ "fieldtype": "Column Break",
"permlevel": 0
- },
+ },
{
- "allow_on_submit": 1,
- "fieldname": "projected_qty",
- "fieldtype": "Float",
- "hidden": 0,
- "label": "Projected Qty",
- "no_copy": 1,
- "oldfieldname": "projected_qty",
- "oldfieldtype": "Currency",
- "permlevel": 0,
- "print_hide": 1,
- "print_width": "70px",
- "read_only": 1,
+ "allow_on_submit": 1,
+ "fieldname": "projected_qty",
+ "fieldtype": "Float",
+ "hidden": 0,
+ "label": "Projected Qty",
+ "no_copy": 1,
+ "oldfieldname": "projected_qty",
+ "oldfieldtype": "Currency",
+ "permlevel": 0,
+ "print_hide": 1,
+ "print_width": "70px",
+ "read_only": 1,
"width": "70px"
- },
+ },
{
- "allow_on_submit": 1,
- "fieldname": "actual_qty",
- "fieldtype": "Float",
- "label": "Actual Qty",
- "no_copy": 1,
- "permlevel": 0,
- "print_hide": 1,
- "print_width": "70px",
- "read_only": 1,
+ "allow_on_submit": 1,
+ "fieldname": "actual_qty",
+ "fieldtype": "Float",
+ "label": "Actual Qty",
+ "no_copy": 1,
+ "permlevel": 0,
+ "print_hide": 1,
+ "print_width": "70px",
+ "read_only": 1,
"width": "70px"
- },
+ },
{
- "fieldname": "delivered_qty",
- "fieldtype": "Float",
- "hidden": 0,
- "in_filter": 0,
- "label": "Delivered Qty",
- "no_copy": 1,
- "oldfieldname": "delivered_qty",
- "oldfieldtype": "Currency",
- "permlevel": 0,
- "print_hide": 1,
- "print_width": "100px",
- "read_only": 1,
- "search_index": 0,
+ "fieldname": "delivered_qty",
+ "fieldtype": "Float",
+ "hidden": 0,
+ "in_filter": 0,
+ "label": "Delivered Qty",
+ "no_copy": 1,
+ "oldfieldname": "delivered_qty",
+ "oldfieldtype": "Currency",
+ "permlevel": 0,
+ "print_hide": 1,
+ "print_width": "100px",
+ "read_only": 1,
+ "search_index": 0,
"width": "100px"
- },
+ },
{
- "fieldname": "billed_amt",
- "fieldtype": "Currency",
- "label": "Billed Amt",
- "no_copy": 1,
- "options": "currency",
- "permlevel": 0,
- "print_hide": 1,
+ "fieldname": "billed_amt",
+ "fieldtype": "Currency",
+ "label": "Billed Amt",
+ "no_copy": 1,
+ "options": "currency",
+ "permlevel": 0,
+ "print_hide": 1,
"read_only": 1
- },
+ },
{
- "description": "For Production",
- "fieldname": "planned_qty",
- "fieldtype": "Float",
- "hidden": 1,
- "label": "Planned Quantity",
- "no_copy": 1,
- "oldfieldname": "planned_qty",
- "oldfieldtype": "Currency",
- "permlevel": 0,
- "print_hide": 1,
- "print_width": "50px",
- "read_only": 1,
- "report_hide": 1,
+ "description": "For Production",
+ "fieldname": "planned_qty",
+ "fieldtype": "Float",
+ "hidden": 1,
+ "label": "Planned Quantity",
+ "no_copy": 1,
+ "oldfieldname": "planned_qty",
+ "oldfieldtype": "Currency",
+ "permlevel": 0,
+ "print_hide": 1,
+ "print_width": "50px",
+ "read_only": 1,
+ "report_hide": 1,
"width": "50px"
- },
+ },
{
- "description": "For Production",
- "fieldname": "produced_qty",
- "fieldtype": "Float",
- "hidden": 1,
- "label": "Produced Quantity",
- "oldfieldname": "produced_qty",
- "oldfieldtype": "Currency",
- "permlevel": 0,
- "print_hide": 1,
- "print_width": "50px",
- "read_only": 1,
- "report_hide": 1,
+ "description": "For Production",
+ "fieldname": "produced_qty",
+ "fieldtype": "Float",
+ "hidden": 1,
+ "label": "Produced Quantity",
+ "oldfieldname": "produced_qty",
+ "oldfieldtype": "Currency",
+ "permlevel": 0,
+ "print_hide": 1,
+ "print_width": "50px",
+ "read_only": 1,
+ "report_hide": 1,
"width": "50px"
- },
+ },
{
- "fieldname": "item_tax_rate",
- "fieldtype": "Small Text",
- "hidden": 1,
- "label": "Item Tax Rate",
- "oldfieldname": "item_tax_rate",
- "oldfieldtype": "Small Text",
- "permlevel": 0,
- "print_hide": 1,
- "read_only": 1,
+ "fieldname": "item_tax_rate",
+ "fieldtype": "Small Text",
+ "hidden": 1,
+ "label": "Item Tax Rate",
+ "oldfieldname": "item_tax_rate",
+ "oldfieldtype": "Small Text",
+ "permlevel": 0,
+ "print_hide": 1,
+ "read_only": 1,
"report_hide": 1
- },
+ },
{
- "description": "Used for Production Plan",
- "fieldname": "transaction_date",
- "fieldtype": "Date",
- "hidden": 1,
- "in_filter": 0,
- "label": "Sales Order Date",
- "oldfieldname": "transaction_date",
- "oldfieldtype": "Date",
- "permlevel": 0,
- "print_hide": 1,
- "read_only": 1,
- "report_hide": 1,
+ "description": "Used for Production Plan",
+ "fieldname": "transaction_date",
+ "fieldtype": "Date",
+ "hidden": 1,
+ "in_filter": 0,
+ "label": "Sales Order Date",
+ "oldfieldname": "transaction_date",
+ "oldfieldtype": "Date",
+ "permlevel": 0,
+ "print_hide": 1,
+ "read_only": 1,
+ "report_hide": 1,
"search_index": 0
}
- ],
- "idx": 1,
- "istable": 1,
- "modified": "2015-02-18 12:50:20.121459",
- "modified_by": "Administrator",
- "module": "Selling",
- "name": "Sales Order Item",
- "owner": "Administrator",
- "permissions": [],
- "sort_field": "modified",
+ ],
+ "idx": 1,
+ "istable": 1,
+ "modified": "2015-02-19 01:07:02.025024",
+ "modified_by": "Administrator",
+ "module": "Selling",
+ "name": "Sales Order Item",
+ "owner": "Administrator",
+ "permissions": [],
+ "sort_field": "modified",
"sort_order": "DESC"
}
diff --git a/erpnext/setup/doctype/company/company.json b/erpnext/setup/doctype/company/company.json
index 13a42ae..3168877 100644
--- a/erpnext/setup/doctype/company/company.json
+++ b/erpnext/setup/doctype/company/company.json
@@ -28,7 +28,7 @@
"reqd": 1
},
{
- "description": "Please Enter Abbreviation or Short Name properly as it will be added as Suffix to all Account Heads.",
+ "description": "",
"fieldname": "abbr",
"fieldtype": "Data",
"label": "Abbr",
@@ -53,6 +53,14 @@
"read_only": 0
},
{
+ "fieldname": "default_letter_head",
+ "fieldtype": "Link",
+ "label": "Default Letter Head",
+ "options": "Letter Head",
+ "permlevel": 0,
+ "precision": ""
+ },
+ {
"fieldname": "domain",
"fieldtype": "Select",
"label": "Domain",
@@ -64,10 +72,18 @@
"fieldname": "charts_section",
"fieldtype": "Section Break",
"hidden": 0,
- "label": "Chart of Accounts",
+ "label": "Localization",
"permlevel": 0
},
{
+ "fieldname": "default_holiday_list",
+ "fieldtype": "Link",
+ "label": "Default Holiday List",
+ "options": "Holiday List",
+ "permlevel": 0,
+ "precision": ""
+ },
+ {
"fieldname": "country",
"fieldtype": "Link",
"in_list_view": 1,
@@ -77,6 +93,22 @@
"reqd": 1
},
{
+ "fieldname": "column_break_10",
+ "fieldtype": "Column Break",
+ "permlevel": 0,
+ "precision": ""
+ },
+ {
+ "fieldname": "default_currency",
+ "fieldtype": "Link",
+ "ignore_user_permissions": 1,
+ "label": "Default Currency",
+ "options": "Currency",
+ "permlevel": 0,
+ "read_only": 0,
+ "reqd": 1
+ },
+ {
"fieldname": "chart_of_accounts",
"fieldtype": "Select",
"hidden": 0,
@@ -131,6 +163,14 @@
"read_only": 0
},
{
+ "fieldname": "column_break0",
+ "fieldtype": "Column Break",
+ "oldfieldtype": "Column Break",
+ "permlevel": 0,
+ "read_only": 0,
+ "width": "50%"
+ },
+ {
"depends_on": "eval:!doc.__islocal",
"fieldname": "default_payable_account",
"fieldtype": "Link",
@@ -164,36 +204,8 @@
"permlevel": 0
},
{
- "fieldname": "default_holiday_list",
- "fieldtype": "Link",
- "label": "Default Holiday List",
- "options": "Holiday List",
- "permlevel": 0,
- "precision": ""
- },
- {
- "fieldname": "column_break0",
- "fieldtype": "Column Break",
- "oldfieldtype": "Column Break",
- "permlevel": 0,
- "read_only": 0,
- "width": "50%"
- },
- {
- "fieldname": "default_currency",
- "fieldtype": "Link",
- "ignore_user_permissions": 1,
- "label": "Default Currency",
- "options": "Currency",
- "permlevel": 0,
- "read_only": 0,
- "reqd": 1
- },
- {
- "fieldname": "default_letter_head",
- "fieldtype": "Link",
- "label": "Default Letter Head",
- "options": "Letter Head",
+ "fieldname": "section_break_22",
+ "fieldtype": "Section Break",
"permlevel": 0,
"precision": ""
},
@@ -229,6 +241,12 @@
"read_only": 0
},
{
+ "fieldname": "column_break_26",
+ "fieldtype": "Column Break",
+ "permlevel": 0,
+ "precision": ""
+ },
+ {
"depends_on": "eval:!doc.__islocal",
"fieldname": "yearly_bgt_flag",
"fieldtype": "Select",
@@ -279,6 +297,12 @@
"read_only": 0
},
{
+ "fieldname": "column_break_32",
+ "fieldtype": "Column Break",
+ "permlevel": 0,
+ "precision": ""
+ },
+ {
"fieldname": "expenses_included_in_valuation",
"fieldtype": "Link",
"ignore_user_permissions": 1,
@@ -375,7 +399,7 @@
],
"icon": "icon-building",
"idx": 1,
- "modified": "2015-02-05 05:11:35.790597",
+ "modified": "2015-02-19 00:37:55.472911",
"modified_by": "Administrator",
"module": "Setup",
"name": "Company",
diff --git a/erpnext/stock/doctype/delivery_note_item/delivery_note_item.json b/erpnext/stock/doctype/delivery_note_item/delivery_note_item.json
index c67c577..2545b0a 100644
--- a/erpnext/stock/doctype/delivery_note_item/delivery_note_item.json
+++ b/erpnext/stock/doctype/delivery_note_item/delivery_note_item.json
@@ -1,5 +1,5 @@
{
- "autoname": "DND/.#######",
+ "autoname": "hash",
"creation": "2013-04-22 13:15:44",
"docstatus": 0,
"doctype": "DocType",
@@ -467,7 +467,7 @@
],
"idx": 1,
"istable": 1,
- "modified": "2015-02-12 15:19:29.701710",
+ "modified": "2015-02-19 01:06:59.675246",
"modified_by": "Administrator",
"module": "Stock",
"name": "Delivery Note Item",
diff --git a/erpnext/stock/doctype/item_customer_detail/item_customer_detail.json b/erpnext/stock/doctype/item_customer_detail/item_customer_detail.json
index 42b917b..4f1a59c 100644
--- a/erpnext/stock/doctype/item_customer_detail/item_customer_detail.json
+++ b/erpnext/stock/doctype/item_customer_detail/item_customer_detail.json
@@ -1,6 +1,6 @@
{
- "autoname": "ITEMCUST/.#####",
- "creation": "2013-03-08 15:37:16.000000",
+ "autoname": "hash",
+ "creation": "2013-03-08 15:37:16",
"description": "For the convenience of customers, these codes can be used in print formats like Invoices and Delivery Notes",
"docstatus": 0,
"doctype": "DocType",
@@ -38,10 +38,11 @@
"idx": 1,
"in_create": 0,
"istable": 1,
- "modified": "2013-12-20 19:23:16.000000",
+ "modified": "2015-02-19 01:07:00.255330",
"modified_by": "Administrator",
"module": "Stock",
"name": "Item Customer Detail",
"owner": "Administrator",
+ "permissions": [],
"read_only": 0
}
\ No newline at end of file
diff --git a/erpnext/stock/doctype/item_quality_inspection_parameter/item_quality_inspection_parameter.json b/erpnext/stock/doctype/item_quality_inspection_parameter/item_quality_inspection_parameter.json
index f7c35f2..69aae27 100644
--- a/erpnext/stock/doctype/item_quality_inspection_parameter/item_quality_inspection_parameter.json
+++ b/erpnext/stock/doctype/item_quality_inspection_parameter/item_quality_inspection_parameter.json
@@ -1,6 +1,6 @@
{
- "autoname": "IISD/.#####",
- "creation": "2013-02-22 01:28:01.000000",
+ "autoname": "hash",
+ "creation": "2013-02-22 01:28:01",
"docstatus": 0,
"doctype": "DocType",
"fields": [
@@ -30,9 +30,10 @@
],
"idx": 1,
"istable": 1,
- "modified": "2013-12-20 19:23:16.000000",
+ "modified": "2015-02-19 01:07:00.296584",
"modified_by": "Administrator",
"module": "Stock",
"name": "Item Quality Inspection Parameter",
- "owner": "Administrator"
+ "owner": "Administrator",
+ "permissions": []
}
\ No newline at end of file
diff --git a/erpnext/stock/doctype/item_reorder/item_reorder.json b/erpnext/stock/doctype/item_reorder/item_reorder.json
index bc96b4a..99cde73 100644
--- a/erpnext/stock/doctype/item_reorder/item_reorder.json
+++ b/erpnext/stock/doctype/item_reorder/item_reorder.json
@@ -1,6 +1,6 @@
{
- "autoname": "REORD-.#####",
- "creation": "2013-03-07 11:42:59.000000",
+ "autoname": "hash",
+ "creation": "2013-03-07 11:42:59",
"docstatus": 0,
"doctype": "DocType",
"fields": [
@@ -45,9 +45,10 @@
"idx": 1,
"in_create": 1,
"istable": 1,
- "modified": "2013-12-20 19:23:16.000000",
+ "modified": "2015-02-19 01:07:00.334482",
"modified_by": "Administrator",
"module": "Stock",
"name": "Item Reorder",
- "owner": "Administrator"
+ "owner": "Administrator",
+ "permissions": []
}
\ No newline at end of file
diff --git a/erpnext/stock/doctype/material_request_item/material_request_item.json b/erpnext/stock/doctype/material_request_item/material_request_item.json
index f6f8831..3b659e3 100644
--- a/erpnext/stock/doctype/material_request_item/material_request_item.json
+++ b/erpnext/stock/doctype/material_request_item/material_request_item.json
@@ -1,5 +1,5 @@
{
- "autoname": "MREQD-.#####",
+ "autoname": "hash",
"creation": "2013-02-22 01:28:02",
"docstatus": 0,
"doctype": "DocType",
@@ -264,7 +264,7 @@
],
"idx": 1,
"istable": 1,
- "modified": "2015-02-12 15:20:02.832792",
+ "modified": "2015-02-19 01:07:00.695393",
"modified_by": "Administrator",
"module": "Stock",
"name": "Material Request Item",
diff --git a/erpnext/stock/doctype/packing_slip_item/packing_slip_item.json b/erpnext/stock/doctype/packing_slip_item/packing_slip_item.json
index 89f8f6b..b051dd5 100644
--- a/erpnext/stock/doctype/packing_slip_item/packing_slip_item.json
+++ b/erpnext/stock/doctype/packing_slip_item/packing_slip_item.json
@@ -1,5 +1,5 @@
{
- "autoname": "PSD/.#######",
+ "autoname": "hash",
"creation": "2013-04-08 13:10:16",
"docstatus": 0,
"doctype": "DocType",
@@ -90,7 +90,7 @@
],
"idx": 1,
"istable": 1,
- "modified": "2014-09-09 05:35:38.604554",
+ "modified": "2015-02-19 01:07:00.840553",
"modified_by": "Administrator",
"module": "Stock",
"name": "Packing Slip Item",
diff --git a/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.json b/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.json
index 816b0b7..c29a270 100755
--- a/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.json
+++ b/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.json
@@ -1,5 +1,5 @@
{
- "autoname": "GRND/.#######",
+ "autoname": "hash",
"creation": "2013-05-24 19:29:10",
"docstatus": 0,
"doctype": "DocType",
@@ -588,7 +588,7 @@
],
"idx": 1,
"istable": 1,
- "modified": "2015-02-12 15:20:26.299671",
+ "modified": "2015-02-19 01:07:01.405923",
"modified_by": "Administrator",
"module": "Stock",
"name": "Purchase Receipt Item",
diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py
index 62c83ed..16d045b 100644
--- a/erpnext/stock/doctype/stock_entry/stock_entry.py
+++ b/erpnext/stock/doctype/stock_entry/stock_entry.py
@@ -13,6 +13,7 @@
from erpnext.controllers.queries import get_match_cond
from erpnext.stock.get_item_details import get_available_qty, get_default_cost_center, get_conversion_factor
from erpnext.manufacturing.doctype.bom.bom import validate_bom_no
+from erpnext.accounts.utils import validate_fiscal_year
class NotUpdateStockError(frappe.ValidationError): pass
class StockOverReturnError(frappe.ValidationError): pass
@@ -48,6 +49,8 @@
pro_obj = self.production_order and \
frappe.get_doc('Production Order', self.production_order) or None
+ validate_fiscal_year(self.posting_date, self.fiscal_year, self.meta.get_label("posting_date"), self)
+
self.validate_item()
self.set_transfer_qty()
self.validate_uom_is_integer("uom", "qty")
@@ -59,8 +62,7 @@
self.validate_finished_goods()
self.validate_return_reference_doc()
self.validate_with_material_request()
- self.validate_fiscal_year()
- self.validate_valuation_rate()
+ #self.validate_valuation_rate()
self.set_total_amount()
def on_submit(self):
@@ -76,11 +78,6 @@
self.update_production_order()
self.make_gl_entries_on_cancel()
- def validate_fiscal_year(self):
- from erpnext.accounts.utils import validate_fiscal_year
- validate_fiscal_year(self.posting_date, self.fiscal_year,
- self.meta.get_label("posting_date"))
-
def validate_purpose(self):
valid_purposes = ["Material Issue", "Material Receipt", "Material Transfer", "Material Transfer for Manufacture",
"Manufacture", "Repack", "Subcontract", "Sales Return", "Purchase Return"]
@@ -220,8 +217,9 @@
if d.t_warehouse and not d.s_warehouse:
valuation_at_target += flt(d.amount)
- if valuation_at_target < valuation_at_source:
- frappe.throw(_("Total valuation for manufactured or repacked item(s) can not be less than total valuation of raw materials"))
+ if valuation_at_target + 0.001 < valuation_at_source:
+ frappe.throw(_("Total valuation ({0}) for manufactured or repacked item(s) can not be less than total valuation of raw materials ({1})").format(valuation_at_target,
+ valuation_at_source))
def set_total_amount(self):
self.total_amount = sum([flt(item.amount) for item in self.get("items")])
@@ -419,7 +417,7 @@
_validate_production_order(pro_doc)
pro_doc.run_method("update_status")
if self.purpose == "Manufacture":
- pro_doc.run_method("update_produced_qty")
+ pro_doc.run_method("update_production_order_qty")
self.update_planned_qty(pro_doc)
def update_planned_qty(self, pro_doc):
diff --git a/erpnext/stock/doctype/stock_entry_detail/stock_entry_detail.json b/erpnext/stock/doctype/stock_entry_detail/stock_entry_detail.json
index dda2580..216be29 100644
--- a/erpnext/stock/doctype/stock_entry_detail/stock_entry_detail.json
+++ b/erpnext/stock/doctype/stock_entry_detail/stock_entry_detail.json
@@ -1,5 +1,5 @@
{
- "autoname": "MTND/.######",
+ "autoname": "hash",
"creation": "2013-03-29 18:22:12",
"docstatus": 0,
"doctype": "DocType",
@@ -331,7 +331,7 @@
],
"idx": 1,
"istable": 1,
- "modified": "2015-02-12 15:20:56.815434",
+ "modified": "2015-02-19 01:07:02.254835",
"modified_by": "Administrator",
"module": "Stock",
"name": "Stock Entry Detail",
diff --git a/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py b/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py
index 0f90ca7..a6abe7c 100644
--- a/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py
+++ b/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py
@@ -21,8 +21,7 @@
self.scrub_posting_time()
from erpnext.accounts.utils import validate_fiscal_year
- validate_fiscal_year(self.posting_date, self.fiscal_year,
- self.meta.get_label("posting_date"))
+ validate_fiscal_year(self.posting_date, self.fiscal_year, self.meta.get_label("posting_date"), self)
def on_submit(self):
self.check_stock_frozen_date()
@@ -67,10 +66,10 @@
frappe.throw(_("Batch number is mandatory for Item {0}").format(self.item_code))
elif not frappe.db.get_value("Batch",{"item": self.item_code, "name": self.batch_no}):
frappe.throw(_("{0} is not a valid Batch Number for Item {1}").format(self.batch_no, self.item_code))
-
+
elif item_det.has_batch_no =='No' and self.batch_no:
frappe.throw(_("The Item {0} cannot have Batch").format(self.item_code))
-
+
if item_det.has_variants:
frappe.throw(_("Stock cannot exist for Item {0} since has variants").format(self.item_code),
ItemTemplateCannotHaveStock)
diff --git a/erpnext/stock/doctype/uom_conversion_detail/uom_conversion_detail.json b/erpnext/stock/doctype/uom_conversion_detail/uom_conversion_detail.json
index 3c9c022..521d688 100644
--- a/erpnext/stock/doctype/uom_conversion_detail/uom_conversion_detail.json
+++ b/erpnext/stock/doctype/uom_conversion_detail/uom_conversion_detail.json
@@ -1,6 +1,6 @@
{
- "autoname": "UCDD/.#####",
- "creation": "2013-02-22 01:28:04.000000",
+ "autoname": "hash",
+ "creation": "2013-02-22 01:28:04",
"docstatus": 0,
"doctype": "DocType",
"fields": [
@@ -26,9 +26,10 @@
],
"idx": 1,
"istable": 1,
- "modified": "2013-12-20 19:21:53.000000",
+ "modified": "2015-02-19 01:07:02.522989",
"modified_by": "Administrator",
"module": "Stock",
"name": "UOM Conversion Detail",
- "owner": "Administrator"
+ "owner": "Administrator",
+ "permissions": []
}
\ No newline at end of file
diff --git a/erpnext/support/doctype/maintenance_schedule_detail/maintenance_schedule_detail.json b/erpnext/support/doctype/maintenance_schedule_detail/maintenance_schedule_detail.json
index aee7274..2e3e5d9 100644
--- a/erpnext/support/doctype/maintenance_schedule_detail/maintenance_schedule_detail.json
+++ b/erpnext/support/doctype/maintenance_schedule_detail/maintenance_schedule_detail.json
@@ -1,6 +1,6 @@
{
- "autoname": "MSD.#####",
- "creation": "2013-02-22 01:28:05.000000",
+ "autoname": "hash",
+ "creation": "2013-02-22 01:28:05",
"docstatus": 0,
"doctype": "DocType",
"fields": [
@@ -89,9 +89,10 @@
],
"idx": 1,
"istable": 1,
- "modified": "2013-12-31 12:13:38.000000",
+ "modified": "2015-02-19 01:07:00.495149",
"modified_by": "Administrator",
"module": "Support",
"name": "Maintenance Schedule Detail",
- "owner": "Administrator"
+ "owner": "Administrator",
+ "permissions": []
}
\ No newline at end of file
diff --git a/erpnext/support/doctype/maintenance_schedule_item/maintenance_schedule_item.json b/erpnext/support/doctype/maintenance_schedule_item/maintenance_schedule_item.json
index 38fa4b5..d0c080a 100644
--- a/erpnext/support/doctype/maintenance_schedule_item/maintenance_schedule_item.json
+++ b/erpnext/support/doctype/maintenance_schedule_item/maintenance_schedule_item.json
@@ -1,6 +1,6 @@
{
- "autoname": "IMD.#####",
- "creation": "2013-02-22 01:28:05.000000",
+ "autoname": "hash",
+ "creation": "2013-02-22 01:28:05",
"docstatus": 0,
"doctype": "DocType",
"fields": [
@@ -133,9 +133,10 @@
],
"idx": 1,
"istable": 1,
- "modified": "2013-12-31 12:08:32.000000",
+ "modified": "2015-02-19 01:07:00.550040",
"modified_by": "Administrator",
"module": "Support",
"name": "Maintenance Schedule Item",
- "owner": "Administrator"
+ "owner": "Administrator",
+ "permissions": []
}
\ No newline at end of file
diff --git a/erpnext/support/doctype/maintenance_visit_purpose/maintenance_visit_purpose.json b/erpnext/support/doctype/maintenance_visit_purpose/maintenance_visit_purpose.json
index 8e98397..8dd525b 100644
--- a/erpnext/support/doctype/maintenance_visit_purpose/maintenance_visit_purpose.json
+++ b/erpnext/support/doctype/maintenance_visit_purpose/maintenance_visit_purpose.json
@@ -1,5 +1,5 @@
{
- "autoname": "MVD.#####",
+ "autoname": "hash",
"creation": "2013-02-22 01:28:06",
"docstatus": 0,
"doctype": "DocType",
@@ -123,7 +123,7 @@
],
"idx": 1,
"istable": 1,
- "modified": "2014-07-07 02:53:48.442249",
+ "modified": "2015-02-19 01:07:00.623383",
"modified_by": "Administrator",
"module": "Support",
"name": "Maintenance Visit Purpose",