mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-06 21:59:13 +00:00
Removed controller.py
This commit is contained in:
@@ -6,9 +6,9 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import frappe
|
import frappe
|
||||||
from frappe import _
|
from frappe import _
|
||||||
from frappe.model.controller import DocListController
|
from frappe.model.document import Document
|
||||||
|
|
||||||
class CurrencyExchange(DocListController):
|
class CurrencyExchange(Document):
|
||||||
|
|
||||||
def autoname(self):
|
def autoname(self):
|
||||||
self.name = self.from_currency + "-" + self.to_currency
|
self.name = self.from_currency + "-" + self.to_currency
|
||||||
|
|||||||
@@ -44,8 +44,8 @@ row_template = """<p style="%(style)s">
|
|||||||
<span style="color: grey">%(currency)s</span>%(value)s
|
<span style="color: grey">%(currency)s</span>%(value)s
|
||||||
</span></p>"""
|
</span></p>"""
|
||||||
|
|
||||||
from frappe.model.controller import DocListController
|
from frappe.model.document import Document
|
||||||
class EmailDigest(DocListController):
|
class EmailDigest(Document):
|
||||||
def __init__(self, arg1, arg2=None):
|
def __init__(self, arg1, arg2=None):
|
||||||
super(EmailDigest, self).__init__(arg1, arg2)
|
super(EmailDigest, self).__init__(arg1, arg2)
|
||||||
self.from_date, self.to_date = self.get_from_to_date()
|
self.from_date, self.to_date = self.get_from_to_date()
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ from __future__ import unicode_literals
|
|||||||
import frappe
|
import frappe
|
||||||
from frappe import _, throw
|
from frappe import _, throw
|
||||||
from frappe.utils import cint
|
from frappe.utils import cint
|
||||||
from frappe.model.controller import DocListController
|
from frappe.model.document import Document
|
||||||
import frappe.defaults
|
import frappe.defaults
|
||||||
|
|
||||||
class PriceList(DocListController):
|
class PriceList(Document):
|
||||||
def validate(self):
|
def validate(self):
|
||||||
if not cint(self.buying) and not cint(self.selling):
|
if not cint(self.buying) and not cint(self.selling):
|
||||||
throw(_("Price List must be applicable for Buying or Selling"))
|
throw(_("Price List must be applicable for Buying or Selling"))
|
||||||
|
|||||||
@@ -6,12 +6,12 @@ from __future__ import unicode_literals
|
|||||||
import frappe
|
import frappe
|
||||||
from frappe import _
|
from frappe import _
|
||||||
from frappe.utils import flt, getdate, add_days, formatdate
|
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
|
from datetime import date
|
||||||
|
|
||||||
class StockFreezeError(frappe.ValidationError): pass
|
class StockFreezeError(frappe.ValidationError): pass
|
||||||
|
|
||||||
class StockLedgerEntry(DocListController):
|
class StockLedgerEntry(Document):
|
||||||
def validate(self):
|
def validate(self):
|
||||||
from erpnext.stock.utils import validate_warehouse_company
|
from erpnext.stock.utils import validate_warehouse_company
|
||||||
self.validate_mandatory()
|
self.validate_mandatory()
|
||||||
|
|||||||
Reference in New Issue
Block a user