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