mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-19 04:59:18 +00:00
install, web serving, session booting webnotes/wnframework#351
This commit is contained in:
@@ -6,9 +6,9 @@ import webnotes
|
||||
from webnotes import _, msgprint
|
||||
from webnotes.utils import flt, cint, today, cstr
|
||||
from webnotes.model.code import get_obj
|
||||
from setup.utils import get_company_currency
|
||||
from accounts.utils import get_fiscal_year, validate_fiscal_year
|
||||
from utilities.transaction_base import TransactionBase, validate_conversion_rate
|
||||
from erpnext.setup.utils import get_company_currency
|
||||
from erpnext.accounts.utils import get_fiscal_year, validate_fiscal_year
|
||||
from erpnext.utilities.transaction_base import TransactionBase, validate_conversion_rate
|
||||
import json
|
||||
|
||||
class AccountsController(TransactionBase):
|
||||
@@ -403,7 +403,7 @@ class AccountsController(TransactionBase):
|
||||
raise_exception=1)
|
||||
|
||||
def get_company_default(self, fieldname):
|
||||
from accounts.utils import get_company_default
|
||||
from erpnext.accounts.utils import get_company_default
|
||||
return get_company_default(self.doc.company, fieldname)
|
||||
|
||||
def get_stock_items(self):
|
||||
|
||||
@@ -6,10 +6,10 @@ import webnotes
|
||||
from webnotes import _, msgprint
|
||||
from webnotes.utils import flt, _round
|
||||
|
||||
from buying.utils import get_item_details
|
||||
from setup.utils import get_company_currency
|
||||
from erpnext.buying.utils import get_item_details
|
||||
from erpnext.setup.utils import get_company_currency
|
||||
|
||||
from controllers.stock_controller import StockController
|
||||
from erpnext.controllers.stock_controller import StockController
|
||||
|
||||
class BuyingController(StockController):
|
||||
def onload_post_render(self):
|
||||
@@ -50,7 +50,7 @@ class BuyingController(StockController):
|
||||
break
|
||||
|
||||
def validate_warehouse(self):
|
||||
from stock.utils import validate_warehouse_user, validate_warehouse_company
|
||||
from erpnext.stock.utils import validate_warehouse_user, validate_warehouse_company
|
||||
|
||||
warehouses = list(set([d.warehouse for d in
|
||||
self.doclist.get({"doctype": self.tname}) if d.warehouse]))
|
||||
|
||||
@@ -186,7 +186,7 @@ def get_delivery_notes_to_be_billed(doctype, txt, searchfield, start, page_len,
|
||||
}, { "start": start, "page_len": page_len, "txt": ("%%%s%%" % txt) })
|
||||
|
||||
def get_batch_no(doctype, txt, searchfield, start, page_len, filters):
|
||||
from controllers.queries import get_match_cond
|
||||
from erpnext.controllers.queries import get_match_cond
|
||||
|
||||
if filters.has_key('warehouse'):
|
||||
return webnotes.conn.sql("""select batch_no from `tabStock Ledger Entry` sle
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
from __future__ import unicode_literals
|
||||
import webnotes
|
||||
from webnotes.utils import cint, flt, comma_or, _round, cstr
|
||||
from setup.utils import get_company_currency
|
||||
from selling.utils import get_item_details
|
||||
from erpnext.setup.utils import get_company_currency
|
||||
from erpnext.selling.utils import get_item_details
|
||||
from webnotes import msgprint, _
|
||||
|
||||
from controllers.stock_controller import StockController
|
||||
from erpnext.controllers.stock_controller import StockController
|
||||
|
||||
class SellingController(StockController):
|
||||
def onload_post_render(self):
|
||||
|
||||
@@ -7,8 +7,8 @@ from webnotes.utils import cint, flt, cstr
|
||||
from webnotes import msgprint, _
|
||||
import webnotes.defaults
|
||||
|
||||
from controllers.accounts_controller import AccountsController
|
||||
from accounts.general_ledger import make_gl_entries, delete_gl_entries
|
||||
from erpnext.controllers.accounts_controller import AccountsController
|
||||
from erpnext.accounts.general_ledger import make_gl_entries, delete_gl_entries
|
||||
|
||||
class StockController(AccountsController):
|
||||
def make_gl_entries(self, update_gl_entries_after=True):
|
||||
@@ -27,7 +27,7 @@ class StockController(AccountsController):
|
||||
|
||||
def get_gl_entries(self, warehouse_account=None, default_expense_account=None,
|
||||
default_cost_center=None):
|
||||
from accounts.general_ledger import process_gl_map
|
||||
from erpnext.accounts.general_ledger import process_gl_map
|
||||
if not warehouse_account:
|
||||
warehouse_account = self.get_warehouse_account()
|
||||
|
||||
@@ -160,7 +160,7 @@ class StockController(AccountsController):
|
||||
where voucher_type=%s and voucher_no=%s""", (voucher_type, voucher_no))
|
||||
|
||||
def make_adjustment_entry(self, expected_gle, voucher_obj):
|
||||
from accounts.utils import get_stock_and_account_difference
|
||||
from erpnext.accounts.utils import get_stock_and_account_difference
|
||||
account_list = [d.account for d in expected_gle]
|
||||
acc_diff = get_stock_and_account_difference(account_list, expected_gle[0].posting_date)
|
||||
|
||||
@@ -190,7 +190,7 @@ class StockController(AccountsController):
|
||||
])
|
||||
|
||||
if gl_entries:
|
||||
from accounts.general_ledger import make_gl_entries
|
||||
from erpnext.accounts.general_ledger import make_gl_entries
|
||||
make_gl_entries(gl_entries)
|
||||
|
||||
def check_expense_account(self, item):
|
||||
@@ -226,7 +226,7 @@ class StockController(AccountsController):
|
||||
return sl_dict
|
||||
|
||||
def make_sl_entries(self, sl_entries, is_amended=None):
|
||||
from stock.stock_ledger import make_sl_entries
|
||||
from erpnext.stock.stock_ledger import make_sl_entries
|
||||
make_sl_entries(sl_entries, is_amended)
|
||||
|
||||
def get_stock_ledger_entries(self, item_list=None, warehouse_list=None):
|
||||
|
||||
Reference in New Issue
Block a user