Removed controller.py

This commit is contained in:
Anand Doshi 2014-04-21 15:12:50 +05:30
parent 424c033395
commit 21ae930b4c
4 changed files with 103 additions and 103 deletions

View File

@ -6,9 +6,9 @@
from __future__ import unicode_literals
import frappe
from frappe import _
from frappe.model.controller import DocListController
from frappe.model.document import Document
class CurrencyExchange(DocListController):
class CurrencyExchange(Document):
def autoname(self):
self.name = self.from_currency + "-" + self.to_currency

View File

@ -44,8 +44,8 @@ row_template = """<p style="%(style)s">
<span style="color: grey">%(currency)s</span>%(value)s
</span></p>"""
from frappe.model.controller import DocListController
class EmailDigest(DocListController):
from frappe.model.document import Document
class EmailDigest(Document):
def __init__(self, arg1, arg2=None):
super(EmailDigest, self).__init__(arg1, arg2)
self.from_date, self.to_date = self.get_from_to_date()

View File

@ -5,10 +5,10 @@ from __future__ import unicode_literals
import frappe
from frappe import _, throw
from frappe.utils import cint
from frappe.model.controller import DocListController
from frappe.model.document import Document
import frappe.defaults
class PriceList(DocListController):
class PriceList(Document):
def validate(self):
if not cint(self.buying) and not cint(self.selling):
throw(_("Price List must be applicable for Buying or Selling"))

View File

@ -6,12 +6,12 @@ from __future__ import unicode_literals
import frappe
from frappe import _
from frappe.utils import flt, getdate, add_days, formatdate
from frappe.model.controller import DocListController
from frappe.model.document import Document
from datetime import date
class StockFreezeError(frappe.ValidationError): pass
class StockLedgerEntry(DocListController):
class StockLedgerEntry(Document):
def validate(self):
from erpnext.stock.utils import validate_warehouse_company
self.validate_mandatory()