Merge pull request #3142 from neilLasrado/production-planning
Manufacturing Settings
This commit is contained in:
commit
3c77b332ae
@ -43,7 +43,7 @@
|
|||||||
"default": "30",
|
"default": "30",
|
||||||
"description": "Try planning operations for X days in advance.",
|
"description": "Try planning operations for X days in advance.",
|
||||||
"fieldname": "capacity_planning_for_days",
|
"fieldname": "capacity_planning_for_days",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Int",
|
||||||
"label": "Capacity Planning For (Days)",
|
"label": "Capacity Planning For (Days)",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": ""
|
"precision": ""
|
||||||
@ -51,7 +51,7 @@
|
|||||||
{
|
{
|
||||||
"description": "Default 10 mins",
|
"description": "Default 10 mins",
|
||||||
"fieldname": "mins_between_operations",
|
"fieldname": "mins_between_operations",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Int",
|
||||||
"label": "Time Between Operations (in mins)",
|
"label": "Time Between Operations (in mins)",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": ""
|
"precision": ""
|
||||||
@ -65,7 +65,7 @@
|
|||||||
"is_submittable": 0,
|
"is_submittable": 0,
|
||||||
"issingle": 1,
|
"issingle": 1,
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
"modified": "2015-03-05 23:44:45.917027",
|
"modified": "2015-04-21 07:57:40.260862",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Manufacturing",
|
"module": "Manufacturing",
|
||||||
"name": "Manufacturing Settings",
|
"name": "Manufacturing Settings",
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import frappe, json
|
import frappe, json
|
||||||
|
|
||||||
from frappe.utils import flt, nowdate, get_datetime, getdate, date_diff
|
from frappe.utils import flt, nowdate, get_datetime, getdate, date_diff, cint
|
||||||
from frappe import _
|
from frappe import _
|
||||||
from frappe.model.document import Document
|
from frappe.model.document import Document
|
||||||
from erpnext.manufacturing.doctype.bom.bom import validate_bom_no
|
from erpnext.manufacturing.doctype.bom.bom import validate_bom_no
|
||||||
@ -269,8 +269,8 @@ class ProductionOrder(Document):
|
|||||||
|
|
||||||
def get_mins_between_operations(self):
|
def get_mins_between_operations(self):
|
||||||
if not hasattr(self, "_mins_between_operations"):
|
if not hasattr(self, "_mins_between_operations"):
|
||||||
self._mins_between_operations = frappe.db.get_single_value("Manufacturing Settings",
|
self._mins_between_operations = cint(frappe.db.get_single_value("Manufacturing Settings",
|
||||||
"mins_between_operations") or 10
|
"mins_between_operations")) or 10
|
||||||
return relativedelta(minutes=self._mins_between_operations)
|
return relativedelta(minutes=self._mins_between_operations)
|
||||||
|
|
||||||
def check_operation_fits_in_working_hours(self, d):
|
def check_operation_fits_in_working_hours(self, d):
|
||||||
|
Loading…
Reference in New Issue
Block a user