mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-16 19:49:18 +00:00
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
|
||||
class DocType:
|
||||
def __init__(self, d, dl):
|
||||
self.doc, self.doclist = d, dl
|
||||
from frappe.model.document import Document
|
||||
|
||||
class ActivityType(Document):
|
||||
pass
|
||||
@@ -8,10 +8,9 @@ from frappe.utils import flt, getdate
|
||||
from frappe import msgprint
|
||||
from erpnext.utilities.transaction_base import delete_events
|
||||
|
||||
class DocType:
|
||||
def __init__(self, doc, doclist=None):
|
||||
self.doc = doc
|
||||
self.doclist = doclist
|
||||
from frappe.model.document import Document
|
||||
|
||||
class Project(Document):
|
||||
|
||||
def get_gross_profit(self):
|
||||
pft, per_pft =0, 0
|
||||
@@ -45,7 +44,7 @@ class DocType:
|
||||
delete_events(self.doc.doctype, self.doc.name)
|
||||
|
||||
# add events
|
||||
for milestone in self.doclist.get({"parentfield": "project_milestones"}):
|
||||
for milestone in self.get("project_milestones"):
|
||||
if milestone.milestone_date:
|
||||
description = (milestone.milestone or "Milestone") + " for " + self.doc.name
|
||||
frappe.bean({
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
|
||||
class DocType:
|
||||
def __init__(self, d, dl):
|
||||
self.doc, self.doclist = d, dl
|
||||
from frappe.model.document import Document
|
||||
|
||||
class ProjectMilestone(Document):
|
||||
pass
|
||||
@@ -5,16 +5,12 @@ from __future__ import unicode_literals
|
||||
import frappe, json
|
||||
|
||||
from frappe.utils import getdate, today
|
||||
from frappe.model import db_exists
|
||||
from frappe.model.bean import copy_doclist
|
||||
from frappe import msgprint
|
||||
|
||||
|
||||
class DocType:
|
||||
def __init__(self,doc,doclist=[]):
|
||||
self.doc = doc
|
||||
self.doclist = doclist
|
||||
|
||||
from frappe.model.document import Document
|
||||
|
||||
class Task(Document):
|
||||
def get_project_details(self):
|
||||
return {
|
||||
"project": self.doc.project
|
||||
|
||||
@@ -11,9 +11,9 @@ from frappe.utils import cstr
|
||||
|
||||
class OverlapError(frappe.ValidationError): pass
|
||||
|
||||
class DocType:
|
||||
def __init__(self, d, dl):
|
||||
self.doc, self.doclist = d, dl
|
||||
from frappe.model.document import Document
|
||||
|
||||
class TimeLog(Document):
|
||||
|
||||
def validate(self):
|
||||
self.set_status()
|
||||
|
||||
@@ -7,9 +7,9 @@ from __future__ import unicode_literals
|
||||
import frappe
|
||||
from frappe import _
|
||||
|
||||
class DocType:
|
||||
def __init__(self, d, dl):
|
||||
self.doc, self.doclist = d, dl
|
||||
from frappe.model.document import Document
|
||||
|
||||
class TimeLogBatch(Document):
|
||||
|
||||
def validate(self):
|
||||
self.set_status()
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
|
||||
class DocType:
|
||||
def __init__(self, d, dl):
|
||||
self.doc, self.doclist = d, dl
|
||||
from frappe.model.document import Document
|
||||
|
||||
class TimeLogBatchDetail(Document):
|
||||
pass
|
||||
Reference in New Issue
Block a user