diff --git a/css/all-app.css b/css/all-app.css index 66229fd393a..41feae8e40c 100644 --- a/css/all-app.css +++ b/css/all-app.css @@ -3615,3 +3615,12 @@ body { max-width: 260px !important; } +.expiry-info { + margin-top: 40px; + margin-bottom: -40px; + text-align: center; + background-color: rgb(255, 255, 204); + padding: 7px; + z-index: 1; +} + diff --git a/css/all-web.css b/css/all-web.css index c7ab6f89e82..c3139d41662 100644 --- a/css/all-web.css +++ b/css/all-web.css @@ -2313,6 +2313,15 @@ body { max-width: 260px !important; } +.expiry-info { + margin-top: 40px; + margin-bottom: -40px; + text-align: center; + background-color: rgb(255, 255, 204); + padding: 7px; + z-index: 1; +} + /* * erpnext/website/css/website.css diff --git a/erpnext/patches/april_2012/reload_c_form.py b/erpnext/patches/april_2012/reload_c_form.py index 246ea0fdb1d..bebca6f9bb6 100644 --- a/erpnext/patches/april_2012/reload_c_form.py +++ b/erpnext/patches/april_2012/reload_c_form.py @@ -1,4 +1,4 @@ def execute(): import webnotes - from webnotes.modules.module_manager import reload_doc + from webnotes.modules import reload_doc reload_doc('accounts', 'doctype', 'c_form') diff --git a/erpnext/patches/april_2012/serial_no_fixes.py b/erpnext/patches/april_2012/serial_no_fixes.py index b4fcf759bd7..f291e1000d8 100644 --- a/erpnext/patches/april_2012/serial_no_fixes.py +++ b/erpnext/patches/april_2012/serial_no_fixes.py @@ -1,6 +1,6 @@ def execute(): import webnotes - from webnotes.modules.module_manager import reload_doc + from webnotes.modules import reload_doc reload_doc('stock', 'doctype', 'serial_no') webnotes.conn.sql("update `tabSerial No` set sle_exists = 1") diff --git a/erpnext/setup/doctype/setup_control/setup_control.py b/erpnext/setup/doctype/setup_control/setup_control.py index ba39358866b..84387e13230 100644 --- a/erpnext/setup/doctype/setup_control/setup_control.py +++ b/erpnext/setup/doctype/setup_control/setup_control.py @@ -21,53 +21,16 @@ from webnotes.model.doc import Document, addchild from webnotes.model.code import get_obj from webnotes import session, form, msgprint -sql = webnotes.conn.sql - class DocType: def __init__(self, d, dl): self.doc, self.doclist = d, dl - #Default Naming Series - #--------------------------------------------------- - def naming_series(self): - ns = [['TDS Payment', 'TDSP'], ['Purchase Invoice', 'BILL'], ['Journal Voucher', 'JV'], ['Sales Invoice', 'INV'], ['Lead', 'Lead'], ['Purchase Request', 'IDT'], ['Opportunity', 'Opportunity'], ['Purchase Order', 'PO'], ['Quotation', 'QTN'], ['Purchase Receipt', 'GRN'], ['Stock Entry', 'STE'], ['Sales Order', 'SO'], ['Delivery Note', 'DN'], ['Employee', 'EMP/']] - for r in ns: - rec = Document('Naming Series') - rec.select_doc_for_series = r[0] - rec.new_series = r[1] - rec_obj = get_obj(doc=rec) - rec_obj.add_series() - - # set account details - #----------------------- - def set_account_details(self, args): - """ - Called from gateway after allocation - """ - import json - args = json.loads(args) - - self.set_cp_defaults(args['company'], args['industry'], args['time_zone'], args['country'], args['account_name']) - self.create_profile(args['user'], args['first_name'], args['last_name'], args.get('pwd')) - - # Domain related updates - try: - from server_tools.gateway_utils import add_domain_map - add_domain_map(args) - except ImportError, e: - pass - - # add record in domain_list of Website Settings - account_url = args['url_name'] + '.erpnext.com' - webnotes.conn.set_value('Website Settings', 'Website Settings', - 'subdomain', account_url) - - # Account Setup # --------------- def setup_account(self, args): import webnotes, json args = json.loads(args) + webnotes.conn.begin() curr_fiscal_year, fy_start_date, fy_abbr = self.get_fy_details(args.get('fy_start')) @@ -117,6 +80,7 @@ class DocType: # Set self.set_defaults(def_args) + self.set_cp_defaults(**args) self.create_feed_and_todo() @@ -126,6 +90,7 @@ class DocType: import webnotes.utils user_fullname = (args.get('first_name') or '') + (args.get('last_name') and (" " + args.get('last_name')) or '') + webnotes.conn.commit() return {'sys_defaults': webnotes.utils.get_defaults(), 'user_fullname': user_fullname} def create_feed_and_todo(self): @@ -204,14 +169,12 @@ class DocType: # Set Control Panel Defaults # -------------------------- - def set_cp_defaults(self, cname, industry, timezone, country, acc_name): + def set_cp_defaults(self, industry, country, timezone, company_name): cp = Document('Control Panel','Control Panel') - cp.account_id = acc_name - cp.company_name = cname + cp.company_name = company_name cp.industry = industry cp.time_zone = timezone cp.country = country - cp.client_name = '