diff --git a/accounts/doctype/account/account.js b/accounts/doctype/account/account.js index 9ccb16b1d98..67a46cda157 100644 --- a/accounts/doctype/account/account.js +++ b/accounts/doctype/account/account.js @@ -11,7 +11,7 @@ cur_frm.cscript.onload = function(doc, cdt, cdn) { // ----------------------------------------- cur_frm.cscript.refresh = function(doc, cdt, cdn) { if(doc.__islocal) { - msgprint("Please create new account from Chart of Accounts."); + msgprint(wn._("Please create new account from Chart of Accounts.")); throw "cannot create"; } @@ -38,7 +38,7 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) { // read-only for root accounts if(!doc.parent_account) { cur_frm.perm = [[1,0,0], [1,0,0]]; - cur_frm.set_intro("This is a root account and cannot be edited."); + cur_frm.set_intro(wn._("This is a root account and cannot be edited.")); } else { // credit days and type if customer or supplier cur_frm.set_intro(null); @@ -81,17 +81,17 @@ cur_frm.cscript.account_type = function(doc, cdt, cdn) { // Hide/unhide group or ledger // ----------------------------------------- cur_frm.cscript.add_toolbar_buttons = function(doc) { - cur_frm.add_custom_button('Chart of Accounts', + cur_frm.add_custom_button(wn._('Chart of Accounts'), function() { wn.set_route("Accounts Browser", "Account"); }, 'icon-sitemap') if (cstr(doc.group_or_ledger) == 'Group') { - cur_frm.add_custom_button('Convert to Ledger', + cur_frm.add_custom_button(wn._('Convert to Ledger'), function() { cur_frm.cscript.convert_to_ledger(); }, 'icon-retweet') } else if (cstr(doc.group_or_ledger) == 'Ledger') { - cur_frm.add_custom_button('Convert to Group', + cur_frm.add_custom_button(wn._('Convert to Group'), function() { cur_frm.cscript.convert_to_group(); }, 'icon-retweet') - cur_frm.add_custom_button('View Ledger', function() { + cur_frm.add_custom_button(wn._('View Ledger'), function() { wn.route_options = { "account": doc.name, "from_date": sys_defaults.year_start_date, diff --git a/accounts/doctype/account/account.py b/accounts/doctype/account/account.py index fba51a9f72e..4961d72c85a 100644 --- a/accounts/doctype/account/account.py +++ b/accounts/doctype/account/account.py @@ -7,7 +7,6 @@ import webnotes from webnotes.utils import flt, fmt_money, cstr, cint from webnotes import msgprint, _ -sql = webnotes.conn.sql get_value = webnotes.conn.get_value class DocType: @@ -25,17 +24,6 @@ class DocType: self.doc.master_name, "address") } - def validate(self): - self.validate_master_name() - self.validate_parent() - self.validate_duplicate_account() - self.validate_root_details() - self.validate_mandatory() - self.validate_warehouse_account() - - if not self.doc.parent_account: - self.doc.parent_account = '' - def validate(self): self.validate_master_name() self.validate_parent() @@ -56,7 +44,7 @@ class DocType: def validate_parent(self): """Fetch Parent Details and validation for account not to be created under ledger""" if self.doc.parent_account: - par = sql("""select name, group_or_ledger, is_pl_account, debit_or_credit + par = webnotes.conn.sql("""select name, group_or_ledger, is_pl_account, debit_or_credit from tabAccount where name =%s""", self.doc.parent_account) if not par: msgprint("Parent account does not exists", raise_exception=1) @@ -84,7 +72,7 @@ class DocType: def validate_duplicate_account(self): if self.doc.fields.get('__islocal') or not self.doc.name: company_abbr = webnotes.conn.get_value("Company", self.doc.company, "abbr") - if sql("""select name from tabAccount where name=%s""", + if webnotes.conn.sql("""select name from tabAccount where name=%s""", (self.doc.account_name + " - " + company_abbr)): msgprint("Account Name: %s already exists, please rename" % self.doc.account_name, raise_exception=1) @@ -133,7 +121,7 @@ class DocType: return webnotes.conn.get_value("GL Entry", {"account": self.doc.name}) def check_if_child_exists(self): - return sql("""select name from `tabAccount` where parent_account = %s + return webnotes.conn.sql("""select name from `tabAccount` where parent_account = %s and docstatus != 2""", self.doc.name) def validate_mandatory(self): @@ -181,7 +169,7 @@ class DocType: # Get credit limit credit_limit_from = 'Customer' - cr_limit = sql("""select t1.credit_limit from tabCustomer t1, `tabAccount` t2 + cr_limit = webnotes.conn.sql("""select t1.credit_limit from tabCustomer t1, `tabAccount` t2 where t2.name=%s and t1.name = t2.master_name""", account) credit_limit = cr_limit and flt(cr_limit[0][0]) or 0 if not credit_limit: @@ -221,7 +209,7 @@ class DocType: # rename account name new_account_name = " - ".join(parts[:-1]) - sql("update `tabAccount` set account_name = %s where name = %s", (new_account_name, old)) + webnotes.conn.sql("update `tabAccount` set account_name = %s where name = %s", (new_account_name, old)) if merge: new_name = " - ".join(parts) diff --git a/accounts/doctype/bank_reconciliation/bank_reconciliation.py b/accounts/doctype/bank_reconciliation/bank_reconciliation.py index 479b57955cf..132358ef83a 100644 --- a/accounts/doctype/bank_reconciliation/bank_reconciliation.py +++ b/accounts/doctype/bank_reconciliation/bank_reconciliation.py @@ -10,7 +10,6 @@ from webnotes.model.doc import addchild from webnotes.model.bean import getlist, copy_doclist from webnotes import msgprint -sql = webnotes.conn.sql @@ -23,7 +22,7 @@ class DocType: msgprint("Bank Account, From Date and To Date are Mandatory") return - dl = sql("select t1.name, t1.cheque_no, t1.cheque_date, t2.debit, t2.credit, t1.posting_date, t2.against_account from `tabJournal Voucher` t1, `tabJournal Voucher Detail` t2 where t2.parent = t1.name and t2.account = %s and (clearance_date is null or clearance_date = '0000-00-00' or clearance_date = '') and t1.posting_date >= %s and t1.posting_date <= %s and t1.docstatus=1", (self.doc.bank_account, self.doc.from_date, self.doc.to_date)) + dl = webnotes.conn.sql("select t1.name, t1.cheque_no, t1.cheque_date, t2.debit, t2.credit, t1.posting_date, t2.against_account from `tabJournal Voucher` t1, `tabJournal Voucher Detail` t2 where t2.parent = t1.name and t2.account = %s and (clearance_date is null or clearance_date = '0000-00-00' or clearance_date = '') and t1.posting_date >= %s and t1.posting_date <= %s and t1.docstatus=1", (self.doc.bank_account, self.doc.from_date, self.doc.to_date)) self.doclist = self.doc.clear_table(self.doclist, 'entries') self.doc.total_amount = 0.0 @@ -47,7 +46,7 @@ class DocType: msgprint("Clearance Date can not be before Cheque Date (Row #%s)" % d.idx, raise_exception=1) - sql("""update `tabJournal Voucher` + webnotes.conn.sql("""update `tabJournal Voucher` set clearance_date = %s, modified = %s where name=%s""", (d.clearance_date, nowdate(), d.voucher_id)) vouchers.append(d.voucher_id) diff --git a/accounts/doctype/cost_center/cost_center.js b/accounts/doctype/cost_center/cost_center.js index c3519bfc6c7..9995b6b1b5c 100644 --- a/accounts/doctype/cost_center/cost_center.js +++ b/accounts/doctype/cost_center/cost_center.js @@ -41,8 +41,8 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) { cur_frm.toggle_enable(['group_or_ledger', 'company'], doc.__islocal); if(!doc.__islocal && doc.group_or_ledger=='Group') { - intro_txt += '

Note: This Cost Center is a Group, \ - Accounting Entries are not allowed against groups.

'; + intro_txt += '

'+wn._('Note:')+''+ wn._('This Cost Center is a')+ ''+wn._('Group')+', '+ + wn._('Accounting Entries are not allowed against groups.')+'

'; } cur_frm.cscript.hide_unhide_group_ledger(doc); @@ -50,22 +50,22 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) { cur_frm.toggle_display('sb1', doc.group_or_ledger=='Ledger') cur_frm.set_intro(intro_txt); - cur_frm.add_custom_button('Chart of Cost Centers', + cur_frm.add_custom_button(wn._('Chart of Cost Centers'), function() { wn.set_route("Accounts Browser", "Cost Center"); }, 'icon-sitemap') } cur_frm.cscript.parent_cost_center = function(doc,cdt,cdn){ if(!doc.company){ - alert('Please enter company name first'); + alert(wn._('Please enter company name first')); } } cur_frm.cscript.hide_unhide_group_ledger = function(doc) { if (cstr(doc.group_or_ledger) == 'Group') { - cur_frm.add_custom_button('Convert to Ledger', + cur_frm.add_custom_button(wn._('Convert to Ledger'), function() { cur_frm.cscript.convert_to_ledger(); }, 'icon-retweet') } else if (cstr(doc.group_or_ledger) == 'Ledger') { - cur_frm.add_custom_button('Convert to Group', + cur_frm.add_custom_button(wn._('Convert to Group'), function() { cur_frm.cscript.convert_to_group(); }, 'icon-retweet') } } diff --git a/accounts/doctype/fiscal_year/fiscal_year.js b/accounts/doctype/fiscal_year/fiscal_year.js index c5500aa1f37..ba63520e29f 100644 --- a/accounts/doctype/fiscal_year/fiscal_year.js +++ b/accounts/doctype/fiscal_year/fiscal_year.js @@ -5,8 +5,8 @@ cur_frm.cscript.refresh = function(doc, dt, dn) { cur_frm.toggle_enable('year_start_date', doc.__islocal) if (!doc.__islocal && (doc.name != sys_defaults.fiscal_year)) { - cur_frm.add_custom_button("Set as Default", cur_frm.cscript.set_as_default); - cur_frm.set_intro("To set this Fiscal Year as Deafult, click on 'Set as Default'"); + cur_frm.add_custom_button(wn._("Set as Default"), cur_frm.cscript.set_as_default); + cur_frm.set_intro(wn._("To set this Fiscal Year as Deafult, click on 'Set as Default'")); } else cur_frm.set_intro(""); } diff --git a/accounts/doctype/gl_entry/gl_entry.py b/accounts/doctype/gl_entry/gl_entry.py index 0c11198be95..7a73b067565 100644 --- a/accounts/doctype/gl_entry/gl_entry.py +++ b/accounts/doctype/gl_entry/gl_entry.py @@ -161,16 +161,6 @@ def update_outstanding_amt(account, against_voucher_type, against_voucher, on_ca webnotes.conn.sql("update `tab%s` set outstanding_amount=%s where name='%s'" % (against_voucher_type, bal, against_voucher)) -def validate_freezed_account(account, adv_adj=False): - """Account has been freezed for other users except account manager""" - - freezed_account = webnotes.conn.get_value("Account", account, "freeze_account") - - if freezed_account == 'Yes' and not adv_adj \ - and 'Accounts Manager' not in webnotes.user.get_roles(): - webnotes.throw(_("Account") + ": " + account + _(" has been freezed. \ - Only Accounts Manager can do transaction against this account")) - def validate_frozen_account(account, adv_adj): frozen_account = webnotes.conn.get_value("Account", account, "freeze_account") if frozen_account == 'Yes' and not adv_adj: @@ -183,4 +173,4 @@ def validate_frozen_account(account, adv_adj): elif frozen_accounts_modifier not in webnotes.user.get_roles(): webnotes.throw(account + _(" is a frozen account. ") + _("To create / edit transactions against this account, you need role") + ": " + - frozen_accounts_modifier) \ No newline at end of file + frozen_accounts_modifier) diff --git a/accounts/doctype/journal_voucher/journal_voucher.js b/accounts/doctype/journal_voucher/journal_voucher.js index a3aa6f127a0..15fad3f9f3c 100644 --- a/accounts/doctype/journal_voucher/journal_voucher.js +++ b/accounts/doctype/journal_voucher/journal_voucher.js @@ -12,10 +12,13 @@ erpnext.accounts.JournalVoucher = wn.ui.form.Controller.extend({ load_defaults: function() { if(this.frm.doc.__islocal && this.frm.doc.company) { wn.model.set_default_values(this.frm.doc); - $.each(wn.model.get_doclist(this.frm.doc.doctype, this.frm.doc.name, {parentfield: "entries"}), - function(i, jvd) { wn.model.set_default_values(jvd); }); + $.each(wn.model.get_doclist(this.frm.doc.doctype, + this.frm.doc.name, {parentfield: "entries"}), function(i, jvd) { + wn.model.set_default_values(jvd); + } + ); - this.frm.doc.posting_date = get_today(); + if(!this.frm.doc.amended_from) this.frm.doc.posting_date = get_today(); } }, @@ -59,6 +62,50 @@ erpnext.accounts.JournalVoucher = wn.ui.form.Controller.extend({ }; }); }, + + against_voucher: function(doc, cdt, cdn) { + var d = wn.model.get_doc(cdt, cdn); + if (d.against_voucher && !flt(d.debit)) { + this.get_outstanding({ + 'doctype': 'Purchase Invoice', + 'docname': d.against_voucher + }, d) + } + }, + + against_invoice: function(doc, cdt, cdn) { + var d = wn.model.get_doc(cdt, cdn); + if (d.against_invoice && !flt(d.credit)) { + this.get_outstanding({ + 'doctype': 'Sales Invoice', + 'docname': d.against_invoice + }, d) + } + }, + + against_jv: function(doc, cdt, cdn) { + var d = wn.model.get_doc(cdt, cdn); + if (d.against_jv && !flt(d.credit) && !flt(d.debit)) { + this.get_outstanding({ + 'doctype': 'Journal Voucher', + 'docname': d.against_jv, + 'account': d.account + }, d) + } + }, + + get_outstanding: function(args, child) { + var me = this; + return this.frm.call({ + child: child, + method: "get_outstanding", + args: { args: args}, + callback: function(r) { + cur_frm.cscript.update_totals(me.frm.doc); + } + }); + } + }); cur_frm.script_manager.make(erpnext.accounts.JournalVoucher); @@ -68,7 +115,7 @@ cur_frm.cscript.refresh = function(doc) { erpnext.hide_naming_series(); cur_frm.cscript.voucher_type(doc); if(doc.docstatus==1) { - cur_frm.add_custom_button('View Ledger', function() { + cur_frm.add_custom_button(wn._('View Ledger'), function() { wn.route_options = { "voucher_no": doc.name, "from_date": doc.posting_date, @@ -88,24 +135,6 @@ cur_frm.cscript.is_opening = function(doc, cdt, cdn) { if (doc.is_opening == 'Yes') unhide_field('aging_date'); } -cur_frm.cscript.against_voucher = function(doc,cdt,cdn) { - var d = locals[cdt][cdn]; - if (d.against_voucher && !flt(d.debit)) { - args = {'doctype': 'Purchase Invoice', 'docname': d.against_voucher } - return get_server_fields('get_outstanding',docstring(args),'entries',doc,cdt,cdn,1,function(r,rt) { cur_frm.cscript.update_totals(doc); }); - } -} - -cur_frm.cscript.against_invoice = function(doc,cdt,cdn) { - var d = locals[cdt][cdn]; - if (d.against_invoice && !flt(d.credit)) { - args = {'doctype': 'Sales Invoice', 'docname': d.against_invoice } - return get_server_fields('get_outstanding',docstring(args),'entries',doc,cdt,cdn,1,function(r,rt) { cur_frm.cscript.update_totals(doc); }); - } -} - -// Update Totals - cur_frm.cscript.update_totals = function(doc) { var td=0.0; var tc =0.0; var el = getchildren('Journal Voucher Detail', doc.name, 'entries'); @@ -156,7 +185,7 @@ cur_frm.cscript.select_print_heading = function(doc,cdt,cdn){ cur_frm.pformat.print_heading = doc.select_print_heading; } else - cur_frm.pformat.print_heading = "Journal Voucher"; + cur_frm.pformat.print_heading = wn._("Journal Voucher"); } cur_frm.cscript.voucher_type = function(doc, cdt, cdn) { diff --git a/accounts/doctype/journal_voucher/journal_voucher.py b/accounts/doctype/journal_voucher/journal_voucher.py index ed4a0d79c7c..ade93c658e4 100644 --- a/accounts/doctype/journal_voucher/journal_voucher.py +++ b/accounts/doctype/journal_voucher/journal_voucher.py @@ -260,15 +260,6 @@ class DocType(AccountsController): if gl_map: make_gl_entries(gl_map, cancel=cancel, adv_adj=adv_adj) - def get_outstanding(self, args): - args = eval(args) - o_s = webnotes.conn.sql("""select outstanding_amount from `tab%s` where name = %s""" % - (args['doctype'], '%s'), args['docname']) - if args['doctype'] == 'Purchase Invoice': - return {'debit': o_s and flt(o_s[0][0]) or 0} - if args['doctype'] == 'Sales Invoice': - return {'credit': o_s and flt(o_s[0][0]) or 0} - def get_balance(self): if not getlist(self.doclist,'entries'): msgprint("Please enter atleast 1 entry in 'GL Entries' table") @@ -434,4 +425,31 @@ def get_against_jv(doctype, txt, searchfield, start, page_len, filters): where jv_detail.parent = jv.name and jv_detail.account = %s and jv.docstatus = 1 and jv.%s like %s order by jv.name desc limit %s, %s""" % ("%s", searchfield, "%s", "%s", "%s"), - (filters["account"], "%%%s%%" % txt, start, page_len)) \ No newline at end of file + (filters["account"], "%%%s%%" % txt, start, page_len)) + +@webnotes.whitelist() +def get_outstanding(args): + args = eval(args) + if args.get("doctype") == "Journal Voucher" and args.get("account"): + against_jv_amount = webnotes.conn.sql(""" + select sum(ifnull(debit, 0)) - sum(ifnull(credit, 0)) + from `tabJournal Voucher Detail` where parent=%s and account=%s + and ifnull(against_invoice, '')='' and ifnull(against_voucher, '')='' + and ifnull(against_jv, '')=''""", (args['docname'], args['account'])) + + against_jv_amount = flt(against_jv_amount[0][0]) if against_jv_amount else 0 + if against_jv_amount > 0: + return {"credit": against_jv_amount} + else: + return {"debit": -1* against_jv_amount} + + elif args.get("doctype") == "Sales Invoice": + return { + "credit": flt(webnotes.conn.get_value("Sales Invoice", args["docname"], + "outstanding_amount")) + } + elif args.get("doctype") == "Purchase Invoice": + return { + "debit": flt(webnotes.conn.get_value("Purchase Invoice", args["docname"], + "outstanding_amount")) + } diff --git a/accounts/doctype/mis_control/mis_control.py b/accounts/doctype/mis_control/mis_control.py index 84350dcb722..f10e3d7df33 100644 --- a/accounts/doctype/mis_control/mis_control.py +++ b/accounts/doctype/mis_control/mis_control.py @@ -11,7 +11,6 @@ from webnotes import session, msgprint import webnotes.defaults -sql = webnotes.conn.sql from accounts.utils import get_balance_on, get_fiscal_year @@ -44,7 +43,7 @@ class DocType: ret['company'] = get_companies() #--- to get fiscal year and start_date of that fiscal year ----- - res = sql("select name, year_start_date from `tabFiscal Year`") + res = webnotes.conn.sql("select name, year_start_date from `tabFiscal Year`") ret['fiscal_year'] = [r[0] for r in res] ret['start_dates'] = {} for r in res: @@ -52,7 +51,7 @@ class DocType: #--- from month and to month (for MIS - Comparison Report) ------- month_list = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'] - fiscal_start_month = sql("select MONTH(year_start_date) from `tabFiscal Year` where name = %s",(webnotes.defaults.get_global_default("fiscal_year"))) + fiscal_start_month = webnotes.conn.sql("select MONTH(year_start_date) from `tabFiscal Year` where name = %s",(webnotes.defaults.get_global_default("fiscal_year"))) fiscal_start_month = fiscal_start_month and fiscal_start_month[0][0] or 1 mon = [''] for i in range(fiscal_start_month,13): mon.append(month_list[i-1]) @@ -107,7 +106,7 @@ class DocType: def dates(self,fiscal_year,from_date,to_date): import datetime ret = '' - start_date = cstr(sql("select year_start_date from `tabFiscal Year` where name = %s",fiscal_year)[0][0]) + start_date = cstr(webnotes.conn.sql("select year_start_date from `tabFiscal Year` where name = %s",fiscal_year)[0][0]) st_mon = cint(from_date.split('-')[1]) ed_mon = cint(to_date.split('-')[1]) st_day = cint(from_date.split('-')[2]) @@ -152,7 +151,7 @@ class DocType: def get_totals(self, args): args = eval(args) #msgprint(args) - totals = sql("SELECT %s FROM %s WHERE %s %s %s %s" %(cstr(args['query_val']), cstr(args['tables']), cstr(args['company']), cstr(args['cond']), cstr(args['add_cond']), cstr(args['fil_cond'])), as_dict = 1)[0] + totals = webnotes.conn.sql("SELECT %s FROM %s WHERE %s %s %s %s" %(cstr(args['query_val']), cstr(args['tables']), cstr(args['company']), cstr(args['cond']), cstr(args['add_cond']), cstr(args['fil_cond'])), as_dict = 1)[0] #msgprint(totals) tot_keys = totals.keys() # return in flt because JSON doesn't accept Decimal @@ -185,7 +184,7 @@ class DocType: # Get Children # ------------ def get_children(self, parent_account, level, pl, company, fy): - cl = sql("select distinct account_name, name, debit_or_credit, lft, rgt from `tabAccount` where ifnull(parent_account, '') = %s and ifnull(is_pl_account, 'No')=%s and company=%s and docstatus != 2 order by name asc", (parent_account, pl, company)) + cl = webnotes.conn.sql("select distinct account_name, name, debit_or_credit, lft, rgt from `tabAccount` where ifnull(parent_account, '') = %s and ifnull(is_pl_account, 'No')=%s and company=%s and docstatus != 2 order by name asc", (parent_account, pl, company)) level0_diff = [0 for p in self.period_list] if pl=='Yes' and level==0: # switch for income & expenses cl = [c for c in cl] @@ -238,7 +237,7 @@ class DocType: def define_periods(self, year, period): # get year start date - ysd = sql("select year_start_date from `tabFiscal Year` where name=%s", year) + ysd = webnotes.conn.sql("select year_start_date from `tabFiscal Year` where name=%s", year) ysd = ysd and ysd[0][0] or '' self.ysd = ysd diff --git a/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.js b/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.js index a48520cbd50..980d6e7d3c3 100644 --- a/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.js +++ b/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.js @@ -13,15 +13,15 @@ cur_frm.cscript.onload_post_render = function(doc) { cur_frm.cscript.refresh = function(doc) { cur_frm.set_intro(""); if(!doc.voucher_no) { - cur_frm.set_intro("Select the Invoice against which you want to allocate payments."); + cur_frm.set_intro(wn._("Select the Invoice against which you want to allocate payments.")); } else { - cur_frm.set_intro("Set allocated amount against each Payment Entry and click 'Allocate'."); + cur_frm.set_intro(wn._("Set allocated amount against each Payment Entry and click 'Allocate'.")); } } cur_frm.fields_dict.voucher_no.get_query = function(doc) { // TO-do: check for pos, it should not come - if (!doc.account) msgprint("Please select Account first"); + if (!doc.account) msgprint(wn._("Please select Account first")); else { return { doctype: doc.voucher_type, diff --git a/accounts/doctype/period_closing_voucher/period_closing_voucher.py b/accounts/doctype/period_closing_voucher/period_closing_voucher.py index 99282f57f1a..70a49925527 100644 --- a/accounts/doctype/period_closing_voucher/period_closing_voucher.py +++ b/accounts/doctype/period_closing_voucher/period_closing_voucher.py @@ -69,7 +69,6 @@ class DocType(AccountsController): def get_pl_balances(self): """Get balance for pl accounts""" - return webnotes.conn.sql(""" select t1.account, sum(ifnull(t1.debit,0))-sum(ifnull(t1.credit,0)) as balance from `tabGL Entry` t1, `tabAccount` t2 @@ -101,4 +100,4 @@ class DocType(AccountsController): })) from accounts.general_ledger import make_gl_entries - make_gl_entries(gl_entries) \ No newline at end of file + make_gl_entries(gl_entries) diff --git a/accounts/doctype/period_closing_voucher/test_period_closing_voucher.py b/accounts/doctype/period_closing_voucher/test_period_closing_voucher.py index c21d63f6ecb..b9ac8bd740c 100644 --- a/accounts/doctype/period_closing_voucher/test_period_closing_voucher.py +++ b/accounts/doctype/period_closing_voucher/test_period_closing_voucher.py @@ -8,6 +8,9 @@ import webnotes class TestPeriodClosingVoucher(unittest.TestCase): def test_closing_entry(self): + # clear GL Entries + webnotes.conn.sql("""delete from `tabGL Entry`""") + from accounts.doctype.journal_voucher.test_journal_voucher import test_records as jv_records jv = webnotes.bean(copy=jv_records[2]) jv.insert() diff --git a/accounts/doctype/purchase_invoice/purchase_invoice.js b/accounts/doctype/purchase_invoice/purchase_invoice.js index fb5569a5f0c..ed75934f143 100644 --- a/accounts/doctype/purchase_invoice/purchase_invoice.js +++ b/accounts/doctype/purchase_invoice/purchase_invoice.js @@ -27,10 +27,10 @@ erpnext.accounts.PurchaseInvoice = erpnext.buying.BuyingController.extend({ // Show / Hide button if(doc.docstatus==1 && doc.outstanding_amount > 0) - this.frm.add_custom_button('Make Payment Entry', this.make_bank_voucher); + this.frm.add_custom_button(wn._('Make Payment Entry'), this.make_bank_voucher); if(doc.docstatus==1) { - cur_frm.add_custom_button('View Ledger', function() { + cur_frm.add_custom_button(wn._('View Ledger'), function() { wn.route_options = { "voucher_no": doc.name, "from_date": doc.posting_date, @@ -214,5 +214,5 @@ cur_frm.cscript.select_print_heading = function(doc,cdt,cdn){ cur_frm.pformat.print_heading = doc.select_print_heading; } else - cur_frm.pformat.print_heading = "Purchase Invoice"; + cur_frm.pformat.print_heading = wn._("Purchase Invoice"); } \ No newline at end of file diff --git a/accounts/doctype/purchase_invoice/purchase_invoice.py b/accounts/doctype/purchase_invoice/purchase_invoice.py index c1e92b9f4fa..ba6f5a4d450 100644 --- a/accounts/doctype/purchase_invoice/purchase_invoice.py +++ b/accounts/doctype/purchase_invoice/purchase_invoice.py @@ -12,7 +12,6 @@ from setup.utils import get_company_currency import webnotes.defaults -sql = webnotes.conn.sql from controllers.buying_controller import BuyingController class DocType(BuyingController): @@ -64,18 +63,21 @@ class DocType(BuyingController): def get_credit_to(self): ret = {} if self.doc.supplier: - acc_head = sql("""select name, credit_days from `tabAccount` + acc_head = webnotes.conn.sql("""select name, credit_days from `tabAccount` where (name = %s or (master_name = %s and master_type = 'supplier')) and docstatus != 2 and company = %s""", (cstr(self.doc.supplier) + " - " + self.company_abbr, self.doc.supplier, self.doc.company)) - + if acc_head and acc_head[0][0]: ret['credit_to'] = acc_head[0][0] if not self.doc.due_date: - ret['due_date'] = add_days(cstr(self.doc.posting_date), acc_head and cint(acc_head[0][1]) or 0) + ret['due_date'] = add_days(cstr(self.doc.posting_date), + acc_head and cint(acc_head[0][1]) or 0) elif not acc_head: - msgprint("%s does not have an Account Head in %s. You must first create it from the Supplier Master" % (self.doc.supplier, self.doc.company)) + msgprint("%s does not have an Account Head in %s. \ + You must first create it from the Supplier Master" % \ + (self.doc.supplier, self.doc.company)) return ret def set_supplier_defaults(self): @@ -86,18 +88,10 @@ class DocType(BuyingController): super(DocType, self).get_advances(self.doc.credit_to, "Purchase Invoice Advance", "advance_allocation_details", "debit") - def get_rate(self,arg): - return get_obj('Purchase Common').get_rate(arg,self) - - def get_rate1(self,acc): - rate = sql("select tax_rate from `tabAccount` where name='%s'"%(acc)) - ret={'add_tax_rate' :rate and flt(rate[0][0]) or 0 } - return ret - def check_active_purchase_items(self): for d in getlist(self.doclist, 'entries'): if d.item_code: # extra condn coz item_code is not mandatory in PV - valid_item = sql("select docstatus,is_purchase_item from tabItem where name = %s",d.item_code) + valid_item = webnotes.conn.sql("select docstatus,is_purchase_item from tabItem where name = %s",d.item_code) if valid_item[0][0] == 2: msgprint("Item : '%s' is Inactive, you can restore it from Trash" %(d.item_code)) raise Exception @@ -117,7 +111,7 @@ class DocType(BuyingController): def validate_bill_no(self): if self.doc.bill_no and self.doc.bill_no.lower().strip() \ not in ['na', 'not applicable', 'none']: - b_no = sql("""select bill_no, name, ifnull(is_opening,'') from `tabPurchase Invoice` + b_no = webnotes.conn.sql("""select bill_no, name, ifnull(is_opening,'') from `tabPurchase Invoice` where bill_no = %s and credit_to = %s and docstatus = 1 and name != %s""", (self.doc.bill_no, self.doc.credit_to, self.doc.name)) if b_no and cstr(b_no[0][2]) == cstr(self.doc.is_opening): @@ -133,7 +127,7 @@ class DocType(BuyingController): self.doc.remarks = "No Remarks" def validate_credit_acc(self): - acc = sql("select debit_or_credit, is_pl_account from tabAccount where name = %s", + acc = webnotes.conn.sql("select debit_or_credit, is_pl_account from tabAccount where name = %s", self.doc.credit_to) if not acc: msgprint("Account: "+ self.doc.credit_to + "does not exist") @@ -149,7 +143,7 @@ class DocType(BuyingController): # ------------------------------------------------------------ def check_for_acc_head_of_supplier(self): if self.doc.supplier and self.doc.credit_to: - acc_head = sql("select master_name from `tabAccount` where name = %s", self.doc.credit_to) + acc_head = webnotes.conn.sql("select master_name from `tabAccount` where name = %s", self.doc.credit_to) if (acc_head and cstr(acc_head[0][0]) != cstr(self.doc.supplier)) or (not acc_head and (self.doc.credit_to != cstr(self.doc.supplier) + " - " + self.company_abbr)): msgprint("Credit To: %s do not match with Supplier: %s for Company: %s.\n If both correctly entered, please select Master Type and Master Name in account master." %(self.doc.credit_to,self.doc.supplier,self.doc.company), raise_exception=1) @@ -161,7 +155,7 @@ class DocType(BuyingController): for d in getlist(self.doclist,'entries'): if d.purchase_order and not d.purchase_order in check_list and not d.purchase_receipt: check_list.append(d.purhcase_order) - stopped = sql("select name from `tabPurchase Order` where status = 'Stopped' and name = '%s'" % d.purchase_order) + stopped = webnotes.conn.sql("select name from `tabPurchase Order` where status = 'Stopped' and name = '%s'" % d.purchase_order) if stopped: msgprint("One cannot do any transaction against 'Purchase Order' : %s, it's status is 'Stopped'" % (d.purhcase_order)) raise Exception @@ -261,11 +255,11 @@ class DocType(BuyingController): def check_prev_docstatus(self): for d in getlist(self.doclist,'entries'): if d.purchase_order: - submitted = sql("select name from `tabPurchase Order` where docstatus = 1 and name = '%s'" % d.purchase_order) + submitted = webnotes.conn.sql("select name from `tabPurchase Order` where docstatus = 1 and name = '%s'" % d.purchase_order) if not submitted: webnotes.throw("Purchase Order : "+ cstr(d.purchase_order) +" is not submitted") if d.purchase_receipt: - submitted = sql("select name from `tabPurchase Receipt` where docstatus = 1 and name = '%s'" % d.purchase_receipt) + submitted = webnotes.conn.sql("select name from `tabPurchase Receipt` where docstatus = 1 and name = '%s'" % d.purchase_receipt) if not submitted: webnotes.throw("Purchase Receipt : "+ cstr(d.purchase_receipt) +" is not submitted") @@ -299,20 +293,14 @@ class DocType(BuyingController): reconcile_against_document(lst) def on_submit(self): - purchase_controller = webnotes.get_obj("Purchase Common") - purchase_controller.is_item_table_empty(self) - self.check_prev_docstatus() - # Check for Approving Authority - get_obj('Authorization Control').validate_approving_authority(self.doc.doctype,self.doc.company, self.doc.grand_total) - + get_obj('Authorization Control').validate_approving_authority(self.doc.doctype, + self.doc.company, self.doc.grand_total) # this sequence because outstanding may get -negative self.make_gl_entries() - self.update_against_document_in_jv() - self.update_prevdoc_status() def make_gl_entries(self): @@ -451,7 +439,7 @@ class DocType(BuyingController): def update_raw_material_cost(self): if self.sub_contracted_items: for d in self.doclist.get({"parentfield": "entries"}): - rm_cost = webnotes.conn.sql(""" select raw_material_cost / quantity + rm_cost = webnotes.conn.sql("""select raw_material_cost / quantity from `tabBOM` where item = %s and is_default = 1 and docstatus = 1 and is_active = 1 """, (d.item_code,)) rm_cost = rm_cost and flt(rm_cost[0][0]) or 0 diff --git a/accounts/doctype/purchase_invoice/purchase_invoice.txt b/accounts/doctype/purchase_invoice/purchase_invoice.txt index f5bdd939a88..8f772272b75 100755 --- a/accounts/doctype/purchase_invoice/purchase_invoice.txt +++ b/accounts/doctype/purchase_invoice/purchase_invoice.txt @@ -2,12 +2,13 @@ { "creation": "2013-05-21 16:16:39", "docstatus": 0, - "modified": "2013-08-09 14:45:35", + "modified": "2013-10-02 14:24:55", "modified_by": "Administrator", "owner": "Administrator" }, { "allow_attach": 1, + "allow_import": 1, "autoname": "naming_series:", "doctype": "DocType", "icon": "icon-file-text", diff --git a/accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.js b/accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.js index 423c4e49b9d..9e497e4ef54 100644 --- a/accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.js +++ b/accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.js @@ -4,6 +4,8 @@ // //--------- ONLOAD ------------- +wn.require("app/js/controllers/accounts.js"); + cur_frm.cscript.onload = function(doc, cdt, cdn) { } @@ -60,12 +62,12 @@ cur_frm.pformat.purchase_tax_details= function(doc){ cur_frm.cscript.add_deduct_tax = function(doc, cdt, cdn) { var d = locals[cdt][cdn]; if(!d.category && d.add_deduct_tax){ - alert("Please select Category first"); + alert(wn._("Please select Category first")); d.add_deduct_tax = ''; } else if(d.category != 'Total' && d.add_deduct_tax == 'Deduct') { console.log([d.category, d.add_deduct_tax]); - msgprint("You cannot deduct when category is for 'Valuation' or 'Valuation and Total'"); + msgprint(wn._("You cannot deduct when category is for 'Valuation' or 'Valuation and Total'")); d.add_deduct_tax = ''; } @@ -74,15 +76,15 @@ cur_frm.cscript.add_deduct_tax = function(doc, cdt, cdn) { cur_frm.cscript.charge_type = function(doc, cdt, cdn) { var d = locals[cdt][cdn]; if(!d.category && d.charge_type){ - alert("Please select Category first"); + alert(wn._("Please select Category first")); d.charge_type = ''; } else if(d.idx == 1 && (d.charge_type == 'On Previous Row Amount' || d.charge_type == 'On Previous Row Total')){ - alert("You cannot select Charge Type as 'On Previous Row Amount' or 'On Previous Row Total' for first row"); + alert(wn._("You cannot select Charge Type as 'On Previous Row Amount' or 'On Previous Row Total' for first row")); d.charge_type = ''; } else if((d.category == 'Valuation' || d.category == 'Valuation and Total') && (d.charge_type == 'On Previous Row Amount' || d.charge_type == 'On Previous Row Total')){ - alert("You cannot select charge type as 'On Previous Row Amount' or 'On Previous Row Total' for valuation. You can select only 'Total' option for previous row amount or previous row total") + alert(wn._("You cannot select charge type as 'On Previous Row Amount' or 'On Previous Row Total' for valuation. You can select only 'Total' option for previous row amount or previous row total")) d.charge_type = ''; } validated = false; @@ -97,16 +99,16 @@ cur_frm.cscript.charge_type = function(doc, cdt, cdn) { cur_frm.cscript.row_id = function(doc, cdt, cdn) { var d = locals[cdt][cdn]; if(!d.charge_type && d.row_id){ - alert("Please select Charge Type first"); + alert(wn._("Please select Charge Type first")); d.row_id = ''; } else if((d.charge_type == 'Actual' || d.charge_type == 'On Net Total') && d.row_id) { - alert("You can Enter Row only if your Charge Type is 'On Previous Row Amount' or ' Previous Row Total'"); + alert(wn._("You can Enter Row only if your Charge Type is 'On Previous Row Amount' or ' Previous Row Total'")); d.row_id = ''; } else if((d.charge_type == 'On Previous Row Amount' || d.charge_type == 'On Previous Row Total') && d.row_id){ if(d.row_id >= d.idx){ - alert("You cannot Enter Row no. greater than or equal to current row no. for this Charge type"); + alert(wn._("You cannot Enter Row no. greater than or equal to current row no. for this Charge type")); d.row_id = ''; } } @@ -134,24 +136,10 @@ cur_frm.fields_dict['purchase_tax_details'].grid.get_field("cost_center").get_qu } } -cur_frm.cscript.account_head = function(doc, cdt, cdn) { - var d = locals[cdt][cdn]; - if(!d.charge_type && d.account_head){ - alert("Please select Charge Type first"); - validated = false; - d.account_head = ''; - } - else if(d.account_head && d.charge_type) { - arg = "{'charge_type' : '" + d.charge_type + "', 'account_head' : '" + d.account_head + "'}"; - return get_server_fields('get_rate', arg, 'purchase_tax_details', doc, cdt, cdn, 1); - } - refresh_field('account_head',d.name,'purchase_tax_details'); -} - cur_frm.cscript.rate = function(doc, cdt, cdn) { var d = locals[cdt][cdn]; if(!d.charge_type && d.rate) { - alert("Please select Charge Type first"); + alert(wn._("Please select Charge Type first")); d.rate = ''; } validated = false; @@ -161,11 +149,11 @@ cur_frm.cscript.rate = function(doc, cdt, cdn) { cur_frm.cscript.tax_amount = function(doc, cdt, cdn) { var d = locals[cdt][cdn]; if(!d.charge_type && d.tax_amount){ - alert("Please select Charge Type first"); + alert(wn._("Please select Charge Type first")); d.tax_amount = ''; } else if(d.charge_type && d.tax_amount) { - alert("You cannot directly enter Amount and if your Charge Type is Actual enter your amount in Rate"); + alert(wn._("You cannot directly enter Amount and if your Charge Type is Actual enter your amount in Rate")); d.tax_amount = ''; } validated = false; diff --git a/accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.py b/accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.py index a4534aefd62..3d003f6e932 100644 --- a/accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.py +++ b/accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.py @@ -8,16 +8,10 @@ from webnotes.model import db_exists from webnotes.model.bean import copy_doclist from webnotes.model.code import get_obj -sql = webnotes.conn.sql class DocType: def __init__(self, doc, doclist=[]): self.doc = doc - self.doclist = doclist - - # Get Tax Rate if account type is Tax - # =================================================================== - def get_rate(self, arg): - return get_obj('Purchase Common').get_rate(arg, self) \ No newline at end of file + self.doclist = doclist \ No newline at end of file diff --git a/accounts/doctype/sales_invoice/sales_invoice.js b/accounts/doctype/sales_invoice/sales_invoice.js index b5c16461768..9afa33d3c84 100644 --- a/accounts/doctype/sales_invoice/sales_invoice.js +++ b/accounts/doctype/sales_invoice/sales_invoice.js @@ -11,7 +11,7 @@ cur_frm.pformat.print_heading = 'Invoice'; wn.require('app/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.js'); wn.require('app/utilities/doctype/sms_control/sms_control.js'); -wn.require('app/selling/doctype/sales_common/sales_common.js'); +wn.require('app/selling/sales_common.js'); wn.require('app/accounts/doctype/sales_invoice/pos.js'); wn.provide("erpnext.accounts"); @@ -61,7 +61,7 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte var percent_paid = cint(flt(doc.grand_total - doc.outstanding_amount) / flt(doc.grand_total) * 100); cur_frm.dashboard.add_progress(percent_paid + "% Paid", percent_paid); - cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms); + cur_frm.add_custom_button(wn._('Send SMS'), cur_frm.cscript.send_sms); if(cint(doc.update_stock)!=1) { // show Make Delivery Note button only if Sales Invoice is not created from Delivery Note @@ -72,11 +72,11 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte }); if(!from_delivery_note) - cur_frm.add_custom_button('Make Delivery', cur_frm.cscript['Make Delivery Note']); + cur_frm.add_custom_button(wn._('Make Delivery'), cur_frm.cscript['Make Delivery Note']); } if(doc.outstanding_amount!=0) - cur_frm.add_custom_button('Make Payment Entry', cur_frm.cscript.make_bank_voucher); + cur_frm.add_custom_button(wn._('Make Payment Entry'), cur_frm.cscript.make_bank_voucher); } // Show buttons only when pos view is active @@ -210,7 +210,6 @@ cur_frm.cscript.hide_fields = function(doc) { 'total_commission', 'advances']; item_flds_normal = ['sales_order', 'delivery_note'] - item_flds_pos = ['serial_no', 'batch_no', 'actual_qty', 'expense_account'] if(cint(doc.is_pos) == 1) { hide_field(par_flds); @@ -225,7 +224,9 @@ cur_frm.cscript.hide_fields = function(doc) { cur_frm.fields_dict['entries'].grid.set_column_disp(item_flds_normal, true); } - cur_frm.fields_dict['entries'].grid.set_column_disp(item_flds_pos, (cint(doc.update_stock)==1?true:false)); + item_flds_stock = ['serial_no', 'batch_no', 'actual_qty', 'expense_account', 'warehouse'] + cur_frm.fields_dict['entries'].grid.set_column_disp(item_flds_stock, + (cint(doc.update_stock)==1 ? true : false)); // India related fields var cp = wn.control_panel; diff --git a/accounts/doctype/sales_invoice/sales_invoice.py b/accounts/doctype/sales_invoice/sales_invoice.py index 3ae74e481e9..cdae74eac49 100644 --- a/accounts/doctype/sales_invoice/sales_invoice.py +++ b/accounts/doctype/sales_invoice/sales_invoice.py @@ -48,11 +48,7 @@ class DocType(SellingController): self.validate_proj_cust() self.validate_with_previous_doc() self.validate_uom_is_integer("stock_uom", "qty") - - sales_com_obj = get_obj('Sales Common') - sales_com_obj.check_stop_sales_order(self) - sales_com_obj.check_active_sales_items(self) - sales_com_obj.validate_max_discount(self, 'entries') + self.check_stop_sales_order("sales_order") self.validate_customer_account() self.validate_debit_acc() self.validate_fixed_asset_account() @@ -110,8 +106,7 @@ class DocType(SellingController): if cint(self.doc.update_stock) == 1: self.update_stock_ledger() - sales_com_obj = get_obj(dt = 'Sales Common') - sales_com_obj.check_stop_sales_order(self) + self.check_stop_sales_order("sales_order") from accounts.utils import remove_against_link_from_jv remove_against_link_from_jv(self.doc.doctype, self.doc.name, "against_invoice") @@ -255,25 +250,7 @@ class DocType(SellingController): else: due_date = self.doc.posting_date - return due_date - - def get_barcode_details(self, barcode): - return get_obj('Sales Common').get_barcode_details(barcode) - - - def get_adj_percent(self, arg=''): - """Fetch ref rate from item master as per selected price list""" - get_obj('Sales Common').get_adj_percent(self) - - - def get_rate(self,arg): - """Get tax rate if account type is tax""" - get_obj('Sales Common').get_rate(arg) - - - def get_comm_rate(self, sales_partner): - """Get Commission rate of Sales Partner""" - return get_obj('Sales Common').get_comm_rate(sales_partner, self) + return due_date def get_advances(self): super(DocType, self).get_advances(self.doc.debit_to, @@ -476,10 +453,6 @@ class DocType(SellingController): w = ps[0][1] return w - - def make_packing_list(self): - get_obj('Sales Common').make_packing_list(self,'entries') - def on_update(self): if cint(self.doc.update_stock) == 1: # Set default warehouse from pos setting @@ -490,7 +463,8 @@ class DocType(SellingController): if not d.warehouse: d.warehouse = cstr(w) - self.make_packing_list() + from stock.doctype.packed_item.packed_item import make_packing_list + make_packing_list(self, 'entries') else: self.doclist = self.doc.clear_table(self.doclist, 'packing_details') @@ -522,8 +496,7 @@ class DocType(SellingController): def update_stock_ledger(self): sl_entries = [] - items = get_obj('Sales Common').get_item_list(self) - for d in items: + for d in self.get_item_list(): if webnotes.conn.get_value("Item", d.item_code, "is_stock_item") == "Yes" \ and d.warehouse: sl_entries.append(self.get_sl_entries(d, { @@ -866,7 +839,6 @@ def send_notification(new_rv): def notify_errors(inv, owner): import webnotes - import website exception_msg = """ Dear User, @@ -962,8 +934,7 @@ def make_delivery_note(source_name, target_doclist=None): "doctype": "Delivery Note Item", "field_map": { "name": "prevdoc_detail_docname", - "parent": "prevdoc_docname", - "parenttype": "prevdoc_doctype", + "parent": "against_sales_invoice", "serial_no": "serial_no" }, "postprocess": update_item diff --git a/accounts/doctype/sales_invoice/sales_invoice.txt b/accounts/doctype/sales_invoice/sales_invoice.txt index b168ba64fd8..34191885ead 100644 --- a/accounts/doctype/sales_invoice/sales_invoice.txt +++ b/accounts/doctype/sales_invoice/sales_invoice.txt @@ -2,12 +2,13 @@ { "creation": "2013-05-24 19:29:05", "docstatus": 0, - "modified": "2013-10-11 13:12:38", + "modified": "2013-10-18 13:12:38", "modified_by": "Administrator", "owner": "Administrator" }, { "allow_attach": 1, + "allow_import": 1, "autoname": "naming_series:", "default_print_format": "Standard", "doctype": "DocType", @@ -322,7 +323,7 @@ "fieldname": "packing_details", "fieldtype": "Table", "label": "Packing Details", - "options": "Delivery Note Packing Item", + "options": "Packed Item", "print_hide": 1, "read_only": 0 }, diff --git a/accounts/doctype/sales_invoice/test_sales_invoice.py b/accounts/doctype/sales_invoice/test_sales_invoice.py index fbb344ec943..9f5b95cd79c 100644 --- a/accounts/doctype/sales_invoice/test_sales_invoice.py +++ b/accounts/doctype/sales_invoice/test_sales_invoice.py @@ -641,7 +641,7 @@ class TestSalesInvoice(unittest.TestCase): return new_si - # if yearly, test 3 repetitions, else test 5 repetitions + # if yearly, test 1 repetition, else test 5 repetitions count = 1 if (no_of_months == 12) else 5 for i in xrange(count): base_si = _test(i) diff --git a/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.js b/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.js index f1a602738bf..9841783f76d 100644 --- a/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.js +++ b/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.js @@ -2,6 +2,9 @@ // License: GNU General Public License v3. See license.txt //--------- ONLOAD ------------- + +wn.require("app/js/controllers/accounts.js"); + cur_frm.cscript.onload = function(doc, cdt, cdn) { if(doc.doctype === "Sales Taxes and Charges Master") erpnext.add_for_territory(); @@ -92,7 +95,7 @@ cur_frm.pformat.other_charges= function(doc){ cur_frm.cscript.charge_type = function(doc, cdt, cdn) { var d = locals[cdt][cdn]; if(d.idx == 1 && (d.charge_type == 'On Previous Row Amount' || d.charge_type == 'On Previous Row Total')){ - alert("You cannot select Charge Type as 'On Previous Row Amount' or 'On Previous Row Total' for first row"); + alert(wn._("You cannot select Charge Type as 'On Previous Row Amount' or 'On Previous Row Total' for first row")); d.charge_type = ''; } validated = false; @@ -105,16 +108,16 @@ cur_frm.cscript.charge_type = function(doc, cdt, cdn) { cur_frm.cscript.row_id = function(doc, cdt, cdn) { var d = locals[cdt][cdn]; if(!d.charge_type && d.row_id){ - alert("Please select Charge Type first"); + alert(wn._("Please select Charge Type first")); d.row_id = ''; } else if((d.charge_type == 'Actual' || d.charge_type == 'On Net Total') && d.row_id) { - alert("You can Enter Row only if your Charge Type is 'On Previous Row Amount' or ' Previous Row Total'"); + alert(wn._("You can Enter Row only if your Charge Type is 'On Previous Row Amount' or ' Previous Row Total'")); d.row_id = ''; } else if((d.charge_type == 'On Previous Row Amount' || d.charge_type == 'On Previous Row Total') && d.row_id){ if(d.row_id >= d.idx){ - alert("You cannot Enter Row no. greater than or equal to current row no. for this Charge type"); + alert(wn._("You cannot Enter Row no. greater than or equal to current row no. for this Charge type")); d.row_id = ''; } } @@ -142,25 +145,10 @@ cur_frm.fields_dict['other_charges'].grid.get_field("cost_center").get_query = f } } - -cur_frm.cscript.account_head = function(doc, cdt, cdn) { - var d = locals[cdt][cdn]; - if(!d.charge_type && d.account_head){ - alert("Please select Charge Type first"); - validated = false; - d.account_head = ''; - } - else if(d.account_head && d.charge_type) { - arg = "{'charge_type' : '" + d.charge_type +"', 'account_head' : '" + d.account_head + "'}"; - return get_server_fields('get_rate', arg, 'other_charges', doc, cdt, cdn, 1); - } - refresh_field('account_head',d.name,'other_charges'); -} - cur_frm.cscript.rate = function(doc, cdt, cdn) { var d = locals[cdt][cdn]; if(!d.charge_type && d.rate) { - alert("Please select Charge Type first"); + alert(wn._("Please select Charge Type first")); d.rate = ''; } validated = false; @@ -170,11 +158,11 @@ cur_frm.cscript.rate = function(doc, cdt, cdn) { cur_frm.cscript.tax_amount = function(doc, cdt, cdn) { var d = locals[cdt][cdn]; if(!d.charge_type && d.tax_amount){ - alert("Please select Charge Type first"); + alert(wn._("Please select Charge Type first")); d.tax_amount = ''; } else if(d.charge_type && d.tax_amount) { - alert("You cannot directly enter Amount and if your Charge Type is Actual enter your amount in Rate"); + alert(wn._("You cannot directly enter Amount and if your Charge Type is Actual enter your amount in Rate")); d.tax_amount = ''; } validated = false; diff --git a/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.py b/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.py index 019edcb31b1..67ba9cb8add 100644 --- a/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.py +++ b/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.py @@ -6,11 +6,7 @@ import webnotes from webnotes.utils import cint from webnotes.model.controller import DocListController -class DocType(DocListController): - def get_rate(self, arg): - from webnotes.model.code import get_obj - return get_obj('Sales Common').get_rate(arg) - +class DocType(DocListController): def validate(self): if self.doc.is_default == 1: webnotes.conn.sql("""update `tabSales Taxes and Charges Master` set is_default = 0 diff --git a/accounts/page/accounts_browser/accounts_browser.js b/accounts/page/accounts_browser/accounts_browser.js index 6b577959a13..fafe816cd95 100644 --- a/accounts/page/accounts_browser/accounts_browser.js +++ b/accounts/page/accounts_browser/accounts_browser.js @@ -20,29 +20,31 @@ pscript['onload_Accounts Browser'] = function(wrapper){ chart_area = $("
") .css({"margin-bottom": "15px"}) .appendTo(main), - help_area = $('
\ -

Quick Help

\ -
    \ -
  1. To add child nodes, explore tree and click on the node under which you \ - want to add more nodes.\ -
  2. Accounting Entries can be made against leaf nodes, called Ledgers.\ - Entries against Groups are not allowed.\ -
  3. Please do NOT create Account (Ledgers) for Customers and Suppliers. \ - They are created directly from the Customer / Supplier masters.\ -
  4. To create a Bank Account: Go to the appropriate group \ - (usually Application of Funds > Current Assets > Bank Accounts)\ - and create a new Account Ledger (by clicking on Add Child) of \ - type "Bank or Cash"\ -
  5. To create a Tax Account: Go to the appropriate group \ - (usually Source of Funds > Current Liabilities > Taxes and Duties) \ - and create a new Account Ledger (by clicking on Add Child) of type\ - "Tax" and do mention the Tax rate.\ -
\ -

Please setup your chart of accounts before you start Accounting Entries

\ -
').appendTo(main); + help_area = $('
'+ + '

'+wn._('Quick Help')+'

'+ + '
    '+ + '
  1. '+wn._('To add child nodes, explore tree and click on the node under which you want to add more nodes.')+'
  2. '+ + '
  3. '+ + wn._('Accounting Entries can be made against leaf nodes, called')+ + '' +wn._('Ledgers')+'.'+ wn._('Entries against') + + '' +wn._('Groups') + ''+ wn._('are not allowed.')+ + '
  4. '+ + '
  5. '+wn._('Please do NOT create Account (Ledgers) for Customers and Suppliers. They are created directly from the Customer / Supplier masters.')+'
  6. '+ + '
  7. '+ + ''+wn._('To create a Bank Account:')+''+ + wn._('Go to the appropriate group (usually Application of Funds > Current Assets > Bank Accounts)')+ + wn._('and create a new Account Ledger (by clicking on Add Child) of type "Bank or Cash"')+ + '
  8. '+ + '
  9. '+ + ''+wn._('To create a Tax Account:')+''+ + wn._('Go to the appropriate group (usually Source of Funds > Current Liabilities > Taxes and Duties)')+ + wn._('and create a new Account Ledger (by clicking on Add Child) of type "Tax" and do mention the Tax rate.')+ + '
  10. '+ + '
'+ + '

'+wn._('Please setup your chart of accounts before you start Accounting Entries')+'

').appendTo(main); if (wn.boot.profile.can_create.indexOf("Company") !== -1) { - wrapper.appframe.add_button('New Company', function() { newdoc('Company'); }, + wrapper.appframe.add_button(wn._('New Company'), function() { newdoc('Company'); }, 'icon-plus'); } @@ -145,20 +147,20 @@ erpnext.AccountsChart = Class.extend({ var node_links = []; // edit if (wn.model.can_read(this.ctype) !== -1) { - node_links.push('Edit'); + node_links.push(''+wn._('Edit')+''); } if (data.expandable && wn.boot.profile.in_create.indexOf(this.ctype) !== -1) { - node_links.push('Add Child'); + node_links.push(''+wn._('Add Child')+''); } else if (this.ctype === 'Account' && wn.boot.profile.can_read.indexOf("GL Entry") !== -1) { - node_links.push('View Ledger'); + node_links.push(''+wn._('View Ledger')+''); } if (this.can_write) { - node_links.push('Rename'); + node_links.push(''+wn._('Rename')+''); }; if (this.can_delete) { - node_links.push('Delete'); + node_links.push(''+wn._('Delete')+''); }; link.toolbar.append(node_links.join(" | ")); @@ -204,20 +206,20 @@ erpnext.AccountsChart = Class.extend({ // the dialog var d = new wn.ui.Dialog({ - title:'New Account', + title:wn._('New Account'), fields: [ - {fieldtype:'Data', fieldname:'account_name', label:'New Account Name', reqd:true, - description: "Name of new Account. Note: Please don't create accounts for Customers and Suppliers, \ - they are created automatically from the Customer and Supplier master"}, - {fieldtype:'Select', fieldname:'group_or_ledger', label:'Group or Ledger', - options:'Group\nLedger', description:'Further accounts can be made under Groups,\ - but entries can be made against Ledger'}, - {fieldtype:'Select', fieldname:'account_type', label:'Account Type', + {fieldtype:'Data', fieldname:'account_name', label:wn._('New Account Name'), reqd:true, + description: wn._("Name of new Account. Note: Please don't create accounts for Customers and Suppliers,")+ + wn._("they are created automatically from the Customer and Supplier master")}, + {fieldtype:'Select', fieldname:'group_or_ledger', label:wn._('Group or Ledger'), + options:'Group\nLedger', description: wn._('Further accounts can be made under Groups,')+ + wn._('but entries can be made against Ledger')}, + {fieldtype:'Select', fieldname:'account_type', label:wn._('Account Type'), options: ['', 'Fixed Asset Account', 'Bank or Cash', 'Expense Account', 'Tax', 'Income Account', 'Chargeable'].join('\n'), - description: "Optional. This setting will be used to filter in various transactions." }, - {fieldtype:'Float', fieldname:'tax_rate', label:'Tax Rate'}, - {fieldtype:'Button', fieldname:'create_new', label:'Create New' } + description: wn._("Optional. This setting will be used to filter in various transactions.") }, + {fieldtype:'Float', fieldname:'tax_rate', label:wn._('Tax Rate')}, + {fieldtype:'Button', fieldname:'create_new', label:wn._('Create New') } ] }) @@ -282,13 +284,13 @@ erpnext.AccountsChart = Class.extend({ var me = this; // the dialog var d = new wn.ui.Dialog({ - title:'New Cost Center', + title:wn._('New Cost Center'), fields: [ - {fieldtype:'Data', fieldname:'cost_center_name', label:'New Cost Center Name', reqd:true}, - {fieldtype:'Select', fieldname:'group_or_ledger', label:'Group or Ledger', - options:'Group\nLedger', description:'Further accounts can be made under Groups,\ - but entries can be made against Ledger'}, - {fieldtype:'Button', fieldname:'create_new', label:'Create New' } + {fieldtype:'Data', fieldname:'cost_center_name', label:wn._('New Cost Center Name'), reqd:true}, + {fieldtype:'Select', fieldname:'group_or_ledger', label:wn._('Group or Ledger'), + options:'Group\nLedger', description:wn._('Further accounts can be made under Groups,')+ + wn._('but entries can be made against Ledger')}, + {fieldtype:'Button', fieldname:'create_new', label:wn._('Create New') } ] }); diff --git a/accounts/page/accounts_browser/accounts_browser.py b/accounts/page/accounts_browser/accounts_browser.py index 61f4bfc521b..7bc95494128 100644 --- a/accounts/page/accounts_browser/accounts_browser.py +++ b/accounts/page/accounts_browser/accounts_browser.py @@ -15,7 +15,7 @@ def get_companies(): @webnotes.whitelist() def get_children(): - args = webnotes.form_dict + args = webnotes.local.form_dict ctype, company = args['ctype'], args['comp'] # root diff --git a/accounts/page/accounts_home/accounts_home.js b/accounts/page/accounts_home/accounts_home.js index d6c388335f4..7a4f511a8b4 100644 --- a/accounts/page/accounts_home/accounts_home.js +++ b/accounts/page/accounts_home/accounts_home.js @@ -88,12 +88,12 @@ wn.module_page["Accounts"] = [ { "label": wn._("Period Closing Voucher"), "doctype": "Period Closing Voucher", - description: "Close Balance Sheet and book Profit or Loss." + description: wn._("Close Balance Sheet and book Profit or Loss.") }, { "page":"voucher-import-tool", "label": wn._("Voucher Import Tool"), - "description": "Import accounting entries from CSV." + "description": wn._("Import accounting entries from CSV.") }, ] }, @@ -105,7 +105,7 @@ wn.module_page["Accounts"] = [ "label": wn._("Accounts Settings"), "route": "Form/Accounts Settings", "doctype":"Accounts Settings", - "description": "Settings for Accounts" + "description": wn._("Settings for Accounts") }, { "label": wn._("Sales Taxes and Charges Master"), @@ -130,7 +130,7 @@ wn.module_page["Accounts"] = [ { "label": wn._("Point-of-Sale Setting"), "doctype":"POS Setting", - "description": "User settings for Point-of-sale (POS)" + "description": wn._("User settings for Point-of-sale (POS)") }, { "doctype":"Budget Distribution", @@ -150,7 +150,7 @@ wn.module_page["Accounts"] = [ { "doctype":"C-Form", "label": wn._("C-Form"), - description: "C-Form records", + description: wn._("C-Form records"), country: "India" } ] diff --git a/accounts/page/financial_analytics/financial_analytics.js b/accounts/page/financial_analytics/financial_analytics.js index 13b9067760b..ffe29ac1a20 100644 --- a/accounts/page/financial_analytics/financial_analytics.js +++ b/accounts/page/financial_analytics/financial_analytics.js @@ -6,7 +6,7 @@ wn.require("app/js/account_tree_grid.js"); wn.pages['financial-analytics'].onload = function(wrapper) { wn.ui.make_app_page({ parent: wrapper, - title: 'Financial Analytics', + title: wn._('Financial Analytics'), single_column: true }); erpnext.trial_balance = new erpnext.FinancialAnalytics(wrapper, 'Financial Analytics'); @@ -18,7 +18,7 @@ wn.pages['financial-analytics'].onload = function(wrapper) { erpnext.FinancialAnalytics = erpnext.AccountTreeGrid.extend({ filters: [ - {fieldtype:"Select", label: "PL or BS", options:["Profit and Loss", "Balance Sheet"], + {fieldtype:"Select", label: wn._("PL or BS"), options:["Profit and Loss", "Balance Sheet"], filter: function(val, item, opts, me) { if(item._show) return true; @@ -28,27 +28,27 @@ erpnext.FinancialAnalytics = erpnext.AccountTreeGrid.extend({ return me.apply_zero_filter(val, item, opts, me); }}, - {fieldtype:"Select", label: "Company", link:"Company", default_value: "Select Company...", + {fieldtype:"Select", label: wn._("Company"), link:"Company", default_value: "Select Company...", filter: function(val, item, opts) { return item.company == val || val == opts.default_value || item._show; }}, - {fieldtype:"Select", label: "Fiscal Year", link:"Fiscal Year", + {fieldtype:"Select", label: wn._("Fiscal Year"), link:"Fiscal Year", default_value: "Select Fiscal Year..."}, - {fieldtype:"Date", label: "From Date"}, - {fieldtype:"Label", label: "To"}, - {fieldtype:"Date", label: "To Date"}, - {fieldtype:"Select", label: "Range", + {fieldtype:"Date", label: wn._("From Date")}, + {fieldtype:"Label", label: wn._("To")}, + {fieldtype:"Date", label: wn._("To Date")}, + {fieldtype:"Select", label: wn._("Range"), options:["Daily", "Weekly", "Monthly", "Quarterly", "Yearly"]}, - {fieldtype:"Button", label: "Refresh", icon:"icon-refresh icon-white", cssClass:"btn-info"}, - {fieldtype:"Button", label: "Reset Filters"} + {fieldtype:"Button", label: wn._("Refresh"), icon:"icon-refresh icon-white", cssClass:"btn-info"}, + {fieldtype:"Button", label: wn._("Reset Filters")} ], setup_columns: function() { var std_columns = [ - {id: "check", name: "Plot", field: "check", width: 30, + {id: "check", name: wn._("Plot"), field: "check", width: 30, formatter: this.check_formatter}, - {id: "name", name: "Account", field: "name", width: 300, + {id: "name", name: wn._("Account"), field: "name", width: 300, formatter: this.tree_formatter}, - {id: "opening", name: "Opening", field: "opening", hidden: true, + {id: "opening", name: wn._("Opening"), field: "opening", hidden: true, formatter: this.currency_formatter} ]; diff --git a/accounts/page/financial_statements/financial_statements.js b/accounts/page/financial_statements/financial_statements.js index 48931250f2e..6a116830700 100644 --- a/accounts/page/financial_statements/financial_statements.js +++ b/accounts/page/financial_statements/financial_statements.js @@ -6,7 +6,7 @@ erpnext.fs = {} pscript['onload_Financial Statements'] = function(wrapper) { wn.ui.make_app_page({ parent: wrapper, - "title": "Financial Statements", + "title": wn._("Financial Statements"), "single_column": true, }); @@ -34,18 +34,18 @@ pscript['onload_Financial Statements'] = function(wrapper) { options: ['Loading...'] }) - wrapper.appframe.add_button("Create", function() { + wrapper.appframe.add_button(wn._("Create"), function() { pscript.stmt_new(); }, "icon-refresh") - wrapper.appframe.add_button("Print", function() { + wrapper.appframe.add_button(wn._("Print"), function() { _p.go($i('print_html').innerHTML); }, "icon-print") $(wrapper).find(".layout-main").html('').css({"min-height": "400px"}); // load companies @@ -61,7 +61,7 @@ pscript['onload_Financial Statements'] = function(wrapper) { pscript.stmt_new = function(stmt,company_name,level,period,year) { - $i('stmt_tree').innerHTML = 'Refreshing....'; + $i('stmt_tree').innerHTML = wn._('Refreshing....'); $i('stmt_tree').style.display = 'block'; var company =erpnext.fs.stmt_company.get_value(); diff --git a/accounts/page/general_ledger/general_ledger.js b/accounts/page/general_ledger/general_ledger.js index da28eb3e0a5..93a23889bf0 100644 --- a/accounts/page/general_ledger/general_ledger.js +++ b/accounts/page/general_ledger/general_ledger.js @@ -4,7 +4,7 @@ wn.pages['general-ledger'].onload = function(wrapper) { wn.ui.make_app_page({ parent: wrapper, - title: 'General Ledger', + title: wn._('General Ledger'), single_column: true }); @@ -16,7 +16,7 @@ wn.pages['general-ledger'].onload = function(wrapper) { erpnext.GeneralLedger = wn.views.GridReport.extend({ init: function(wrapper) { this._super({ - title: "General Ledger", + title: wn._("General Ledger"), page: wrapper, parent: $(wrapper).find('.layout-main'), appframe: wrapper.appframe, @@ -24,41 +24,42 @@ erpnext.GeneralLedger = wn.views.GridReport.extend({ }); }, setup_columns: function() { + var DEFAULT_COMPANY_VALUE = wn._("Select Company..."); this.columns = [ - {id: "posting_date", name: "Posting Date", field: "posting_date", width: 100, + {id: "posting_date", name: wn._("Posting Date"), field: "posting_date", width: 100, formatter: this.date_formatter}, - {id: "account", name: "Account", field: "account", width: 240, + {id: "account", name: wn._("Account"), field: "account", width: 240, link_formatter: { filter_input: "account", open_btn: true, doctype: "'Account'" }}, - {id: "against_account", name: "Against Account", field: "against_account", + {id: "against_account", name: wn._("Against Account"), field: "against_account", width: 240, hidden: !this.account}, - {id: "debit", name: "Debit", field: "debit", width: 100, + {id: "debit", name: wn._("Debit"), field: "debit", width: 100, formatter: this.currency_formatter}, - {id: "credit", name: "Credit", field: "credit", width: 100, + {id: "credit", name: wn._("Credit"), field: "credit", width: 100, formatter: this.currency_formatter}, - {id: "voucher_type", name: "Voucher Type", field: "voucher_type", width: 120}, - {id: "voucher_no", name: "Voucher No", field: "voucher_no", width: 160, + {id: "voucher_type", name: wn._("Voucher Type"), field: "voucher_type", width: 120}, + {id: "voucher_no", name: wn._("Voucher No"), field: "voucher_no", width: 160, link_formatter: { filter_input: "voucher_no", open_btn: true, doctype: "dataContext.voucher_type" }}, - {id: "remarks", name: "Remarks", field: "remarks", width: 200, + {id: "remarks", name: wn._("Remarks"), field: "remarks", width: 200, formatter: this.text_formatter}, ]; }, filters: [ - {fieldtype:"Select", label: "Company", link:"Company", default_value: "Select Company...", + {fieldtype:"Select", label: wn._("Company"), link:"Company", default_value: DEFAULT_COMPANY_VALUE, filter: function(val, item, opts) { - return item.company == val || val == opts.default_value; + return item.company == val || val == DEFAULT_COMPANY_VALUE; }}, - {fieldtype:"Link", label: "Account", link:"Account", + {fieldtype:"Link", label: wn._("Account"), link:"Account", filter: function(val, item, opts, me) { if(!val) { return true; @@ -68,22 +69,22 @@ erpnext.GeneralLedger = wn.views.GridReport.extend({ return me.is_child_account(val, item.account); } }}, - {fieldtype:"Data", label: "Voucher No", + {fieldtype:"Data", label: wn._("Voucher No"), filter: function(val, item, opts) { if(!val) return true; return (item.voucher_no && item.voucher_no.indexOf(val)!=-1); }}, - {fieldtype:"Date", label: "From Date", filter: function(val, item) { + {fieldtype:"Date", label: wn._("From Date"), filter: function(val, item) { return dateutil.str_to_obj(val) <= dateutil.str_to_obj(item.posting_date); }}, - {fieldtype:"Label", label: "To"}, - {fieldtype:"Date", label: "To Date", filter: function(val, item) { + {fieldtype:"Label", label: wn._("To")}, + {fieldtype:"Date", label: wn._("To Date"), filter: function(val, item) { return dateutil.str_to_obj(val) >= dateutil.str_to_obj(item.posting_date); }}, - {fieldtype: "Check", label: "Group by Ledger"}, - {fieldtype: "Check", label: "Group by Voucher"}, - {fieldtype:"Button", label: "Refresh", icon:"icon-refresh icon-white", cssClass:"btn-info"}, - {fieldtype:"Button", label: "Reset Filters"} + {fieldtype: "Check", label: wn._("Group by Ledger")}, + {fieldtype: "Check", label: wn._("Group by Voucher")}, + {fieldtype:"Button", label: wn._("Refresh"), icon:"icon-refresh icon-white", cssClass:"btn-info"}, + {fieldtype:"Button", label: wn._("Reset Filters")} ], setup_filters: function() { this._super(); @@ -160,7 +161,7 @@ erpnext.GeneralLedger = wn.views.GridReport.extend({ var to_date = dateutil.str_to_obj(this.to_date); if(to_date < from_date) { - msgprint("From Date must be before To Date"); + msgprint(wn._("From Date must be before To Date")); return; } @@ -236,7 +237,7 @@ erpnext.GeneralLedger = wn.views.GridReport.extend({ closing.credit = opening.credit + totals.credit; if(me.account) { - me.appframe.set_title("General Ledger: " + me.account); + me.appframe.set_title(wn._("General Ledger: ") + me.account); // group by ledgers if(this.account_by_name[this.account].group_or_ledger==="Group" @@ -254,7 +255,7 @@ erpnext.GeneralLedger = wn.views.GridReport.extend({ out = [opening].concat(out).concat([totals, closing]); } else { - me.appframe.set_title("General Ledger"); + me.appframe.set_title(wn._("General Ledger")); out = out.concat([totals]); } diff --git a/accounts/page/trial_balance/trial_balance.js b/accounts/page/trial_balance/trial_balance.js index 65212562cb8..ec14c51e884 100644 --- a/accounts/page/trial_balance/trial_balance.js +++ b/accounts/page/trial_balance/trial_balance.js @@ -6,7 +6,7 @@ wn.require("app/js/account_tree_grid.js"); wn.pages['trial-balance'].onload = function(wrapper) { wn.ui.make_app_page({ parent: wrapper, - title: 'Trial Balance', + title: wn._('Trial Balance'), single_column: true }); var TrialBalance = erpnext.AccountTreeGrid.extend({ @@ -17,8 +17,8 @@ wn.pages['trial-balance'].onload = function(wrapper) { // period closing entry checkbox this.wrapper.bind("make", function() { $('
\ - With period closing entry
') + class="with_period_closing_entry">' + + wn._("With period closing entry") + '
') .appendTo(me.wrapper) .find("input").click(function() { me.refresh(); }); }); diff --git a/accounts/page/voucher_import_tool/voucher_import_tool.js b/accounts/page/voucher_import_tool/voucher_import_tool.js index 5a8538e4dc3..67d4aec1392 100644 --- a/accounts/page/voucher_import_tool/voucher_import_tool.js +++ b/accounts/page/voucher_import_tool/voucher_import_tool.js @@ -4,29 +4,34 @@ wn.pages['voucher-import-tool'].onload = function(wrapper) { wn.ui.make_app_page({ parent: wrapper, - title: 'Voucher Import Tool', + title: wn._('Voucher Import Tool'), single_column: true }); - $(wrapper).find('.layout-main').html('\ -

Import multiple accounting entries via CSV (spreadsheet) file:

\ -

1. Download Template


\ -
\ - \ -

Import multiple vouchers with one debit and one credit entry

\ -
\ -
\ - \ -

Import multiple vouchers with multiple accounts

\ -
\ -
\ -

2. Upload


\ -
\ -

Upload file in CSV format with UTF-8 encoding

\ -
\ -

\ -
\ - '); + $(wrapper).find('.layout-main').html('

' + + wn._('Import multiple accounting entries via CSV (spreadsheet) file:') + + '

1. ' + wn._('Download Template') + '


' + + '
' + + '' + + '

' + + wn._('Import multiple vouchers with one debit and one credit entry') + + '

'+ + '
'+ + '

' + + wn._('Import multiple vouchers with multiple accounts')+ + '

'+ + '
'+ + '
'+ + '

2. ' + wn._('Upload') + '


'+ + '
'+ + '

' + wn._('Upload file in CSV format with UTF-8 encoding') + + '

'+ + '

'+ + '
'+ + ''); wn.upload.make({ parent: $(wrapper).find("#voucher-upload"), diff --git a/accounts/page/voucher_import_tool/voucher_import_tool.py b/accounts/page/voucher_import_tool/voucher_import_tool.py index 9425afc7d0f..14e30be7a9e 100644 --- a/accounts/page/voucher_import_tool/voucher_import_tool.py +++ b/accounts/page/voucher_import_tool/voucher_import_tool.py @@ -64,10 +64,10 @@ def upload(): data, start_idx = get_data(rows, company_abbr, rows[0][0]) except Exception, e: - err_msg = webnotes.message_log and "
".join(webnotes.message_log) or cstr(e) + err_msg = webnotes.local.message_log and "
".join(webnotes.local.message_log) or cstr(e) messages.append("""

%s

""" % (err_msg or "No message")) webnotes.errprint(webnotes.getTraceback()) - webnotes.message_log = [] + webnotes.local.message_log = [] return messages return import_vouchers(common_values, data, start_idx, rows[0][0]) @@ -117,11 +117,11 @@ def import_vouchers(common_values, data, start_idx, import_type): d = data[i][0] if import_type == "Voucher Import: Two Accounts" and flt(d.get("amount")) == 0: - webnotes.message_log = ["Amount not specified"] + webnotes.local.message_log = ["Amount not specified"] raise Exception elif import_type == "Voucher Import: Multiple Accounts" and \ (flt(d.get("total_debit")) == 0 or flt(d.get("total_credit")) == 0): - webnotes.message_log = ["Total Debit and Total Credit amount can not be zero"] + webnotes.local.message_log = ["Total Debit and Total Credit amount can not be zero"] raise Exception else: d.posting_date = parse_date(d.posting_date) @@ -174,7 +174,7 @@ def import_vouchers(common_values, data, start_idx, import_type): details.append(detail) if not details: - webnotes.message_log = ["""No accounts found. + webnotes.local.message_log = ["""No accounts found. If you entered accounts correctly, please check template once"""] raise Exception @@ -193,12 +193,12 @@ def import_vouchers(common_values, data, start_idx, import_type): webnotes.conn.commit() except Exception, e: webnotes.conn.rollback() - err_msg = webnotes.message_log and "
".join(webnotes.message_log) or cstr(e) + err_msg = webnotes.local.message_log and "
".join(webnotes.local.message_log) or cstr(e) messages.append("""

[row #%s] %s failed: %s

""" % ((start_idx + 1) + i, jv.name or "", err_msg or "No message")) messages.append("

All transactions rolled back

") webnotes.errprint(webnotes.getTraceback()) - webnotes.message_log = [] + webnotes.local.message_log = [] return messages diff --git a/accounts/report/accounts_payable/accounts_payable.js b/accounts/report/accounts_payable/accounts_payable.js index 2c6c918e57e..86516fc5505 100644 --- a/accounts/report/accounts_payable/accounts_payable.js +++ b/accounts/report/accounts_payable/accounts_payable.js @@ -5,14 +5,14 @@ wn.query_reports["Accounts Payable"] = { "filters": [ { "fieldname":"company", - "label": "Company", + "label": wn._("Company"), "fieldtype": "Link", "options": "Company", "default": wn.defaults.get_default("company") }, { "fieldname":"account", - "label": "Account", + "label": wn._("Account"), "fieldtype": "Link", "options": "Account", "get_query": function() { @@ -30,13 +30,13 @@ wn.query_reports["Accounts Payable"] = { }, { "fieldname":"report_date", - "label": "Date", + "label": wn._("Date"), "fieldtype": "Date", "default": get_today() }, { "fieldname":"ageing_based_on", - "label": "Ageing Based On", + "label": wn._("Ageing Based On"), "fieldtype": "Select", "options": 'Posting Date' + NEWLINE + 'Due Date', "default": "Posting Date" diff --git a/accounts/report/accounts_receivable/accounts_receivable.js b/accounts/report/accounts_receivable/accounts_receivable.js index 5f0b1901c31..65588a661bc 100644 --- a/accounts/report/accounts_receivable/accounts_receivable.js +++ b/accounts/report/accounts_receivable/accounts_receivable.js @@ -5,14 +5,14 @@ wn.query_reports["Accounts Receivable"] = { "filters": [ { "fieldname":"company", - "label": "Company", + "label": wn._("Company"), "fieldtype": "Link", "options": "Company", "default": wn.defaults.get_default("company") }, { "fieldname":"account", - "label": "Account", + "label": wn._("Account"), "fieldtype": "Link", "options": "Account", "get_query": function() { @@ -30,13 +30,13 @@ wn.query_reports["Accounts Receivable"] = { }, { "fieldname":"report_date", - "label": "Date", + "label": wn._("Date"), "fieldtype": "Date", "default": get_today() }, { "fieldname":"ageing_based_on", - "label": "Ageing Based On", + "label": wn._("Ageing Based On"), "fieldtype": "Select", "options": 'Posting Date' + NEWLINE + 'Due Date', "default": "Posting Date" diff --git a/accounts/report/bank_clearance_summary/bank_clearance_summary.js b/accounts/report/bank_clearance_summary/bank_clearance_summary.js index 8e6d0c04fe4..fbc973a052b 100644 --- a/accounts/report/bank_clearance_summary/bank_clearance_summary.js +++ b/accounts/report/bank_clearance_summary/bank_clearance_summary.js @@ -5,20 +5,20 @@ wn.query_reports["Bank Clearance Summary"] = { "filters": [ { "fieldname":"from_date", - "label": "From Date", + "label": wn._("From Date"), "fieldtype": "Date", "default": wn.defaults.get_user_default("year_start_date"), "width": "80" }, { "fieldname":"to_date", - "label": "To Date", + "label": wn._("To Date"), "fieldtype": "Date", "default": get_today() }, { "fieldname":"account", - "label": "Bank Account", + "label": wn._("Bank Account"), "fieldtype": "Link", "options": "Account", "get_query": function() { diff --git a/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.js b/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.js index bf971a7f972..420e0870189 100644 --- a/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.js +++ b/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.js @@ -5,7 +5,7 @@ wn.query_reports["Bank Reconciliation Statement"] = { "filters": [ { "fieldname":"account", - "label": "Bank Account", + "label": wn._("Bank Account"), "fieldtype": "Link", "options": "Account", "get_query": function() { @@ -20,7 +20,7 @@ wn.query_reports["Bank Reconciliation Statement"] = { }, { "fieldname":"report_date", - "label": "Date", + "label": wn._("Date"), "fieldtype": "Date", "default": get_today() }, diff --git a/accounts/report/budget_variance_report/budget_variance_report.js b/accounts/report/budget_variance_report/budget_variance_report.js index 2ed60182681..908963fe14f 100644 --- a/accounts/report/budget_variance_report/budget_variance_report.js +++ b/accounts/report/budget_variance_report/budget_variance_report.js @@ -5,21 +5,21 @@ wn.query_reports["Budget Variance Report"] = { "filters": [ { fieldname: "fiscal_year", - label: "Fiscal Year", + label: wn._("Fiscal Year"), fieldtype: "Link", options: "Fiscal Year", default: sys_defaults.fiscal_year }, { fieldname: "period", - label: "Period", + label: wn._("Period"), fieldtype: "Select", options: "Monthly\nQuarterly\nHalf-Yearly\nYearly", default: "Monthly" }, { fieldname: "company", - label: "Company", + label: wn._("Company"), fieldtype: "Link", options: "Company", default: wn.defaults.get_default("company") diff --git a/accounts/report/gross_profit/gross_profit.js b/accounts/report/gross_profit/gross_profit.js index aea0b8a4e40..ee95f72974e 100644 --- a/accounts/report/gross_profit/gross_profit.js +++ b/accounts/report/gross_profit/gross_profit.js @@ -5,20 +5,20 @@ wn.query_reports["Gross Profit"] = { "filters": [ { "fieldname":"company", - "label": "Company", + "label": wn._("Company"), "fieldtype": "Link", "options": "Company", "default": wn.defaults.get_user_default("company") }, { "fieldname":"from_date", - "label": "From Date", + "label": wn._("From Date"), "fieldtype": "Date", "default": wn.defaults.get_user_default("year_start_date") }, { "fieldname":"to_date", - "label": "To Date", + "label": wn._("To Date"), "fieldtype": "Date", "default": wn.defaults.get_user_default("year_end_date") }, diff --git a/accounts/report/gross_profit/gross_profit.py b/accounts/report/gross_profit/gross_profit.py index 9917b69697f..6d01af4cdf1 100644 --- a/accounts/report/gross_profit/gross_profit.py +++ b/accounts/report/gross_profit/gross_profit.py @@ -75,7 +75,7 @@ def get_item_sales_bom(): for d in webnotes.conn.sql("""select parenttype, parent, parent_item, item_code, warehouse, -1*qty as total_qty, parent_detail_docname - from `tabDelivery Note Packing Item` where docstatus=1""", as_dict=True): + from `tabPacked Item` where docstatus=1""", as_dict=True): item_sales_bom.setdefault(d.parenttype, webnotes._dict()).setdefault(d.parent, webnotes._dict()).setdefault(d.parent_item, []).append(d) diff --git a/accounts/report/item_wise_purchase_register/item_wise_purchase_register.js b/accounts/report/item_wise_purchase_register/item_wise_purchase_register.js index 457c9a80009..19970b7df12 100644 --- a/accounts/report/item_wise_purchase_register/item_wise_purchase_register.js +++ b/accounts/report/item_wise_purchase_register/item_wise_purchase_register.js @@ -5,26 +5,26 @@ wn.query_reports["Item-wise Purchase Register"] = { "filters": [ { "fieldname":"from_date", - "label": "From Date", + "label": wn._("From Date"), "fieldtype": "Date", "default": wn.defaults.get_user_default("year_start_date"), "width": "80" }, { "fieldname":"to_date", - "label": "To Date", + "label": wn._("To Date"), "fieldtype": "Date", "default": get_today() }, { "fieldname": "item_code", - "label": "Item", + "label": wn._("Item"), "fieldtype": "Link", "options": "Item", }, { "fieldname":"account", - "label": "Account", + "label": wn._("Account"), "fieldtype": "Link", "options": "Account", "get_query": function() { @@ -42,7 +42,7 @@ wn.query_reports["Item-wise Purchase Register"] = { }, { "fieldname":"company", - "label": "Company", + "label": wn._("Company"), "fieldtype": "Link", "options": "Company", "default": wn.defaults.get_default("company") diff --git a/accounts/report/item_wise_sales_register/item_wise_sales_register.js b/accounts/report/item_wise_sales_register/item_wise_sales_register.js index c131fbde64f..068c33dc6eb 100644 --- a/accounts/report/item_wise_sales_register/item_wise_sales_register.js +++ b/accounts/report/item_wise_sales_register/item_wise_sales_register.js @@ -5,20 +5,20 @@ wn.query_reports["Item-wise Sales Register"] = wn.query_reports["Sales Register" "filters": [ { "fieldname":"from_date", - "label": "From Date", + "label": wn._("From Date"), "fieldtype": "Date", "default": wn.defaults.get_default("year_start_date"), "width": "80" }, { "fieldname":"to_date", - "label": "To Date", + "label": wn._("To Date"), "fieldtype": "Date", "default": get_today() }, { "fieldname":"account", - "label": "Account", + "label": wn._("Account"), "fieldtype": "Link", "options": "Account", "get_query": function() { @@ -36,7 +36,7 @@ wn.query_reports["Item-wise Sales Register"] = wn.query_reports["Sales Register" }, { "fieldname":"company", - "label": "Company", + "label": wn._("Company"), "fieldtype": "Link", "options": "Company", "default": wn.defaults.get_default("company") diff --git a/accounts/report/payment_collection_with_ageing/payment_collection_with_ageing.js b/accounts/report/payment_collection_with_ageing/payment_collection_with_ageing.js index 8d8c7464676..e619a43d0fe 100644 --- a/accounts/report/payment_collection_with_ageing/payment_collection_with_ageing.js +++ b/accounts/report/payment_collection_with_ageing/payment_collection_with_ageing.js @@ -5,20 +5,20 @@ wn.query_reports["Payment Collection With Ageing"] = { "filters": [ { "fieldname": "from_date", - "label": "From Date", + "label": wn._("From Date"), "fieldtype": "Date", "default": wn.defaults.get_user_default("year_start_date"), "width": "80" }, { "fieldname":"to_date", - "label": "To Date", + "label": wn._("To Date"), "fieldtype": "Date", "default": get_today() }, { "fieldname":"account", - "label": "Customer Account", + "label": wn._("Customer Account"), "fieldtype": "Link", "options": "Account", "get_query": function() { @@ -36,7 +36,7 @@ wn.query_reports["Payment Collection With Ageing"] = { }, { "fieldname":"company", - "label": "Company", + "label": wn._("Company"), "fieldtype": "Link", "options": "Company", "default": wn.defaults.get_default("company") diff --git a/accounts/report/payment_made_with_ageing/payment_made_with_ageing.js b/accounts/report/payment_made_with_ageing/payment_made_with_ageing.js index 7b80bdeaed4..101df80a8cd 100644 --- a/accounts/report/payment_made_with_ageing/payment_made_with_ageing.js +++ b/accounts/report/payment_made_with_ageing/payment_made_with_ageing.js @@ -5,19 +5,19 @@ wn.query_reports["Payment Made With Ageing"] = { "filters": [ { fieldname: "from_date", - label: "From Date", + label: wn._("From Date"), fieldtype: "Date", default: wn.defaults.get_user_default("year_start_date"), }, { fieldname:"to_date", - label: "To Date", + label: wn._("To Date"), fieldtype: "Date", default: get_today() }, { fieldname:"account", - label: "Supplier Account", + label: wn._("Supplier Account"), fieldtype: "Link", options: "Account", get_query: function() { @@ -34,7 +34,7 @@ wn.query_reports["Payment Made With Ageing"] = { }, { fieldname:"company", - label: "Company", + label: wn._("Company"), fieldtype: "Link", options: "Company", default: wn.defaults.get_default("company") diff --git a/accounts/report/purchase_register/purchase_register.js b/accounts/report/purchase_register/purchase_register.js index 5944b1a0592..0bd713fd08c 100644 --- a/accounts/report/purchase_register/purchase_register.js +++ b/accounts/report/purchase_register/purchase_register.js @@ -5,20 +5,20 @@ wn.query_reports["Purchase Register"] = { "filters": [ { "fieldname":"from_date", - "label": "From Date", + "label": wn._("From Date"), "fieldtype": "Date", "default": wn.defaults.get_user_default("year_start_date"), "width": "80" }, { "fieldname":"to_date", - "label": "To Date", + "label": wn._("To Date"), "fieldtype": "Date", "default": get_today() }, { "fieldname":"account", - "label": "Account", + "label": wn._("Account"), "fieldtype": "Link", "options": "Account", "get_query": function() { @@ -36,7 +36,7 @@ wn.query_reports["Purchase Register"] = { }, { "fieldname":"company", - "label": "Company", + "label": wn._("Company"), "fieldtype": "Link", "options": "Company", "default": wn.defaults.get_default("company") diff --git a/accounts/report/sales_register/sales_register.js b/accounts/report/sales_register/sales_register.js index 43c841f1325..ab3fcd7a35c 100644 --- a/accounts/report/sales_register/sales_register.js +++ b/accounts/report/sales_register/sales_register.js @@ -5,20 +5,20 @@ wn.query_reports["Sales Register"] = { "filters": [ { "fieldname":"from_date", - "label": "From Date", + "label": wn._("From Date"), "fieldtype": "Date", "default": wn.defaults.get_default("year_start_date"), "width": "80" }, { "fieldname":"to_date", - "label": "To Date", + "label": wn._("To Date"), "fieldtype": "Date", "default": get_today() }, { "fieldname":"account", - "label": "Account", + "label": wn._("Account"), "fieldtype": "Link", "options": "Account", "get_query": function() { @@ -36,7 +36,7 @@ wn.query_reports["Sales Register"] = { }, { "fieldname":"company", - "label": "Company", + "label": wn._("Company"), "fieldtype": "Link", "options": "Company", "default": wn.defaults.get_default("company") diff --git a/accounts/utils.py b/accounts/utils.py index 5c6c16b76a9..ac823129d66 100644 --- a/accounts/utils.py +++ b/accounts/utils.py @@ -108,7 +108,7 @@ def get_balance_on(account=None, date=None): @webnotes.whitelist() def add_ac(args=None): if not args: - args = webnotes.form_dict + args = webnotes.local.form_dict args.pop("cmd") ac = webnotes.bean(args) @@ -121,7 +121,7 @@ def add_ac(args=None): @webnotes.whitelist() def add_cc(args=None): if not args: - args = webnotes.form_dict + args = webnotes.local.form_dict args.pop("cmd") cc = webnotes.bean(args) diff --git a/buying/doctype/buying_settings/buying_settings.py b/buying/doctype/buying_settings/buying_settings.py index 3f4f96da6f3..efca33932d7 100644 --- a/buying/doctype/buying_settings/buying_settings.py +++ b/buying/doctype/buying_settings/buying_settings.py @@ -13,4 +13,7 @@ class DocType: def validate(self): for key in ["supplier_type", "supp_master_name", "maintain_same_rate", "buying_price_list"]: webnotes.conn.set_default(key, self.doc.fields.get(key, "")) - \ No newline at end of file + + from setup.doctype.naming_series.naming_series import set_by_naming_series + set_by_naming_series("Supplier", "supplier_name", + self.doc.get("supp_master_name")=="Naming Series", hide_name_field=False) diff --git a/buying/doctype/purchase_common/purchase_common.js b/buying/doctype/purchase_common/purchase_common.js index 433a76fba7c..023c7f3a631 100644 --- a/buying/doctype/purchase_common/purchase_common.js +++ b/buying/doctype/purchase_common/purchase_common.js @@ -8,6 +8,7 @@ wn.provide("erpnext.buying"); wn.require("app/js/transaction.js"); +wn.require("app/js/controllers/accounts.js"); erpnext.buying.BuyingController = erpnext.TransactionController.extend({ onload: function() { diff --git a/buying/doctype/purchase_common/purchase_common.py b/buying/doctype/purchase_common/purchase_common.py index 9b6dc6c9ab7..4d2bc00e0d8 100644 --- a/buying/doctype/purchase_common/purchase_common.py +++ b/buying/doctype/purchase_common/purchase_common.py @@ -10,40 +10,13 @@ from webnotes import msgprint, _ from buying.utils import get_last_purchase_details -sql = webnotes.conn.sql from controllers.buying_controller import BuyingController class DocType(BuyingController): def __init__(self, doc, doclist=None): self.doc = doc self.doclist = doclist - - def is_item_table_empty(self, obj): - if not len(obj.doclist.get({"parentfield": obj.fname})): - msgprint(_("You need to put at least one item in the item table."), raise_exception=True) - - def get_supplier_details(self, name = ''): - details = sql("select supplier_name,address from `tabSupplier` where name = '%s' and docstatus != 2" %(name), as_dict = 1) - if details: - ret = { - 'supplier_name' : details and details[0]['supplier_name'] or '', - 'supplier_address' : details and details[0]['address'] or '' - } - # ********** get primary contact details (this is done separately coz. , in case there is no primary contact thn it would not be able to fetch customer details in case of join query) - contact_det = sql("select contact_name, contact_no, email_id from `tabContact` where supplier = '%s' and is_supplier = 1 and is_primary_contact = 'Yes' and docstatus != 2" %(name), as_dict = 1) - ret['contact_person'] = contact_det and contact_det[0]['contact_name'] or '' - return ret - else: - msgprint("Supplier : %s does not exists" % (name)) - raise Exception - # Get Available Qty at Warehouse - def get_bin_details( self, arg = ''): - arg = eval(arg) - bin = sql("select projected_qty from `tabBin` where item_code = %s and warehouse = %s", (arg['item_code'], arg['warehouse']), as_dict=1) - ret = { 'projected_qty' : bin and flt(bin[0]['projected_qty']) or 0 } - return ret - def update_last_purchase_rate(self, obj, is_submit): """updates last_purchase_rate in item table for each item""" @@ -70,7 +43,7 @@ class DocType(BuyingController): # update last purchsae rate if last_purchase_rate: - sql("update `tabItem` set last_purchase_rate = %s where name = %s", + webnotes.conn.sql("update `tabItem` set last_purchase_rate = %s where name = %s", (flt(last_purchase_rate),d.item_code)) def get_last_purchase_rate(self, obj): @@ -107,7 +80,7 @@ class DocType(BuyingController): raise Exception # udpate with latest quantities - bin = sql("select projected_qty from `tabBin` where item_code = %s and warehouse = %s", (d.item_code, d.warehouse), as_dict = 1) + bin = webnotes.conn.sql("select projected_qty from `tabBin` where item_code = %s and warehouse = %s", (d.item_code, d.warehouse), as_dict = 1) f_lst ={'projected_qty': bin and flt(bin[0]['projected_qty']) or 0, 'ordered_qty': 0, 'received_qty' : 0} if d.doctype == 'Purchase Receipt Item': @@ -116,7 +89,7 @@ class DocType(BuyingController): if d.fields.has_key(x): d.fields[x] = f_lst[x] - item = sql("select is_stock_item, is_purchase_item, is_sub_contracted_item, end_of_life from tabItem where name=%s", + item = webnotes.conn.sql("select is_stock_item, is_purchase_item, is_sub_contracted_item, end_of_life from tabItem where name=%s", d.item_code) if not item: msgprint("Item %s does not exist in Item Master." % cstr(d.item_code), raise_exception=True) @@ -139,7 +112,7 @@ class DocType(BuyingController): # if is not stock item f = [d.schedule_date, d.item_code, d.description] - ch = sql("select is_stock_item from `tabItem` where name = '%s'"%d.item_code) + ch = webnotes.conn.sql("select is_stock_item from `tabItem` where name = '%s'"%d.item_code) if ch and ch[0][0] == 'Yes': # check for same items @@ -165,18 +138,18 @@ class DocType(BuyingController): # but if in Material Request uom KG it can change in PO get_qty = (transaction == 'Material Request - Purchase Order') and 'qty * conversion_factor' or 'qty' - qty = sql("select sum(%s) from `tab%s` where %s = '%s' and docstatus = 1 and parent != '%s'"% ( get_qty, curr_doctype, ref_tab_fname, ref_tab_dn, curr_parent_name)) + qty = webnotes.conn.sql("select sum(%s) from `tab%s` where %s = '%s' and docstatus = 1 and parent != '%s'"% ( get_qty, curr_doctype, ref_tab_fname, ref_tab_dn, curr_parent_name)) qty = qty and flt(qty[0][0]) or 0 # get total qty of ref doctype #-------------------- - max_qty = sql("select qty from `tab%s` where name = '%s' and docstatus = 1"% (ref_doc_tname, ref_tab_dn)) + max_qty = webnotes.conn.sql("select qty from `tab%s` where name = '%s' and docstatus = 1"% (ref_doc_tname, ref_tab_dn)) max_qty = max_qty and flt(max_qty[0][0]) or 0 return cstr(qty)+'~~~'+cstr(max_qty) def check_for_stopped_status(self, doctype, docname): - stopped = sql("select name from `tab%s` where name = '%s' and status = 'Stopped'" % + stopped = webnotes.conn.sql("select name from `tab%s` where name = '%s' and status = 'Stopped'" % ( doctype, docname)) if stopped: msgprint("One cannot do any transaction against %s : %s, it's status is 'Stopped'" % @@ -184,7 +157,7 @@ class DocType(BuyingController): def check_docstatus(self, check, doctype, docname , detail_doctype = ''): if check == 'Next': - submitted = sql("""select t1.name from `tab%s` t1,`tab%s` t2 + submitted = webnotes.conn.sql("""select t1.name from `tab%s` t1,`tab%s` t2 where t1.name = t2.parent and t2.prevdoc_docname = %s and t1.docstatus = 1""" % (doctype, detail_doctype, '%s'), docname) if submitted: @@ -192,23 +165,8 @@ class DocType(BuyingController): + _(" has already been submitted."), raise_exception=1) if check == 'Previous': - submitted = sql("""select name from `tab%s` + submitted = webnotes.conn.sql("""select name from `tab%s` where docstatus = 1 and name = %s"""% (doctype, '%s'), docname) if not submitted: msgprint(cstr(doctype) + ": " + cstr(submitted[0][0]) + _(" not submitted"), raise_exception=1) - - def get_rate(self, arg, obj): - arg = eval(arg) - rate = sql("select account_type, tax_rate from `tabAccount` where name = %s" - , (arg['account_head']), as_dict=1) - - return {'rate': rate and (rate[0]['account_type'] == 'Tax' \ - and not arg['charge_type'] == 'Actual') and flt(rate[0]['tax_rate']) or 0 } - - def get_prevdoc_date(self, obj): - for d in getlist(obj.doclist, obj.fname): - if d.prevdoc_doctype and d.prevdoc_docname: - dt = sql("select transaction_date from `tab%s` where name = %s" - % (d.prevdoc_doctype, '%s'), (d.prevdoc_docname)) - d.prevdoc_date = dt and dt[0][0].strftime('%Y-%m-%d') or '' \ No newline at end of file diff --git a/buying/doctype/purchase_order/purchase_order.js b/buying/doctype/purchase_order/purchase_order.js index 9967f15a50b..c1342232bb8 100644 --- a/buying/doctype/purchase_order/purchase_order.js +++ b/buying/doctype/purchase_order/purchase_order.js @@ -24,19 +24,19 @@ erpnext.buying.PurchaseOrderController = erpnext.buying.BuyingController.extend( doc.per_billed); - cur_frm.add_custom_button('Send SMS', cur_frm.cscript['Send SMS']); + cur_frm.add_custom_button(wn._('Send SMS'), cur_frm.cscript['Send SMS']); if(flt(doc.per_received, 2) < 100) - cur_frm.add_custom_button('Make Purchase Receipt', this.make_purchase_receipt); + cur_frm.add_custom_button(wn._('Make Purchase Receipt'), this.make_purchase_receipt); if(flt(doc.per_billed, 2) < 100) - cur_frm.add_custom_button('Make Invoice', this.make_purchase_invoice); + cur_frm.add_custom_button(wn._('Make Invoice'), this.make_purchase_invoice); if(flt(doc.per_billed, 2) < 100 || doc.per_received < 100) - cur_frm.add_custom_button('Stop', cur_frm.cscript['Stop Purchase Order']); + cur_frm.add_custom_button(wn._('Stop'), cur_frm.cscript['Stop Purchase Order']); } else if(doc.docstatus===0) { cur_frm.cscript.add_from_mappers(); } if(doc.docstatus == 1 && doc.status == 'Stopped') - cur_frm.add_custom_button('Unstop Purchase Order', + cur_frm.add_custom_button(wn._('Unstop Purchase Order'), cur_frm.cscript['Unstop Purchase Order']); }, @@ -137,7 +137,7 @@ cur_frm.cscript.get_last_purchase_rate = function(doc, cdt, cdn){ cur_frm.cscript['Stop Purchase Order'] = function() { var doc = cur_frm.doc; - var check = confirm("Do you really want to STOP " + doc.name); + var check = confirm(wn._("Do you really want to STOP ") + doc.name); if (check) { return $c('runserverobj', args={'method':'update_status', 'arg': 'Stopped', 'docs': wn.model.compress(make_doclist(doc.doctype, doc.name))}, function(r,rt) { @@ -148,7 +148,7 @@ cur_frm.cscript['Stop Purchase Order'] = function() { cur_frm.cscript['Unstop Purchase Order'] = function() { var doc = cur_frm.doc; - var check = confirm("Do you really want to UNSTOP " + doc.name); + var check = confirm(wn._("Do you really want to UNSTOP ") + doc.name); if (check) { return $c('runserverobj', args={'method':'update_status', 'arg': 'Submitted', 'docs': wn.model.compress(make_doclist(doc.doctype, doc.name))}, function(r,rt) { @@ -185,9 +185,9 @@ cur_frm.pformat.indent_no = function(doc, cdt, cdn){ if(cl[i].prevdoc_doctype == 'Material Request' && cl[i].prevdoc_docname && prevdoc_list.indexOf(cl[i].prevdoc_docname) == -1) { prevdoc_list.push(cl[i].prevdoc_docname); if(prevdoc_list.length ==1) - out += make_row(cl[i].prevdoc_doctype, cl[i].prevdoc_docname, cl[i].prevdoc_date,0); + out += make_row(cl[i].prevdoc_doctype, cl[i].prevdoc_docname, null,0); else - out += make_row('', cl[i].prevdoc_docname, cl[i].prevdoc_date,0); + out += make_row('', cl[i].prevdoc_docname,null,0); } } } diff --git a/buying/doctype/purchase_order/purchase_order.py b/buying/doctype/purchase_order/purchase_order.py index 64f89e32ffe..d3555fc25a4 100644 --- a/buying/doctype/purchase_order/purchase_order.py +++ b/buying/doctype/purchase_order/purchase_order.py @@ -9,7 +9,6 @@ from webnotes.model.bean import getlist from webnotes.model.code import get_obj from webnotes import msgprint -sql = webnotes.conn.sql from controllers.buying_controller import BuyingController class DocType(BuyingController): @@ -42,7 +41,6 @@ class DocType(BuyingController): pc_obj = get_obj(dt='Purchase Common') pc_obj.validate_for_items(self) - pc_obj.get_prevdoc_date(self) self.check_for_stopped_status(pc_obj) self.validate_uom_is_integer("uom", "qty") @@ -66,10 +64,6 @@ class DocType(BuyingController): } }) - # get available qty at warehouse - def get_bin_details(self, arg = ''): - return get_obj(dt='Purchase Common').get_bin_details(arg) - def get_schedule_dates(self): for d in getlist(self.doclist, 'po_details'): if d.prevdoc_detail_docname and not d.schedule_date: @@ -133,8 +127,8 @@ class DocType(BuyingController): update_bin(args) def check_modified_date(self): - mod_db = sql("select modified from `tabPurchase Order` where name = '%s'" % self.doc.name) - date_diff = sql("select TIMEDIFF('%s', '%s')" % ( mod_db[0][0],cstr(self.doc.modified))) + mod_db = webnotes.conn.sql("select modified from `tabPurchase Order` where name = '%s'" % self.doc.name) + date_diff = webnotes.conn.sql("select TIMEDIFF('%s', '%s')" % ( mod_db[0][0],cstr(self.doc.modified))) if date_diff and date_diff[0][0]: msgprint(cstr(self.doc.doctype) +" => "+ cstr(self.doc.name) +" has been modified. Please Refresh. ") @@ -153,7 +147,6 @@ class DocType(BuyingController): def on_submit(self): purchase_controller = webnotes.get_obj("Purchase Common") - purchase_controller.is_item_table_empty(self) self.update_prevdoc_status() self.update_bin(is_submit = 1, is_stopped = 0) @@ -173,7 +166,7 @@ class DocType(BuyingController): pc_obj.check_docstatus(check = 'Next', doctype = 'Purchase Receipt', docname = self.doc.name, detail_doctype = 'Purchase Receipt Item') # Check if Purchase Invoice has been submitted against current Purchase Order - submitted = sql("select t1.name from `tabPurchase Invoice` t1,`tabPurchase Invoice Item` t2 where t1.name = t2.parent and t2.purchase_order = '%s' and t1.docstatus = 1" % self.doc.name) + submitted = webnotes.conn.sql("select t1.name from `tabPurchase Invoice` t1,`tabPurchase Invoice Item` t2 where t1.name = t2.parent and t2.purchase_order = '%s' and t1.docstatus = 1" % self.doc.name) if submitted: msgprint("Purchase Invoice : " + cstr(submitted[0][0]) + " has already been submitted !") raise Exception @@ -186,9 +179,6 @@ class DocType(BuyingController): def on_update(self): pass - def get_rate(self,arg): - return get_obj('Purchase Common').get_rate(arg,self) - @webnotes.whitelist() def make_purchase_receipt(source_name, target_doclist=None): from webnotes.model.mapper import get_mapped_doclist diff --git a/buying/doctype/purchase_order/purchase_order.txt b/buying/doctype/purchase_order/purchase_order.txt index d3c1620b51d..7169aaf3906 100644 --- a/buying/doctype/purchase_order/purchase_order.txt +++ b/buying/doctype/purchase_order/purchase_order.txt @@ -2,12 +2,13 @@ { "creation": "2013-05-21 16:16:39", "docstatus": 0, - "modified": "2013-09-12 18:34:54", + "modified": "2013-10-02 14:24:49", "modified_by": "Administrator", "owner": "Administrator" }, { "allow_attach": 1, + "allow_import": 1, "autoname": "naming_series:", "doctype": "DocType", "document_type": "Transaction", @@ -132,7 +133,6 @@ "fieldtype": "Date", "in_filter": 1, "label": "Purchase Order Date", - "no_copy": 1, "oldfieldname": "transaction_date", "oldfieldtype": "Date", "reqd": 1, diff --git a/buying/doctype/purchase_order_item/purchase_order_item.txt b/buying/doctype/purchase_order_item/purchase_order_item.txt index 36b81d2c1fc..fade98fa980 100755 --- a/buying/doctype/purchase_order_item/purchase_order_item.txt +++ b/buying/doctype/purchase_order_item/purchase_order_item.txt @@ -2,7 +2,7 @@ { "creation": "2013-05-24 19:29:06", "docstatus": 0, - "modified": "2013-08-07 14:44:12", + "modified": "2013-10-10 17:01:57", "modified_by": "Administrator", "owner": "Administrator" }, @@ -306,21 +306,6 @@ "search_index": 1, "width": "120px" }, - { - "doctype": "DocField", - "fieldname": "prevdoc_date", - "fieldtype": "Date", - "hidden": 1, - "in_filter": 1, - "in_list_view": 0, - "label": "Material Request Date", - "no_copy": 1, - "oldfieldname": "prevdoc_date", - "oldfieldtype": "Date", - "print_hide": 1, - "read_only": 1, - "search_index": 0 - }, { "doctype": "DocField", "fieldname": "prevdoc_detail_docname", diff --git a/buying/doctype/supplier/supplier.js b/buying/doctype/supplier/supplier.js index 75542c82579..1512dec92ea 100644 --- a/buying/doctype/supplier/supplier.js +++ b/buying/doctype/supplier/supplier.js @@ -9,10 +9,7 @@ cur_frm.cscript.onload = function(doc,dt,dn){ cur_frm.cscript.refresh = function(doc,dt,dn) { cur_frm.cscript.make_dashboard(doc); - if(sys_defaults.supp_master_name == 'Supplier Name') - hide_field('naming_series'); - else - unhide_field('naming_series'); + erpnext.hide_naming_series(); if(doc.__islocal){ hide_field(['address_html','contact_html']); @@ -71,7 +68,7 @@ cur_frm.cscript.make_address = function() { return "select name, address_type, address_line1, address_line2, city, state, country, pincode, fax, email_id, phone, is_primary_address, is_shipping_address from tabAddress where supplier='"+cur_frm.docname+"' and docstatus != 2 order by is_primary_address desc" }, as_dict: 1, - no_results_message: 'No addresses created', + no_results_message: wn._('No addresses created'), render_row: cur_frm.cscript.render_address_row, }); // note: render_address_row is defined in contact_control.js @@ -89,7 +86,7 @@ cur_frm.cscript.make_contact = function() { return "select name, first_name, last_name, email_id, phone, mobile_no, department, designation, is_primary_contact from tabContact where supplier='"+cur_frm.docname+"' and docstatus != 2 order by is_primary_contact desc" }, as_dict: 1, - no_results_message: 'No contacts created', + no_results_message: wn._('No contacts created'), render_row: cur_frm.cscript.render_contact_row, }); // note: render_contact_row is defined in contact_control.js diff --git a/buying/doctype/supplier/supplier.py b/buying/doctype/supplier/supplier.py index 15e1d625f9a..3c0163367be 100644 --- a/buying/doctype/supplier/supplier.py +++ b/buying/doctype/supplier/supplier.py @@ -9,7 +9,6 @@ from webnotes.utils import cint from webnotes import msgprint, _ from webnotes.model.doc import make_autoname -sql = webnotes.conn.sql from utilities.transaction_base import TransactionBase @@ -29,7 +28,7 @@ class DocType(TransactionBase): self.doc.name = make_autoname(self.doc.naming_series + '.#####') def update_credit_days_limit(self): - sql("""update tabAccount set credit_days = %s where name = %s""", + webnotes.conn.sql("""update tabAccount set credit_days = %s where name = %s""", (cint(self.doc.credit_days), self.doc.name + " - " + self.get_company_abbr())) def on_update(self): @@ -43,7 +42,7 @@ class DocType(TransactionBase): self.update_credit_days_limit() def get_payables_group(self): - g = sql("select payables_group from tabCompany where name=%s", self.doc.company) + g = webnotes.conn.sql("select payables_group from tabCompany where name=%s", self.doc.company) g = g and g[0][0] or '' if not g: msgprint("Update Company master, assign a default group for Payables") @@ -65,14 +64,14 @@ class DocType(TransactionBase): msgprint(_("Created Group ") + ac) def get_company_abbr(self): - return sql("select abbr from tabCompany where name=%s", self.doc.company)[0][0] + return webnotes.conn.sql("select abbr from tabCompany where name=%s", self.doc.company)[0][0] def get_parent_account(self, abbr): if (not self.doc.supplier_type): msgprint("Supplier Type is mandatory") raise Exception - if not sql("select name from tabAccount where name=%s and debit_or_credit = 'Credit' and ifnull(is_pl_account, 'No') = 'No'", (self.doc.supplier_type + " - " + abbr)): + if not webnotes.conn.sql("select name from tabAccount where name=%s and debit_or_credit = 'Credit' and ifnull(is_pl_account, 'No') = 'No'", (self.doc.supplier_type + " - " + abbr)): # if not group created , create it self.add_account(self.doc.supplier_type, self.get_payables_group(), abbr) @@ -90,7 +89,7 @@ class DocType(TransactionBase): abbr = self.get_company_abbr() parent_account = self.get_parent_account(abbr) - if not sql("select name from tabAccount where name=%s", (self.doc.name + " - " + abbr)): + if not webnotes.conn.sql("select name from tabAccount where name=%s", (self.doc.name + " - " + abbr)): ac_bean = webnotes.bean({ "doctype": "Account", 'account_name': self.doc.name, @@ -121,15 +120,15 @@ class DocType(TransactionBase): def get_contacts(self,nm): if nm: - contact_details =webnotes.conn.convert_to_lists(sql("select name, CONCAT(IFNULL(first_name,''),' ',IFNULL(last_name,'')),contact_no,email_id from `tabContact` where supplier = '%s'"%nm)) + contact_details =webnotes.conn.convert_to_lists(webnotes.conn.sql("select name, CONCAT(IFNULL(first_name,''),' ',IFNULL(last_name,'')),contact_no,email_id from `tabContact` where supplier = '%s'"%nm)) return contact_details else: return '' def delete_supplier_address(self): - for rec in sql("select * from `tabAddress` where supplier=%s", (self.doc.name,), as_dict=1): - sql("delete from `tabAddress` where name=%s",(rec['name'])) + for rec in webnotes.conn.sql("select * from `tabAddress` where supplier=%s", (self.doc.name,), as_dict=1): + webnotes.conn.sql("delete from `tabAddress` where name=%s",(rec['name'])) def delete_supplier_contact(self): for contact in webnotes.conn.sql_list("""select name from `tabContact` @@ -138,7 +137,7 @@ class DocType(TransactionBase): def delete_supplier_account(self): """delete supplier's ledger if exist and check balance before deletion""" - acc = sql("select name from `tabAccount` where master_type = 'Supplier' \ + acc = webnotes.conn.sql("select name from `tabAccount` where master_type = 'Supplier' \ and master_name = %s and docstatus < 2", self.doc.name) if acc: from webnotes.model import delete_doc @@ -161,7 +160,7 @@ class DocType(TransactionBase): ('Purchase Receipt', 'supplier'), ('Serial No', 'supplier')] for rec in update_fields: - sql("update `tab%s` set supplier_name = %s where `%s` = %s" % \ + webnotes.conn.sql("update `tab%s` set supplier_name = %s where `%s` = %s" % \ (rec[0], '%s', rec[1], '%s'), (new, old)) for account in webnotes.conn.sql("""select name, account_name from diff --git a/buying/doctype/supplier_quotation/supplier_quotation.js b/buying/doctype/supplier_quotation/supplier_quotation.js index 3fba931f995..4e017828019 100644 --- a/buying/doctype/supplier_quotation/supplier_quotation.js +++ b/buying/doctype/supplier_quotation/supplier_quotation.js @@ -16,7 +16,7 @@ erpnext.buying.SupplierQuotationController = erpnext.buying.BuyingController.ext this._super(); if (this.frm.doc.docstatus === 1) { - cur_frm.add_custom_button("Make Purchase Order", this.make_purchase_order); + cur_frm.add_custom_button(wn._("Make Purchase Order"), this.make_purchase_order); } else if (this.frm.doc.docstatus===0) { cur_frm.add_custom_button(wn._('From Material Request'), diff --git a/buying/doctype/supplier_quotation/supplier_quotation.py b/buying/doctype/supplier_quotation/supplier_quotation.py index c3d2f78451a..67c8360905f 100644 --- a/buying/doctype/supplier_quotation/supplier_quotation.py +++ b/buying/doctype/supplier_quotation/supplier_quotation.py @@ -26,9 +26,6 @@ class DocType(BuyingController): self.validate_uom_is_integer("uom", "qty") def on_submit(self): - purchase_controller = webnotes.get_obj("Purchase Common") - purchase_controller.is_item_table_empty(self) - webnotes.conn.set(self.doc, "status", "Submitted") def on_cancel(self): @@ -54,7 +51,6 @@ class DocType(BuyingController): def validate_common(self): pc = get_obj('Purchase Common') pc.validate_for_items(self) - pc.get_prevdoc_date(self) @webnotes.whitelist() def make_purchase_order(source_name, target_doclist=None): diff --git a/buying/doctype/supplier_quotation/supplier_quotation.txt b/buying/doctype/supplier_quotation/supplier_quotation.txt index 36747d345a8..ddd17307dcf 100644 --- a/buying/doctype/supplier_quotation/supplier_quotation.txt +++ b/buying/doctype/supplier_quotation/supplier_quotation.txt @@ -2,12 +2,13 @@ { "creation": "2013-05-21 16:16:45", "docstatus": 0, - "modified": "2013-08-09 14:45:58", + "modified": "2013-10-02 14:24:44", "modified_by": "Administrator", "owner": "Administrator" }, { "allow_attach": 1, + "allow_import": 1, "autoname": "naming_series:", "doctype": "DocType", "document_type": "Transaction", diff --git a/buying/doctype/supplier_quotation_item/supplier_quotation_item.txt b/buying/doctype/supplier_quotation_item/supplier_quotation_item.txt index 1d162915ef4..515cdb2a34f 100644 --- a/buying/doctype/supplier_quotation_item/supplier_quotation_item.txt +++ b/buying/doctype/supplier_quotation_item/supplier_quotation_item.txt @@ -2,7 +2,7 @@ { "creation": "2013-05-22 12:43:10", "docstatus": 0, - "modified": "2013-08-07 14:44:18", + "modified": "2013-10-10 17:02:11", "modified_by": "Administrator", "owner": "Administrator" }, @@ -259,21 +259,6 @@ "search_index": 1, "width": "120px" }, - { - "doctype": "DocField", - "fieldname": "prevdoc_date", - "fieldtype": "Date", - "hidden": 1, - "in_filter": 1, - "in_list_view": 0, - "label": "Material Request Date", - "no_copy": 1, - "oldfieldname": "prevdoc_date", - "oldfieldtype": "Date", - "print_hide": 1, - "read_only": 1, - "search_index": 0 - }, { "doctype": "DocField", "fieldname": "prevdoc_detail_docname", diff --git a/buying/page/buying_home/buying_home.js b/buying/page/buying_home/buying_home.js index b6de994e963..3af91a025e2 100644 --- a/buying/page/buying_home/buying_home.js +++ b/buying/page/buying_home/buying_home.js @@ -58,7 +58,7 @@ wn.module_page["Buying"] = [ "label": wn._("Buying Settings"), "route": "Form/Buying Settings", "doctype":"Buying Settings", - "description": "Settings for Buying Module" + "description": wn._("Settings for Buying Module") }, { "label": wn._("Purchase Taxes and Charges Master"), diff --git a/buying/page/purchase_analytics/purchase_analytics.js b/buying/page/purchase_analytics/purchase_analytics.js index c163052a6a3..6a8fc1ae0f5 100644 --- a/buying/page/purchase_analytics/purchase_analytics.js +++ b/buying/page/purchase_analytics/purchase_analytics.js @@ -4,7 +4,7 @@ wn.pages['purchase-analytics'].onload = function(wrapper) { wn.ui.make_app_page({ parent: wrapper, - title: 'Purchase Analytics', + title: wn._('Purchase Analytics'), single_column: true }); @@ -18,7 +18,7 @@ wn.pages['purchase-analytics'].onload = function(wrapper) { erpnext.PurchaseAnalytics = wn.views.TreeGridReport.extend({ init: function(wrapper) { this._super({ - title: "Purchase Analytics", + title: wn._("Purchase Analytics"), page: wrapper, parent: $(wrapper).find('.layout-main'), appframe: wrapper.appframe, @@ -31,7 +31,7 @@ erpnext.PurchaseAnalytics = wn.views.TreeGridReport.extend({ this.tree_grids = { "Supplier Type": { - label: "Supplier Type / Supplier", + label: wn._("Supplier Type / Supplier"), show: true, item_key: "supplier", parent_field: "parent_supplier_type", @@ -44,7 +44,7 @@ erpnext.PurchaseAnalytics = wn.views.TreeGridReport.extend({ } }, "Supplier": { - label: "Supplier", + label: wn._("Supplier"), show: false, item_key: "supplier", formatter: function(item) { @@ -74,7 +74,7 @@ erpnext.PurchaseAnalytics = wn.views.TreeGridReport.extend({ this.tree_grid = this.tree_grids[this.tree_type]; var std_columns = [ - {id: "check", name: "Plot", field: "check", width: 30, + {id: "check", name: wn._("Plot"), field: "check", width: 30, formatter: this.check_formatter}, {id: "name", name: this.tree_grid.label, field: "name", width: 300, formatter: this.tree_formatter}, @@ -86,23 +86,23 @@ erpnext.PurchaseAnalytics = wn.views.TreeGridReport.extend({ this.columns = std_columns.concat(this.columns); }, filters: [ - {fieldtype:"Select", label: "Tree Type", options:["Supplier Type", "Supplier", + {fieldtype:"Select", label: wn._("Tree Type"), options:["Supplier Type", "Supplier", "Item Group", "Item"], filter: function(val, item, opts, me) { return me.apply_zero_filter(val, item, opts, me); }}, - {fieldtype:"Select", label: "Based On", options:["Purchase Invoice", + {fieldtype:"Select", label: wn._("Based On"), options:["Purchase Invoice", "Purchase Order", "Purchase Receipt"]}, - {fieldtype:"Select", label: "Value or Qty", options:["Value", "Quantity"]}, - {fieldtype:"Select", label: "Company", link:"Company", + {fieldtype:"Select", label: wn._("Value or Qty"), options:["Value", "Quantity"]}, + {fieldtype:"Select", label: wn._("Company"), link:"Company", default_value: "Select Company..."}, - {fieldtype:"Date", label: "From Date"}, - {fieldtype:"Label", label: "To"}, - {fieldtype:"Date", label: "To Date"}, - {fieldtype:"Select", label: "Range", + {fieldtype:"Date", label: wn._("From Date")}, + {fieldtype:"Label", label: wn._("To")}, + {fieldtype:"Date", label: wn._("To Date")}, + {fieldtype:"Select", label: wn._("Range"), options:["Daily", "Weekly", "Monthly", "Quarterly", "Yearly"]}, - {fieldtype:"Button", label: "Refresh", icon:"icon-refresh icon-white", cssClass:"btn-info"}, - {fieldtype:"Button", label: "Reset Filters"} + {fieldtype:"Button", label: wn._("Refresh"), icon:"icon-refresh icon-white", cssClass:"btn-info"}, + {fieldtype:"Button", label: wn._("Reset Filters")} ], setup_filters: function() { var me = this; @@ -130,18 +130,18 @@ erpnext.PurchaseAnalytics = wn.views.TreeGridReport.extend({ }) wn.report_dump.data["Supplier Type"] = [{ - name: "All Supplier Types", + name: wn._("All Supplier Types"), id: "All Supplier Types", }].concat(wn.report_dump.data["Supplier Type"]); wn.report_dump.data["Supplier"].push({ - name: "Not Set", + name: wn._("Not Set"), parent_supplier_type: "All Supplier Types", id: "Not Set", }); wn.report_dump.data["Item"].push({ - name: "Not Set", + name: wn._("Not Set"), parent_item_group: "All Item Groups", id: "Not Set", }); diff --git a/controllers/accounts_controller.py b/controllers/accounts_controller.py index 2b6a21f5ede..9b2e28b3a9e 100644 --- a/controllers/accounts_controller.py +++ b/controllers/accounts_controller.py @@ -422,3 +422,7 @@ class AccountsController(TransactionBase): self._abbr = webnotes.conn.get_value("Company", self.doc.company, "abbr") return self._abbr + +@webnotes.whitelist() +def get_tax_rate(account_head): + return webnotes.conn.get_value("Account", account_head, "tax_rate") diff --git a/controllers/buying_controller.py b/controllers/buying_controller.py index fd3428e6ada..2677252da31 100644 --- a/controllers/buying_controller.py +++ b/controllers/buying_controller.py @@ -21,6 +21,7 @@ class BuyingController(StockController): if self.doc.supplier and not self.doc.supplier_name: self.doc.supplier_name = webnotes.conn.get_value("Supplier", self.doc.supplier, "supplier_name") + self.is_item_table_empty() self.validate_stock_or_nonstock_items() self.validate_warehouse() @@ -278,3 +279,8 @@ class BuyingController(StockController): (", ".join((["%s"]*len(item_codes))),), item_codes)] return self._purchase_items + + + def is_item_table_empty(self): + if not len(self.doclist.get({"parentfield": self.fname})): + webnotes.throw(_("Item table can not be blank")) \ No newline at end of file diff --git a/controllers/queries.py b/controllers/queries.py index 637d5e18cd8..ed44f9b02dd 100644 --- a/controllers/queries.py +++ b/controllers/queries.py @@ -174,4 +174,36 @@ def get_delivery_notes_to_be_billed(doctype, txt, searchfield, start, page_len, "fcond": get_filters_cond(doctype, filters, []), "mcond": get_match_cond(doctype), "start": "%(start)s", "page_len": "%(page_len)s", "txt": "%(txt)s" - }, { "start": start, "page_len": page_len, "txt": ("%%%s%%" % txt) }) \ No newline at end of file + }, { "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 + + if filters.has_key('warehouse'): + return webnotes.conn.sql("""select batch_no from `tabStock Ledger Entry` sle + where item_code = '%(item_code)s' + and warehouse = '%(warehouse)s' + and batch_no like '%(txt)s' + and exists(select * from `tabBatch` + where name = sle.batch_no + and (ifnull(expiry_date, '')='' or expiry_date >= '%(posting_date)s') + and docstatus != 2) + %(mcond)s + group by batch_no having sum(actual_qty) > 0 + order by batch_no desc + limit %(start)s, %(page_len)s """ % {'item_code': filters['item_code'], + 'warehouse': filters['warehouse'], 'posting_date': filters['posting_date'], + 'txt': "%%%s%%" % txt, 'mcond':get_match_cond(doctype, searchfield), + 'start': start, 'page_len': page_len}) + else: + return webnotes.conn.sql("""select name from tabBatch + where docstatus != 2 + and item = '%(item_code)s' + and (ifnull(expiry_date, '')='' or expiry_date >= '%(posting_date)s') + and name like '%(txt)s' + %(mcond)s + order by name desc + limit %(start)s, %(page_len)s""" % {'item_code': filters['item_code'], + 'posting_date': filters['posting_date'], 'txt': "%%%s%%" % txt, + 'mcond':get_match_cond(doctype, searchfield),'start': start, + 'page_len': page_len}) \ No newline at end of file diff --git a/controllers/selling_controller.py b/controllers/selling_controller.py index 37674ee4bfa..61bd03269c6 100644 --- a/controllers/selling_controller.py +++ b/controllers/selling_controller.py @@ -3,7 +3,7 @@ from __future__ import unicode_literals import webnotes -from webnotes.utils import cint, flt, comma_or, _round, add_days, cstr +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 webnotes import msgprint, _ @@ -15,6 +15,14 @@ class SellingController(StockController): # contact, address, item details and pos details (if applicable) self.set_missing_values() + def validate(self): + super(SellingController, self).validate() + self.validate_max_discount() + check_active_sales_items(self) + + def get_sender(self, comm): + return webnotes.conn.get_value('Sales Email Settings', None, 'email_id') + def set_missing_values(self, for_validate=False): super(SellingController, self).set_missing_values(for_validate) @@ -233,4 +241,121 @@ class SellingController(StockController): self.doc.order_type = "Sales" elif self.doc.order_type not in valid_types: msgprint(_(self.meta.get_label("order_type")) + " " + - _("must be one of") + ": " + comma_or(valid_types), raise_exception=True) \ No newline at end of file + _("must be one of") + ": " + comma_or(valid_types), raise_exception=True) + + def check_credit(self, grand_total): + customer_account = webnotes.conn.get_value("Account", {"company": self.doc.company, + "master_name": self.doc.customer}, "name") + if customer_account: + total_outstanding = 0 + total_outstanding = webnotes.conn.sql("""select + sum(ifnull(debit, 0)) - sum(ifnull(credit, 0)) + from `tabGL Entry` where account = %s""", customer_account)[0][0] + + outstanding_including_current = flt(total_outstanding) + flt(grand_total) + webnotes.bean('Account', customer_account).run_method("check_credit_limit", + customer_account, self.doc.company, outstanding_including_current) + + def validate_max_discount(self): + for d in self.doclist.get({"parentfield": self.fname}): + discount = flt(webnotes.conn.get_value("Item", d.item_code, "max_discount")) + + if discount and flt(d.adj_rate) > discount: + webnotes.throw(_("You cannot give more than ") + cstr(discount) + "% " + + _("discount on Item Code") + ": " + cstr(d.item_code)) + + def get_item_list(self): + il = [] + for d in self.doclist.get({"parentfield": self.fname}): + reserved_warehouse = "" + reserved_qty_for_main_item = 0 + + if self.doc.doctype == "Sales Order": + if (webnotes.conn.get_value("Item", d.item_code, "is_stock_item") == 'Yes' or + self.has_sales_bom(d.item_code)) and not d.reserved_warehouse: + webnotes.throw(_("Please enter Reserved Warehouse for item ") + + d.item_code + _(" as it is stock Item or packing item")) + reserved_warehouse = d.reserved_warehouse + if flt(d.qty) > flt(d.delivered_qty): + reserved_qty_for_main_item = flt(d.qty) - flt(d.delivered_qty) + + if self.doc.doctype == "Delivery Note" and d.against_sales_order: + # if SO qty is 10 and there is tolerance of 20%, then it will allow DN of 12. + # But in this case reserved qty should only be reduced by 10 and not 12 + + already_delivered_qty = self.get_already_delivered_qty(self.doc.name, + d.against_sales_order, d.prevdoc_detail_docname) + so_qty, reserved_warehouse = self.get_so_qty_and_warehouse(d.prevdoc_detail_docname) + + if already_delivered_qty + d.qty > so_qty: + reserved_qty_for_main_item = -(so_qty - already_delivered_qty) + else: + reserved_qty_for_main_item = -flt(d.qty) + + if self.has_sales_bom(d.item_code): + for p in self.doclist.get({"parentfield": "packing_details"}): + if p.parent_detail_docname == d.name and p.parent_item == d.item_code: + # the packing details table's qty is already multiplied with parent's qty + il.append(webnotes._dict({ + 'warehouse': p.warehouse, + 'reserved_warehouse': reserved_warehouse, + 'item_code': p.item_code, + 'qty': flt(p.qty), + 'reserved_qty': (flt(p.qty)/flt(d.qty)) * reserved_qty_for_main_item, + 'uom': p.uom, + 'batch_no': cstr(p.batch_no).strip(), + 'serial_no': cstr(p.serial_no).strip(), + 'name': d.name + })) + else: + il.append(webnotes._dict({ + 'warehouse': d.warehouse, + 'reserved_warehouse': reserved_warehouse, + 'item_code': d.item_code, + 'qty': d.qty, + 'reserved_qty': reserved_qty_for_main_item, + 'uom': d.stock_uom, + 'batch_no': cstr(d.batch_no).strip(), + 'serial_no': cstr(d.serial_no).strip(), + 'name': d.name + })) + return il + + def has_sales_bom(self, item_code): + return webnotes.conn.sql("""select name from `tabSales BOM` + where new_item_code=%s and docstatus != 2""", item_code) + + def get_already_delivered_qty(self, dn, so, so_detail): + qty = webnotes.conn.sql("""select sum(qty) from `tabDelivery Note Item` + where prevdoc_detail_docname = %s and docstatus = 1 + and against_sales_order = %s + and parent != %s""", (so_detail, so, dn)) + return qty and flt(qty[0][0]) or 0.0 + + def get_so_qty_and_warehouse(self, so_detail): + so_item = webnotes.conn.sql("""select qty, reserved_warehouse from `tabSales Order Item` + where name = %s and docstatus = 1""", so_detail, as_dict=1) + so_qty = so_item and flt(so_item[0]["qty"]) or 0.0 + so_warehouse = so_item and so_item[0]["reserved_warehouse"] or "" + return so_qty, so_warehouse + + def check_stop_sales_order(self, ref_fieldname): + for d in self.doclist.get({"parentfield": self.fname}): + if d.fields.get(ref_fieldname): + status = webnotes.conn.get_value("Sales Order", d.fields[ref_fieldname], "status") + if status == "Stopped": + webnotes.throw(self.doc.doctype + + _(" can not be created/modified against stopped Sales Order ") + + d.fields[ref_fieldname]) + +def check_active_sales_items(obj): + for d in obj.doclist.get({"parentfield": obj.fname}): + if d.item_code: + item = webnotes.conn.sql("""select docstatus, is_sales_item, + is_service_item, default_income_account from tabItem where name = %s""", + d.item_code, as_dict=True)[0] + if item.is_sales_item == 'No' and item.is_service_item == 'No': + webnotes.throw(_("Item is neither Sales nor Service Item") + ": " + d.item_code) + if d.income_account and not item.default_income_account: + webnotes.conn.set_value("Item", d.item_code, "default_income_account", + d.income_account) diff --git a/controllers/status_updater.py b/controllers/status_updater.py index 070f2002764..b2a0e17a258 100644 --- a/controllers/status_updater.py +++ b/controllers/status_updater.py @@ -8,6 +8,51 @@ from webnotes import msgprint from webnotes.model.controller import DocListController +status_map = { + "Contact": [ + ["Replied", "communication_sent"], + ["Open", "communication_received"] + ], + "Job Applicant": [ + ["Replied", "communication_sent"], + ["Open", "communication_received"] + ], + "Lead": [ + ["Replied", "communication_sent"], + ["Converted", "has_customer"], + ["Opportunity", "has_opportunity"], + ["Open", "communication_received"], + ], + "Opportunity": [ + ["Draft", None], + ["Submitted", "eval:self.doc.docstatus==1"], + ["Lost", "eval:self.doc.status=='Lost'"], + ["Quotation", "has_quotation"], + ["Replied", "communication_sent"], + ["Cancelled", "eval:self.doc.docstatus==2"], + ["Open", "communication_received"], + ], + "Quotation": [ + ["Draft", None], + ["Submitted", "eval:self.doc.docstatus==1"], + ["Lost", "eval:self.doc.status=='Lost'"], + ["Ordered", "has_sales_order"], + ["Replied", "communication_sent"], + ["Cancelled", "eval:self.doc.docstatus==2"], + ["Open", "communication_received"], + ], + "Sales Order": [ + ["Draft", None], + ["Submitted", "eval:self.doc.docstatus==1"], + ["Stopped", "eval:self.doc.status=='Stopped'"], + ["Cancelled", "eval:self.doc.docstatus==2"], + ], + "Support Ticket": [ + ["Replied", "communication_sent"], + ["Open", "communication_received"] + ], +} + class StatusUpdater(DocListController): """ Updates the status of the calling records @@ -20,6 +65,45 @@ class StatusUpdater(DocListController): self.update_qty() self.validate_qty() + def set_status(self, update=False): + if self.doc.get("__islocal"): + return + + if self.doc.doctype in status_map: + sl = status_map[self.doc.doctype][:] + sl.reverse() + for s in sl: + if not s[1]: + self.doc.status = s[0] + break + elif s[1].startswith("eval:"): + if eval(s[1][5:]): + self.doc.status = s[0] + break + elif getattr(self, s[1])(): + self.doc.status = s[0] + break + + if update: + webnotes.conn.set_value(self.doc.doctype, self.doc.name, "status", self.doc.status) + + def on_communication(self): + self.communication_set = True + self.set_status(update=True) + del self.communication_set + + def communication_received(self): + if getattr(self, "communication_set", False): + last_comm = self.doclist.get({"doctype":"Communication"}) + if last_comm: + return last_comm[-1].sent_or_received == "Received" + + def communication_sent(self): + if getattr(self, "communication_set", False): + last_comm = self.doclist.get({"doctype":"Communication"}) + if last_comm: + return last_comm[-1].sent_or_received == "Sent" + def validate_qty(self): """ Validates qty at row level diff --git a/home/doctype/feed/feed.py b/home/doctype/feed/feed.py index 25abf5798a0..ebee5c4ce75 100644 --- a/home/doctype/feed/feed.py +++ b/home/doctype/feed/feed.py @@ -7,7 +7,6 @@ import webnotes from webnotes.model import db_exists from webnotes.model.bean import copy_doclist -sql = webnotes.conn.sql diff --git a/home/page/activity/activity.js b/home/page/activity/activity.js index 8d451939cc7..edfe50f363b 100644 --- a/home/page/activity/activity.js +++ b/home/page/activity/activity.js @@ -4,7 +4,7 @@ wn.pages['activity'].onload = function(wrapper) { wn.ui.make_app_page({ parent: wrapper, - title: "Activity", + title: wn._("Activity"), single_column: true }) wrapper.appframe.add_module_icon("Activity"); @@ -21,7 +21,7 @@ wn.pages['activity'].onload = function(wrapper) { // Build Report Button if(wn.boot.profile.can_get_report.indexOf("Feed")!=-1) { - wrapper.appframe.add_button('Build Report', function() { + wrapper.appframe.add_button(wn._('Build Report'), function() { wn.set_route('Report', "Feed"); }, 'icon-th') } diff --git a/home/page/latest_updates/latest_updates.js b/home/page/latest_updates/latest_updates.js index 094eeb558e0..d5e361eb767 100644 --- a/home/page/latest_updates/latest_updates.js +++ b/home/page/latest_updates/latest_updates.js @@ -4,7 +4,7 @@ wn.pages['latest-updates'].onload = function(wrapper) { wn.ui.make_app_page({ parent: wrapper, - title: 'Latest Updates', + title: wn._('Latest Updates'), single_column: true }); @@ -16,9 +16,9 @@ wn.pages['latest-updates'].onload = function(wrapper) { method:"home.page.latest_updates.latest_updates.get", callback: function(r) { parent.empty(); - $("

Report issues at\ - GitHub Issues

\ -

Commit Log

") + $("

"+wn._("Report issues at")+ + ""+wn._("GitHub Issues")+"

\ +

"+wn._("Commit Log")+"

") .appendTo(parent); var $tbody = $('
') diff --git a/hr/doctype/appraisal/appraisal.js b/hr/doctype/appraisal/appraisal.js index f94a288fd52..8c5df8e2971 100644 --- a/hr/doctype/appraisal/appraisal.js +++ b/hr/doctype/appraisal/appraisal.js @@ -45,7 +45,7 @@ cur_frm.cscript.score = function(doc,cdt,cdn){ var d = locals[cdt][cdn]; if (d.score){ if (flt(d.score) > 5) { - msgprint("Score must be less than or equal to 5"); + msgprint(wn._("Score must be less than or equal to 5")); d.score = 0; refresh_field('score', d.name, 'appraisal_details'); } diff --git a/hr/doctype/attendance/attendance.py b/hr/doctype/attendance/attendance.py index 7b82bc524b0..6d52b5723d9 100644 --- a/hr/doctype/attendance/attendance.py +++ b/hr/doctype/attendance/attendance.py @@ -7,7 +7,6 @@ import webnotes from webnotes.utils import getdate, nowdate from webnotes import msgprint, _ -sql = webnotes.conn.sql class DocType: def __init__(self, doc, doclist=[]): @@ -15,7 +14,7 @@ class DocType: self.doclist = doclist def validate_duplicate_record(self): - res = sql("""select name from `tabAttendance` where employee = %s and att_date = %s + res = webnotes.conn.sql("""select name from `tabAttendance` where employee = %s and att_date = %s and name != %s and docstatus = 1""", (self.doc.employee, self.doc.att_date, self.doc.name)) if res: @@ -24,7 +23,7 @@ class DocType: def check_leave_record(self): if self.doc.status == 'Present': - leave = sql("""select name from `tabLeave Application` + leave = webnotes.conn.sql("""select name from `tabLeave Application` where employee = %s and %s between from_date and to_date and status = 'Approved' and docstatus = 1""", (self.doc.employee, self.doc.att_date)) @@ -42,7 +41,7 @@ class DocType: msgprint(_("Attendance can not be marked for future dates"), raise_exception=1) def validate_employee(self): - emp = sql("select name from `tabEmployee` where name = %s and status = 'Active'", + emp = webnotes.conn.sql("select name from `tabEmployee` where name = %s and status = 'Active'", self.doc.employee) if not emp: msgprint(_("Employee: ") + self.doc.employee + diff --git a/hr/doctype/employee/employee.js b/hr/doctype/employee/employee.js index 615e2761b8a..3814dd9c11f 100644 --- a/hr/doctype/employee/employee.js +++ b/hr/doctype/employee/employee.js @@ -21,7 +21,7 @@ erpnext.hr.EmployeeController = wn.ui.form.Controller.extend({ var me = this; erpnext.hide_naming_series(); if(!this.frm.doc.__islocal) { - cur_frm.add_custom_button('Make Salary Structure', function() { + cur_frm.add_custom_button(wn._('Make Salary Structure'), function() { me.make_salary_structure(this); }); } }, diff --git a/hr/doctype/employee/employee.py b/hr/doctype/employee/employee.py index e28e02d81bb..56dfb357660 100644 --- a/hr/doctype/employee/employee.py +++ b/hr/doctype/employee/employee.py @@ -4,11 +4,10 @@ from __future__ import unicode_literals import webnotes -from webnotes.utils import getdate, validate_email_add, cstr +from webnotes.utils import getdate, validate_email_add, cstr, cint from webnotes.model.doc import make_autoname from webnotes import msgprint, _ -sql = webnotes.conn.sql class DocType: def __init__(self,doc,doclist=[]): @@ -21,12 +20,8 @@ class DocType: webnotes.throw(_("Please setup Employee Naming System in Human Resource > HR Settings")) else: if naming_method=='Naming Series': - if not self.doc.naming_series: - webnotes.throw(_("Please select Naming Neries")) self.doc.name = make_autoname(self.doc.naming_series + '.####') elif naming_method=='Employee Number': - if not self.doc.employee_number: - webnotes.throw(_("Please enter Employee Number")) self.doc.name = self.doc.employee_number self.doc.employee = self.doc.name @@ -40,12 +35,12 @@ class DocType: self.validate_email() self.validate_status() self.validate_employee_leave_approver() + self.update_dob_event() def on_update(self): if self.doc.user_id: self.update_user_default() self.update_profile() - self.update_dob_event() def update_user_default(self): webnotes.conn.set_default("employee", self.doc.name, self.doc.user_id) @@ -156,10 +151,11 @@ class DocType: raise_exception=InvalidLeaveApproverError) def update_dob_event(self): - if self.doc.status == "Active" and self.doc.date_of_birth: + if self.doc.status == "Active" and self.doc.date_of_birth \ + and not cint(webnotes.conn.get_value("HR Settings", None, "stop_birthday_reminders")): birthday_event = webnotes.conn.sql("""select name from `tabEvent` where repeat_on='Every Year' and ref_type='Employee' and ref_name=%s""", self.doc.name) - + starts_on = self.doc.date_of_birth + " 00:00:00" ends_on = self.doc.date_of_birth + " 00:15:00" diff --git a/hr/doctype/employee/employee.txt b/hr/doctype/employee/employee.txt index bbe87ad8801..4ed873275ab 100644 --- a/hr/doctype/employee/employee.txt +++ b/hr/doctype/employee/employee.txt @@ -2,12 +2,13 @@ { "creation": "2013-03-07 09:04:18", "docstatus": 0, - "modified": "2013-08-08 14:22:11", + "modified": "2013-10-11 10:52:53", "modified_by": "Administrator", "owner": "Administrator" }, { "allow_attach": 1, + "allow_rename": 1, "autoname": "naming_series:", "doctype": "DocType", "document_type": "Master", diff --git a/hr/doctype/expense_claim/expense_claim.js b/hr/doctype/expense_claim/expense_claim.js index f7895b10eb0..e19cac77512 100644 --- a/hr/doctype/expense_claim/expense_claim.js +++ b/hr/doctype/expense_claim/expense_claim.js @@ -93,28 +93,28 @@ cur_frm.cscript.refresh = function(doc,cdt,cdn){ cur_frm.savesubmit(); if(doc.docstatus==1 && wn.model.can_create("Journal Voucher")) - cur_frm.add_custom_button("Make Bank Voucher", cur_frm.cscript.make_bank_voucher); + cur_frm.add_custom_button(wn._("Make Bank Voucher"), cur_frm.cscript.make_bank_voucher); } } cur_frm.cscript.set_help = function(doc) { cur_frm.set_intro(""); if(doc.__islocal && !in_list(user_roles, "HR User")) { - cur_frm.set_intro("Fill the form and save it") + cur_frm.set_intro(wn._("Fill the form and save it")) } else { if(doc.docstatus==0 && doc.approval_status=="Draft") { if(user==doc.exp_approver) { - cur_frm.set_intro("You are the Expense Approver for this record. \ - Please Update the 'Status' and Save"); + cur_frm.set_intro(wn._("You are the Expense Approver for this record. \ + Please Update the 'Status' and Save")); } else { - cur_frm.set_intro("Expense Claim is pending approval. \ - Only the Expense Approver can update status."); + cur_frm.set_intro(wn._("Expense Claim is pending approval. \ + Only the Expense Approver can update status.")); } } else { if(doc.approval_status=="Approved") { - cur_frm.set_intro("Expense Claim has been approved."); + cur_frm.set_intro(wn._("Expense Claim has been approved.")); } else if(doc.approval_status=="Rejected") { - cur_frm.set_intro("Expense Claim has been rejected."); + cur_frm.set_intro(wn._("Expense Claim has been rejected.")); } } } diff --git a/hr/doctype/holiday_list/holiday_list.py b/hr/doctype/holiday_list/holiday_list.py index 81d18f336e1..100c1403fad 100644 --- a/hr/doctype/holiday_list/holiday_list.py +++ b/hr/doctype/holiday_list/holiday_list.py @@ -10,7 +10,6 @@ from webnotes.model.doc import addchild, make_autoname from webnotes.model.bean import copy_doclist from webnotes import msgprint -sql = webnotes.conn.sql import datetime diff --git a/hr/doctype/hr_settings/hr_settings.py b/hr/doctype/hr_settings/hr_settings.py index 784339de7db..20edd1642d0 100644 --- a/hr/doctype/hr_settings/hr_settings.py +++ b/hr/doctype/hr_settings/hr_settings.py @@ -6,6 +6,30 @@ from __future__ import unicode_literals import webnotes +from webnotes.utils import cint + class DocType: def __init__(self, d, dl): - self.doc, self.doclist = d, dl \ No newline at end of file + self.doc, self.doclist = d, dl + + def validate(self): + self.update_birthday_reminders() + + from setup.doctype.naming_series.naming_series import set_by_naming_series + set_by_naming_series("Employee", "employee_number", + self.doc.get("emp_created_by")=="Naming Series", hide_name_field=True) + + def update_birthday_reminders(self): + original_stop_birthday_reminders = cint(webnotes.conn.get_value("HR Settings", + None, "stop_birthday_reminders")) + + # reset birthday reminders + if cint(self.doc.stop_birthday_reminders) != original_stop_birthday_reminders: + webnotes.conn.sql("""delete from `tabEvent` where repeat_on='Every Year' and ref_type='Employee'""") + + if not self.doc.stop_birthday_reminders: + for employee in webnotes.conn.sql_list("""select name from `tabEmployee` where status='Active' and + ifnull(date_of_birth, '')!=''"""): + webnotes.get_obj("Employee", employee).update_dob_event() + + webnotes.msgprint(webnotes._("Updated Birthday Reminders")) \ No newline at end of file diff --git a/hr/doctype/hr_settings/hr_settings.txt b/hr/doctype/hr_settings/hr_settings.txt index e3694d05727..bf4b0119aaf 100644 --- a/hr/doctype/hr_settings/hr_settings.txt +++ b/hr/doctype/hr_settings/hr_settings.txt @@ -2,7 +2,7 @@ { "creation": "2013-08-02 13:45:23", "docstatus": 0, - "modified": "2013-08-02 14:22:26", + "modified": "2013-10-02 15:44:38", "modified_by": "Administrator", "owner": "Administrator" }, @@ -38,6 +38,12 @@ "doctype": "DocType", "name": "HR Settings" }, + { + "doctype": "DocField", + "fieldname": "employee_settings", + "fieldtype": "Section Break", + "label": "Employee Settings" + }, { "description": "Employee record is created using selected field. ", "doctype": "DocField", @@ -46,6 +52,19 @@ "label": "Employee Records to be created by", "options": "Naming Series\nEmployee Number" }, + { + "description": "Don't send Employee Birthday Reminders", + "doctype": "DocField", + "fieldname": "stop_birthday_reminders", + "fieldtype": "Check", + "label": "Stop Birthday Reminders" + }, + { + "doctype": "DocField", + "fieldname": "payroll_settings", + "fieldtype": "Section Break", + "label": "Payroll Settings" + }, { "description": "If checked, Total no. of Working Days will include holidays, and this will reduce the value of Salary Per Day", "doctype": "DocField", diff --git a/hr/doctype/job_applicant/get_job_applications.py b/hr/doctype/job_applicant/get_job_applications.py index 2e013289159..a9297810193 100644 --- a/hr/doctype/job_applicant/get_job_applications.py +++ b/hr/doctype/job_applicant/get_job_applications.py @@ -37,7 +37,7 @@ class JobsMailbox(POP3Mailbox): mail.save_attachments_in_doc(applicant.doc) make(content=mail.content, sender=mail.from_email, - doctype="Job Applicant", name=applicant.doc.name) + doctype="Job Applicant", name=applicant.doc.name, sent_or_received="Received") def get_job_applications(): if cint(webnotes.conn.get_value('Jobs Email Settings', None, 'extract_emails')): diff --git a/hr/doctype/job_applicant/job_applicant.js b/hr/doctype/job_applicant/job_applicant.js index f82da11f07f..ccfbbc25b97 100644 --- a/hr/doctype/job_applicant/job_applicant.js +++ b/hr/doctype/job_applicant/job_applicant.js @@ -7,8 +7,8 @@ cur_frm.cscript = { onload: function(doc, dt, dn) { if(in_list(user_roles,'System Manager')) { cur_frm.footer.help_area.innerHTML = '
\ -

Jobs Email Settings
\ - Automatically extract Job Applicants from a mail box e.g. "jobs@example.com"

'; +

'+wn._("Jobs Email Settings")+'
\ + '+wn._('Automatically extract Job Applicants from a mail box ')+'e.g. "jobs@example.com"

'; } }, refresh: function(doc) { diff --git a/hr/doctype/job_applicant/job_applicant.py b/hr/doctype/job_applicant/job_applicant.py index 9bf1b967e7d..0ab4ba86128 100644 --- a/hr/doctype/job_applicant/job_applicant.py +++ b/hr/doctype/job_applicant/job_applicant.py @@ -11,14 +11,9 @@ from webnotes.utils import extract_email_id class DocType(TransactionBase): def __init__(self, d, dl): self.doc, self.doclist = d, dl - + def get_sender(self, comm): - return webnotes.conn.get_value('Jobs Email Settings',None,'email_id') - - def on_communication(self, comm): - if webnotes.conn.get_value("Profile", extract_email_id(comm.sender), "user_type")=="System User": - status = "Replied" - else: - status = "Open" - - webnotes.conn.set(self.doc, 'status', status) \ No newline at end of file + return webnotes.conn.get_value('Jobs Email Settings',None,'email_id') + + def validate(self): + self.set_status() \ No newline at end of file diff --git a/hr/doctype/leave_allocation/leave_allocation.py b/hr/doctype/leave_allocation/leave_allocation.py index 1c856fa3352..a058e1db778 100755 --- a/hr/doctype/leave_allocation/leave_allocation.py +++ b/hr/doctype/leave_allocation/leave_allocation.py @@ -5,7 +5,6 @@ from __future__ import unicode_literals import webnotes from webnotes.utils import cint, flt from webnotes import msgprint -sql = webnotes.conn.sql class DocType: def __init__(self, doc, doclist): @@ -37,7 +36,7 @@ class DocType: def check_existing_leave_allocation(self): """check whether leave for same type is already allocated or not""" - leave_allocation = sql("""select name from `tabLeave Allocation` + leave_allocation = webnotes.conn.sql("""select name from `tabLeave Allocation` where employee=%s and leave_type=%s and fiscal_year=%s and docstatus=1""", (self.doc.employee, self.doc.leave_type, self.doc.fiscal_year)) if leave_allocation: @@ -64,14 +63,14 @@ class DocType: return self.get_leaves_allocated(prev_fyear) - self.get_leaves_applied(prev_fyear) def get_leaves_applied(self, fiscal_year): - leaves_applied = sql("""select SUM(ifnull(total_leave_days, 0)) + leaves_applied = webnotes.conn.sql("""select SUM(ifnull(total_leave_days, 0)) from `tabLeave Application` where employee=%s and leave_type=%s and fiscal_year=%s and docstatus=1""", (self.doc.employee, self.doc.leave_type, fiscal_year)) return leaves_applied and flt(leaves_applied[0][0]) or 0 def get_leaves_allocated(self, fiscal_year): - leaves_allocated = sql("""select SUM(ifnull(total_leaves_allocated, 0)) + leaves_allocated = webnotes.conn.sql("""select SUM(ifnull(total_leaves_allocated, 0)) from `tabLeave Allocation` where employee=%s and leave_type=%s and fiscal_year=%s and docstatus=1 and name!=%s""", (self.doc.employee, self.doc.leave_type, fiscal_year, self.doc.name)) @@ -79,7 +78,7 @@ class DocType: def allow_carry_forward(self): """check whether carry forward is allowed or not for this leave type""" - cf = sql("""select is_carry_forward from `tabLeave Type` where name = %s""", + cf = webnotes.conn.sql("""select is_carry_forward from `tabLeave Type` where name = %s""", self.doc.leave_type) cf = cf and cint(cf[0][0]) or 0 if not cf: @@ -110,7 +109,7 @@ class DocType: webnotes.conn.set(self.doc,'total_leaves_allocated',flt(leave_det['total_leaves_allocated'])) def check_for_leave_application(self): - exists = sql("""select name from `tabLeave Application` + exists = webnotes.conn.sql("""select name from `tabLeave Application` where employee=%s and leave_type=%s and fiscal_year=%s and docstatus=1""", (self.doc.employee, self.doc.leave_type, self.doc.fiscal_year)) if exists: diff --git a/hr/doctype/leave_application/leave_application.js b/hr/doctype/leave_application/leave_application.js index 5969f4dc4fb..7b32cff6919 100755 --- a/hr/doctype/leave_application/leave_application.js +++ b/hr/doctype/leave_application/leave_application.js @@ -31,14 +31,14 @@ cur_frm.cscript.refresh = function(doc, dt, dn) { } cur_frm.set_intro(""); if(doc.__islocal && !in_list(user_roles, "HR User")) { - cur_frm.set_intro("Fill the form and save it") + cur_frm.set_intro(wn._("Fill the form and save it")) } else { if(doc.docstatus==0 && doc.status=="Open") { if(user==doc.leave_approver) { - cur_frm.set_intro("You are the Leave Approver for this record. Please Update the 'Status' and Save"); + cur_frm.set_intro(wn._("You are the Leave Approver for this record. Please Update the 'Status' and Save")); cur_frm.toggle_enable("status", true); } else { - cur_frm.set_intro("This Leave Application is pending approval. Only the Leave Apporver can update status.") + cur_frm.set_intro(wn._("This Leave Application is pending approval. Only the Leave Apporver can update status.")) cur_frm.toggle_enable("status", false); if(!doc.__islocal) { if(cur_frm.frm_head.appframe.buttons.Submit) @@ -47,12 +47,12 @@ cur_frm.cscript.refresh = function(doc, dt, dn) { } } else { if(doc.status=="Approved") { - cur_frm.set_intro("Leave application has been approved."); + cur_frm.set_intro(wn._("Leave application has been approved.")); if(cur_frm.doc.docstatus==0) { - cur_frm.set_intro("Please submit to update Leave Balance."); + cur_frm.set_intro(wn._("Please submit to update Leave Balance.")); } } else if(doc.status=="Rejected") { - cur_frm.set_intro("Leave application has been rejected."); + cur_frm.set_intro(wn._("Leave application has been rejected.")); } } } @@ -86,7 +86,7 @@ cur_frm.cscript.from_date = function(doc, dt, dn) { cur_frm.cscript.to_date = function(doc, dt, dn) { if(cint(doc.half_day) == 1 && cstr(doc.from_date) && doc.from_date != doc.to_date){ - msgprint("To Date should be same as From Date for Half Day leave"); + msgprint(wn._("To Date should be same as From Date for Half Day leave")); set_multiple(dt,dn,{to_date:doc.from_date}); } cur_frm.cscript.calculate_total_days(doc, dt, dn); diff --git a/hr/doctype/leave_application/test_leave_application.py b/hr/doctype/leave_application/test_leave_application.py index c89f7c4537c..7a900e3bfee 100644 --- a/hr/doctype/leave_application/test_leave_application.py +++ b/hr/doctype/leave_application/test_leave_application.py @@ -7,6 +7,9 @@ import unittest from hr.doctype.leave_application.leave_application import LeaveDayBlockedError, OverlapError class TestLeaveApplication(unittest.TestCase): + def tearDown(self): + webnotes.session.user = "Administrator" + def _clear_roles(self): webnotes.conn.sql("""delete from `tabUserRole` where parent in ("test@example.com", "test1@example.com", "test2@example.com")""") @@ -15,6 +18,7 @@ class TestLeaveApplication(unittest.TestCase): webnotes.conn.sql("""delete from `tabLeave Application`""") def _add_employee_leave_approver(self, employee, leave_approver): + temp_session_user = webnotes.session.user webnotes.session.user = "Administrator" employee = webnotes.bean("Employee", employee) employee.doclist.append({ @@ -23,6 +27,7 @@ class TestLeaveApplication(unittest.TestCase): "leave_approver": leave_approver }) employee.save() + webnotes.session.user = temp_session_user def get_application(self, doclist): application = webnotes.bean(copy=doclist) @@ -31,7 +36,6 @@ class TestLeaveApplication(unittest.TestCase): return application def test_block_list(self): - webnotes.session.user = "Administrator" self._clear_roles() from webnotes.profile import add_role @@ -54,7 +58,6 @@ class TestLeaveApplication(unittest.TestCase): self.assertTrue(application.insert()) def test_overlap(self): - webnotes.session.user = "Administrator" self._clear_roles() self._clear_applications() @@ -72,7 +75,6 @@ class TestLeaveApplication(unittest.TestCase): self.assertRaises(OverlapError, application.insert) def test_global_block_list(self): - webnotes.session.user = "Administrator" self._clear_roles() from webnotes.profile import add_role @@ -98,7 +100,6 @@ class TestLeaveApplication(unittest.TestCase): "applies_to_all_departments", 0) def test_leave_approval(self): - webnotes.session.user = "Administrator" self._clear_roles() from webnotes.profile import add_role diff --git a/hr/doctype/leave_block_list/test_leave_block_list.py b/hr/doctype/leave_block_list/test_leave_block_list.py index e266cd84d67..34814d9380b 100644 --- a/hr/doctype/leave_block_list/test_leave_block_list.py +++ b/hr/doctype/leave_block_list/test_leave_block_list.py @@ -7,6 +7,9 @@ import unittest from hr.doctype.leave_block_list.leave_block_list import get_applicable_block_dates class TestLeaveBlockList(unittest.TestCase): + def tearDown(self): + webnotes.session.user = "Administrator" + def test_get_applicable_block_dates(self): webnotes.session.user = "test@example.com" webnotes.conn.set_value("Department", "_Test Department", "leave_block_list", diff --git a/hr/doctype/leave_control_panel/leave_control_panel.js b/hr/doctype/leave_control_panel/leave_control_panel.js index a53f031f4c7..7a840ba78d5 100644 --- a/hr/doctype/leave_control_panel/leave_control_panel.js +++ b/hr/doctype/leave_control_panel/leave_control_panel.js @@ -15,7 +15,7 @@ cur_frm.cscript.to_date = function(doc, cdt, cdn) { function(r, rt) { var doc = locals[cdt][cdn]; if (r.message) { - alert("To date cannot be before from date"); + alert(wn._("To date cannot be before from date")); doc.to_date = ''; refresh_field('to_date'); } diff --git a/hr/doctype/leave_control_panel/leave_control_panel.py b/hr/doctype/leave_control_panel/leave_control_panel.py index 30b52ba8898..294701c004b 100644 --- a/hr/doctype/leave_control_panel/leave_control_panel.py +++ b/hr/doctype/leave_control_panel/leave_control_panel.py @@ -9,7 +9,6 @@ from webnotes.model.doc import Document from webnotes.model.code import get_obj from webnotes import msgprint -sql = webnotes.conn.sql @@ -34,7 +33,7 @@ class DocType: emp_query = "select name from `tabEmployee` " if flag == 1: emp_query += condition - e = sql(emp_query) + e = webnotes.conn.sql(emp_query) return e # ---------------- diff --git a/hr/doctype/salary_manager/salary_manager.js b/hr/doctype/salary_manager/salary_manager.js index 178ab3ef6b9..b27d41c418b 100644 --- a/hr/doctype/salary_manager/salary_manager.js +++ b/hr/doctype/salary_manager/salary_manager.js @@ -5,7 +5,7 @@ var display_activity_log = function(msg) { if(!pscript.ss_html) pscript.ss_html = $a(cur_frm.fields_dict['activity_log'].wrapper,'div'); pscript.ss_html.innerHTML = - '
Activity Log:
'+msg+'
'; + '
'+wn._("Activity Log:")+'
'+msg+'
'; } //Create salary slip @@ -23,7 +23,7 @@ cur_frm.cscript.create_salary_slip = function(doc, cdt, cdn) { //Submit salary slip //----------------------- cur_frm.cscript.submit_salary_slip = function(doc, cdt, cdn) { - var check = confirm("Do you really want to Submit all Salary Slip for month : " + doc.month+" and fiscal year : "+doc.fiscal_year); + var check = confirm(wn._("Do you really want to Submit all Salary Slip for month : ") + doc.month+ wn._(" and fiscal year : ")+doc.fiscal_year); if(check){ var callback = function(r, rt){ if (r.message) @@ -49,7 +49,7 @@ cur_frm.cscript.make_jv = function(doc, dt, dn) { var jv = wn.model.make_new_doc_and_get_name('Journal Voucher'); jv = locals['Journal Voucher'][jv]; jv.voucher_type = 'Bank Voucher'; - jv.user_remark = 'Payment of salary for the month: ' + doc.month + 'and fiscal year: ' + doc.fiscal_year; + jv.user_remark = wn._('Payment of salary for the month: ') + doc.month + wn._('and fiscal year: ') + doc.fiscal_year; jv.fiscal_year = doc.fiscal_year; jv.company = doc.company; jv.posting_date = dateutil.obj_to_str(new Date()); diff --git a/hr/doctype/salary_manager/salary_manager.py b/hr/doctype/salary_manager/salary_manager.py index 0eadca14c42..48dcab18084 100644 --- a/hr/doctype/salary_manager/salary_manager.py +++ b/hr/doctype/salary_manager/salary_manager.py @@ -11,7 +11,6 @@ from webnotes.model.bean import getlist, copy_doclist from webnotes.model.code import get_obj from webnotes import msgprint -sql = webnotes.conn.sql @@ -30,7 +29,7 @@ class DocType: cond = self.get_filter_condition() cond += self.get_joining_releiving_condition() - emp_list = sql(""" + emp_list = webnotes.conn.sql(""" select t1.name from `tabEmployee` t1, `tabSalary Structure` t2 where t1.docstatus!=2 and t2.docstatus != 2 @@ -68,7 +67,7 @@ class DocType: def get_month_details(self, year, month): - ysd = sql("select year_start_date from `tabFiscal Year` where name ='%s'"%year)[0][0] + ysd = webnotes.conn.sql("select year_start_date from `tabFiscal Year` where name ='%s'"%year)[0][0] if ysd: from dateutil.relativedelta import relativedelta import calendar, datetime @@ -96,7 +95,7 @@ class DocType: emp_list = self.get_emp_list() ss_list = [] for emp in emp_list: - if not sql("""select name from `tabSalary Slip` + if not webnotes.conn.sql("""select name from `tabSalary Slip` where docstatus!= 2 and employee = %s and month = %s and fiscal_year = %s and company = %s """, (emp[0], self.doc.month, self.doc.fiscal_year, self.doc.company)): ss = webnotes.bean({ @@ -127,7 +126,7 @@ class DocType: which are not submitted """ cond = self.get_filter_condition() - ss_list = sql(""" + ss_list = webnotes.conn.sql(""" select t1.name from `tabSalary Slip` t1 where t1.docstatus = 0 and month = '%s' and fiscal_year = '%s' %s """ % (self.doc.month, self.doc.fiscal_year, cond)) @@ -189,7 +188,7 @@ class DocType: Get total salary amount from submitted salary slip based on selected criteria """ cond = self.get_filter_condition() - tot = sql(""" + tot = webnotes.conn.sql(""" select sum(rounded_total) from `tabSalary Slip` t1 where t1.docstatus = 1 and month = '%s' and fiscal_year = '%s' %s """ % (self.doc.month, self.doc.fiscal_year, cond)) @@ -202,7 +201,7 @@ class DocType: get default bank account,default salary acount from company """ amt = self.get_total_salary() - com = sql("select default_bank_account from `tabCompany` where name = '%s'" % self.doc.company) + com = webnotes.conn.sql("select default_bank_account from `tabCompany` where name = '%s'" % self.doc.company) if not com[0][0] or not com[0][1]: msgprint("You can set Default Bank Account in Company master.") diff --git a/hr/doctype/salary_manager/test_salary_manager.py b/hr/doctype/salary_manager/test_salary_manager.py index 04000f06701..13815db52be 100644 --- a/hr/doctype/salary_manager/test_salary_manager.py +++ b/hr/doctype/salary_manager/test_salary_manager.py @@ -9,7 +9,7 @@ test_records = [] # from webnotes.model.doc import Document # from webnotes.model.code import get_obj -# sql = webnotes.conn.sql +# webnotes.conn.sql = webnotes.conn.sql # # class TestSalaryManager(unittest.TestCase): # def setUp(self): @@ -20,15 +20,15 @@ test_records = [] # ss1[0].employee = emp1.name # for s in ss1: s.save(1) # for s in ss1[1:]: -# sql("update `tabSalary Structure Earning` set parent = '%s' where name = '%s'" % (ss1[0].name, s.name)) -# sql("update `tabSalary Structure Deduction` set parent = '%s' where name = '%s'" % (ss1[0].name, s.name)) +# webnotes.conn.sql("update `tabSalary Structure Earning` set parent = '%s' where name = '%s'" % (ss1[0].name, s.name)) +# webnotes.conn.sql("update `tabSalary Structure Deduction` set parent = '%s' where name = '%s'" % (ss1[0].name, s.name)) # # # ss2[0].employee = emp2.name # for s in ss2: s.save(1) # for s in ss2[1:]: -# sql("update `tabSalary Structure Earning` set parent = '%s' where name = '%s'" % (ss2[0].name, s.name)) -# sql("update `tabSalary Structure Deduction` set parent = '%s' where name = '%s'" % (ss2[0].name, s.name)) +# webnotes.conn.sql("update `tabSalary Structure Earning` set parent = '%s' where name = '%s'" % (ss2[0].name, s.name)) +# webnotes.conn.sql("update `tabSalary Structure Deduction` set parent = '%s' where name = '%s'" % (ss2[0].name, s.name)) # # sman.save() # self.sm = get_obj('Salary Manager') @@ -36,7 +36,7 @@ test_records = [] # self.sm.create_sal_slip() # # def test_creation(self): -# ssid = sql(""" +# ssid = webnotes.conn.sql(""" # select name, department # from `tabSalary Slip` # where month = '08' and fiscal_year='2011-2012'""") @@ -46,7 +46,7 @@ test_records = [] # # # def test_lwp_calc(self): -# ss = sql(""" +# ss = webnotes.conn.sql(""" # select payment_days # from `tabSalary Slip` # where month = '08' and fiscal_year='2011-2012' and employee = '%s' diff --git a/hr/doctype/salary_slip/salary_slip.py b/hr/doctype/salary_slip/salary_slip.py index 36d7ceba84e..dab026e3645 100644 --- a/hr/doctype/salary_slip/salary_slip.py +++ b/hr/doctype/salary_slip/salary_slip.py @@ -11,7 +11,6 @@ from webnotes.model.code import get_obj from webnotes import msgprint, _ from setup.utils import get_company_currency -sql = webnotes.conn.sql from utilities.transaction_base import TransactionBase @@ -32,7 +31,7 @@ class DocType(TransactionBase): def check_sal_struct(self): - struct = sql("select name from `tabSalary Structure` where employee ='%s' and is_active = 'Yes' "%self.doc.employee) + struct = webnotes.conn.sql("select name from `tabSalary Structure` where employee ='%s' and is_active = 'Yes' "%self.doc.employee) if not struct: msgprint("Please create Salary Structure for employee '%s'"%self.doc.employee) self.doc.employee = '' @@ -100,13 +99,13 @@ class DocType(TransactionBase): return payment_days def get_holidays_for_employee(self, m): - holidays = sql("""select t1.holiday_date + holidays = webnotes.conn.sql("""select t1.holiday_date from `tabHoliday` t1, tabEmployee t2 where t1.parent = t2.holiday_list and t2.name = %s and t1.holiday_date between %s and %s""", (self.doc.employee, m['month_start_date'], m['month_end_date'])) if not holidays: - holidays = sql("""select t1.holiday_date + holidays = webnotes.conn.sql("""select t1.holiday_date from `tabHoliday` t1, `tabHoliday List` t2 where t1.parent = t2.name and ifnull(t2.is_default, 0) = 1 and t2.fiscal_year = %s @@ -120,7 +119,7 @@ class DocType(TransactionBase): for d in range(m['month_days']): dt = add_days(cstr(m['month_start_date']), d) if dt not in holidays: - leave = sql(""" + leave = webnotes.conn.sql(""" select t1.name, t1.half_day from `tabLeave Application` t1, `tabLeave Type` t2 where t2.name = t1.leave_type @@ -134,7 +133,7 @@ class DocType(TransactionBase): return lwp def check_existing(self): - ret_exist = sql("""select name from `tabSalary Slip` + ret_exist = webnotes.conn.sql("""select name from `tabSalary Slip` where month = %s and fiscal_year = %s and docstatus != 2 and employee = %s and name != %s""", (self.doc.month, self.doc.fiscal_year, self.doc.employee, self.doc.name)) @@ -201,9 +200,9 @@ class DocType(TransactionBase): receiver = webnotes.conn.get_value("Employee", self.doc.employee, "company_email") if receiver: subj = 'Salary Slip - ' + cstr(self.doc.month) +'/'+cstr(self.doc.fiscal_year) - earn_ret=sql("""select e_type, e_modified_amount from `tabSalary Slip Earning` + earn_ret=webnotes.conn.sql("""select e_type, e_modified_amount from `tabSalary Slip Earning` where parent = %s""", self.doc.name) - ded_ret=sql("""select d_type, d_modified_amount from `tabSalary Slip Deduction` + ded_ret=webnotes.conn.sql("""select d_type, d_modified_amount from `tabSalary Slip Deduction` where parent = %s""", self.doc.name) earn_table = '' diff --git a/hr/doctype/salary_structure/salary_structure.js b/hr/doctype/salary_structure/salary_structure.js index 81cb63d352d..15b35129353 100644 --- a/hr/doctype/salary_structure/salary_structure.js +++ b/hr/doctype/salary_structure/salary_structure.js @@ -12,7 +12,7 @@ cur_frm.cscript.onload = function(doc, dt, dn){ cur_frm.cscript.refresh = function(doc, dt, dn){ if((!doc.__islocal) && (doc.is_active == 'Yes')){ - cur_frm.add_custom_button('Make Salary Slip', cur_frm.cscript['Make Salary Slip']); + cur_frm.add_custom_button(wn._('Make Salary Slip'), cur_frm.cscript['Make Salary Slip']); } cur_frm.toggle_enable('employee', doc.__islocal); diff --git a/hr/doctype/salary_structure/salary_structure.py b/hr/doctype/salary_structure/salary_structure.py index 50b0160d9ae..bfa7850d51d 100644 --- a/hr/doctype/salary_structure/salary_structure.py +++ b/hr/doctype/salary_structure/salary_structure.py @@ -8,7 +8,6 @@ from webnotes.utils import cstr, flt from webnotes.model.doc import addchild, make_autoname from webnotes import msgprint, _ -sql = webnotes.conn.sql class DocType: def __init__(self,doc,doclist=[]): @@ -20,7 +19,7 @@ class DocType: def get_employee_details(self): ret = {} - det = sql("""select employee_name, branch, designation, department, grade + det = webnotes.conn.sql("""select employee_name, branch, designation, department, grade from `tabEmployee` where name = %s""", self.doc.employee) if det: ret = { @@ -34,7 +33,7 @@ class DocType: return ret def get_ss_values(self,employee): - basic_info = sql("""select bank_name, bank_ac_no, esic_card_no, pf_number + basic_info = webnotes.conn.sql("""select bank_name, bank_ac_no, esic_card_no, pf_number from `tabEmployee` where name =%s""", employee) ret = {'bank_name': basic_info and basic_info[0][0] or '', 'bank_ac_no': basic_info and basic_info[0][1] or '', @@ -43,7 +42,7 @@ class DocType: return ret def make_table(self, doct_name, tab_fname, tab_name): - list1 = sql("select name from `tab%s` where docstatus != 2" % doct_name) + list1 = webnotes.conn.sql("select name from `tab%s` where docstatus != 2" % doct_name) for li in list1: child = addchild(self.doc, tab_fname, tab_name, self.doclist) if(tab_fname == 'earning_details'): @@ -58,7 +57,7 @@ class DocType: self.make_table('Deduction Type','deduction_details', 'Salary Structure Deduction') def check_existing(self): - ret = sql("""select name from `tabSalary Structure` where is_active = 'Yes' + ret = webnotes.conn.sql("""select name from `tabSalary Structure` where is_active = 'Yes' and employee = %s and name!=%s""", (self.doc.employee,self.doc.name)) if ret and self.doc.is_active=='Yes': msgprint(_("""Another Salary Structure '%s' is active for employee '%s'. diff --git a/hr/doctype/upload_attendance/upload_attendance.js b/hr/doctype/upload_attendance/upload_attendance.js index 71e266928db..06a78c6735c 100644 --- a/hr/doctype/upload_attendance/upload_attendance.js +++ b/hr/doctype/upload_attendance/upload_attendance.js @@ -17,7 +17,7 @@ erpnext.hr.AttendanceControlPanel = wn.ui.form.Controller.extend({ get_template:function() { if(!this.frm.doc.att_fr_date || !this.frm.doc.att_to_date) { - msgprint("Attendance From Date and Attendance To Date is mandatory"); + msgprint(wn._("Attendance From Date and Attendance To Date is mandatory")); return; } window.location.href = repl(wn.request.url + @@ -56,10 +56,10 @@ erpnext.hr.AttendanceControlPanel = wn.ui.form.Controller.extend({ return v; }); - r.messages = ["

Import Failed!

"] + r.messages = ["

"+wn._("Import Failed!")+"

"] .concat(r.messages) } else { - r.messages = ["

Import Successful!

"]. + r.messages = ["

"+wn._("Import Successful!")+"

"]. concat(r.message.messages) } diff --git a/hr/doctype/upload_attendance/upload_attendance.py b/hr/doctype/upload_attendance/upload_attendance.py index c1344b90e41..56c8eedcc75 100644 --- a/hr/doctype/upload_attendance/upload_attendance.py +++ b/hr/doctype/upload_attendance/upload_attendance.py @@ -9,7 +9,8 @@ from webnotes.utils import cstr, add_days, date_diff from webnotes import msgprint, _ from webnotes.utils.datautils import UnicodeWriter -doclist = None +# doclist = None +doclist = webnotes.local('uploadattendance_doclist') class DocType(): def __init__(self, doc, doclist=[]): @@ -21,9 +22,8 @@ def get_template(): if not webnotes.has_permission("Attendance", "create"): raise webnotes.PermissionError - args = webnotes.form_dict - global doclist - doclist = webnotes.model.doctype.get("Attendance") + args = webnotes.local.form_dict + webnotes.local.uploadattendance_doclist = webnotes.model.doctype.get("Attendance") w = UnicodeWriter() w = add_header(w) @@ -144,4 +144,4 @@ def upload(): webnotes.conn.rollback() else: webnotes.conn.commit() - return {"messages": ret, "error": error} \ No newline at end of file + return {"messages": ret, "error": error} diff --git a/hr/report/employee_birthday/employee_birthday.js b/hr/report/employee_birthday/employee_birthday.js index 3fd849266f1..8fce812abf5 100644 --- a/hr/report/employee_birthday/employee_birthday.js +++ b/hr/report/employee_birthday/employee_birthday.js @@ -5,7 +5,7 @@ wn.query_reports["Employee Birthday"] = { "filters": [ { "fieldname":"month", - "label": "Month", + "label": wn._("Month"), "fieldtype": "Select", "options": "Jan\nFeb\nMar\nApr\nMay\nJun\nJul\nAug\nSep\nOct\nNov\nDec", "default": ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", @@ -13,7 +13,7 @@ wn.query_reports["Employee Birthday"] = { }, { "fieldname":"company", - "label": "Company", + "label": wn._("Company"), "fieldtype": "Link", "options": "Company", "default": wn.defaults.get_user_default("company") diff --git a/hr/report/employee_leave_balance/employee_leave_balance.js b/hr/report/employee_leave_balance/employee_leave_balance.js index 1bf252d2a7a..7af65b641f0 100644 --- a/hr/report/employee_leave_balance/employee_leave_balance.js +++ b/hr/report/employee_leave_balance/employee_leave_balance.js @@ -5,14 +5,14 @@ wn.query_reports["Employee Leave Balance"] = { "filters": [ { "fieldname":"fiscal_year", - "label": "Fiscal Year", + "label": wn._("Fiscal Year"), "fieldtype": "Link", "options": "Fiscal Year", "default": wn.defaults.get_user_default("fiscal_year") }, { "fieldname":"company", - "label": "Company", + "label": wn._("Company"), "fieldtype": "Link", "options": "Company", "default": wn.defaults.get_user_default("company") diff --git a/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.js b/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.js index 678e7af713b..fc14b6dd8ee 100644 --- a/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.js +++ b/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.js @@ -5,7 +5,7 @@ wn.query_reports["Monthly Attendance Sheet"] = { "filters": [ { "fieldname":"month", - "label": "Month", + "label": wn._("Month"), "fieldtype": "Select", "options": "Jan\nFeb\nMar\nApr\nMay\nJun\nJul\nAug\nSep\nOct\nNov\nDec", "default": ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", @@ -13,20 +13,20 @@ wn.query_reports["Monthly Attendance Sheet"] = { }, { "fieldname":"fiscal_year", - "label": "Fiscal Year", + "label": wn._("Fiscal Year"), "fieldtype": "Link", "options": "Fiscal Year", "default": sys_defaults.fiscal_year, }, { "fieldname":"employee", - "label": "Employee", + "label": wn._("Employee"), "fieldtype": "Link", "options": "Employee" }, { "fieldname":"company", - "label": "Company", + "label": wn._("Company"), "fieldtype": "Link", "options": "Company", "default": wn.defaults.get_default("company") diff --git a/hr/report/monthly_salary_register/monthly_salary_register.js b/hr/report/monthly_salary_register/monthly_salary_register.js index eb33d08cd0f..45d7ff9bad9 100644 --- a/hr/report/monthly_salary_register/monthly_salary_register.js +++ b/hr/report/monthly_salary_register/monthly_salary_register.js @@ -5,7 +5,7 @@ wn.query_reports["Monthly Salary Register"] = { "filters": [ { "fieldname":"month", - "label": "Month", + "label": wn._("Month"), "fieldtype": "Select", "options": "Jan\nFeb\nMar\nApr\nMay\nJun\nJul\nAug\nSep\nOct\nNov\nDec", "default": ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", @@ -13,20 +13,20 @@ wn.query_reports["Monthly Salary Register"] = { }, { "fieldname":"fiscal_year", - "label": "Fiscal Year", + "label": wn._("Fiscal Year"), "fieldtype": "Link", "options": "Fiscal Year", "default": sys_defaults.fiscal_year, }, { "fieldname":"employee", - "label": "Employee", + "label": wn._("Employee"), "fieldtype": "Link", "options": "Employee" }, { "fieldname":"company", - "label": "Company", + "label": wn._("Company"), "fieldtype": "Link", "options": "Company", "default": wn.defaults.get_default("company") diff --git a/install_erpnext.py b/install_erpnext.py index 7f3b8c3b655..139458c01be 100644 --- a/install_erpnext.py +++ b/install_erpnext.py @@ -5,15 +5,36 @@ from __future__ import unicode_literals import os, sys -apache_user = None is_redhat = is_debian = None root_password = None +requirements = [ + "MySQL-python", + "pytz==2013b", + "python-dateutil", + "jinja2", + "markdown2", + "termcolor", + "python-memcached", + "requests", + "chardet", + "dropbox", + "google-api-python-client ", + "pygeoip" +] + def install(install_path=None): + if os.getuid() != 0: + raise Exception, "Please run this script as root" + install_pre_requisites() + + if os.environ.get('SUDO_UID'): + os.setuid(int(os.environ.get('SUDO_UID'))) if not install_path: install_path = os.getcwd() + setup_folders(install_path) install_erpnext(install_path) post_install(install_path) @@ -44,7 +65,7 @@ def validate_install(): # check python version python_version = sys.version.split(" ")[0] print "Python Version =", python_version - if not (python_version and int(python_version.split(".")[0])==2 and int(python_version.split(".")[1]) >= 6): + if not (python_version and int(python_version.split(".")[0])==2 and int(python_version.split(".")[1]) >= 7): raise Exception, "Hey! ERPNext needs Python version to be 2.6+" # check distribution @@ -59,7 +80,7 @@ def validate_install(): return is_redhat, is_debian def install_using_yum(): - packages = "python python-setuptools gcc python-devel MySQL-python httpd git memcached ntp vim-enhanced screen" + packages = "python python-setuptools gcc python-devel MySQL-python git memcached ntp vim-enhanced screen" print "-"*80 print "Installing Packages: (This may take some time)" @@ -92,9 +113,6 @@ def install_using_yum(): def update_config_for_redhat(): import re - global apache_user - apache_user = "apache" - # update memcache user with open("/etc/sysconfig/memcached", "r") as original: memcached_conf = original.read() @@ -108,7 +126,7 @@ def update_config_for_redhat(): def install_using_apt(): exec_in_shell("apt-get update") - packages = "python python-setuptools python-dev build-essential python-pip python-mysqldb apache2 git memcached ntp vim screen htop" + packages = "python python-setuptools python-dev build-essential python-pip python-mysqldb git memcached ntp vim screen htop" print "-"*80 print "Installing Packages: (This may take some time)" print packages @@ -123,8 +141,6 @@ def install_using_apt(): update_config_for_debian() def update_config_for_debian(): - global apache_user - apache_user = "www-data" # update memcache user with open("/etc/memcached.conf", "r") as original: @@ -132,14 +148,10 @@ def update_config_for_debian(): with open("/etc/memcached.conf", "w") as modified: modified.write(memcached_conf.replace("-u memcache", "-u %s" % apache_user)) - exec_in_shell("a2enmod rewrite") - - for service in ("mysql", "apache2", "memcached", "ntpd"): + for service in ("mysql", "memcached", "ntpd"): exec_in_shell("service %s restart" % service) def install_python_modules(): - python_modules = "pytz python-dateutil jinja2 markdown2 termcolor python-memcached requests chardet dropbox google-api-python-client pygeoip" - print "-"*80 print "Installing Python Modules: (This may take some time)" print python_modules @@ -151,7 +163,7 @@ def install_python_modules(): exec_in_shell("pip install --upgrade pip") exec_in_shell("pip install --upgrade setuptools") exec_in_shell("pip install --upgrade virtualenv") - exec_in_shell("pip install -q %s" % python_modules) + exec_in_shell("pip install -r {}".format(' '.join(requirements))) def install_erpnext(install_path): print @@ -169,19 +181,15 @@ def install_erpnext(install_path): if not db_name: raise Exception, "Sorry! You must specify ERPNext Database Name" - # install folders and conf - setup_folders(install_path) - setup_conf(install_path, db_name) - # setup paths - sys.path.extend([".", "lib", "app"]) + sys.path = [".", "lib", "app"] + sys.path + import wnf # install database, run patches, update schema - setup_db(install_path, root_password, db_name) - - setup_cron(install_path) - - setup_apache_conf(install_path) + # setup_db(install_path, root_password, db_name) + wnf.install(db_name, root_password=root_password) + + # setup_cron(install_path) def get_root_password(): # ask for root mysql password @@ -200,7 +208,7 @@ def setup_folders(install_path): app = os.path.join(install_path, "app") if not os.path.exists(app): print "Cloning erpnext" - exec_in_shell("cd %s && git clone https://github.com/webnotes/erpnext.git app" % install_path) + exec_in_shell("cd %s && git clone https://github.com/webnotes/erpnext.git app && cd app && git checkout wsgi" % install_path) exec_in_shell("cd app && git config core.filemode false") if not os.path.exists(app): raise Exception, "Couldn't clone erpnext repository" @@ -208,7 +216,7 @@ def setup_folders(install_path): lib = os.path.join(install_path, "lib") if not os.path.exists(lib): print "Cloning wnframework" - exec_in_shell("cd %s && git clone https://github.com/webnotes/wnframework.git lib" % install_path) + exec_in_shell("cd %s && git clone https://github.com/webnotes/wnframework.git lib && cd lib && git checkout wsgi" % install_path) exec_in_shell("cd lib && git config core.filemode false") if not os.path.exists(lib): raise Exception, "Couldn't clone wnframework repository" @@ -238,86 +246,13 @@ def setup_conf(install_path, db_name): return db_password -def setup_db(install_path, root_password, db_name): - from webnotes.install_lib.install import Installer - inst = Installer("root", root_password) - inst.import_from_db(db_name, verbose=1) - - # run patches and sync - exec_in_shell("./lib/wnf.py --patch_sync_build") - -def setup_cron(install_path): - erpnext_cron_entries = [ - "*/3 * * * * cd %s && python lib/wnf.py --run_scheduler >> /var/log/erpnext-sch.log 2>&1" % install_path, - "0 */6 * * * cd %s && python lib/wnf.py --backup >> /var/log/erpnext-backup.log 2>&1" % install_path - ] - - for row in erpnext_cron_entries: - try: - existing_cron = exec_in_shell("crontab -l") - if row not in existing_cron: - exec_in_shell('{ crontab -l; echo "%s"; } | crontab' % row) - except: - exec_in_shell('echo "%s" | crontab' % row) - -def setup_apache_conf(install_path): - apache_conf_content = """Listen 8080 -NameVirtualHost *:8080 - - ServerName localhost - DocumentRoot %s/public/ - - AddHandler cgi-script .cgi .xml .py - AddType application/vnd.ms-fontobject .eot - AddType font/ttf .ttf - AddType font/otf .otf - AddType application/x-font-woff .woff - - - # directory specific options - Options -Indexes +FollowSymLinks +ExecCGI - - # directory's index file - DirectoryIndex web.py - - AllowOverride all - Order Allow,Deny - Allow from all - - # rewrite rule - RewriteEngine on - RewriteCond %%{REQUEST_FILENAME} !-f - RewriteCond %%{REQUEST_FILENAME} !-d - RewriteCond %%{REQUEST_FILENAME} !-l - RewriteRule ^([^/]+)$ /web.py?page=$1 [QSA,L] - -""" % (install_path, install_path) - - new_apache_conf_path = os.path.join(install_path, os.path.basename(install_path)+".conf") - with open(new_apache_conf_path, "w") as apache_conf_file: - apache_conf_file.write(apache_conf_content) - def post_install(install_path): - global apache_user - exec_in_shell("chown -R %s %s" % (apache_user, install_path)) - - apache_conf_filename = os.path.basename(install_path)+".conf" - if is_redhat: - os.symlink(os.path.join(install_path, apache_conf_filename), - os.path.join("/etc/httpd/conf.d", apache_conf_filename)) - exec_in_shell("service httpd restart") - - elif is_debian: - os.symlink(os.path.join(install_path, apache_conf_filename), - os.path.join("/etc/apache2/sites-enabled", apache_conf_filename)) - exec_in_shell("service apache2 restart") - print print "-"*80 - print "To change url domain, run: lib/wnf.py --domain example.com" + print "To start the development server, run lib/wnf.py --serve" print "-"*80 print "Installation complete" - print "Open your browser and go to http://localhost:8080" + print "Open your browser and go to http://localhost:8000" print "Login using username = Administrator and password = admin" def exec_in_shell(cmd): diff --git a/manufacturing/doctype/bom/bom.js b/manufacturing/doctype/bom/bom.js index badb108048a..020325867a1 100644 --- a/manufacturing/doctype/bom/bom.js +++ b/manufacturing/doctype/bom/bom.js @@ -6,7 +6,7 @@ cur_frm.cscript.refresh = function(doc,dt,dn){ cur_frm.toggle_enable("item", doc.__islocal); if (!doc.__islocal && doc.docstatus<2) { - cur_frm.add_custom_button("Update Cost", cur_frm.cscript.update_cost); + cur_frm.add_custom_button(wn._("Update Cost"), cur_frm.cscript.update_cost); } cur_frm.cscript.with_operations(doc); @@ -123,7 +123,7 @@ cur_frm.cscript.qty = function(doc, cdt, cdn) { cur_frm.cscript.rate = function(doc, cdt, cdn) { var d = locals[cdt][cdn]; if (d.bom_no) { - msgprint("You can not change rate if BOM mentioned agianst any item"); + msgprint(wn._("You can not change rate if BOM mentioned agianst any item")); get_bom_material_detail(doc, cdt, cdn); } else { calculate_rm_cost(doc); diff --git a/manufacturing/doctype/bom/bom.py b/manufacturing/doctype/bom/bom.py index c3dd7244fe4..785851d17a3 100644 --- a/manufacturing/doctype/bom/bom.py +++ b/manufacturing/doctype/bom/bom.py @@ -9,7 +9,6 @@ from webnotes.model.bean import getlist from webnotes.model.code import get_obj from webnotes import msgprint, _ -sql = webnotes.conn.sql class DocType: @@ -18,7 +17,7 @@ class DocType: self.doclist = doclist def autoname(self): - last_name = sql("""select max(name) from `tabBOM` + last_name = webnotes.conn.sql("""select max(name) from `tabBOM` where name like "BOM/%s/%%" """ % cstr(self.doc.item).replace('"', '\\"')) if last_name: idx = cint(cstr(last_name[0][0]).split('/')[-1].split('-')[0]) + 1 @@ -144,7 +143,7 @@ class DocType: webnotes.bean(self.doclist).update_after_submit() def get_bom_unitcost(self, bom_no): - bom = sql("""select name, total_cost/quantity as unit_cost from `tabBOM` + bom = webnotes.conn.sql("""select name, total_cost/quantity as unit_cost from `tabBOM` where is_active = 1 and name = %s""", bom_no, as_dict=1) return bom and bom[0]['unit_cost'] or 0 @@ -156,7 +155,7 @@ class DocType: from stock.utils import get_incoming_rate dt = self.doc.costing_date or nowdate() time = self.doc.costing_date == nowdate() and now().split()[1] or '23:59' - warehouse = sql("select warehouse from `tabBin` where item_code = %s", args['item_code']) + warehouse = webnotes.conn.sql("select warehouse from `tabBin` where item_code = %s", args['item_code']) rate = [] for wh in warehouse: r = get_incoming_rate({ @@ -184,7 +183,7 @@ class DocType: if not self.doc.is_active: webnotes.conn.set(self.doc, "is_default", 0) - sql("update `tabItem` set default_bom = null where name = %s and default_bom = %s", + webnotes.conn.sql("update `tabItem` set default_bom = null where name = %s and default_bom = %s", (self.doc.item, self.doc.name)) def clear_operations(self): @@ -250,7 +249,7 @@ class DocType: def validate_bom_no(self, item, bom_no, idx): """Validate BOM No of sub-contracted items""" - bom = sql("""select name from `tabBOM` where name = %s and item = %s + bom = webnotes.conn.sql("""select name from `tabBOM` where name = %s and item = %s and is_active=1 and docstatus=1""", (bom_no, item), as_dict =1) if not bom: @@ -272,7 +271,7 @@ class DocType: for d in check_list: bom_list, count = [self.doc.name], 0 while (len(bom_list) > count ): - boms = sql(" select %s from `tabBOM Item` where %s = '%s' " % + boms = webnotes.conn.sql(" select %s from `tabBOM Item` where %s = '%s' " % (d[0], d[1], cstr(bom_list[count]))) count = count + 1 for b in boms: @@ -333,6 +332,7 @@ class DocType: d.amount = flt(d.rate) * flt(d.qty) d.qty_consumed_per_unit = flt(d.qty) / flt(self.doc.quantity) total_rm_cost += d.amount + self.doc.raw_material_cost = total_rm_cost def update_exploded_items(self): @@ -364,7 +364,7 @@ class DocType: def get_child_exploded_items(self, bom_no, qty): """ Add all items from Flat BOM of child BOM""" - child_fb_items = sql("""select item_code, description, stock_uom, qty, rate, + child_fb_items = webnotes.conn.sql("""select item_code, description, stock_uom, qty, rate, qty_consumed_per_unit from `tabBOM Explosion Item` where parent = %s and docstatus = 1""", bom_no, as_dict = 1) @@ -390,12 +390,12 @@ class DocType: ch.save(1) def get_parent_bom_list(self, bom_no): - p_bom = sql("select parent from `tabBOM Item` where bom_no = '%s'" % bom_no) + p_bom = webnotes.conn.sql("select parent from `tabBOM Item` where bom_no = '%s'" % bom_no) return p_bom and [i[0] for i in p_bom] or [] def validate_bom_links(self): if not self.doc.is_active: - act_pbom = sql("""select distinct bom_item.parent from `tabBOM Item` bom_item + act_pbom = webnotes.conn.sql("""select distinct bom_item.parent from `tabBOM Item` bom_item where bom_item.bom_no = %s and bom_item.docstatus = 1 and exists (select * from `tabBOM` where name = bom_item.parent and docstatus = 1 and is_active = 1)""", self.doc.name) @@ -403,4 +403,55 @@ class DocType: if act_pbom and act_pbom[0][0]: action = self.doc.docstatus < 2 and _("deactivate") or _("cancel") msgprint(_("Cannot ") + action + _(": It is linked to other active BOM(s)"), - raise_exception=1) \ No newline at end of file + raise_exception=1) + +def get_bom_items_as_dict(bom, qty=1, fetch_exploded=1): + item_dict = {} + + query = """select + bom_item.item_code, + ifnull(sum(bom_item.qty_consumed_per_unit),0) * %(qty)s as qty, + item.description, + item.stock_uom, + item.default_warehouse, + item.purchase_account as expense_account, + item.cost_center + from + `tab%(table)s` bom_item, `tabItem` item + where + bom_item.docstatus < 2 + and bom_item.parent = "%(bom)s" + and item.name = bom_item.item_code + %(conditions)s + group by item_code, stock_uom""" + + if fetch_exploded: + items = webnotes.conn.sql(query % { + "qty": qty, + "table": "BOM Explosion Item", + "bom": bom, + "conditions": """and ifnull(item.is_pro_applicable, 'No') = 'No' + and ifnull(item.is_sub_contracted_item, 'No') = 'No' """ + }, as_dict=True) + else: + items = webnotes.conn.sql(query % { + "qty": qty, + "table": "BOM Item", + "bom": bom, + "conditions": "" + }, as_dict=True) + + # make unique + for item in items: + if item_dict.has_key(item.item_code): + item_dict[item.item_code]["qty"] += flt(item.qty) + else: + item_dict[item.item_code] = item + + return item_dict + +@webnotes.whitelist() +def get_bom_items(bom, qty=1, fetch_exploded=1): + items = get_bom_items_as_dict(bom, qty, fetch_exploded).values() + items.sort(lambda a, b: a.item_code > b.item_code and 1 or -1) + return items diff --git a/manufacturing/doctype/bom/test_bom.py b/manufacturing/doctype/bom/test_bom.py index d0b394a1f89..2f4424eb978 100644 --- a/manufacturing/doctype/bom/test_bom.py +++ b/manufacturing/doctype/bom/test_bom.py @@ -7,6 +7,35 @@ import unittest import webnotes test_records = [ + [ + { + "doctype": "BOM", + "item": "_Test Item Home Desktop Manufactured", + "quantity": 1.0, + "is_active": 1, + "is_default": 1, + "docstatus": 1 + }, + { + "doctype": "BOM Item", + "item_code": "_Test Serialized Item With Series", + "parentfield": "bom_materials", + "qty": 1.0, + "rate": 5000.0, + "amount": 5000.0, + "stock_uom": "_Test UOM" + }, + { + "doctype": "BOM Item", + "item_code": "_Test Item 2", + "parentfield": "bom_materials", + "qty": 2.0, + "rate": 1000.0, + "amount": 2000.0, + "stock_uom": "_Test UOM" + } + ], + [ { "doctype": "BOM", @@ -34,5 +63,57 @@ test_records = [ "amount": 2000.0, "stock_uom": "_Test UOM" } - ] -] \ No newline at end of file + ], + + [ + { + "doctype": "BOM", + "item": "_Test FG Item 2", + "quantity": 1.0, + "is_active": 1, + "is_default": 1, + "docstatus": 1 + }, + { + "doctype": "BOM Item", + "item_code": "_Test Item", + "parentfield": "bom_materials", + "qty": 1.0, + "rate": 5000.0, + "amount": 5000.0, + "stock_uom": "_Test UOM" + }, + { + "doctype": "BOM Item", + "item_code": "_Test Item Home Desktop Manufactured", + "bom_no": "BOM/_Test Item Home Desktop Manufactured/001", + "parentfield": "bom_materials", + "qty": 2.0, + "rate": 1000.0, + "amount": 2000.0, + "stock_uom": "_Test UOM" + } + ], +] + +class TestBOM(unittest.TestCase): + def test_get_items(self): + from manufacturing.doctype.bom.bom import get_bom_items_as_dict + items_dict = get_bom_items_as_dict(bom="BOM/_Test FG Item 2/001", qty=1, fetch_exploded=0) + self.assertTrue(test_records[2][1]["item_code"] in items_dict) + self.assertTrue(test_records[2][2]["item_code"] in items_dict) + self.assertEquals(len(items_dict.values()), 2) + + def test_get_items_exploded(self): + from manufacturing.doctype.bom.bom import get_bom_items_as_dict + items_dict = get_bom_items_as_dict(bom="BOM/_Test FG Item 2/001", qty=1, fetch_exploded=1) + self.assertTrue(test_records[2][1]["item_code"] in items_dict) + self.assertFalse(test_records[2][2]["item_code"] in items_dict) + self.assertTrue(test_records[0][1]["item_code"] in items_dict) + self.assertTrue(test_records[0][2]["item_code"] in items_dict) + self.assertEquals(len(items_dict.values()), 3) + + def test_get_items_list(self): + from manufacturing.doctype.bom.bom import get_bom_items + self.assertEquals(len(get_bom_items(bom="BOM/_Test FG Item 2/001", qty=1, fetch_exploded=1)), 3) + diff --git a/manufacturing/doctype/production_order/production_order.js b/manufacturing/doctype/production_order/production_order.js index f680776a565..7c4325dc37d 100644 --- a/manufacturing/doctype/production_order/production_order.js +++ b/manufacturing/doctype/production_order/production_order.js @@ -13,7 +13,7 @@ cur_frm.cscript.refresh = function(doc, dt, dn) { cfn_set_fields(doc, dt, dn); if(doc.docstatus===0 && !doc.__islocal) { - cur_frm.set_intro("Submit this Production Order for further processing."); + cur_frm.set_intro(wn._("Submit this Production Order for further processing.")); } else if(doc.docstatus===1) { var percent = flt(doc.produced_qty) / flt(doc.qty) * 100; cur_frm.dashboard.add_progress(cint(percent) + "% " + wn._("Complete"), percent); @@ -27,13 +27,13 @@ cur_frm.cscript.refresh = function(doc, dt, dn) { var cfn_set_fields = function(doc, dt, dn) { if (doc.docstatus == 1) { if (doc.status != 'Stopped' && doc.status != 'Completed') - cur_frm.add_custom_button('Stop!', cur_frm.cscript['Stop Production Order']); + cur_frm.add_custom_button(wn._('Stop!'), cur_frm.cscript['Stop Production Order']); else if (doc.status == 'Stopped') - cur_frm.add_custom_button('Unstop', cur_frm.cscript['Unstop Production Order']); + cur_frm.add_custom_button(wn._('Unstop'), cur_frm.cscript['Unstop Production Order']); if (doc.status == 'Submitted' || doc.status == 'Material Transferred' || doc.status == 'In Process'){ - cur_frm.add_custom_button('Transfer Raw Materials', cur_frm.cscript['Transfer Raw Materials']); - cur_frm.add_custom_button('Update Finished Goods', cur_frm.cscript['Update Finished Goods']); + cur_frm.add_custom_button(wn._('Transfer Raw Materials'), cur_frm.cscript['Transfer Raw Materials']); + cur_frm.add_custom_button(wn._('Update Finished Goods'), cur_frm.cscript['Update Finished Goods']); } } } @@ -47,7 +47,7 @@ cur_frm.cscript.production_item = function(doc) { cur_frm.cscript['Stop Production Order'] = function() { var doc = cur_frm.doc; - var check = confirm("Do you really want to stop production order: " + doc.name); + var check = confirm(wn._("Do you really want to stop production order: " + doc.name)); if (check) { return $c_obj(make_doclist(doc.doctype, doc.name), 'stop_unstop', 'Stopped', function(r, rt) {cur_frm.refresh();}); } @@ -55,7 +55,7 @@ cur_frm.cscript['Stop Production Order'] = function() { cur_frm.cscript['Unstop Production Order'] = function() { var doc = cur_frm.doc; - var check = confirm("Do really want to unstop production order: " + doc.name); + var check = confirm(wn._("Do really want to unstop production order: " + doc.name)); if (check) return $c_obj(make_doclist(doc.doctype, doc.name), 'stop_unstop', 'Unstopped', function(r, rt) {cur_frm.refresh();}); } @@ -105,5 +105,5 @@ cur_frm.set_query("bom_no", function(doc) { query:"controllers.queries.bom", filters: {item: cstr(doc.production_item)} } - } else msgprint(" Please enter Production Item first"); + } else msgprint(wn._("Please enter Production Item first")); }); \ No newline at end of file diff --git a/manufacturing/doctype/production_order/production_order.py b/manufacturing/doctype/production_order/production_order.py index b29b0f1e721..9d4ff32e2f7 100644 --- a/manufacturing/doctype/production_order/production_order.py +++ b/manufacturing/doctype/production_order/production_order.py @@ -8,7 +8,6 @@ from webnotes.utils import cstr, flt, nowdate from webnotes.model.code import get_obj from webnotes import msgprint, _ -sql = webnotes.conn.sql class OverProductionError(webnotes.ValidationError): pass @@ -34,7 +33,7 @@ class DocType: def validate_bom_no(self): if self.doc.bom_no: - bom = sql("""select name from `tabBOM` where name=%s and docstatus=1 + bom = webnotes.conn.sql("""select name from `tabBOM` where name=%s and docstatus=1 and is_active=1 and item=%s""" , (self.doc.bom_no, self.doc.production_item), as_dict =1) if not bom: @@ -70,7 +69,7 @@ class DocType: where parent = %s and item_code = %s""", (self.doc.sales_order, self.doc.production_item))[0][0] # get qty from Packing Item table - dnpi_qty = webnotes.conn.sql("""select sum(qty) from `tabDelivery Note Packing Item` + dnpi_qty = webnotes.conn.sql("""select sum(qty) from `tabPacked Item` where parent = %s and parenttype = 'Sales Order' and item_code = %s""", (self.doc.sales_order, self.doc.production_item))[0][0] # total qty in SO @@ -112,7 +111,7 @@ class DocType: def on_cancel(self): # Check whether any stock entry exists against this Production Order - stock_entry = sql("""select name from `tabStock Entry` + stock_entry = webnotes.conn.sql("""select name from `tabStock Entry` where production_order = %s and docstatus = 1""", self.doc.name) if stock_entry: msgprint("""Submitted Stock Entry %s exists against this production order. @@ -168,4 +167,4 @@ def make_stock_entry(production_order_id, purpose): stock_entry.doc.to_warehouse = production_order.doc.fg_warehouse stock_entry.run_method("get_items") - return [d.fields for d in stock_entry.doclist] \ No newline at end of file + return [d.fields for d in stock_entry.doclist] diff --git a/manufacturing/doctype/production_order/production_order.txt b/manufacturing/doctype/production_order/production_order.txt index 782c99f0363..81821f6c45c 100644 --- a/manufacturing/doctype/production_order/production_order.txt +++ b/manufacturing/doctype/production_order/production_order.txt @@ -2,11 +2,12 @@ { "creation": "2013-01-10 16:34:16", "docstatus": 0, - "modified": "2013-08-08 14:22:12", + "modified": "2013-10-02 14:25:03", "modified_by": "Administrator", "owner": "Administrator" }, { + "allow_import": 1, "autoname": "naming_series:", "doctype": "DocType", "icon": "icon-cogs", diff --git a/manufacturing/doctype/production_planning_tool/production_planning_tool.js b/manufacturing/doctype/production_planning_tool/production_planning_tool.js index daa701352b2..22bf6caef49 100644 --- a/manufacturing/doctype/production_planning_tool/production_planning_tool.js +++ b/manufacturing/doctype/production_planning_tool/production_planning_tool.js @@ -44,7 +44,7 @@ cur_frm.fields_dict['pp_details'].grid.get_field('bom_no').get_query = function( query:"controllers.queries.bom", filters:{'item': cstr(d.item_code)} } - } else msgprint(" Please enter Item first"); + } else msgprint(wn._("Please enter Item first")); } cur_frm.fields_dict.customer.get_query = function(doc,cdt,cdn) { diff --git a/manufacturing/doctype/production_planning_tool/production_planning_tool.py b/manufacturing/doctype/production_planning_tool/production_planning_tool.py index 766f2ac233c..277e53a7bf9 100644 --- a/manufacturing/doctype/production_planning_tool/production_planning_tool.py +++ b/manufacturing/doctype/production_planning_tool/production_planning_tool.py @@ -9,7 +9,6 @@ from webnotes.model.bean import getlist from webnotes.model.code import get_obj from webnotes import msgprint, _ -sql = webnotes.conn.sql class DocType: def __init__(self, doc, doclist=[]): @@ -19,7 +18,7 @@ class DocType: def get_so_details(self, so): """Pull other details from so""" - so = sql("""select transaction_date, customer, grand_total + so = webnotes.conn.sql("""select transaction_date, customer, grand_total from `tabSales Order` where name = %s""", so, as_dict = 1) ret = { 'sales_order_date': so and so[0]['transaction_date'] or '', @@ -31,7 +30,7 @@ class DocType: def get_item_details(self, item_code): """ Pull other item details from item master""" - item = sql("""select description, stock_uom, default_bom + item = webnotes.conn.sql("""select description, stock_uom, default_bom from `tabItem` where name = %s""", item_code, as_dict =1) ret = { 'description' : item and item[0]['description'], @@ -63,7 +62,7 @@ class DocType: if self.doc.fg_item: item_filter += ' and item.name = "' + self.doc.fg_item + '"' - open_so = sql(""" + open_so = webnotes.conn.sql(""" select distinct so.name, so.transaction_date, so.customer, so.grand_total from `tabSales Order` so, `tabSales Order Item` so_item where so_item.parent = so.name @@ -73,7 +72,7 @@ class DocType: and (exists (select name from `tabItem` item where item.name=so_item.item_code and (ifnull(item.is_pro_applicable, 'No') = 'Yes' or ifnull(item.is_sub_contracted_item, 'No') = 'Yes') %s) - or exists (select name from `tabDelivery Note Packing Item` dnpi + or exists (select name from `tabPacked Item` dnpi where dnpi.parent = so.name and dnpi.parent_item = so_item.item_code and exists (select name from `tabItem` item where item.name=dnpi.item_code and (ifnull(item.is_pro_applicable, 'No') = 'Yes' @@ -108,7 +107,7 @@ class DocType: msgprint("Please enter sales order in the above table") return [] - items = sql("""select distinct parent, item_code, reserved_warehouse, + items = webnotes.conn.sql("""select distinct parent, item_code, reserved_warehouse, (qty - ifnull(delivered_qty, 0)) as pending_qty from `tabSales Order Item` so_item where parent in (%s) and docstatus = 1 and ifnull(qty, 0) > ifnull(delivered_qty, 0) @@ -117,10 +116,10 @@ class DocType: or ifnull(item.is_sub_contracted_item, 'No') = 'Yes'))""" % \ (", ".join(["%s"] * len(so_list))), tuple(so_list), as_dict=1) - dnpi_items = sql("""select distinct dnpi.parent, dnpi.item_code, dnpi.warehouse as reserved_warhouse, + dnpi_items = webnotes.conn.sql("""select distinct dnpi.parent, dnpi.item_code, dnpi.warehouse as reserved_warhouse, (((so_item.qty - ifnull(so_item.delivered_qty, 0)) * dnpi.qty) / so_item.qty) as pending_qty - from `tabSales Order Item` so_item, `tabDelivery Note Packing Item` dnpi + from `tabSales Order Item` so_item, `tabPacked Item` dnpi where so_item.parent = dnpi.parent and so_item.docstatus = 1 and dnpi.parent_item = so_item.item_code and so_item.parent in (%s) and ifnull(so_item.qty, 0) > ifnull(so_item.delivered_qty, 0) @@ -136,7 +135,7 @@ class DocType: self.clear_item_table() for p in items: - item_details = sql("""select description, stock_uom, default_bom + item_details = webnotes.conn.sql("""select description, stock_uom, default_bom from tabItem where name=%s""", p['item_code']) pi = addchild(self.doc, 'pp_details', 'Production Plan Item', self.doclist) pi.sales_order = p['parent'] @@ -162,7 +161,7 @@ class DocType: msgprint("Please enter bom no for item: %s at row no: %s" % (d.item_code, d.idx), raise_exception=1) else: - bom = sql("""select name from `tabBOM` where name = %s and item = %s + bom = webnotes.conn.sql("""select name from `tabBOM` where name = %s and item = %s and docstatus = 1 and is_active = 1""", (d.bom_no, d.item_code), as_dict = 1) if not bom: @@ -216,14 +215,14 @@ class DocType: pro = webnotes.new_bean("Production Order") pro.doc.fields.update(items[key]) - webnotes.mute_messages = True + webnotes.flags.mute_messages = True try: pro.insert() pro_list.append(pro.doc.name) except OverProductionError, e: pass - webnotes.mute_messages = False + webnotes.flags.mute_messages = False return pro_list @@ -243,7 +242,7 @@ class DocType: for bom in bom_dict: if self.doc.use_multi_level_bom: # get all raw materials with sub assembly childs - fl_bom_items = sql("""select fb.item_code, + fl_bom_items = webnotes.conn.sql("""select fb.item_code, ifnull(sum(fb.qty_consumed_per_unit), 0)*%s as qty, fb.description, fb.stock_uom, it.min_order_qty from `tabBOM Explosion Item` fb,`tabItem` it @@ -254,7 +253,7 @@ class DocType: else: # Get all raw materials considering SA items as raw materials, # so no childs of SA items - fl_bom_items = sql("""select bom_item.item_code, + fl_bom_items = webnotes.conn.sql("""select bom_item.item_code, ifnull(sum(bom_item.qty_consumed_per_unit), 0) * %s, bom_item.description, bom_item.stock_uom, item.min_order_qty from `tabBOM Item` bom_item, tabItem item @@ -274,7 +273,7 @@ class DocType: 'Quantity Requested for Purchase', 'Ordered Qty', 'Actual Qty']] for d in self.item_dict: item_list.append([d, self.item_dict[d][1], self.item_dict[d][2], self.item_dict[d][0]]) - item_qty= sql("""select warehouse, indented_qty, ordered_qty, actual_qty + item_qty= webnotes.conn.sql("""select warehouse, indented_qty, ordered_qty, actual_qty from `tabBin` where item_code = %s""", d) i_qty, o_qty, a_qty = 0, 0, 0 for w in item_qty: diff --git a/manufacturing/doctype/workstation/workstation.py b/manufacturing/doctype/workstation/workstation.py index 35e2c1f06b2..cc129340e4a 100644 --- a/manufacturing/doctype/workstation/workstation.py +++ b/manufacturing/doctype/workstation/workstation.py @@ -8,7 +8,6 @@ from webnotes.utils import flt from webnotes.model import db_exists from webnotes.model.bean import copy_doclist -sql = webnotes.conn.sql @@ -18,9 +17,9 @@ class DocType: self.doclist = doclist def update_bom_operation(self): - bom_list = sql(" select DISTINCT parent from `tabBOM Operation` where workstation = '%s'" % self.doc.name) + bom_list = webnotes.conn.sql(" select DISTINCT parent from `tabBOM Operation` where workstation = '%s'" % self.doc.name) for bom_no in bom_list: - sql("update `tabBOM Operation` set hour_rate = '%s' where parent = '%s' and workstation = '%s'"%( self.doc.hour_rate, bom_no[0], self.doc.name)) + webnotes.conn.sql("update `tabBOM Operation` set hour_rate = '%s' where parent = '%s' and workstation = '%s'"%( self.doc.hour_rate, bom_no[0], self.doc.name)) def on_update(self): webnotes.conn.set(self.doc, 'overhead', flt(self.doc.hour_rate_electricity) + flt(self.doc.hour_rate_consumable) + flt(self.doc.hour_rate_rent)) diff --git a/patches/april_2013/p05_update_file_data.py b/patches/april_2013/p05_update_file_data.py index e03abc6b65c..47d6de9186b 100644 --- a/patches/april_2013/p05_update_file_data.py +++ b/patches/april_2013/p05_update_file_data.py @@ -52,7 +52,7 @@ def update_for_doc(doctype, doc): exists = True if not (filename.startswith("http://") or filename.startswith("https://")): - if not os.path.exists(webnotes.utils.get_path("public", "files", filename)): + if not os.path.exists(webnotes.utils.get_site_path(webnotes.conf.files_path, filename)): exists = False if exists: diff --git a/patches/april_2013/p06_update_file_size.py b/patches/april_2013/p06_update_file_size.py index 6879625ad9d..973cea94d7e 100644 --- a/patches/april_2013/p06_update_file_size.py +++ b/patches/april_2013/p06_update_file_size.py @@ -4,7 +4,7 @@ import webnotes, os, webnotes.utils def execute(): - files_path = webnotes.utils.get_path("public", "files") + files_path = webnotes.utils.get_site_path(webnotes.conf.files_path) webnotes.conn.auto_commit_on_many_writes = 1 for f in webnotes.conn.sql("""select name, file_name from @@ -14,4 +14,4 @@ def execute(): if os.path.exists(filepath): webnotes.conn.set_value("File Data", f.name, "file_size", os.stat(filepath).st_size) - webnotes.conn.auto_commit_on_many_writes = 0 \ No newline at end of file + webnotes.conn.auto_commit_on_many_writes = 0 diff --git a/patches/august_2013/p06_fix_sle_against_stock_entry.py b/patches/august_2013/p06_fix_sle_against_stock_entry.py index 02588bec6d6..2e6c383ebd6 100644 --- a/patches/august_2013/p06_fix_sle_against_stock_entry.py +++ b/patches/august_2013/p06_fix_sle_against_stock_entry.py @@ -1,10 +1,9 @@ import webnotes -cancelled = [] -uncancelled = [] - def execute(): - global cancelled, uncancelled + cancelled = [] + uncancelled = [] + stock_entries = webnotes.conn.sql("""select * from `tabStock Entry` where docstatus >= 1 and date(modified) >= "2013-08-16" and ifnull(production_order, '') != '' and ifnull(bom_no, '') != '' @@ -17,14 +16,12 @@ def execute(): where voucher_type='Stock Entry' and voucher_no=%s and is_cancelled='No'""", entry.name, as_dict=True) if res: - make_stock_entry_detail(entry, res) + make_stock_entry_detail(entry, res, cancelled, uncancelled) if cancelled or uncancelled: - send_email() + send_email(cancelled, uncancelled) -def make_stock_entry_detail(entry, res): - global cancelled, uncancelled - +def make_stock_entry_detail(entry, res, cancelled, uncancelled): fg_item = webnotes.conn.get_value("Production Order", entry.production_order, "production_item") voucher_detail_entries_map = {} @@ -87,9 +84,8 @@ def make_stock_entry_detail(entry, res): uncancelled.append(se.doc.name) -def send_email(): +def send_email(cancelled, uncancelled): from webnotes.utils.email_lib import sendmail_to_system_managers - global cancelled, uncancelled uncancelled = "we have undone the cancellation of the following Stock Entries through a patch:\n" + \ "\n".join(uncancelled) if uncancelled else "" cancelled = "and cancelled the following Stock Entries:\n" + "\n".join(cancelled) \ diff --git a/patches/june_2013/p08_shopping_cart_settings.py b/patches/june_2013/p08_shopping_cart_settings.py index 479a6961e26..677b62a5e3e 100644 --- a/patches/june_2013/p08_shopping_cart_settings.py +++ b/patches/june_2013/p08_shopping_cart_settings.py @@ -7,7 +7,7 @@ def execute(): webnotes.reload_doc("selling", "doctype", "shopping_cart_settings") # create two default territories, one for home country and one named Rest of the World - from setup.doctype.setup_control.setup_control import create_territories + from setup.page.setup_wizard.setup_wizard import create_territories create_territories() webnotes.conn.set_value("Shopping Cart Settings", None, "default_territory", "Rest of the World") diff --git a/patches/november_2012/update_delivered_billed_percentage_for_pos.py b/patches/november_2012/update_delivered_billed_percentage_for_pos.py index 0703f946f38..ffba0f98e85 100644 --- a/patches/november_2012/update_delivered_billed_percentage_for_pos.py +++ b/patches/november_2012/update_delivered_billed_percentage_for_pos.py @@ -3,10 +3,6 @@ def execute(): import webnotes - from webnotes.model.code import get_obj - - #sc_obj = get_obj("Sales Common") - from selling.doctype.sales_common import sales_common si = webnotes.conn.sql("""select distinct si.name from `tabSales Invoice` si, `tabSales Invoice Item` si_item @@ -16,5 +12,4 @@ def execute(): and ifnull(si_item.sales_order, '') != '' """) for d in si: - sales_common.StatusUpdater(get_obj("Sales Invoice", d[0], with_children=1), \ - 1).update_all_qty() \ No newline at end of file + webnotes.bean("Sales Invoice", d[0]).run_method("update_qty") \ No newline at end of file diff --git a/patches/october_2013/p01_update_delivery_note_prevdocs.py b/patches/october_2013/p01_update_delivery_note_prevdocs.py new file mode 100644 index 00000000000..75ac53f9837 --- /dev/null +++ b/patches/october_2013/p01_update_delivery_note_prevdocs.py @@ -0,0 +1,13 @@ +# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. +# License: GNU General Public License v3. See license.txt + +from __future__ import unicode_literals +import webnotes + +def execute(): + webnotes.reload_doc("stock", "doctype", "delivery_note_item") + webnotes.conn.sql("""update `tabDelivery Note Item` set against_sales_order=prevdoc_docname + where prevdoc_doctype='Sales Order' """) + + webnotes.conn.sql("""update `tabDelivery Note Item` set against_sales_invoice=prevdoc_docname + where prevdoc_doctype='Sales Invoice' """) \ No newline at end of file diff --git a/patches/october_2013/p02_set_communication_status.py b/patches/october_2013/p02_set_communication_status.py new file mode 100644 index 00000000000..d67d08dbe0a --- /dev/null +++ b/patches/october_2013/p02_set_communication_status.py @@ -0,0 +1,11 @@ +# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. +# License: GNU General Public License v3. See license.txt + +from __future__ import unicode_literals +import webnotes + +def execute(): + webnotes.reload_doc("core", "doctype", "communication") + + webnotes.conn.sql("""update tabCommunication + set sent_or_received= if(ifnull(recipients, '')='', "Received", "Sent")""") \ No newline at end of file diff --git a/patches/october_2013/p03_crm_update_status.py b/patches/october_2013/p03_crm_update_status.py new file mode 100644 index 00000000000..07a70c642a9 --- /dev/null +++ b/patches/october_2013/p03_crm_update_status.py @@ -0,0 +1,47 @@ +# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. +# License: GNU General Public License v3. See license.txt + +from __future__ import unicode_literals +import webnotes + +# reason field + +def execute(): + change_map = { + "Lead": [ + ["Lead Lost", "Lead"], + ["Not interested", "Do Not Contact"], + ["Opportunity Made", "Opportunity"], + ["Contacted", "Replied"], + ["Attempted to Contact", "Replied"], + ["Contact in Future", "Interested"], + ], + "Opportunity": [ + ["Quotation Sent", "Quotation"], + ["Order Confirmed", "Quotation"], + ["Opportunity Lost", "Lost"], + ], + "Quotation": [ + ["Order Confirmed", "Ordered"], + ["Order Lost", "Lost"] + ], + "Support Ticket": [ + ["Waiting for Customer", "Replied"], + ["To Reply", "Open"], + ] + } + + for dt, opts in change_map.items(): + for status in opts: + webnotes.conn.sql("""update `tab%s` set status=%s where status=%s""" % \ + (dt, "%s", "%s"), (status[1], status[0])) + + for dt in ["Lead", "Opportunity"]: + for name in webnotes.conn.sql_list("""select name from `tab%s`""" % dt): + bean = webnotes.bean(dt, name) + before_status = bean.doc.status + bean.get_controller().set_status() + + if bean.doc.status != before_status: + webnotes.conn.sql("""update `tab%s` set status=%s where name=%s""" % (dt, "%s", "%s"), + (bean.doc.status, name)) diff --git a/patches/october_2013/p04_wsgi_migration.py b/patches/october_2013/p04_wsgi_migration.py new file mode 100644 index 00000000000..d374f4ee171 --- /dev/null +++ b/patches/october_2013/p04_wsgi_migration.py @@ -0,0 +1,33 @@ +# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. +# License: GNU General Public License v3. See license.txt + +from __future__ import unicode_literals +import webnotes +import webnotes.utils +import os + +def execute(): + base_path = webnotes.utils.get_base_path() + + # Remove symlinks from public folder: + # - server.py + # - web.py + # - unsupported.html + # - blank.html + # - rss.xml + # - sitemap.xml + for file in ("server.py", "web.py", "unsupported.html", "blank.html", "rss.xml", "sitemap.xml"): + file_path = os.path.join(base_path, "public", file) + if os.path.exists(file_path): + os.remove(file_path) + + # Remove wn-web files + # - js/wn-web.js + # - css/wn-web.css + for file_path in (("js", "wn-web.js"), ("css", "wn-web.css")): + file_path = os.path.join(base_path, "public", *file_path) + if os.path.exists(file_path): + os.remove(file_path) + + # Remove update app page + webnotes.delete_doc("Page", "update-manager") diff --git a/patches/october_2013/p05_server_custom_script_to_file.py b/patches/october_2013/p05_server_custom_script_to_file.py new file mode 100644 index 00000000000..3a7e7702652 --- /dev/null +++ b/patches/october_2013/p05_server_custom_script_to_file.py @@ -0,0 +1,36 @@ +# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. +# License: GNU General Public License v3. See license.txt + +from __future__ import unicode_literals +import webnotes + +def execute(): + """ + Assuming that some kind of indentation exists: + - Find indentation of server custom script + - replace indentation with tabs + - Add line: + class CustomDocType(DocType): + - Add tab indented code after this line + - Write to file + - Delete custom script record + """ + import os + from webnotes.utils import get_site_base_path + from core.doctype.custom_script.custom_script import make_custom_server_script_file + for name, dt, script in webnotes.conn.sql("""select name, dt, script from `tabCustom Script` + where script_type='Server'"""): + if script.strip(): + script = indent_using_tabs(script) + make_custom_server_script_file(dt, script) + +def indent_using_tabs(script): + for line in script.split("\n"): + try: + indentation_used = line[:line.index("def ")] + script = script.replace(indentation_used, "\t") + break + except ValueError: + pass + + return script \ No newline at end of file diff --git a/patches/october_2013/p06_rename_packing_list_doctype.py b/patches/october_2013/p06_rename_packing_list_doctype.py new file mode 100644 index 00000000000..d7c5c123a2e --- /dev/null +++ b/patches/october_2013/p06_rename_packing_list_doctype.py @@ -0,0 +1,21 @@ +# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. +# License: GNU General Public License v3. See license.txt + +from __future__ import unicode_literals +import webnotes, os + +def execute(): + webnotes.reload_doc("core", "doctype", "doctype") + + tables = webnotes.conn.sql_list("show tables") + + if "tabPacked Item" not in tables: + webnotes.rename_doc("DocType", "Delivery Note Packing Item", "Packed Item", force=True) + + webnotes.reload_doc("stock", "doctype", "packed_item") + + if os.path.exists("app/stock/doctype/delivery_note_packing_item"): + os.system("rm -rf app/stock/doctype/delivery_note_packing_item") + + if webnotes.conn.exists("DocType", "Delivery Note Packing Item"): + webnotes.delete_doc("DocType", "Delivery Note Packing Item") \ No newline at end of file diff --git a/patches/october_2013/p09_update_naming_series_settings.py b/patches/october_2013/p09_update_naming_series_settings.py new file mode 100644 index 00000000000..57b48dae2c9 --- /dev/null +++ b/patches/october_2013/p09_update_naming_series_settings.py @@ -0,0 +1,10 @@ +# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. +# License: GNU General Public License v3. See license.txt + +from __future__ import unicode_literals +import webnotes + +def execute(): + # reset property setters for series + for name in ("Stock Settings", "Selling Settings", "Buying Settings", "HR Settings"): + webnotes.bean(name, name).save() \ No newline at end of file diff --git a/patches/patch_list.py b/patches/patch_list.py index 37220abe1fb..63f06f7232f 100644 --- a/patches/patch_list.py +++ b/patches/patch_list.py @@ -3,10 +3,8 @@ from __future__ import unicode_literals patch_list = [ - "execute:webnotes.reload_doc('core', 'doctype', 'doctype', force=True) #2013-07-15", - "execute:webnotes.reload_doc('core', 'doctype', 'docfield', force=True) #2013-07-15", - "execute:webnotes.reload_doc('core', 'doctype', 'doctype', force=True) #2013-07-16", - "execute:webnotes.reload_doc('core', 'doctype', 'docfield', force=True) #2013-07-16", + "execute:webnotes.reload_doc('core', 'doctype', 'doctype', force=True) #2013-10-15", + "execute:webnotes.reload_doc('core', 'doctype', 'docfield', force=True) #2013-10-15", "execute:webnotes.reload_doc('core', 'doctype', 'docperm') #2013-07-16", "execute:webnotes.reload_doc('core', 'doctype', 'page') #2013-07-16", "execute:webnotes.reload_doc('core', 'doctype', 'report') #2013-07-16", @@ -220,8 +218,17 @@ patch_list = [ "patches.september_2013.p04_unsubmit_serial_nos", "patches.september_2013.p05_fix_customer_in_pos", "patches.october_2013.fix_is_cancelled_in_sle", + "patches.october_2013.p01_update_delivery_note_prevdocs", + "patches.october_2013.p02_set_communication_status", + "patches.october_2013.p03_crm_update_status", + "execute:webnotes.delete_doc('DocType', 'Setup Control')", + "patches.october_2013.p04_wsgi_migration", + "patches.october_2013.p05_server_custom_script_to_file", "patches.october_2013.repost_ordered_qty", "patches.october_2013.repost_planned_qty", + "patches.october_2013.p06_rename_packing_list_doctype", + "execute:webnotes.delete_doc('DocType', 'Sales Common')", + "patches.october_2013.p09_update_naming_series_settings", "patches.october_2013.p02_update_price_list_and_item_details_in_item_price", "execute:webnotes.delete_doc('Report', 'Item-wise Price List')", "patches.october_2013.p03_remove_sales_and_purchase_return_tool", diff --git a/portal/templates/includes/cart.js b/portal/templates/includes/cart.js index bd3f56533c5..a894b32e6b6 100644 --- a/portal/templates/includes/cart.js +++ b/portal/templates/includes/cart.js @@ -13,11 +13,11 @@ $(document).ready(function() { $(".progress").remove(); if(r.exc) { if(r.exc.indexOf("WebsitePriceListMissingError")!==-1) { - erpnext.cart.show_error("Oops!", "Price List not configured."); + erpnext.cart.show_error("Oops!", wn._("Price List not configured.")); } else if(r["403"]) { - erpnext.cart.show_error("Hey!", "You need to be logged in to view your cart."); + erpnext.cart.show_error("Hey!", wn._("You need to be logged in to view your cart.")); } else { - erpnext.cart.show_error("Oops!", "Something went wrong."); + erpnext.cart.show_error("Oops!", wn._("Something went wrong.")); } } else { erpnext.cart.set_cart_count(); @@ -78,7 +78,7 @@ $.extend(erpnext.cart, { var no_items = $.map(doclist, function(d) { return d.item_code || null;}).length===0; if(no_items) { - erpnext.cart.show_error("Empty :-(", "Go ahead and add something to your cart."); + erpnext.cart.show_error("Empty :-(", wn._("Go ahead and add something to your cart.")); $("#cart-addresses").toggle(false); return; } @@ -117,7 +117,7 @@ $.extend(erpnext.cart, { }); if(!(addresses && addresses.length)) { - $cart_shipping_address.html('
Hey! Go ahead and add an address
'); + $cart_shipping_address.html('
'+wn._("Hey! Go ahead and add an address")+'
'); } else { erpnext.cart.render_address($cart_shipping_address, addresses, doclist[0].shipping_address_name); erpnext.cart.render_address($cart_billing_address, addresses, doclist[0].customer_address); @@ -283,7 +283,7 @@ $.extend(erpnext.cart, { $("#cart-error") .empty() - .html(msg || "Something went wrong!") + .html(msg || wn._("Something went wrong!")) .toggle(true); } else { window.location.href = "order?name=" + encodeURIComponent(r.message); diff --git a/portal/templates/pages/cart.py b/portal/templates/pages/cart.py index 24b474a55c3..ecf3163f0ad 100644 --- a/portal/templates/pages/cart.py +++ b/portal/templates/pages/cart.py @@ -3,4 +3,5 @@ from __future__ import unicode_literals -no_cache = True \ No newline at end of file +no_cache = True +no_sitemap = True \ No newline at end of file diff --git a/portal/templates/pages/profile.py b/portal/templates/pages/profile.py index 8edd830d471..3a75cfb0823 100644 --- a/portal/templates/pages/profile.py +++ b/portal/templates/pages/profile.py @@ -7,6 +7,7 @@ from webnotes import _ from webnotes.utils import cstr no_cache = True +no_sitemap = True def get_context(): from selling.utils.cart import get_lead_or_customer @@ -33,7 +34,7 @@ def update_profile(fullname, password=None, company_name=None, mobile_no=None, p return _("Name is required") webnotes.conn.set_value("Profile", webnotes.session.user, "first_name", fullname) - webnotes.add_cookies["full_name"] = fullname + webnotes._response.set_cookie("full_name", fullname) return _("Updated") \ No newline at end of file diff --git a/projects/doctype/project/project.js b/projects/doctype/project/project.js index 74cfa45198b..3dfe8973839 100644 --- a/projects/doctype/project/project.js +++ b/projects/doctype/project/project.js @@ -4,11 +4,11 @@ // show tasks cur_frm.cscript.refresh = function(doc) { if(!doc.__islocal) { - cur_frm.add_custom_button("Gantt Chart", function() { + cur_frm.add_custom_button(wn._("Gantt Chart"), function() { wn.route_options = {"project": doc.name} wn.set_route("Gantt", "Task"); }, "icon-tasks"); - cur_frm.add_custom_button("Tasks", function() { + cur_frm.add_custom_button(wn._("Tasks"), function() { wn.route_options = {"project": doc.name} wn.set_route("List", "Task"); }, "icon-list"); diff --git a/projects/doctype/project/project.txt b/projects/doctype/project/project.txt index 91dcfa16816..fc8accf1ee1 100644 --- a/projects/doctype/project/project.txt +++ b/projects/doctype/project/project.txt @@ -2,12 +2,13 @@ { "creation": "2013-03-07 11:55:07", "docstatus": 0, - "modified": "2013-07-05 14:51:41", + "modified": "2013-10-02 14:25:02", "modified_by": "Administrator", "owner": "Administrator" }, { "allow_attach": 1, + "allow_import": 1, "autoname": "field:project_name", "doctype": "DocType", "document_type": "Master", diff --git a/projects/doctype/task/task.py b/projects/doctype/task/task.py index 6cd1ba8636e..fb9b6ab6a67 100644 --- a/projects/doctype/task/task.py +++ b/projects/doctype/task/task.py @@ -9,7 +9,6 @@ from webnotes.model import db_exists from webnotes.model.bean import copy_doclist from webnotes import msgprint -sql = webnotes.conn.sql class DocType: def __init__(self,doc,doclist=[]): @@ -17,13 +16,13 @@ class DocType: self.doclist = doclist def get_project_details(self): - cust = sql("select customer, customer_name from `tabProject` where name = %s", self.doc.project) + cust = webnotes.conn.sql("select customer, customer_name from `tabProject` where name = %s", self.doc.project) if cust: ret = {'customer': cust and cust[0][0] or '', 'customer_name': cust and cust[0][1] or ''} return ret def get_customer_details(self): - cust = sql("select customer_name from `tabCustomer` where name=%s", self.doc.customer) + cust = webnotes.conn.sql("select customer_name from `tabCustomer` where name=%s", self.doc.customer) if cust: ret = {'customer_name': cust and cust[0][0] or ''} return ret diff --git a/projects/doctype/task/task.txt b/projects/doctype/task/task.txt index d890bd67b94..1c12c8a534f 100644 --- a/projects/doctype/task/task.txt +++ b/projects/doctype/task/task.txt @@ -2,12 +2,13 @@ { "creation": "2013-01-29 19:25:50", "docstatus": 0, - "modified": "2013-07-05 14:57:57", + "modified": "2013-10-02 14:25:00", "modified_by": "Administrator", "owner": "Administrator" }, { "allow_attach": 1, + "allow_import": 1, "autoname": "TASK.#####", "doctype": "DocType", "document_type": "Master", diff --git a/projects/doctype/task/task_calendar.js b/projects/doctype/task/task_calendar.js index 77728553e06..29d1c9940bb 100644 --- a/projects/doctype/task/task_calendar.js +++ b/projects/doctype/task/task_calendar.js @@ -6,7 +6,7 @@ wn.views.calendar["Task"] = { "start": "exp_start_date", "end": "exp_end_date", "id": "name", - "title": "subject", + "title": wn._("subject"), "allDay": "allDay" }, gantt: true, @@ -15,7 +15,7 @@ wn.views.calendar["Task"] = { "fieldtype": "Link", "fieldname": "project", "options": "Project", - "label": "Project" + "label": wn._("Project") } ], get_events_method: "projects.doctype.task.task.get_events" diff --git a/projects/doctype/time_log/time_log_calendar.js b/projects/doctype/time_log/time_log_calendar.js index a4f22db3294..12cfcba5620 100644 --- a/projects/doctype/time_log/time_log_calendar.js +++ b/projects/doctype/time_log/time_log_calendar.js @@ -6,7 +6,7 @@ wn.views.calendar["Time Log"] = { "start": "from_time", "end": "to_time", "id": "name", - "title": "title", + "title": w._("title"), "allDay": "allDay" }, get_events_method: "projects.doctype.time_log.time_log.get_events" diff --git a/projects/doctype/time_log_batch/test_time_log_batch.py b/projects/doctype/time_log_batch/test_time_log_batch.py index 34a0cc06c9f..4976dfe46da 100644 --- a/projects/doctype/time_log_batch/test_time_log_batch.py +++ b/projects/doctype/time_log_batch/test_time_log_batch.py @@ -5,15 +5,31 @@ import webnotes, unittest class TimeLogBatchTest(unittest.TestCase): def test_time_log_status(self): - self.assertEquals(webnotes.conn.get_value("Time Log", "_T-Time Log-00001", "status"), "Submitted") - tlb = webnotes.bean("Time Log Batch", "_T-Time Log Batch-00001") + from projects.doctype.time_log.test_time_log import test_records as time_log_records + time_log = webnotes.bean(copy=time_log_records[0]) + time_log.doc.fields.update({ + "from_time": "2013-01-02 10:00:00", + "to_time": "2013-01-02 11:00:00", + "docstatus": 0 + }) + time_log.insert() + time_log.submit() + + self.assertEquals(webnotes.conn.get_value("Time Log", time_log.doc.name, "status"), "Submitted") + tlb = webnotes.bean(copy=test_records[0]) + tlb.doclist[1].time_log = time_log.doc.name + tlb.insert() tlb.submit() - self.assertEquals(webnotes.conn.get_value("Time Log", "_T-Time Log-00001", "status"), "Batched for Billing") + + self.assertEquals(webnotes.conn.get_value("Time Log", time_log.doc.name, "status"), "Batched for Billing") tlb.cancel() - self.assertEquals(webnotes.conn.get_value("Time Log", "_T-Time Log-00001", "status"), "Submitted") + self.assertEquals(webnotes.conn.get_value("Time Log", time_log.doc.name, "status"), "Submitted") test_records = [[ - {"rate": "500"}, + { + "doctype": "Time Log Batch", + "rate": "500" + }, { "doctype": "Time Log Batch Detail", "parenttype": "Time Log Batch", diff --git a/projects/doctype/time_log_batch/time_log_batch.js b/projects/doctype/time_log_batch/time_log_batch.js index 96f7c2229df..c338c401a18 100644 --- a/projects/doctype/time_log_batch/time_log_batch.js +++ b/projects/doctype/time_log_batch/time_log_batch.js @@ -25,7 +25,7 @@ $.extend(cur_frm.cscript, { }[doc.status]); if(doc.status=="Submitted") { - cur_frm.add_custom_button("Make Sales Invoice", function() { cur_frm.cscript.make_invoice() }, + cur_frm.add_custom_button(wn._("Make Sales Invoice"), function() { cur_frm.cscript.make_invoice() }, "icon-file-alt"); } }, diff --git a/projects/report/daily_time_log_summary/daily_time_log_summary.js b/projects/report/daily_time_log_summary/daily_time_log_summary.js index 6bb1117ba64..70e3cca450b 100644 --- a/projects/report/daily_time_log_summary/daily_time_log_summary.js +++ b/projects/report/daily_time_log_summary/daily_time_log_summary.js @@ -5,13 +5,13 @@ wn.query_reports["Daily Time Log Summary"] = { "filters": [ { "fieldname":"from_date", - "label": "From Date", + "label": wn._("From Date"), "fieldtype": "Date", "default": wn.datetime.get_today() }, { "fieldname":"to_date", - "label": "To Date", + "label": wn._("To Date"), "fieldtype": "Date", "default": wn.datetime.get_today() }, diff --git a/public/js/account_tree_grid.js b/public/js/account_tree_grid.js index c779cfa6d92..28db1d79461 100644 --- a/public/js/account_tree_grid.js +++ b/public/js/account_tree_grid.js @@ -36,39 +36,39 @@ erpnext.AccountTreeGrid = wn.views.TreeGridReport.extend({ }, setup_columns: function() { this.columns = [ - {id: "name", name: "Account", field: "name", width: 300, cssClass: "cell-title", + {id: "name", name: wn._("Account"), field: "name", width: 300, cssClass: "cell-title", formatter: this.tree_formatter}, - {id: "opening_debit", name: "Opening (Dr)", field: "opening_debit", width: 100, + {id: "opening_debit", name: wn._("Opening (Dr)"), field: "opening_debit", width: 100, formatter: this.currency_formatter}, - {id: "opening_credit", name: "Opening (Cr)", field: "opening_credit", width: 100, + {id: "opening_credit", name: wn._("Opening (Cr)"), field: "opening_credit", width: 100, formatter: this.currency_formatter}, - {id: "debit", name: "Debit", field: "debit", width: 100, + {id: "debit", name: wn._("Debit"), field: "debit", width: 100, formatter: this.currency_formatter}, - {id: "credit", name: "Credit", field: "credit", width: 100, + {id: "credit", name: wn._("Credit"), field: "credit", width: 100, formatter: this.currency_formatter}, - {id: "closing_debit", name: "Closing (Dr)", field: "closing_debit", width: 100, + {id: "closing_debit", name: wn._("Closing (Dr)"), field: "closing_debit", width: 100, formatter: this.currency_formatter}, - {id: "closing_credit", name: "Closing (Cr)", field: "closing_credit", width: 100, + {id: "closing_credit", name: wn._("Closing (Cr)"), field: "closing_credit", width: 100, formatter: this.currency_formatter} ]; }, filters: [ - {fieldtype: "Select", label: "Company", link:"Company", default_value: "Select Company...", + {fieldtype: "Select", label: wn._("Company"), link:"Company", default_value: "Select Company...", filter: function(val, item, opts, me) { if (item.company == val || val == opts.default_value) { return me.apply_zero_filter(val, item, opts, me); } return false; }}, - {fieldtype: "Select", label: "Fiscal Year", link:"Fiscal Year", + {fieldtype: "Select", label: wn._("Fiscal Year"), link:"Fiscal Year", default_value: "Select Fiscal Year..."}, - {fieldtype: "Date", label: "From Date"}, - {fieldtype: "Label", label: "To"}, - {fieldtype: "Date", label: "To Date"}, - {fieldtype: "Button", label: "Refresh", icon:"icon-refresh icon-white", + {fieldtype: "Date", label: wn._("From Date")}, + {fieldtype: "Label", label: wn._("To")}, + {fieldtype: "Date", label: wn._("To Date")}, + {fieldtype: "Button", label: wn._("Refresh"), icon:"icon-refresh icon-white", cssClass:"btn-info"}, - {fieldtype: "Button", label: "Reset Filters"}, + {fieldtype: "Button", label: wn._("Reset Filters")}, ], setup_filters: function() { this._super(); @@ -193,7 +193,7 @@ erpnext.AccountTreeGrid = wn.views.TreeGridReport.extend({ set_fiscal_year: function() { if (this.opening_date > this.closing_date) { - msgprint("Opening Date should be before Closing Date"); + msgprint(wn._("Opening Date should be before Closing Date")); return; } @@ -207,7 +207,7 @@ erpnext.AccountTreeGrid = wn.views.TreeGridReport.extend({ }); if (!this.fiscal_year) { - msgprint("Opening Date and Closing Date should be within same Fiscal Year"); + msgprint(wn._("Opening Date and Closing Date should be within same Fiscal Year")); return; } }, diff --git a/public/js/complete_setup.js b/public/js/complete_setup.js deleted file mode 100644 index 7448c7b3644..00000000000 --- a/public/js/complete_setup.js +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. -// License: GNU General Public License v3. See license.txt - -// complete my company registration -// -------------------------------- -wn.provide('erpnext.complete_setup'); - -$.extend(erpnext.complete_setup, { - show: function() { - d = erpnext.complete_setup.prepare_dialog(); - d.show(); - }, - - prepare_dialog: function() { - var d = new wn.ui.Dialog({ - title: "Setup", - fields: [ - {fieldname:'first_name', label:'Your First Name', fieldtype:'Data', reqd: 1}, - {fieldname:'last_name', label:'Your Last Name', fieldtype:'Data'}, - {fieldname:'company_name', label:'Company Name', fieldtype:'Data', reqd:1, - description: 'e.g. "My Company LLC"'}, - {fieldname:'company_abbr', label:'Company Abbreviation', fieldtype:'Data', - description:'e.g. "MC"',reqd:1}, - {fieldname:'fy_start', label:'Financial Year Start Date', fieldtype:'Select', - description:'Your financial year begins on"', reqd:1, - options: erpnext.complete_setup.fy_start_list.join('\n')}, - {fieldname:'country', label: 'Country', reqd:1, - options: "", fieldtype: 'Select'}, - {fieldname:'currency', label: 'Default Currency', reqd:1, - options: "", fieldtype: 'Select'}, - {fieldname:'time_zone', label: 'Time Zone', reqd:1, - options: "", fieldtype: 'Select'}, - {fieldname:'industry', label: 'Industry', reqd:1, - options: erpnext.complete_setup.domains.join('\n'), fieldtype: 'Select'}, - {fieldname:'update', label:'Setup',fieldtype:'Button'}, - ], - }); - - if(user != 'Administrator'){ - d.$wrapper.find('.close').toggle(false); // Hide close image - $('header').toggle(false); // hide toolbar - } - - wn.call({ - method:"webnotes.country_info.get_country_timezone_info", - callback: function(data) { - erpnext.country_info = data.message.country_info; - erpnext.all_timezones = data.message.all_timezones; - d.get_input("country").empty() - .add_options([""].concat(keys(erpnext.country_info).sort())); - d.get_input("currency").empty() - .add_options(wn.utils.unique([""].concat($.map(erpnext.country_info, - function(opts, country) { return opts.currency; }))).sort()); - d.get_input("time_zone").empty() - .add_options([""].concat(erpnext.all_timezones)); - } - }); - - // on clicking update - d.fields_dict.update.input.onclick = function() { - var data = d.get_values(); - if(!data) return; - $(this).set_working(); - return $c_obj('Setup Control','setup_account',data,function(r, rt){ - $(this).done_working(); - if(!r.exc) { - sys_defaults = r.message; - user_fullname = r.message.user_fullname; - wn.boot.user_info[user].fullname = user_fullname; - d.hide(); - $('header').toggle(true); - wn.container.wntoolbar.set_user_name(); - - setTimeout(function() { window.location.reload(); }, 3000); - } - }); - }; - - d.fields_dict.company_name.input.onchange = function() { - var parts = d.get_input("company_name").val().split(" "); - var abbr = $.map(parts, function(p) { return p ? p.substr(0,1) : null }).join(""); - d.get_input("company_abbr").val(abbr.toUpperCase()); - } - - d.fields_dict.country.input.onchange = function() { - var country = d.fields_dict.country.input.value; - var $timezone = $(d.fields_dict.time_zone.input); - $timezone.empty(); - // add country specific timezones first - if(country){ - var timezone_list = erpnext.country_info[country].timezones || []; - $timezone.add_options(timezone_list.sort()); - - d.get_input("currency").val(erpnext.country_info[country].currency); - } - // add all timezones at the end, so that user has the option to change it to any timezone - $timezone.add_options([""].concat(erpnext.all_timezones)); - - }; - - // company name already set - if(wn.control_panel.company_name) { - var inp = d.fields_dict.company_name.input; - inp.value = wn.control_panel.company_name; - inp.disabled = true; - d.fields_dict.company_name.$input.trigger("change"); - } - - // set first name, last name - if(user_fullname) { - u = user_fullname.split(' '); - if(u[0]) { - d.fields_dict.first_name.input.value = u[0]; - } - if(u[1]) { - d.fields_dict.last_name.input.value = u[1]; - } - } - - return d; - }, - - fy_start_list: ['', '1st Jan', '1st Apr', '1st Jul', '1st Oct'], - - domains: ['', "Manufacturing", "Retail", "Distribution", "Services", "Other"], -}); \ No newline at end of file diff --git a/public/js/conf.js b/public/js/conf.js index 993d2ab800a..bc49f711a8b 100644 --- a/public/js/conf.js +++ b/public/js/conf.js @@ -24,14 +24,14 @@ $(document).bind('toolbar_setup', function() { wn.provide('wn.ui.misc'); wn.ui.misc.about = function() { if(!wn.ui.misc.about_dialog) { - var d = new wn.ui.Dialog({title:'About ERPNext'}) + var d = new wn.ui.Dialog({title: wn._('About ERPNext')}) $(d.body).html(repl("
\ -

ERPNext is an open-source web based ERP made by Web Notes Technologies Pvt Ltd.\ +

"+wn._("ERPNext is an open-source web based ERP made by Web Notes Technologies Pvt Ltd.\ to provide an integrated tool to manage most processes in a small organization.\ - For more information about Web Notes, or to buy hosting servies, go to \ - https://erpnext.com.

\ -

To report an issue, go to GitHub Issues

\ + For more information about Web Notes, or to buy hosting servies, go to ")+ + "https://erpnext.com.

\ +

"+wn._("To report an issue, go to ")+"GitHub Issues

\
\

License: GNU General Public License Version 3

\
", wn.app)); diff --git a/public/js/controllers/accounts.js b/public/js/controllers/accounts.js new file mode 100644 index 00000000000..201c47e2bb5 --- /dev/null +++ b/public/js/controllers/accounts.js @@ -0,0 +1,18 @@ + +// get tax rate +cur_frm.cscript.account_head = function(doc, cdt, cdn) { + var d = locals[cdt][cdn]; + if(!d.charge_type && d.account_head){ + msgprint("Please select Charge Type first"); + wn.model.set_value(cdt, cdn, "account_head", ""); + } else if(d.account_head && d.charge_type!=="Actual") { + wn.call({ + type:"GET", + method: "controllers.accounts_controller.get_tax_rate", + args: {"account_head":d.account_head}, + callback: function(r) { + wn.model.set_value(cdt, cdn, "rate", r.message || 0); + } + }) + } +} diff --git a/public/js/controllers/stock_controller.js b/public/js/controllers/stock_controller.js index de18fe0b579..01a73a25f57 100644 --- a/public/js/controllers/stock_controller.js +++ b/public/js/controllers/stock_controller.js @@ -7,7 +7,7 @@ erpnext.stock.StockController = wn.ui.form.Controller.extend({ show_stock_ledger: function() { var me = this; if(this.frm.doc.docstatus===1) { - this.frm.add_custom_button("Stock Ledger", function() { + this.frm.add_custom_button(wn._("Stock Ledger"), function() { wn.route_options = { voucher_no: me.frm.doc.name, from_date: me.frm.doc.posting_date, @@ -22,7 +22,7 @@ erpnext.stock.StockController = wn.ui.form.Controller.extend({ show_general_ledger: function() { var me = this; if(this.frm.doc.docstatus===1 && cint(wn.defaults.get_default("auto_accounting_for_stock"))) { - cur_frm.add_custom_button('Accounting Ledger', function() { + cur_frm.add_custom_button(wn._('Accounting Ledger'), function() { wn.route_options = { "voucher_no": me.frm.doc.name, "from_date": me.frm.doc.posting_date, diff --git a/public/js/feature_setup.js b/public/js/feature_setup.js index 31f81be342c..96dea90eadb 100644 --- a/public/js/feature_setup.js +++ b/public/js/feature_setup.js @@ -198,7 +198,7 @@ $(document).bind('form_refresh', function() { } else if(cur_frm.fields_dict[fort]) { cur_frm.fields_dict[fort].grid.set_column_disp(pscript.feature_dict[sys_feat][cur_frm.doc.doctype][fort], false); } else { - msgprint('Grid "'+fort+'" does not exists'); + msgprint(wn._('Grid "')+fort+wn._('" does not exists')); } } } diff --git a/public/js/purchase_trends_filters.js b/public/js/purchase_trends_filters.js index 5a13066a249..62d7fd26504 100644 --- a/public/js/purchase_trends_filters.js +++ b/public/js/purchase_trends_filters.js @@ -5,35 +5,35 @@ var get_filters = function(){ return [ { "fieldname":"period", - "label": "Period", + "label": wn._("Period"), "fieldtype": "Select", "options": ["Monthly", "Quarterly", "Half-Yearly", "Yearly"].join("\n"), "default": "Monthly" }, { "fieldname":"based_on", - "label": "Based On", + "label": wn._("Based On"), "fieldtype": "Select", "options": ["Item", "Item Group", "Supplier", "Supplier Type", "Project"].join("\n"), "default": "Item" }, { "fieldname":"group_by", - "label": "Group By", + "label": wn._("Group By"), "fieldtype": "Select", "options": ["Item", "Supplier"].join("\n"), "default": "" }, { "fieldname":"fiscal_year", - "label": "Fiscal Year", + "label": wn._("Fiscal Year"), "fieldtype": "Link", "options":'Fiscal Year', "default": sys_defaults.fiscal_year }, { "fieldname":"company", - "label": "Company", + "label": wn._("Company"), "fieldtype": "Link", "options": "Company", "default": wn.defaults.get_default("company") diff --git a/public/js/sales_trends_filters.js b/public/js/sales_trends_filters.js index 63f6e63e5a0..29bb779b4a5 100644 --- a/public/js/sales_trends_filters.js +++ b/public/js/sales_trends_filters.js @@ -5,35 +5,35 @@ var get_filters = function(){ return[ { "fieldname":"period", - "label": "Period", + "label": wn._("Period"), "fieldtype": "Select", "options": ["Monthly", "Quarterly", "Half-Yearly", "Yearly"].join("\n"), "default": "Monthly" }, { "fieldname":"based_on", - "label": "Based On", + "label": wn._("Based On"), "fieldtype": "Select", "options": ["Item", "Item Group", "Customer", "Customer Group", "Territory", "Project"].join("\n"), "default": "Item" }, { "fieldname":"group_by", - "label": "Group By", + "label": wn._("Group By"), "fieldtype": "Select", "options": ["Item", "Customer"].join("\n"), "default": "" }, { "fieldname":"fiscal_year", - "label": "Fiscal Year", + "label": wn._("Fiscal Year"), "fieldtype": "Link", "options":'Fiscal Year', "default": sys_defaults.fiscal_year }, { "fieldname":"company", - "label": "Company", + "label": wn._("Company"), "fieldtype": "Link", "options": "Company", "default": wn.defaults.get_default("company") diff --git a/public/js/startup.js b/public/js/startup.js index eee8a056208..3af847dd7f1 100644 --- a/public/js/startup.js +++ b/public/js/startup.js @@ -6,28 +6,13 @@ var current_module; wn.provide('erpnext.startup'); erpnext.startup.start = function() { - console.log('Starting up...'); + console.log(wn._('Starting up...')); $('#startup_div').html('Starting up...').toggle(true); - if(user != 'Guest'){ - // setup toolbar - erpnext.toolbar.setup(); - - // complete registration - if(in_list(user_roles,'System Manager') && (wn.boot.setup_complete==='No')) { - wn.require("app/js/complete_setup.js"); - erpnext.complete_setup.show(); - } else if(!wn.boot.customer_count) { - if(wn.get_route()[0]!=="Setup") { - msgprint("" - + wn._("Proceed to Setup") + "\ -

"+ - wn._("This message goes away after you create your first customer.")+ - "

", wn._("Welcome")); - } - } else if(wn.boot.expires_on && in_list(user_roles, 'System Manager')) { - erpnext.startup.show_expiry_banner(); - } + erpnext.toolbar.setup(); + + if(wn.boot.expires_on && in_list(user_roles, 'System Manager')) { + erpnext.startup.show_expiry_banner(); } } @@ -35,16 +20,16 @@ erpnext.startup.show_expiry_banner = function() { var today = dateutil.str_to_obj(wn.boot.server_date); var expires_on = dateutil.str_to_obj(wn.boot.expires_on); var diff = dateutil.get_diff(expires_on, today); - var payment_link = "\ - Click here to buy subscription."; + var payment_link = ""+ + wn._("Click here to buy subscription.")+""; var msg = ""; if (0 <= diff && diff <= 10) { var expiry_string = diff==0 ? "today" : repl("in %(diff)s day(s)", { diff: diff }); - msg = repl('Your ERPNext subscription will expire %(expiry_string)s. %(payment_link)s', + msg = repl(wn._('Your ERPNext subscription will')+'expire %(expiry_string)s. %(payment_link)s', { expiry_string: expiry_string, payment_link: payment_link }); } else if (diff < 0) { - msg = repl('This ERPNext subscription has expired. %(payment_link)s', {payment_link: payment_link}); + msg = repl(wn._('This ERPNext subscription')+''+wn._('has expired')+'. %(payment_link)s', {payment_link: payment_link}); } if(msg) wn.ui.toolbar.show_banner(msg); diff --git a/public/js/stock_analytics.js b/public/js/stock_analytics.js index 5b581130463..8cb61616360 100644 --- a/public/js/stock_analytics.js +++ b/public/js/stock_analytics.js @@ -6,7 +6,7 @@ wn.require("app/js/stock_grid_report.js"); erpnext.StockAnalytics = erpnext.StockGridReport.extend({ init: function(wrapper, opts) { var args = { - title: "Stock Analytics", + title: wn._("Stock Analytics"), page: wrapper, parent: $(wrapper).find('.layout-main'), appframe: wrapper.appframe, @@ -36,13 +36,13 @@ erpnext.StockAnalytics = erpnext.StockGridReport.extend({ }, setup_columns: function() { var std_columns = [ - {id: "check", name: "Plot", field: "check", width: 30, + {id: "check", name: wn._("Plot"), field: "check", width: 30, formatter: this.check_formatter}, - {id: "name", name: "Item", field: "name", width: 300, + {id: "name", name: wn._("Item"), field: "name", width: 300, formatter: this.tree_formatter}, - {id: "brand", name: "Brand", field: "brand", width: 100}, - {id: "stock_uom", name: "UOM", field: "stock_uom", width: 100}, - {id: "opening", name: "Opening", field: "opening", hidden: true, + {id: "brand", name: wn._("Brand"), field: "brand", width: 100}, + {id: "stock_uom", name: wn._("UOM"), field: "stock_uom", width: 100}, + {id: "opening", name: wn._("Opening"), field: "opening", hidden: true, formatter: this.currency_formatter} ]; @@ -50,23 +50,23 @@ erpnext.StockAnalytics = erpnext.StockGridReport.extend({ this.columns = std_columns.concat(this.columns); }, filters: [ - {fieldtype:"Select", label: "Value or Qty", options:["Value", "Quantity"], + {fieldtype:"Select", label: wn._("Value or Qty"), options:["Value", "Quantity"], filter: function(val, item, opts, me) { return me.apply_zero_filter(val, item, opts, me); }}, - {fieldtype:"Select", label: "Brand", link:"Brand", + {fieldtype:"Select", label: wn._("Brand"), link:"Brand", default_value: "Select Brand...", filter: function(val, item, opts) { return val == opts.default_value || item.brand == val || item._show; }, link_formatter: {filter_input: "brand"}}, - {fieldtype:"Select", label: "Warehouse", link:"Warehouse", + {fieldtype:"Select", label: wn._("Warehouse"), link:"Warehouse", default_value: "Select Warehouse..."}, - {fieldtype:"Date", label: "From Date"}, - {fieldtype:"Label", label: "To"}, - {fieldtype:"Date", label: "To Date"}, - {fieldtype:"Select", label: "Range", + {fieldtype:"Date", label: wn._("From Date")}, + {fieldtype:"Label", label: wn._("To")}, + {fieldtype:"Date", label: wn._("To Date")}, + {fieldtype:"Select", label: wn._("Range"), options:["Daily", "Weekly", "Monthly", "Quarterly", "Yearly"]}, - {fieldtype:"Button", label: "Refresh", icon:"icon-refresh icon-white", cssClass:"btn-info"}, - {fieldtype:"Button", label: "Reset Filters"} + {fieldtype:"Button", label: wn._("Refresh"), icon:"icon-refresh icon-white", cssClass:"btn-info"}, + {fieldtype:"Button", label: wn._("Reset Filters")} ], setup_filters: function() { var me = this; diff --git a/public/js/transaction.js b/public/js/transaction.js index d52b742228a..b1201907c1d 100644 --- a/public/js/transaction.js +++ b/public/js/transaction.js @@ -326,7 +326,7 @@ erpnext.TransactionController = erpnext.stock.StockController.extend({ validate_on_previous_row: function(tax) { // validate if a valid row id is mentioned in case of // On Previous Row Amount and On Previous Row Total - if((["On Previous Row Amount", "On Previous Row Total"].indexOf(tax.charge_type) != -1) && + if(([wn._("On Previous Row Amount"), wn._("On Previous Row Total")].indexOf(tax.charge_type) != -1) && (!tax.row_id || cint(tax.row_id) >= tax.idx)) { var msg = repl(wn._("Row") + " # %(idx)s [%(doctype)s]: " + wn._("Please specify a valid") + " %(row_id_label)s", { diff --git a/public/js/utils.js b/public/js/utils.js index 61e613bdecb..2e5eea515b6 100644 --- a/public/js/utils.js +++ b/public/js/utils.js @@ -13,14 +13,14 @@ $.extend(erpnext, { }, hide_naming_series: function() { - if(cur_frm.fields_dict.naming_series) { + if(cur_frm.fields_dict.naming_series && !wn.meta.get_docfield(cur_frm.doctype, "naming_series")) { cur_frm.toggle_display("naming_series", cur_frm.doc.__islocal?true:false); } }, hide_company: function() { if(cur_frm.fields_dict.company) { - var companies = Object.keys(locals[":Company"]); + var companies = Object.keys(locals[":Company"] || {}); if(companies.length === 1) { if(!cur_frm.doc.company) cur_frm.set_value("company", companies[0]); cur_frm.toggle_display("company", false); @@ -41,19 +41,19 @@ $.extend(erpnext, { if(!grid_row.fields_dict.serial_no || grid_row.fields_dict.serial_no.get_status()!=="Write") return; - var $btn = $('') + var $btn = $('') .appendTo($("
") .css({"margin-bottom": "10px", "margin-top": "-10px"}) .appendTo(grid_row.fields_dict.serial_no.$wrapper)); $btn.on("click", function() { var d = new wn.ui.Dialog({ - title: "Add Serial No", + title: wn._("Add Serial No"), fields: [ { "fieldtype": "Link", "options": "Serial No", - "label": "Serial No", + "label": wn._("Serial No"), "get_query": { item_code: grid_row.doc.item_code, warehouse: grid_row.doc.warehouse @@ -61,7 +61,7 @@ $.extend(erpnext, { }, { "fieldtype": "Button", - "label": "Add" + "label": wn._("Add") } ] }); diff --git a/selling/doctype/customer/customer.js b/selling/doctype/customer/customer.js index d2c632530b3..0828adf008a 100644 --- a/selling/doctype/customer/customer.js +++ b/selling/doctype/customer/customer.js @@ -20,10 +20,7 @@ cur_frm.add_fetch('default_sales_partner','commission_rate','default_commission_ cur_frm.cscript.refresh = function(doc,dt,dn) { cur_frm.cscript.setup_dashboard(doc); - if(sys_defaults.cust_master_name == 'Customer Name') - hide_field('naming_series'); - else - unhide_field('naming_series'); + erpnext.hide_naming_series(); if(doc.__islocal){ hide_field(['address_html','contact_html']); @@ -34,7 +31,6 @@ cur_frm.cscript.refresh = function(doc,dt,dn) { cur_frm.cscript.make_contact(doc,dt,dn); cur_frm.communication_view = new wn.views.CommunicationList({ - list: wn.model.get("Communication", {"customer": doc.name}), parent: cur_frm.fields_dict.communication_html.wrapper, doc: doc, }); @@ -81,7 +77,7 @@ cur_frm.cscript.make_address = function() { return "select name, address_type, address_line1, address_line2, city, state, country, pincode, fax, email_id, phone, is_primary_address, is_shipping_address from tabAddress where customer='"+cur_frm.docname+"' and docstatus != 2 order by is_primary_address desc" }, as_dict: 1, - no_results_message: 'No addresses created', + no_results_message: wn._('No addresses created'), render_row: cur_frm.cscript.render_address_row, }); // note: render_address_row is defined in contact_control.js diff --git a/selling/doctype/customer/customer.py b/selling/doctype/customer/customer.py index 2b57da972c8..18c8a34d8cd 100644 --- a/selling/doctype/customer/customer.py +++ b/selling/doctype/customer/customer.py @@ -9,7 +9,6 @@ from webnotes.model.doc import Document, make_autoname from webnotes import msgprint, _ import webnotes.defaults -sql = webnotes.conn.sql from utilities.transaction_base import TransactionBase @@ -31,7 +30,7 @@ class DocType(TransactionBase): return webnotes.conn.get_value('Company', self.doc.company, 'abbr') def get_receivables_group(self): - g = sql("select receivables_group from tabCompany where name=%s", self.doc.company) + g = webnotes.conn.sql("select receivables_group from tabCompany where name=%s", self.doc.company) g = g and g[0][0] or '' if not g: msgprint("Update Company master, assign a default group for Receivables") @@ -47,7 +46,7 @@ class DocType(TransactionBase): def update_lead_status(self): if self.doc.lead_name: - sql("update `tabLead` set status='Converted' where name = %s", self.doc.lead_name) + webnotes.conn.sql("update `tabLead` set status='Converted' where name = %s", self.doc.lead_name) def create_account_head(self): if self.doc.company : @@ -132,7 +131,7 @@ class DocType(TransactionBase): def delete_customer_account(self): """delete customer's ledger if exist and check balance before deletion""" - acc = sql("select name from `tabAccount` where master_type = 'Customer' \ + acc = webnotes.conn.sql("select name from `tabAccount` where master_type = 'Customer' \ and master_name = %s and docstatus < 2", self.doc.name) if acc: from webnotes.model import delete_doc @@ -143,7 +142,7 @@ class DocType(TransactionBase): self.delete_customer_contact() self.delete_customer_account() if self.doc.lead_name: - sql("update `tabLead` set status='Interested' where name=%s",self.doc.lead_name) + webnotes.conn.sql("update `tabLead` set status='Interested' where name=%s",self.doc.lead_name) def on_rename(self, new, old, merge=False): #update customer_name if not naming series diff --git a/selling/doctype/customer/customer.txt b/selling/doctype/customer/customer.txt index b25c0bd32bf..5d3a508d4ef 100644 --- a/selling/doctype/customer/customer.txt +++ b/selling/doctype/customer/customer.txt @@ -2,7 +2,7 @@ { "creation": "2013-06-11 14:26:44", "docstatus": 0, - "modified": "2013-09-10 10:50:50", + "modified": "2013-10-18 16:49:20", "modified_by": "Administrator", "owner": "Administrator" }, @@ -48,6 +48,16 @@ "permlevel": 0, "reqd": 0 }, + { + "doctype": "DocField", + "fieldname": "naming_series", + "fieldtype": "Select", + "label": "Document Numbering Series", + "no_copy": 1, + "options": "\nCUST\nCUSTMUM", + "permlevel": 0, + "print_hide": 0 + }, { "doctype": "DocField", "fieldname": "customer_name", @@ -76,16 +86,6 @@ "permlevel": 0, "reqd": 1 }, - { - "doctype": "DocField", - "fieldname": "naming_series", - "fieldtype": "Select", - "label": "Document Numbering Series", - "no_copy": 1, - "options": "\nCUST\nCUSTMUM", - "permlevel": 0, - "print_hide": 0 - }, { "description": "Fetch lead which will be converted into customer.", "doctype": "DocField", diff --git a/selling/doctype/customer/test_customer.py b/selling/doctype/customer/test_customer.py index 7c90f6a1a8f..adc5a549ef9 100644 --- a/selling/doctype/customer/test_customer.py +++ b/selling/doctype/customer/test_customer.py @@ -17,6 +17,8 @@ class TestCustomer(unittest.TestCase): (("_Test Customer 1 Renamed",),)) self.assertEqual(webnotes.conn.exists("Customer", "_Test Customer 1"), ()) + webnotes.rename_doc("Customer", "_Test Customer 1 Renamed", "_Test Customer 1") + def test_merge(self): from webnotes.test_runner import make_test_records make_test_records("Sales Invoice") @@ -57,6 +59,9 @@ class TestCustomer(unittest.TestCase): # check that old name doesn't exist self.assertEqual(webnotes.conn.exists("Customer", "_Test Customer"), ()) self.assertEqual(webnotes.conn.exists("Account", "_Test Customer - _TC"), ()) + + # create back _Test Customer + webnotes.bean(copy=test_records[0]).insert() test_ignore = ["Price List"] diff --git a/selling/doctype/installation_note/installation_note.py b/selling/doctype/installation_note/installation_note.py index ca47043e28c..17c36919e53 100644 --- a/selling/doctype/installation_note/installation_note.py +++ b/selling/doctype/installation_note/installation_note.py @@ -6,7 +6,6 @@ import webnotes from webnotes.utils import cstr, getdate from webnotes.model.bean import getlist -from webnotes.model.code import get_obj from webnotes import msgprint from stock.utils import get_valid_serial_nos @@ -36,9 +35,9 @@ class DocType(TransactionBase): self.validate_fiscal_year() self.validate_installation_date() self.check_item_table() - sales_com_obj = get_obj(dt = 'Sales Common') - sales_com_obj.check_active_sales_items(self) - sales_com_obj.get_prevdoc_date(self) + + from controllers.selling_controller import check_active_sales_items + check_active_sales_items(self) def validate_fiscal_year(self): from accounts.utils import validate_fiscal_year diff --git a/selling/doctype/installation_note_item/installation_note_item.txt b/selling/doctype/installation_note_item/installation_note_item.txt index 02871ad7343..7435d461b41 100644 --- a/selling/doctype/installation_note_item/installation_note_item.txt +++ b/selling/doctype/installation_note_item/installation_note_item.txt @@ -2,7 +2,7 @@ { "creation": "2013-02-22 01:27:51", "docstatus": 0, - "modified": "2013-07-10 14:54:09", + "modified": "2013-10-10 17:02:31", "modified_by": "Administrator", "owner": "Administrator" }, @@ -48,18 +48,6 @@ "read_only": 1, "width": "300px" }, - { - "doctype": "DocField", - "fieldname": "prevdoc_date", - "fieldtype": "Date", - "hidden": 0, - "in_list_view": 1, - "label": "Delivery Date", - "oldfieldname": "prevdoc_date", - "oldfieldtype": "Date", - "print_hide": 0, - "read_only": 1 - }, { "doctype": "DocField", "fieldname": "serial_no", diff --git a/selling/doctype/lead/get_leads.py b/selling/doctype/lead/get_leads.py index 3305a3b9f6e..eaf837bb5be 100644 --- a/selling/doctype/lead/get_leads.py +++ b/selling/doctype/lead/get_leads.py @@ -29,7 +29,7 @@ def add_sales_communication(subject, content, sender, real_name, mail=None, parent_name = contact_name or lead_name message = make(content=content, sender=sender, subject=subject, - doctype = parent_doctype, name = parent_name, date=date) + doctype = parent_doctype, name = parent_name, date=date, sent_or_received="Received") if mail: # save attachments to parent if from mail diff --git a/selling/doctype/lead/lead.js b/selling/doctype/lead/lead.js index 3c6fda7922c..9f6412cfd17 100644 --- a/selling/doctype/lead/lead.js +++ b/selling/doctype/lead/lead.js @@ -24,8 +24,8 @@ erpnext.LeadController = wn.ui.form.Controller.extend({ if(in_list(user_roles,'System Manager')) { cur_frm.footer.help_area.innerHTML = '
\ -

Sales Email Settings
\ - Automatically extract Leads from a mail box e.g. "sales@example.com"

'; +

'+wn._('Sales Email Settings')+'
\ + '+wn._('Automatically extract Leads from a mail box e.g.')+' "sales@example.com"

'; } }, @@ -33,12 +33,12 @@ erpnext.LeadController = wn.ui.form.Controller.extend({ var doc = this.frm.doc; erpnext.hide_naming_series(); this.frm.clear_custom_buttons(); - + this.frm.__is_customer = this.frm.__is_customer || this.frm.doc.__is_customer; if(!this.frm.doc.__islocal && !this.frm.__is_customer) { - this.frm.add_custom_button("Create Customer", this.create_customer); - this.frm.add_custom_button("Create Opportunity", this.create_opportunity); - this.frm.add_custom_button("Send SMS", this.frm.cscript.send_sms); + this.frm.add_custom_button(wn._("Create Customer"), this.create_customer); + this.frm.add_custom_button(wn._("Create Opportunity"), this.create_opportunity); + this.frm.add_custom_button(wn._("Send SMS"), this.frm.cscript.send_sms); } cur_frm.communication_view = new wn.views.CommunicationList({ @@ -68,7 +68,7 @@ erpnext.LeadController = wn.ui.form.Controller.extend({ order by is_primary_address, is_shipping_address desc' }, as_dict: 1, - no_results_message: 'No addresses created', + no_results_message: wn._('No addresses created'), render_row: this.render_address_row, }); // note: render_address_row is defined in contact_control.js diff --git a/selling/doctype/lead/lead.py b/selling/doctype/lead/lead.py index 41387f4938f..a33ae3587fe 100644 --- a/selling/doctype/lead/lead.py +++ b/selling/doctype/lead/lead.py @@ -7,7 +7,6 @@ from webnotes import _ from webnotes.utils import cstr, validate_email_add, cint, extract_email_id from webnotes import session, msgprint -sql = webnotes.conn.sql from controllers.selling_controller import SellingController @@ -27,24 +26,9 @@ class DocType(SellingController): customer = webnotes.conn.get_value("Customer", {"lead_name": self.doc.name}) if customer: self.doc.fields["__is_customer"] = customer - - def on_communication(self, comm): - if comm.sender == self.get_sender(comm) or \ - webnotes.conn.get_value("Profile", extract_email_id(comm.sender), "user_type")=="System User": - status = "Replied" - else: - status = "Open" - - webnotes.conn.set(self.doc, 'status', status) - - def check_status(self): - chk = sql("select status from `tabLead` where name=%s", self.doc.name) - chk = chk and chk[0][0] or '' - return cstr(chk) def validate(self): - if self.doc.status == 'Lead Lost' and not self.doc.order_lost_reason: - webnotes.throw("Please Enter Lost Reason under More Info section") + self.set_status() if self.doc.source == 'Campaign' and not self.doc.campaign_name and session['user'] != 'Guest': webnotes.throw("Please specify campaign name") @@ -76,14 +60,18 @@ class DocType(SellingController): webnotes.msgprint(_("""Email Id must be unique, already exists for: """) + \ ", ".join(items), raise_exception=True) - def get_sender(self, comm): - return webnotes.conn.get_value('Sales Email Settings',None,'email_id') - def on_trash(self): webnotes.conn.sql("""update `tabSupport Ticket` set lead='' where lead=%s""", self.doc.name) self.delete_events() + + def has_customer(self): + return webnotes.conn.get_value("Customer", {"lead_name": self.doc.name}) + + def has_opportunity(self): + return webnotes.conn.get_value("Opportunity", {"lead": self.doc.name, "docstatus": 1, + "status": ["!=", "Lost"]}) @webnotes.whitelist() def make_customer(source_name, target_doclist=None): diff --git a/selling/doctype/lead/lead.txt b/selling/doctype/lead/lead.txt index b969906085b..b700a2e1464 100644 --- a/selling/doctype/lead/lead.txt +++ b/selling/doctype/lead/lead.txt @@ -7,6 +7,7 @@ "owner": "Administrator" }, { + "allow_import": 1, "autoname": "naming_series:", "doctype": "DocType", "document_type": "Master", @@ -101,7 +102,7 @@ "fieldtype": "Column Break" }, { - "default": "Open", + "default": "Lead", "doctype": "DocField", "fieldname": "status", "fieldtype": "Select", @@ -111,7 +112,7 @@ "no_copy": 1, "oldfieldname": "status", "oldfieldtype": "Select", - "options": "\nOpen\nReplied\nAttempted to Contact\nContact in Future\nContacted\nOpportunity Made\nInterested\nNot interested\nLead Lost\nConverted\nPassive", + "options": "Lead\nOpen\nReplied\nOpportunity\nInterested\nConverted\nDo Not Contact", "reqd": 1, "search_index": 1 }, @@ -223,8 +224,7 @@ "fieldtype": "HTML", "label": "Communication HTML", "oldfieldname": "follow_up", - "oldfieldtype": "Table", - "print_hide": 1 + "oldfieldtype": "Table" }, { "doctype": "DocField", @@ -377,18 +377,6 @@ "oldfieldtype": "Column Break", "width": "50%" }, - { - "allow_on_submit": 0, - "depends_on": "eval:doc.status == 'Lead Lost'", - "doctype": "DocField", - "fieldname": "order_lost_reason", - "fieldtype": "Link", - "hidden": 0, - "label": "Lost Reason", - "oldfieldname": "order_lost_reason", - "oldfieldtype": "Link", - "options": "Quotation Lost Reason" - }, { "doctype": "DocField", "fieldname": "company", @@ -417,8 +405,7 @@ "fieldtype": "Table", "hidden": 1, "label": "Communications", - "options": "Communication", - "print_hide": 1 + "options": "Communication" }, { "cancel": 1, diff --git a/selling/doctype/opportunity/opportunity.js b/selling/doctype/opportunity/opportunity.js index 25f28bf3fbf..75fde277ec7 100644 --- a/selling/doctype/opportunity/opportunity.js +++ b/selling/doctype/opportunity/opportunity.js @@ -101,21 +101,14 @@ $.extend(cur_frm.cscript, new erpnext.selling.Opportunity({frm: cur_frm})); cur_frm.cscript.refresh = function(doc, cdt, cdn){ erpnext.hide_naming_series(); - - cur_frm.dashboard.reset(doc); - if(!doc.__islocal) { - if(doc.status=="Converted" || doc.status=="Order Confirmed") { - cur_frm.dashboard.set_headline_alert(wn._(doc.status), "alert-success", "icon-ok-sign"); - } else if(doc.status=="Opportunity Lost") { - cur_frm.dashboard.set_headline_alert(wn._(doc.status), "alert-danger", "icon-exclamation-sign"); - } - } - cur_frm.clear_custom_buttons(); - if(doc.docstatus === 1 && doc.status!=="Opportunity Lost") { - cur_frm.add_custom_button('Create Quotation', cur_frm.cscript.create_quotation); - cur_frm.add_custom_button('Opportunity Lost', cur_frm.cscript['Declare Opportunity Lost']); - cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms); + + if(doc.docstatus === 1 && doc.status!=="Lost") { + cur_frm.add_custom_button(wn._('Create Quotation'), cur_frm.cscript.create_quotation); + if(doc.status!=="Quotation") { + cur_frm.add_custom_button(wn._('Opportunity Lost'), cur_frm.cscript['Declare Opportunity Lost']); + } + cur_frm.add_custom_button(wn._('Send SMS'), cur_frm.cscript.send_sms); } cur_frm.toggle_display("contact_info", doc.customer || doc.lead); @@ -181,11 +174,11 @@ cur_frm.cscript.lead = function(doc, cdt, cdn) { cur_frm.cscript['Declare Opportunity Lost'] = function(){ var dialog = new wn.ui.Dialog({ - title: "Set as Lost", + title: wn._("Set as Lost"), fields: [ - {"fieldtype": "Text", "label": "Reason for losing", "fieldname": "reason", + {"fieldtype": "Text", "label": wn._("Reason for losing"), "fieldname": "reason", "reqd": 1 }, - {"fieldtype": "Button", "label": "Update", "fieldname": "update"}, + {"fieldtype": "Button", "label": wn._("Update"), "fieldname": "update"}, ] }); @@ -198,7 +191,7 @@ cur_frm.cscript['Declare Opportunity Lost'] = function(){ args: args.reason, callback: function(r) { if(r.exc) { - msgprint("There were errors."); + msgprint(wn._("There were errors.")); return; } dialog.hide(); diff --git a/selling/doctype/opportunity/opportunity.py b/selling/doctype/opportunity/opportunity.py index 5854758b5b4..ecba077515c 100644 --- a/selling/doctype/opportunity/opportunity.py +++ b/selling/doctype/opportunity/opportunity.py @@ -6,9 +6,8 @@ import webnotes from webnotes.utils import cstr, cint from webnotes.model.bean import getlist -from webnotes import msgprint +from webnotes import msgprint, _ -sql = webnotes.conn.sql from utilities.transaction_base import TransactionBase @@ -27,7 +26,7 @@ class DocType(TransactionBase): }) def get_item_details(self, item_code): - item = sql("""select item_name, stock_uom, description_html, description, item_group, brand + item = webnotes.conn.sql("""select item_name, stock_uom, description_html, description, item_group, brand from `tabItem` where name = %s""", item_code, as_dict=1) ret = { 'item_name': item and item[0]['item_name'] or '', @@ -39,7 +38,7 @@ class DocType(TransactionBase): return ret def get_cust_address(self,name): - details = sql("select customer_name, address, territory, customer_group from `tabCustomer` where name = '%s' and docstatus != 2" %(name), as_dict = 1) + details = webnotes.conn.sql("select customer_name, address, territory, customer_group from `tabCustomer` where name = '%s' and docstatus != 2" %(name), as_dict = 1) if details: ret = { 'customer_name': details and details[0]['customer_name'] or '', @@ -49,7 +48,7 @@ class DocType(TransactionBase): } # ********** get primary contact details (this is done separately coz. , in case there is no primary contact thn it would not be able to fetch customer details in case of join query) - contact_det = sql("select contact_name, contact_no, email_id from `tabContact` where customer = '%s' and is_customer = 1 and is_primary_contact = 'Yes' and docstatus != 2" %(name), as_dict = 1) + contact_det = webnotes.conn.sql("select contact_name, contact_no, email_id from `tabContact` where customer = '%s' and is_customer = 1 and is_primary_contact = 'Yes' and docstatus != 2" %(name), as_dict = 1) ret['contact_person'] = contact_det and contact_det[0]['contact_name'] or '' ret['contact_no'] = contact_det and contact_det[0]['contact_no'] or '' @@ -60,15 +59,6 @@ class DocType(TransactionBase): msgprint("Customer : %s does not exist in system." % (name)) raise Exception - def get_contact_details(self, arg): - arg = eval(arg) - contact = sql("select contact_no, email_id from `tabContact` where contact_name = '%s' and customer_name = '%s'" %(arg['contact_person'],arg['customer']), as_dict = 1) - ret = { - 'contact_no' : contact and contact[0]['contact_no'] or '', - 'email_id' : contact and contact[0]['email_id'] or '' - } - return ret - def on_update(self): self.add_calendar_event() @@ -109,48 +99,36 @@ class DocType(TransactionBase): msgprint("Customer is mandatory if 'Opportunity From' is selected as Customer", raise_exception=1) def validate(self): + self.set_status() self.validate_item_details() self.validate_uom_is_integer("uom", "qty") self.validate_lead_cust() from accounts.utils import validate_fiscal_year validate_fiscal_year(self.doc.transaction_date, self.doc.fiscal_year, "Opportunity Date") - self.doc.status = "Draft" def on_submit(self): - webnotes.conn.set(self.doc, 'status', 'Submitted') - if self.doc.lead and webnotes.conn.get_value("Lead", self.doc.lead, "status")!="Converted": - webnotes.conn.set_value("Lead", self.doc.lead, "status", "Opportunity Made") + if self.doc.lead: + webnotes.bean("Lead", self.doc.lead).get_controller().set_status(update=True) def on_cancel(self): - chk = sql("select t1.name from `tabQuotation` t1, `tabQuotation Item` t2 where t2.parent = t1.name and t1.docstatus=1 and (t1.status!='Order Lost' and t1.status!='Cancelled') and t2.prevdoc_docname = %s",self.doc.name) - if chk: - msgprint("Quotation No. "+cstr(chk[0][0])+" is submitted against this Opportunity. Thus can not be cancelled.") - raise Exception - else: - webnotes.conn.set(self.doc, 'status', 'Cancelled') - if self.doc.lead and webnotes.conn.get_value("Lead", self.doc.lead, - "status")!="Converted": - if webnotes.conn.get_value("Communication", {"parent": self.doc.lead}): - status = "Contacted" - else: - status = "Open" - - webnotes.conn.set_value("Lead", self.doc.lead, "status", status) + if self.has_quotation(): + webnotes.throw(_("Cannot Cancel Opportunity as Quotation Exists")) + self.set_status(update=True) def declare_enquiry_lost(self,arg): - chk = sql("select t1.name from `tabQuotation` t1, `tabQuotation Item` t2 where t2.parent = t1.name and t1.docstatus=1 and (t1.status!='Order Lost' and t1.status!='Cancelled') and t2.prevdoc_docname = %s",self.doc.name) - if chk: - msgprint("Quotation No. "+cstr(chk[0][0])+" is submitted against this Opportunity. Thus 'Opportunity Lost' can not be declared against it.") - raise Exception - else: - webnotes.conn.set(self.doc, 'status', 'Opportunity Lost') + if not self.has_quotation(): + webnotes.conn.set(self.doc, 'status', 'Lost') webnotes.conn.set(self.doc, 'order_lost_reason', arg) - return 'true' + else: + webnotes.throw(_("Cannot declare as lost, because Quotation has been made.")) def on_trash(self): self.delete_events() + def has_quotation(self): + return webnotes.conn.get_value("Quotation Item", {"prevdoc_docname": self.doc.name, "docstatus": 1}) + @webnotes.whitelist() def make_quotation(source_name, target_doclist=None): from webnotes.model.mapper import get_mapped_doclist diff --git a/selling/doctype/opportunity/opportunity.txt b/selling/doctype/opportunity/opportunity.txt index 8a68a31e793..3c860ade845 100644 --- a/selling/doctype/opportunity/opportunity.txt +++ b/selling/doctype/opportunity/opportunity.txt @@ -7,6 +7,7 @@ "owner": "Administrator" }, { + "allow_import": 1, "autoname": "naming_series:", "description": "Potential Sales Deal", "doctype": "DocType", @@ -125,7 +126,7 @@ "no_copy": 1, "oldfieldname": "status", "oldfieldtype": "Select", - "options": "\nDraft\nSubmitted\nQuotation Sent\nOrder Confirmed\nOpportunity Lost\nCancelled", + "options": "Draft\nSubmitted\nQuotation\nLost\nCancelled\nReplied\nOpen", "read_only": 1, "reqd": 1 }, @@ -168,7 +169,6 @@ "label": "Communication History", "oldfieldtype": "Section Break", "options": "icon-comments", - "print_hide": 1, "read_only": 0 }, { @@ -179,7 +179,6 @@ "label": "Communication HTML", "oldfieldname": "follow_up", "oldfieldtype": "Table", - "print_hide": 1, "read_only": 0 }, { @@ -351,18 +350,6 @@ "options": "Campaign", "read_only": 0 }, - { - "depends_on": "eval:!doc.__islocal", - "doctype": "DocField", - "fieldname": "order_lost_reason", - "fieldtype": "Small Text", - "label": "Quotation Lost Reason", - "no_copy": 1, - "oldfieldname": "order_lost_reason", - "oldfieldtype": "Small Text", - "read_only": 1, - "report_hide": 0 - }, { "doctype": "DocField", "fieldname": "company", @@ -377,6 +364,15 @@ "reqd": 1, "search_index": 1 }, + { + "depends_on": "eval:!doc.__islocal", + "doctype": "DocField", + "fieldname": "order_lost_reason", + "fieldtype": "Text", + "label": "Lost Reason", + "no_copy": 1, + "read_only": 1 + }, { "doctype": "DocField", "fieldname": "column_break2", @@ -436,8 +432,7 @@ "fieldtype": "Table", "hidden": 1, "label": "Communications", - "options": "Communication", - "print_hide": 1 + "options": "Communication" }, { "doctype": "DocPerm", diff --git a/selling/doctype/quotation/quotation.js b/selling/doctype/quotation/quotation.js index e20308f18ee..f890b28d760 100644 --- a/selling/doctype/quotation/quotation.js +++ b/selling/doctype/quotation/quotation.js @@ -10,7 +10,7 @@ cur_frm.cscript.sales_team_fname = "sales_team"; wn.require('app/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.js'); wn.require('app/utilities/doctype/sms_control/sms_control.js'); -wn.require('app/selling/doctype/sales_common/sales_common.js'); +wn.require('app/selling/sales_common.js'); wn.require('app/accounts/doctype/sales_invoice/pos.js'); erpnext.selling.QuotationController = erpnext.selling.SellingController.extend({ @@ -24,22 +24,15 @@ erpnext.selling.QuotationController = erpnext.selling.SellingController.extend({ }, refresh: function(doc, dt, dn) { this._super(doc, dt, dn); - - cur_frm.dashboard.reset(doc); - if(!doc.__islocal) { - if(doc.status=="Converted" || doc.status=="Order Confirmed") { - cur_frm.dashboard.set_headline_alert(wn._(doc.status), "alert-success", "icon-ok-sign"); - } else if(doc.status==="Order Lost") { - cur_frm.dashboard.set_headline_alert(wn._(doc.status), "alert-danger", "icon-exclamation-sign"); - } - } - if(doc.docstatus == 1 && doc.status!=='Order Lost') { - cur_frm.add_custom_button('Make Sales Order', cur_frm.cscript['Make Sales Order']); - if(doc.status!=="Order Confirmed") { - cur_frm.add_custom_button('Set as Lost', cur_frm.cscript['Declare Order Lost']); + if(doc.docstatus == 1 && doc.status!=='Lost') { + cur_frm.add_custom_button(wn._('Make Sales Order'), + cur_frm.cscript['Make Sales Order']); + if(doc.status!=="Ordered") { + cur_frm.add_custom_button(wn._('Set as Lost'), + cur_frm.cscript['Declare Order Lost']); } - cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms); + cur_frm.add_custom_button(wn._('Send SMS'), cur_frm.cscript.send_sms); } if (this.frm.doc.docstatus===0) { @@ -59,7 +52,6 @@ erpnext.selling.QuotationController = erpnext.selling.SellingController.extend({ }) }); } - if (!doc.__islocal) { cur_frm.communication_view = new wn.views.CommunicationList({ @@ -131,9 +123,9 @@ cur_frm.cscript['Declare Order Lost'] = function(){ var dialog = new wn.ui.Dialog({ title: "Set as Lost", fields: [ - {"fieldtype": "Text", "label": "Reason for losing", "fieldname": "reason", + {"fieldtype": "Text", "label": wn._("Reason for losing"), "fieldname": "reason", "reqd": 1 }, - {"fieldtype": "Button", "label": "Update", "fieldname": "update"}, + {"fieldtype": "Button", "label": wn._("Update"), "fieldname": "update"}, ] }); @@ -146,7 +138,7 @@ cur_frm.cscript['Declare Order Lost'] = function(){ args: args.reason, callback: function(r) { if(r.exc) { - msgprint("There were errors."); + msgprint(wn._("There were errors.")); return; } dialog.hide(); diff --git a/selling/doctype/quotation/quotation.py b/selling/doctype/quotation/quotation.py index 8209548fcbe..53531278e4d 100644 --- a/selling/doctype/quotation/quotation.py +++ b/selling/doctype/quotation/quotation.py @@ -9,7 +9,6 @@ from webnotes.model.bean import getlist from webnotes.model.code import get_obj from webnotes import _, msgprint -sql = webnotes.conn.sql from controllers.selling_controller import SellingController @@ -20,47 +19,10 @@ class DocType(SellingController): self.doclist = doclist self.tname = 'Quotation Item' self.fname = 'quotation_details' - - # Get contact person details based on customer selected - # ------------------------------------------------------ - def get_contact_details(self): - return get_obj('Sales Common').get_contact_details(self,0) - - # Get Item Details - # ----------------- - def get_item_details(self, args=None): - import json - args = args and json.loads(args) or {} - if args.get('item_code'): - return get_obj('Sales Common').get_item_details(args, self) - else: - obj = get_obj('Sales Common') - for doc in self.doclist: - if doc.fields.get('item_code'): - arg = { - 'item_code': doc.fields.get('item_code'), - 'income_account': doc.fields.get('income_account'), - 'cost_center': doc.fields.get('cost_center'), - 'warehouse': doc.fields.get('warehouse') - } - res = obj.get_item_details(arg, self) or {} - for r in res: - if not doc.fields.get(r): - doc.fields[r] = res[r] - # Re-calculates Basic Rate & amount based on Price List Selected - # -------------------------------------------------------------- - def get_adj_percent(self, arg=''): - get_obj('Sales Common').get_adj_percent(self) - - - # Get Tax rate if account type is TAX - # ----------------------------------- - def get_rate(self,arg): - return get_obj('Sales Common').get_rate(arg) - - # Does not allow same item code to be entered twice - # ------------------------------------------------- + def has_sales_order(self): + return webnotes.conn.get_value("Sales Order Item", {"prevdoc_docname": self.doc.name, "docstatus": 1}) + def validate_for_items(self): chk_dupl_itm = [] for d in getlist(self.doclist,'quotation_details'): @@ -70,15 +32,12 @@ class DocType(SellingController): else: chk_dupl_itm.append([cstr(d.item_code),cstr(d.description)]) - - #do not allow sales item in maintenance quotation and service item in sales quotation - #----------------------------------------------------------------------------------------------- def validate_order_type(self): super(DocType, self).validate_order_type() if self.doc.order_type in ['Maintenance', 'Service']: for d in getlist(self.doclist, 'quotation_details'): - is_service_item = sql("select is_service_item from `tabItem` where name=%s", d.item_code) + is_service_item = webnotes.conn.sql("select is_service_item from `tabItem` where name=%s", d.item_code) is_service_item = is_service_item and is_service_item[0][0] or 'No' if is_service_item == 'No': @@ -86,7 +45,7 @@ class DocType(SellingController): raise Exception else: for d in getlist(self.doclist, 'quotation_details'): - is_sales_item = sql("select is_sales_item from `tabItem` where name=%s", d.item_code) + is_sales_item = webnotes.conn.sql("select is_sales_item from `tabItem` where name=%s", d.item_code) is_sales_item = is_sales_item and is_sales_item[0][0] or 'No' if is_sales_item == 'No': @@ -95,90 +54,42 @@ class DocType(SellingController): def validate(self): super(DocType, self).validate() - - import utilities - if not self.doc.status: - self.doc.status = "Draft" - else: - utilities.validate_status(self.doc.status, ["Draft", "Submitted", - "Order Confirmed", "Order Lost", "Cancelled"]) - + self.set_status() self.validate_order_type() self.validate_for_items() - self.validate_uom_is_integer("stock_uom", "qty") - sales_com_obj = get_obj('Sales Common') - sales_com_obj.check_active_sales_items(self) - sales_com_obj.validate_max_discount(self,'quotation_details') - - def on_update(self): - # Set Quotation Status - webnotes.conn.set(self.doc, 'status', 'Draft') + def update_opportunity(self): + for opportunity in self.doclist.get_distinct_values("prevdoc_docname"): + webnotes.bean("Opportunity", opportunity).get_controller().set_status(update=True) - #update enquiry - #------------------ - def update_enquiry(self, flag): - prevdoc='' - for d in getlist(self.doclist, 'quotation_details'): - if d.prevdoc_docname: - prevdoc = d.prevdoc_docname - - if prevdoc: - if flag == 'submit': #on submit - sql("update `tabOpportunity` set status = 'Quotation Sent' where name = %s", prevdoc) - elif flag == 'cancel': #on cancel - sql("update `tabOpportunity` set status = 'Open' where name = %s", prevdoc) - elif flag == 'order lost': #order lost - sql("update `tabOpportunity` set status = 'Opportunity Lost' where name=%s", prevdoc) - elif flag == 'order confirm': #order confirm - sql("update `tabOpportunity` set status='Order Confirmed' where name=%s", prevdoc) - - # declare as order lost - #------------------------- def declare_order_lost(self, arg): - chk = sql("select t1.name from `tabSales Order` t1, `tabSales Order Item` t2 where t2.parent = t1.name and t1.docstatus=1 and t2.prevdoc_docname = %s",self.doc.name) - if chk: - msgprint("Sales Order No. "+cstr(chk[0][0])+" is submitted against this Quotation. Thus 'Order Lost' can not be declared against it.") - raise Exception - else: - webnotes.conn.set(self.doc, 'status', 'Order Lost') + if not self.has_sales_order(): + webnotes.conn.set(self.doc, 'status', 'Lost') webnotes.conn.set(self.doc, 'order_lost_reason', arg) - self.update_enquiry('order lost') - return 'true' + self.update_opportunity() + else: + webnotes.throw(_("Cannot set as Lost as Sales Order is made.")) - #check if value entered in item table - #-------------------------------------- def check_item_table(self): if not getlist(self.doclist, 'quotation_details'): msgprint("Please enter item details") raise Exception - # ON SUBMIT - # ========================================================================= def on_submit(self): self.check_item_table() # Check for Approving Authority get_obj('Authorization Control').validate_approving_authority(self.doc.doctype, self.doc.company, self.doc.grand_total, self) - - # Set Quotation Status - webnotes.conn.set(self.doc, 'status', 'Submitted') - + #update enquiry status - self.update_enquiry('submit') + self.update_opportunity() - -# ON CANCEL -# ========================================================================== def on_cancel(self): #update enquiry status - self.update_enquiry('cancel') - - webnotes.conn.set(self.doc,'status','Cancelled') + self.set_status() + self.update_opportunity() -# Print other charges -# =========================================================================== def print_other_charges(self,docname): print_lst = [] for d in getlist(self.doclist,'other_charges'): @@ -187,6 +98,7 @@ class DocType(SellingController): lst1.append(d.total) print_lst.append(lst1) return print_lst + @webnotes.whitelist() def make_sales_order(source_name, target_doclist=None): diff --git a/selling/doctype/quotation/quotation.txt b/selling/doctype/quotation/quotation.txt index 62c36b432f6..1620d915e92 100644 --- a/selling/doctype/quotation/quotation.txt +++ b/selling/doctype/quotation/quotation.txt @@ -9,6 +9,7 @@ { "allow_attach": 1, "allow_email": 0, + "allow_import": 1, "autoname": "naming_series:", "doctype": "DocType", "document_type": "Transaction", @@ -732,7 +733,7 @@ "no_copy": 1, "oldfieldname": "status", "oldfieldtype": "Select", - "options": "\nDraft\nSubmitted\nOrder Confirmed\nOrder Lost\nCancelled", + "options": "Draft\nSubmitted\nOrdered\nLost\nCancelled", "print_hide": 1, "read_only": 1, "reqd": 1, @@ -840,8 +841,7 @@ "fieldtype": "Table", "hidden": 1, "label": "Communications", - "options": "Communication", - "print_hide": 1 + "options": "Communication" }, { "amend": 1, diff --git a/selling/doctype/quotation/test_quotation.py b/selling/doctype/quotation/test_quotation.py index cf3881d0c3f..366035ef1a5 100644 --- a/selling/doctype/quotation/test_quotation.py +++ b/selling/doctype/quotation/test_quotation.py @@ -11,17 +11,19 @@ class TestQuotation(unittest.TestCase): def test_make_sales_order(self): from selling.doctype.quotation.quotation import make_sales_order - self.assertRaises(webnotes.ValidationError, make_sales_order, "_T-Quotation-00001") + quotation = webnotes.bean(copy=test_records[0]) + quotation.insert() + + self.assertRaises(webnotes.ValidationError, make_sales_order, quotation.doc.name) - quotation = webnotes.bean("Quotation","_T-Quotation-00001") quotation.submit() - sales_order = make_sales_order("_T-Quotation-00001") + sales_order = make_sales_order(quotation.doc.name) self.assertEquals(sales_order[0]["doctype"], "Sales Order") self.assertEquals(len(sales_order), 2) self.assertEquals(sales_order[1]["doctype"], "Sales Order Item") - self.assertEquals(sales_order[1]["prevdoc_docname"], "_T-Quotation-00001") + self.assertEquals(sales_order[1]["prevdoc_docname"], quotation.doc.name) self.assertEquals(sales_order[0]["customer"], "_Test Customer") sales_order[0]["delivery_date"] = "2014-01-01" diff --git a/selling/doctype/sales_bom/sales_bom.js b/selling/doctype/sales_bom/sales_bom.js index 80e66b824d6..871420abbea 100644 --- a/selling/doctype/sales_bom/sales_bom.js +++ b/selling/doctype/sales_bom/sales_bom.js @@ -4,7 +4,7 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) { cur_frm.toggle_enable('new_item_code', doc.__islocal); if(!doc.__islocal) { - cur_frm.add_custom_button("Check for Duplicates", function() { + cur_frm.add_custom_button(wn._("Check for Duplicates"), function() { return cur_frm.call_server('check_duplicate', 1) }, 'icon-search') } @@ -15,8 +15,8 @@ cur_frm.fields_dict.new_item_code.get_query = function() { query: "selling.doctype.sales_bom.sales_bom.get_new_item_code" } } -cur_frm.fields_dict.new_item_code.query_description = 'Select Item where "Is Stock Item" is "No" \ - and "Is Sales Item" is "Yes" and there is no other Sales BOM'; +cur_frm.fields_dict.new_item_code.query_description = wn._('Select Item where "Is Stock Item" is "No"')+ +wn._('and "Is Sales Item" is "Yes" and there is no other Sales BOM'); cur_frm.cscript.item_code = function(doc, dt, dn) { var d = locals[dt][dn]; diff --git a/selling/doctype/sales_common/README.md b/selling/doctype/sales_common/README.md deleted file mode 100644 index 1c029d250bd..00000000000 --- a/selling/doctype/sales_common/README.md +++ /dev/null @@ -1 +0,0 @@ -Common scripts used in Sales Cycle. \ No newline at end of file diff --git a/selling/doctype/sales_common/__init__.py b/selling/doctype/sales_common/__init__.py deleted file mode 100644 index baffc488252..00000000000 --- a/selling/doctype/sales_common/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/selling/doctype/sales_common/sales_common.py b/selling/doctype/sales_common/sales_common.py deleted file mode 100644 index ad626da4600..00000000000 --- a/selling/doctype/sales_common/sales_common.py +++ /dev/null @@ -1,348 +0,0 @@ -# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. -# License: GNU General Public License v3. See license.txt - -from __future__ import unicode_literals -import webnotes - -from webnotes.utils import cint, cstr, flt -from webnotes.model.doc import addchild -from webnotes.model.bean import getlist -from webnotes.model.code import get_obj -from webnotes import msgprint, _ -from setup.utils import get_company_currency - -get_value = webnotes.conn.get_value - -from utilities.transaction_base import TransactionBase - -class DocType(TransactionBase): - def __init__(self,d,dl): - self.doc, self.doclist = d, dl - - - def get_contact_details(self, obj = '', primary = 0): - cond = " and contact_name = '"+cstr(obj.doc.contact_person)+"'" - if primary: cond = " and is_primary_contact = 'Yes'" - contact = webnotes.conn.sql("select contact_name, contact_no, email_id, contact_address from `tabContact` where customer = '%s' and docstatus != 2 %s" %(obj.doc.customer, cond), as_dict = 1) - if not contact: - return - c = contact[0] - obj.doc.contact_person = c['contact_name'] or '' - obj.doc.contact_no = c['contact_no'] or '' - obj.doc.email_id = c['email_id'] or '' - obj.doc.customer_mobile_no = c['contact_no'] or '' - if c['contact_address']: - obj.doc.customer_address = c['contact_address'] - - def get_invoice_details(self, obj = ''): - if obj.doc.company: - acc_head = webnotes.conn.sql("select name from `tabAccount` where name = '%s' and docstatus != 2" % (cstr(obj.doc.customer) + " - " + webnotes.conn.get_value('Company', obj.doc.company, 'abbr'))) - obj.doc.debit_to = acc_head and acc_head[0][0] or '' - - def get_tax_details(self, item_code, obj): - import json - tax = webnotes.conn.sql("select tax_type, tax_rate from `tabItem Tax` where parent = %s" , item_code) - t = {} - for x in tax: t[x[0]] = flt(x[1]) - ret = { - 'item_tax_rate' : tax and json.dumps(t) or '' - } - return ret - - def get_serial_details(self, serial_no, obj): - import json - item = webnotes.conn.sql("select item_code, make, label,brand, description from `tabSerial No` where name = '%s' and docstatus != 2" %(serial_no), as_dict=1) - tax = webnotes.conn.sql("select tax_type, tax_rate from `tabItem Tax` where parent = %s" , item[0]['item_code']) - t = {} - for x in tax: t[x[0]] = flt(x[1]) - ret = { - 'item_code' : item and item[0]['item_code'] or '', - 'make' : item and item[0]['make'] or '', - 'label' : item and item[0]['label'] or '', - 'brand' : item and item[0]['brand'] or '', - 'description' : item and item[0]['description'] or '', - 'item_tax_rate' : json.dumps(t) - } - return ret - - # To verify whether rate entered in details table does not exceed max discount % - # ======================================================================================= - def validate_max_discount(self,obj, detail_table): - for d in getlist(obj.doclist, detail_table): - discount = webnotes.conn.sql("select max_discount from tabItem where name = '%s'" %(d.item_code),as_dict = 1) - if discount and discount[0]['max_discount'] and (flt(d.adj_rate)>flt(discount[0]['max_discount'])): - msgprint("You cannot give more than " + cstr(discount[0]['max_discount']) + " % discount on Item Code : "+cstr(d.item_code)) - raise Exception - - # Get Tax rate if account type is TAX - # ========================================================================= - def get_rate(self, arg): - arg = eval(arg) - rate = webnotes.conn.sql("select account_type, tax_rate from `tabAccount` where name = '%s' and docstatus != 2" %(arg['account_head']), as_dict=1) - ret = {'rate' : 0} - if arg['charge_type'] == 'Actual' and rate[0]['account_type'] == 'Tax': - msgprint("You cannot select ACCOUNT HEAD of type TAX as your CHARGE TYPE is 'ACTUAL'") - ret = { - 'account_head' : '' - } - elif rate[0]['account_type'] in ['Tax', 'Chargeable'] and not arg['charge_type'] == 'Actual': - ret = { - 'rate' : rate and flt(rate[0]['tax_rate']) or 0 - } - return ret - - - def get_item_list(self, obj, is_stopped=0): - """get item list""" - il = [] - for d in getlist(obj.doclist, obj.fname): - reserved_warehouse = "" - reserved_qty_for_main_item = 0 - - if obj.doc.doctype == "Sales Order": - if (webnotes.conn.get_value("Item", d.item_code, "is_stock_item") == 'Yes' or - self.has_sales_bom(d.item_code)) and not d.reserved_warehouse: - webnotes.throw(_("Please enter Reserved Warehouse for item ") + - d.item_code + _(" as it is stock Item or packing item")) - reserved_warehouse = d.reserved_warehouse - if flt(d.qty) > flt(d.delivered_qty): - reserved_qty_for_main_item = flt(d.qty) - flt(d.delivered_qty) - - if obj.doc.doctype == "Delivery Note" and d.prevdoc_doctype == 'Sales Order': - # if SO qty is 10 and there is tolerance of 20%, then it will allow DN of 12. - # But in this case reserved qty should only be reduced by 10 and not 12 - - already_delivered_qty = self.get_already_delivered_qty(obj.doc.name, - d.prevdoc_docname, d.prevdoc_detail_docname) - so_qty, reserved_warehouse = self.get_so_qty_and_warehouse(d.prevdoc_detail_docname) - - if already_delivered_qty + d.qty > so_qty: - reserved_qty_for_main_item = -(so_qty - already_delivered_qty) - else: - reserved_qty_for_main_item = -flt(d.qty) - - if self.has_sales_bom(d.item_code): - for p in getlist(obj.doclist, 'packing_details'): - if p.parent_detail_docname == d.name and p.parent_item == d.item_code: - # the packing details table's qty is already multiplied with parent's qty - il.append(webnotes._dict({ - 'warehouse': p.warehouse, - 'reserved_warehouse': reserved_warehouse, - 'item_code': p.item_code, - 'qty': flt(p.qty), - 'reserved_qty': (flt(p.qty)/flt(d.qty)) * reserved_qty_for_main_item, - 'uom': p.uom, - 'batch_no': cstr(p.batch_no).strip(), - 'serial_no': cstr(p.serial_no).strip(), - 'name': d.name - })) - else: - il.append(webnotes._dict({ - 'warehouse': d.warehouse, - 'reserved_warehouse': reserved_warehouse, - 'item_code': d.item_code, - 'qty': d.qty, - 'reserved_qty': reserved_qty_for_main_item, - 'uom': d.stock_uom, - 'batch_no': cstr(d.batch_no).strip(), - 'serial_no': cstr(d.serial_no).strip(), - 'name': d.name - })) - return il - - def get_already_delivered_qty(self, dn, so, so_detail): - qty = webnotes.conn.sql("""select sum(qty) from `tabDelivery Note Item` - where prevdoc_detail_docname = %s and docstatus = 1 - and prevdoc_doctype = 'Sales Order' and prevdoc_docname = %s - and parent != %s""", (so_detail, so, dn)) - return qty and flt(qty[0][0]) or 0.0 - - def get_so_qty_and_warehouse(self, so_detail): - so_item = webnotes.conn.sql("""select qty, reserved_warehouse from `tabSales Order Item` - where name = %s and docstatus = 1""", so_detail, as_dict=1) - so_qty = so_item and flt(so_item[0]["qty"]) or 0.0 - so_warehouse = so_item and so_item[0]["reserved_warehouse"] or "" - return so_qty, so_warehouse - - def has_sales_bom(self, item_code): - return webnotes.conn.sql("select name from `tabSales BOM` where new_item_code=%s and docstatus != 2", item_code) - - def get_sales_bom_items(self, item_code): - return webnotes.conn.sql("""select t1.item_code, t1.qty, t1.uom - from `tabSales BOM Item` t1, `tabSales BOM` t2 - where t2.new_item_code=%s and t1.parent = t2.name""", item_code, as_dict=1) - - def get_packing_item_details(self, item): - return webnotes.conn.sql("select item_name, description, stock_uom from `tabItem` where name = %s", item, as_dict = 1)[0] - - def get_bin_qty(self, item, warehouse): - det = webnotes.conn.sql("select actual_qty, projected_qty from `tabBin` where item_code = '%s' and warehouse = '%s'" % (item, warehouse), as_dict = 1) - return det and det[0] or '' - - def update_packing_list_item(self,obj, packing_item_code, qty, warehouse, line): - bin = self.get_bin_qty(packing_item_code, warehouse) - item = self.get_packing_item_details(packing_item_code) - - # check if exists - exists = 0 - for d in getlist(obj.doclist, 'packing_details'): - if d.parent_item == line.item_code and d.item_code == packing_item_code and d.parent_detail_docname == line.name: - pi, exists = d, 1 - break - - if not exists: - pi = addchild(obj.doc, 'packing_details', 'Delivery Note Packing Item', - obj.doclist) - - pi.parent_item = line.item_code - pi.item_code = packing_item_code - pi.item_name = item['item_name'] - pi.parent_detail_docname = line.name - pi.description = item['description'] - pi.uom = item['stock_uom'] - pi.qty = flt(qty) - pi.actual_qty = bin and flt(bin['actual_qty']) or 0 - pi.projected_qty = bin and flt(bin['projected_qty']) or 0 - pi.prevdoc_doctype = line.prevdoc_doctype - if not pi.warehouse: - pi.warehouse = warehouse - if not pi.batch_no: - pi.batch_no = cstr(line.batch_no) - pi.idx = self.packing_list_idx - - # saved, since this function is called on_update of delivery note - pi.save() - - self.packing_list_idx += 1 - - - def make_packing_list(self, obj, fname): - """make packing list for sales bom item""" - self.packing_list_idx = 0 - parent_items = [] - for d in getlist(obj.doclist, fname): - warehouse = fname == "sales_order_details" and d.reserved_warehouse or d.warehouse - if self.has_sales_bom(d.item_code): - for i in self.get_sales_bom_items(d.item_code): - self.update_packing_list_item(obj, i['item_code'], flt(i['qty'])*flt(d.qty), warehouse, d) - - if [d.item_code, d.name] not in parent_items: - parent_items.append([d.item_code, d.name]) - - obj.doclist = self.cleanup_packing_list(obj, parent_items) - - return obj.doclist - - def cleanup_packing_list(self, obj, parent_items): - """Remove all those child items which are no longer present in main item table""" - delete_list = [] - for d in getlist(obj.doclist, 'packing_details'): - if [d.parent_item, d.parent_detail_docname] not in parent_items: - # mark for deletion from doclist - delete_list.append(d.name) - - if not delete_list: - return obj.doclist - - # delete from doclist - obj.doclist = webnotes.doclist(filter(lambda d: d.name not in delete_list, obj.doclist)) - - # delete from db - webnotes.conn.sql("""\ - delete from `tabDelivery Note Packing Item` - where name in (%s)""" - % (", ".join(["%s"] * len(delete_list))), - tuple(delete_list)) - - return obj.doclist - - - def get_month(self,date): - """Get month based on date (required in sales person and sales partner)""" - month_list = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'] - month_idx = cint(cstr(date).split('-')[1])-1 - return month_list[month_idx] - - - # **** Check for Stop SO as no transactions can be made against Stopped SO. Need to unstop it. *** - def check_stop_sales_order(self,obj): - for d in getlist(obj.doclist,obj.fname): - ref_doc_name = '' - if d.fields.has_key('prevdoc_docname') and d.prevdoc_docname and d.prevdoc_doctype == 'Sales Order': - ref_doc_name = d.prevdoc_docname - elif d.fields.has_key('sales_order') and d.sales_order and not d.delivery_note: - ref_doc_name = d.sales_order - if ref_doc_name: - so_status = webnotes.conn.sql("select status from `tabSales Order` where name = %s",ref_doc_name) - so_status = so_status and so_status[0][0] or '' - if so_status == 'Stopped': - msgprint("You cannot do any transaction against Sales Order : '%s' as it is Stopped." %(ref_doc_name)) - raise Exception - - def check_active_sales_items(self,obj): - for d in getlist(obj.doclist, obj.fname): - if d.item_code: - item = webnotes.conn.sql("""select docstatus, is_sales_item, - is_service_item, default_income_account from tabItem where name = %s""", - d.item_code, as_dict=True)[0] - if item.is_sales_item == 'No' and item.is_service_item == 'No': - msgprint("Item : '%s' is neither Sales nor Service Item" % (d.item_code)) - raise Exception - if d.income_account and not item.default_income_account: - webnotes.conn.set_value("Item", d.item_code, "default_income_account", d.income_account) - - - def check_credit(self,obj,grand_total): - acc_head = webnotes.conn.sql("select name from `tabAccount` where company = '%s' and master_name = '%s'"%(obj.doc.company, obj.doc.customer)) - if acc_head: - tot_outstanding = 0 - dbcr = webnotes.conn.sql("""select sum(debit), sum(credit) from `tabGL Entry` - where account = %s""", acc_head[0][0]) - if dbcr: - tot_outstanding = flt(dbcr[0][0])-flt(dbcr[0][1]) - - exact_outstanding = flt(tot_outstanding) + flt(grand_total) - get_obj('Account',acc_head[0][0]).check_credit_limit(acc_head[0][0], obj.doc.company, exact_outstanding) - - def get_prevdoc_date(self, obj): - for d in getlist(obj.doclist, obj.fname): - if d.prevdoc_doctype and d.prevdoc_docname: - if d.prevdoc_doctype in ["Sales Invoice", "Delivery Note"]: - date_field = "posting_date" - else: - date_field = "transaction_date" - - d.prevdoc_date = webnotes.conn.get_value(d.prevdoc_doctype, - d.prevdoc_docname, date_field) - -def get_batch_no(doctype, txt, searchfield, start, page_len, filters): - from controllers.queries import get_match_cond - - if filters.has_key('warehouse'): - return webnotes.conn.sql("""select batch_no from `tabStock Ledger Entry` sle - where item_code = '%(item_code)s' - and warehouse = '%(warehouse)s' - and batch_no like '%(txt)s' - and exists(select * from `tabBatch` - where name = sle.batch_no - and (ifnull(expiry_date, '')='' or expiry_date >= '%(posting_date)s') - and docstatus != 2) - %(mcond)s - group by batch_no having sum(actual_qty) > 0 - order by batch_no desc - limit %(start)s, %(page_len)s """ % {'item_code': filters['item_code'], - 'warehouse': filters['warehouse'], 'posting_date': filters['posting_date'], - 'txt': "%%%s%%" % txt, 'mcond':get_match_cond(doctype, searchfield), - 'start': start, 'page_len': page_len}) - else: - return webnotes.conn.sql("""select name from tabBatch - where docstatus != 2 - and item = '%(item_code)s' - and (ifnull(expiry_date, '')='' or expiry_date >= '%(posting_date)s') - and name like '%(txt)s' - %(mcond)s - order by name desc - limit %(start)s, %(page_len)s""" % {'item_code': filters['item_code'], - 'posting_date': filters['posting_date'], 'txt': "%%%s%%" % txt, - 'mcond':get_match_cond(doctype, searchfield),'start': start, - 'page_len': page_len}) diff --git a/selling/doctype/sales_common/sales_common.txt b/selling/doctype/sales_common/sales_common.txt deleted file mode 100644 index a407493c6f8..00000000000 --- a/selling/doctype/sales_common/sales_common.txt +++ /dev/null @@ -1,19 +0,0 @@ -[ - { - "creation": "2012-03-27 14:36:14", - "docstatus": 0, - "modified": "2013-07-10 14:54:19", - "modified_by": "Administrator", - "owner": "Administrator" - }, - { - "doctype": "DocType", - "issingle": 1, - "module": "Selling", - "name": "__common__" - }, - { - "doctype": "DocType", - "name": "Sales Common" - } -] \ No newline at end of file diff --git a/selling/doctype/sales_order/sales_order.js b/selling/doctype/sales_order/sales_order.js index 0c261793e15..4033870775a 100644 --- a/selling/doctype/sales_order/sales_order.js +++ b/selling/doctype/sales_order/sales_order.js @@ -9,7 +9,7 @@ cur_frm.cscript.other_fname = "other_charges"; cur_frm.cscript.sales_team_fname = "sales_team"; -wn.require('app/selling/doctype/sales_common/sales_common.js'); +wn.require('app/selling/sales_common.js'); wn.require('app/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.js'); wn.require('app/utilities/doctype/sms_control/sms_control.js'); wn.require('app/accounts/doctype/sales_invoice/pos.js'); @@ -66,7 +66,7 @@ erpnext.selling.SalesOrderController = erpnext.selling.SellingController.extend( source_doctype: "Quotation", get_query_filters: { docstatus: 1, - status: ["!=", "Order Lost"], + status: ["!=", "Lost"], order_type: cur_frm.doc.order_type, customer: cur_frm.doc.customer || undefined, company: cur_frm.doc.company diff --git a/selling/doctype/sales_order/sales_order.py b/selling/doctype/sales_order/sales_order.py index 66b487e450e..7bad121331a 100644 --- a/selling/doctype/sales_order/sales_order.py +++ b/selling/doctype/sales_order/sales_order.py @@ -11,9 +11,6 @@ from webnotes.model.code import get_obj from webnotes import msgprint from webnotes.model.mapper import get_mapped_doclist -sql = webnotes.conn.sql - - from controllers.selling_controller import SellingController class DocType(SellingController): @@ -27,21 +24,6 @@ class DocType(SellingController): self.partner_tname = 'Partner Target Detail' self.territory_tname = 'Territory Target Detail' - def get_contact_details(self): - get_obj('Sales Common').get_contact_details(self,0) - - def get_comm_rate(self, sales_partner): - return get_obj('Sales Common').get_comm_rate(sales_partner, self) - - def get_adj_percent(self, arg=''): - get_obj('Sales Common').get_adj_percent(self) - - def get_available_qty(self,args): - return get_obj('Sales Common').get_available_qty(eval(args)) - - def get_rate(self,arg): - return get_obj('Sales Common').get_rate(arg) - def validate_mandatory(self): # validate transaction date v/s delivery date if self.doc.delivery_date: @@ -88,14 +70,14 @@ class DocType(SellingController): # used for production plan d.transaction_date = self.doc.transaction_date - tot_avail_qty = sql("select projected_qty from `tabBin` \ + tot_avail_qty = webnotes.conn.sql("select projected_qty from `tabBin` \ where item_code = '%s' and warehouse = '%s'" % (d.item_code,d.reserved_warehouse)) d.projected_qty = tot_avail_qty and flt(tot_avail_qty[0][0]) or 0 def validate_sales_mntc_quotation(self): for d in getlist(self.doclist, 'sales_order_details'): if d.prevdoc_docname: - res = sql("select name from `tabQuotation` where name=%s and order_type = %s", (d.prevdoc_docname, self.doc.order_type)) + res = webnotes.conn.sql("select name from `tabQuotation` where name=%s and order_type = %s", (d.prevdoc_docname, self.doc.order_type)) if not res: msgprint("""Order Type (%s) should be same in Quotation: %s \ and current Sales Order""" % (self.doc.order_type, d.prevdoc_docname)) @@ -112,7 +94,7 @@ class DocType(SellingController): def validate_proj_cust(self): if self.doc.project_name and self.doc.customer_name: - res = sql("select name from `tabProject` where name = '%s' and (customer = '%s' or ifnull(customer,'')='')"%(self.doc.project_name, self.doc.customer)) + res = webnotes.conn.sql("select name from `tabProject` where name = '%s' and (customer = '%s' or ifnull(customer,'')='')"%(self.doc.project_name, self.doc.customer)) if not res: msgprint("Customer - %s does not belong to project - %s. \n\nIf you want to use project for multiple customers then please make customer details blank in project - %s."%(self.doc.customer,self.doc.project_name,self.doc.project_name)) raise Exception @@ -128,13 +110,10 @@ class DocType(SellingController): self.validate_uom_is_integer("stock_uom", "qty") self.validate_for_items() self.validate_warehouse() - sales_com_obj = get_obj(dt = 'Sales Common') - sales_com_obj.check_active_sales_items(self) - - sales_com_obj.validate_max_discount(self,'sales_order_details') - self.doclist = sales_com_obj.make_packing_list(self,'sales_order_details') - + from stock.doctype.packed_item.packed_item import make_packing_list + self.doclist = make_packing_list(self,'sales_order_details') + self.validate_with_previous_doc() if not self.doc.status: @@ -167,39 +146,23 @@ class DocType(SellingController): }) - def check_prev_docstatus(self): - for d in getlist(self.doclist, 'sales_order_details'): - cancel_quo = sql("select name from `tabQuotation` where docstatus = 2 and name = '%s'" % d.prevdoc_docname) - if cancel_quo: - msgprint("Quotation :" + cstr(cancel_quo[0][0]) + " is already cancelled !") - raise Exception , "Validation Error. " - def update_enquiry_status(self, prevdoc, flag): - enq = sql("select t2.prevdoc_docname from `tabQuotation` t1, `tabQuotation Item` t2 where t2.parent = t1.name and t1.name=%s", prevdoc) + enq = webnotes.conn.sql("select t2.prevdoc_docname from `tabQuotation` t1, `tabQuotation Item` t2 where t2.parent = t1.name and t1.name=%s", prevdoc) if enq: - sql("update `tabOpportunity` set status = %s where name=%s",(flag,enq[0][0])) + webnotes.conn.sql("update `tabOpportunity` set status = %s where name=%s",(flag,enq[0][0])) - def update_prevdoc_status(self, flag): - for d in getlist(self.doclist, 'sales_order_details'): - if d.prevdoc_docname: - if flag=='submit': - sql("update `tabQuotation` set status = 'Order Confirmed' where name=%s",d.prevdoc_docname) - - #update enquiry - self.update_enquiry_status(d.prevdoc_docname, 'Order Confirmed') - elif flag == 'cancel': - chk = sql("select t1.name from `tabSales Order` t1, `tabSales Order Item` t2 where t2.parent = t1.name and t2.prevdoc_docname=%s and t1.name!=%s and t1.docstatus=1", (d.prevdoc_docname,self.doc.name)) - if not chk: - sql("update `tabQuotation` set status = 'Submitted' where name=%s",d.prevdoc_docname) - - #update enquiry - self.update_enquiry_status(d.prevdoc_docname, 'Quotation Sent') + def update_prevdoc_status(self, flag): + for quotation in self.doclist.get_distinct_values("prevdoc_docname"): + bean = webnotes.bean("Quotation", quotation) + if bean.doc.docstatus==2: + webnotes.throw(quotation + ": " + webnotes._("Quotation is cancelled.")) + + bean.get_controller().set_status(update=True) def on_submit(self): - self.check_prev_docstatus() self.update_stock_ledger(update_stock = 1) - get_obj('Sales Common').check_credit(self,self.doc.grand_total) + self.check_credit(self.doc.grand_total) get_obj('Authorization Control').validate_approving_authority(self.doc.doctype, self.doc.grand_total, self) @@ -220,56 +183,56 @@ class DocType(SellingController): def check_nextdoc_docstatus(self): # Checks Delivery Note - submit_dn = sql("select t1.name from `tabDelivery Note` t1,`tabDelivery Note Item` t2 where t1.name = t2.parent and t2.prevdoc_docname = '%s' and t1.docstatus = 1" % (self.doc.name)) + submit_dn = webnotes.conn.sql("select t1.name from `tabDelivery Note` t1,`tabDelivery Note Item` t2 where t1.name = t2.parent and t2.against_sales_order = %s and t1.docstatus = 1", self.doc.name) if submit_dn: msgprint("Delivery Note : " + cstr(submit_dn[0][0]) + " has been submitted against " + cstr(self.doc.doctype) + ". Please cancel Delivery Note : " + cstr(submit_dn[0][0]) + " first and then cancel "+ cstr(self.doc.doctype), raise_exception = 1) # Checks Sales Invoice - submit_rv = sql("select t1.name from `tabSales Invoice` t1,`tabSales Invoice Item` t2 where t1.name = t2.parent and t2.sales_order = '%s' and t1.docstatus = 1" % (self.doc.name)) + submit_rv = webnotes.conn.sql("select t1.name from `tabSales Invoice` t1,`tabSales Invoice Item` t2 where t1.name = t2.parent and t2.sales_order = '%s' and t1.docstatus = 1" % (self.doc.name)) if submit_rv: msgprint("Sales Invoice : " + cstr(submit_rv[0][0]) + " has already been submitted against " +cstr(self.doc.doctype)+ ". Please cancel Sales Invoice : "+ cstr(submit_rv[0][0]) + " first and then cancel "+ cstr(self.doc.doctype), raise_exception = 1) #check maintenance schedule - submit_ms = sql("select t1.name from `tabMaintenance Schedule` t1, `tabMaintenance Schedule Item` t2 where t2.parent=t1.name and t2.prevdoc_docname = %s and t1.docstatus = 1",self.doc.name) + submit_ms = webnotes.conn.sql("select t1.name from `tabMaintenance Schedule` t1, `tabMaintenance Schedule Item` t2 where t2.parent=t1.name and t2.prevdoc_docname = %s and t1.docstatus = 1",self.doc.name) if submit_ms: msgprint("Maintenance Schedule : " + cstr(submit_ms[0][0]) + " has already been submitted against " +cstr(self.doc.doctype)+ ". Please cancel Maintenance Schedule : "+ cstr(submit_ms[0][0]) + " first and then cancel "+ cstr(self.doc.doctype), raise_exception = 1) # check maintenance visit - submit_mv = sql("select t1.name from `tabMaintenance Visit` t1, `tabMaintenance Visit Purpose` t2 where t2.parent=t1.name and t2.prevdoc_docname = %s and t1.docstatus = 1",self.doc.name) + submit_mv = webnotes.conn.sql("select t1.name from `tabMaintenance Visit` t1, `tabMaintenance Visit Purpose` t2 where t2.parent=t1.name and t2.prevdoc_docname = %s and t1.docstatus = 1",self.doc.name) if submit_mv: msgprint("Maintenance Visit : " + cstr(submit_mv[0][0]) + " has already been submitted against " +cstr(self.doc.doctype)+ ". Please cancel Maintenance Visit : " + cstr(submit_mv[0][0]) + " first and then cancel "+ cstr(self.doc.doctype), raise_exception = 1) # check production order - pro_order = sql("""select name from `tabProduction Order` where sales_order = %s and docstatus = 1""", self.doc.name) + pro_order = webnotes.conn.sql("""select name from `tabProduction Order` where sales_order = %s and docstatus = 1""", self.doc.name) if pro_order: msgprint("""Production Order: %s exists against this sales order. Please cancel production order first and then cancel this sales order""" % pro_order[0][0], raise_exception=1) def check_modified_date(self): - mod_db = sql("select modified from `tabSales Order` where name = '%s'" % self.doc.name) - date_diff = sql("select TIMEDIFF('%s', '%s')" % ( mod_db[0][0],cstr(self.doc.modified))) + mod_db = webnotes.conn.sql("select modified from `tabSales Order` where name = '%s'" % self.doc.name) + date_diff = webnotes.conn.sql("select TIMEDIFF('%s', '%s')" % ( mod_db[0][0],cstr(self.doc.modified))) if date_diff and date_diff[0][0]: msgprint("%s: %s has been modified after you have opened. Please Refresh" % (self.doc.doctype, self.doc.name), raise_exception=1) def stop_sales_order(self): self.check_modified_date() - self.update_stock_ledger(update_stock = -1,is_stopped = 1) + self.update_stock_ledger(-1) webnotes.conn.set(self.doc, 'status', 'Stopped') msgprint("""%s: %s has been Stopped. To make transactions against this Sales Order you need to Unstop it.""" % (self.doc.doctype, self.doc.name)) def unstop_sales_order(self): self.check_modified_date() - self.update_stock_ledger(update_stock = 1,is_stopped = 1) + self.update_stock_ledger(1) webnotes.conn.set(self.doc, 'status', 'Submitted') msgprint("%s: %s has been Unstopped" % (self.doc.doctype, self.doc.name)) - def update_stock_ledger(self, update_stock, is_stopped = 0): + def update_stock_ledger(self, update_stock): from stock.utils import update_bin - for d in self.get_item_list(is_stopped): + for d in self.get_item_list(): if webnotes.conn.get_value("Item", d['item_code'], "is_stock_item") == "Yes": args = { "item_code": d['item_code'], @@ -281,10 +244,6 @@ class DocType(SellingController): "is_amended": self.doc.amended_from and 'Yes' or 'No' } update_bin(args) - - - def get_item_list(self, is_stopped): - return get_obj('Sales Common').get_item_list( self, is_stopped) def on_update(self): pass @@ -343,8 +302,7 @@ def make_delivery_note(source_name, target_doclist=None): "field_map": { "export_rate": "export_rate", "name": "prevdoc_detail_docname", - "parent": "prevdoc_docname", - "parenttype": "prevdoc_doctype", + "parent": "against_sales_order", "reserved_warehouse": "warehouse" }, "postprocess": update_item, diff --git a/selling/doctype/sales_order/sales_order.txt b/selling/doctype/sales_order/sales_order.txt index 46a06b5bc40..bfbcd944609 100644 --- a/selling/doctype/sales_order/sales_order.txt +++ b/selling/doctype/sales_order/sales_order.txt @@ -8,6 +8,7 @@ }, { "allow_attach": 1, + "allow_import": 1, "autoname": "naming_series:", "doctype": "DocType", "document_type": "Transaction", @@ -360,7 +361,7 @@ "label": "Packing Details", "oldfieldname": "packing_details", "oldfieldtype": "Table", - "options": "Delivery Note Packing Item", + "options": "Packed Item", "print_hide": 1, "read_only": 1 }, diff --git a/selling/doctype/sales_order/test_sales_order.py b/selling/doctype/sales_order/test_sales_order.py index 7b72271bec9..0ee58a7fd27 100644 --- a/selling/doctype/sales_order/test_sales_order.py +++ b/selling/doctype/sales_order/test_sales_order.py @@ -72,10 +72,13 @@ class TestSalesOrder(unittest.TestCase): def create_dn_against_so(self, so, delivered_qty=0): from stock.doctype.delivery_note.test_delivery_note import test_records as dn_test_records + from stock.doctype.delivery_note.test_delivery_note import _insert_purchase_receipt + + _insert_purchase_receipt(so.doclist[1].item_code) + dn = webnotes.bean(webnotes.copy_doclist(dn_test_records[0])) dn.doclist[1].item_code = so.doclist[1].item_code - dn.doclist[1].prevdoc_doctype = "Sales Order" - dn.doclist[1].prevdoc_docname = so.doc.name + dn.doclist[1].against_sales_order = so.doc.name dn.doclist[1].prevdoc_detail_docname = so.doclist[1].name if delivered_qty: dn.doclist[1].qty = delivered_qty @@ -273,14 +276,13 @@ class TestSalesOrder(unittest.TestCase): so.doclist[1].reserved_warehouse, 20.0) def test_warehouse_user(self): - webnotes.session.user = "test@example.com" - webnotes.bean("Profile", "test@example.com").get_controller()\ .add_roles("Sales User", "Sales Manager", "Material User", "Material Manager") webnotes.bean("Profile", "test2@example.com").get_controller()\ .add_roles("Sales User", "Sales Manager", "Material User", "Material Manager") - + + webnotes.session.user = "test@example.com" from stock.utils import UserNotAllowedForWarehouse so = webnotes.bean(copy = test_records[0]) diff --git a/selling/doctype/selling_settings/selling_settings.py b/selling/doctype/selling_settings/selling_settings.py index 93866528e02..620721df06d 100644 --- a/selling/doctype/selling_settings/selling_settings.py +++ b/selling/doctype/selling_settings/selling_settings.py @@ -14,3 +14,7 @@ class DocType: for key in ["cust_master_name", "customer_group", "territory", "maintain_same_sales_rate", "editable_price_list_rate", "selling_price_list"]: webnotes.conn.set_default(key, self.doc.fields.get(key, "")) + + from setup.doctype.naming_series.naming_series import set_by_naming_series + set_by_naming_series("Customer", "customer_name", + self.doc.get("cust_master_name")=="Naming Series", hide_name_field=False) diff --git a/selling/doctype/sms_center/sms_center.py b/selling/doctype/sms_center/sms_center.py index 29e793c04e8..eb331c206eb 100644 --- a/selling/doctype/sms_center/sms_center.py +++ b/selling/doctype/sms_center/sms_center.py @@ -10,7 +10,6 @@ from webnotes.model.bean import copy_doclist from webnotes.model.code import get_obj from webnotes import msgprint -sql = webnotes.conn.sql # ---------- @@ -29,15 +28,15 @@ class DocType: where_clause = self.doc.sales_partner and " and ifnull(is_sales_partner, 0) = 1 and sales_partner = '%s'" % self.doc.sales_partner or " and ifnull(sales_partner, '') != ''" if self.doc.send_to in ['All Contact', 'All Customer Contact', 'All Supplier Contact', 'All Sales Partner Contact']: - rec = sql("select CONCAT(ifnull(first_name,''),'',ifnull(last_name,'')), mobile_no from `tabContact` where ifnull(mobile_no,'')!='' and docstatus != 2 %s" % where_clause) + rec = webnotes.conn.sql("select CONCAT(ifnull(first_name,''),'',ifnull(last_name,'')), mobile_no from `tabContact` where ifnull(mobile_no,'')!='' and docstatus != 2 %s" % where_clause) elif self.doc.send_to == 'All Lead (Open)': - rec = sql("select lead_name, mobile_no from tabLead where ifnull(mobile_no,'')!='' and docstatus != 2 and status = 'Open'") + rec = webnotes.conn.sql("select lead_name, mobile_no from tabLead where ifnull(mobile_no,'')!='' and docstatus != 2 and status = 'Open'") elif self.doc.send_to == 'All Employee (Active)': where_clause = self.doc.department and " and department = '%s'" % self.doc.department or "" where_clause += self.doc.branch and " and branch = '%s'" % self.doc.branch or "" - rec = sql("select employee_name, cell_number from `tabEmployee` where status = 'Active' and docstatus < 2 and ifnull(cell_number,'')!='' %s" % where_clause) + rec = webnotes.conn.sql("select employee_name, cell_number from `tabEmployee` where status = 'Active' and docstatus < 2 and ifnull(cell_number,'')!='' %s" % where_clause) elif self.doc.send_to == 'All Sales Person': - rec = sql("select sales_person_name, mobile_no from `tabSales Person` where docstatus != 2 and ifnull(mobile_no,'')!=''") + rec = webnotes.conn.sql("select sales_person_name, mobile_no from `tabSales Person` where docstatus != 2 and ifnull(mobile_no,'')!=''") rec_list = '' for d in rec: rec_list += d[0] + ' - ' + d[1] + '\n' diff --git a/selling/page/sales_analytics/sales_analytics.js b/selling/page/sales_analytics/sales_analytics.js index 0159ae021c5..daa78b40d04 100644 --- a/selling/page/sales_analytics/sales_analytics.js +++ b/selling/page/sales_analytics/sales_analytics.js @@ -4,7 +4,7 @@ wn.pages['sales-analytics'].onload = function(wrapper) { wn.ui.make_app_page({ parent: wrapper, - title: 'Sales Analytics', + title: wn._('Sales Analytics'), single_column: true }); new erpnext.SalesAnalytics(wrapper); @@ -17,7 +17,7 @@ wn.pages['sales-analytics'].onload = function(wrapper) { erpnext.SalesAnalytics = wn.views.TreeGridReport.extend({ init: function(wrapper) { this._super({ - title: "Sales Analytics", + title: wn._("Sales Analytics"), page: wrapper, parent: $(wrapper).find('.layout-main'), appframe: wrapper.appframe, @@ -30,14 +30,14 @@ erpnext.SalesAnalytics = wn.views.TreeGridReport.extend({ this.tree_grids = { "Customer Group": { - label: "Customer Group / Customer", + label: wn._("Customer Group / Customer"), show: true, item_key: "customer", parent_field: "parent_customer_group", formatter: function(item) { return item.name; } }, "Customer": { - label: "Customer", + label: wn._("Customer"), show: false, item_key: "customer", formatter: function(item) { @@ -45,7 +45,7 @@ erpnext.SalesAnalytics = wn.views.TreeGridReport.extend({ } }, "Item Group": { - label: "Item", + label: wn._("Item"), show: true, parent_field: "parent_item_group", item_key: "item_code", @@ -54,7 +54,7 @@ erpnext.SalesAnalytics = wn.views.TreeGridReport.extend({ } }, "Item": { - label: "Item", + label: wn._("Item"), show: false, item_key: "item_code", formatter: function(item) { @@ -62,7 +62,7 @@ erpnext.SalesAnalytics = wn.views.TreeGridReport.extend({ } }, "Territory": { - label: "Territory / Customer", + label: wn._("Territory / Customer"), show: true, item_key: "customer", parent_field: "parent_territory", @@ -88,23 +88,23 @@ erpnext.SalesAnalytics = wn.views.TreeGridReport.extend({ this.columns = std_columns.concat(this.columns); }, filters: [ - {fieldtype:"Select", label: "Tree Type", options:["Customer Group", "Customer", + {fieldtype:"Select", label: wn._("Tree Type"), options:["Customer Group", "Customer", "Item Group", "Item", "Territory"], filter: function(val, item, opts, me) { return me.apply_zero_filter(val, item, opts, me); }}, - {fieldtype:"Select", label: "Based On", options:["Sales Invoice", + {fieldtype:"Select", label: wn._("Based On"), options:["Sales Invoice", "Sales Order", "Delivery Note"]}, - {fieldtype:"Select", label: "Value or Qty", options:["Value", "Quantity"]}, - {fieldtype:"Select", label: "Company", link:"Company", + {fieldtype:"Select", label: wn._("Value or Qty"), options:["Value", "Quantity"]}, + {fieldtype:"Select", label: wn._("Company"), link:"Company", default_value: "Select Company..."}, - {fieldtype:"Date", label: "From Date"}, - {fieldtype:"Label", label: "To"}, - {fieldtype:"Date", label: "To Date"}, - {fieldtype:"Select", label: "Range", + {fieldtype:"Date", label: wn._("From Date")}, + {fieldtype:"Label", label: wn._("To")}, + {fieldtype:"Date", label: wn._("To Date")}, + {fieldtype:"Select", label: wn._("Range"), options:["Daily", "Weekly", "Monthly", "Quarterly", "Yearly"]}, - {fieldtype:"Button", label: "Refresh", icon:"icon-refresh icon-white", cssClass:"btn-info"}, - {fieldtype:"Button", label: "Reset Filters"} + {fieldtype:"Button", label: wn._("Refresh"), icon:"icon-refresh icon-white", cssClass:"btn-info"}, + {fieldtype:"Button", label: wn._("Reset Filters")} ], setup_filters: function() { var me = this; diff --git a/selling/page/sales_browser/sales_browser.js b/selling/page/sales_browser/sales_browser.js index 53df1887b60..470fb688699 100644 --- a/selling/page/sales_browser/sales_browser.js +++ b/selling/page/sales_browser/sales_browser.js @@ -15,8 +15,9 @@ pscript['onload_Sales Browser'] = function(wrapper){ $(wrapper) .find(".layout-side-section") - .html('
Click on a link to get options to expand \ - get options Add / Edit / Delete.
') + .html('
'+ + wn._('Click on a link to get options to expand get options ') + + wn._('Add') + ' / ' + wn._('Edit') + ' / '+ wn._('Delete') + '.
') wrapper.make_tree = function() { var ctype = wn.get_route()[1] || 'Territory'; @@ -87,22 +88,22 @@ erpnext.SalesChart = Class.extend({ var node_links = []; if (wn.model.can_read(this.ctype)) { - node_links.push('Edit'); + node_links.push(''+wn._('Edit')+''); } if(data.expandable) { if (wn.boot.profile.can_create.indexOf(this.ctype) !== -1 || wn.boot.profile.in_create.indexOf(this.ctype) !== -1) { - node_links.push('Add Child'); + node_links.push('' + wn._('Add Child') + ''); } } if (wn.model.can_write(this.ctype)) { - node_links.push('Rename'); + node_links.push('' + wn._('Rename') + ''); }; if (wn.model.can_delete(this.ctype)) { - node_links.push('Delete'); + node_links.push('' + wn._('Delete') + ''); }; link.toolbar.append(node_links.join(" | ")); @@ -114,18 +115,18 @@ erpnext.SalesChart = Class.extend({ {fieldtype:'Data', fieldname: 'name_field', label:'New ' + me.ctype + ' Name', reqd:true}, {fieldtype:'Select', fieldname:'is_group', label:'Group Node', options:'No\nYes', - description: "Further nodes can be only created under 'Group' type nodes"}, + description: wn._("Further nodes can be only created under 'Group' type nodes")}, {fieldtype:'Button', fieldname:'create_new', label:'Create New' } ] if(me.ctype == "Sales Person") { fields.splice(-1, 0, {fieldtype:'Link', fieldname:'employee', label:'Employee', - options:'Employee', description: "Please enter Employee Id of this sales parson"}); + options:'Employee', description: wn._("Please enter Employee Id of this sales parson")}); } // the dialog var d = new wn.ui.Dialog({ - title:'New ' + me.ctype, + title: wn._('New ') + wn._(me.ctype), fields: fields }) diff --git a/selling/page/sales_funnel/__init__.py b/selling/page/sales_funnel/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/selling/page/sales_funnel/sales_funnel.css b/selling/page/sales_funnel/sales_funnel.css new file mode 100644 index 00000000000..89e904fcfc9 --- /dev/null +++ b/selling/page/sales_funnel/sales_funnel.css @@ -0,0 +1,3 @@ +.funnel-wrapper { + margin: 15px; +} \ No newline at end of file diff --git a/selling/page/sales_funnel/sales_funnel.js b/selling/page/sales_funnel/sales_funnel.js new file mode 100644 index 00000000000..e2c3a98bf59 --- /dev/null +++ b/selling/page/sales_funnel/sales_funnel.js @@ -0,0 +1,189 @@ +// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. +// License: GNU General Public License v3. See license.txt + +wn.pages['sales-funnel'].onload = function(wrapper) { + wn.ui.make_app_page({ + parent: wrapper, + title: 'Sales Funnel', + single_column: true + }); + + wrapper.crm_funnel = new erpnext.CRMFunnel(wrapper); + + wrapper.appframe.add_module_icon("Selling", "sales-funnel", function() { + wn.set_route("selling-home"); + }); +} + +erpnext.CRMFunnel = Class.extend({ + init: function(wrapper) { + var me = this; + // 0 setTimeout hack - this gives time for canvas to get width and height + setTimeout(function() { + me.setup(wrapper); + me.get_data(); + }, 0); + }, + + setup: function(wrapper) { + var me = this; + + this.elements = { + layout: $(wrapper).find(".layout-main"), + from_date: wrapper.appframe.add_date("From Date"), + to_date: wrapper.appframe.add_date("To Date"), + refresh_btn: wrapper.appframe.add_button("Refresh", + function() { me.get_data(); }, "icon-refresh"), + }; + + this.elements.no_data = $('
No Data
') + .toggle(false) + .appendTo(this.elements.layout); + + this.elements.funnel_wrapper = $('
') + .appendTo(this.elements.layout); + + this.options = { + from_date: wn.datetime.add_months(wn.datetime.get_today(), -1), + to_date: wn.datetime.get_today() + }; + + // set defaults and bind on change + $.each(this.options, function(k, v) { + me.elements[k].val(wn.datetime.str_to_user(v)); + me.elements[k].on("change", function() { + me.options[k] = wn.datetime.user_to_str($(this).val()); + me.get_data(); + }); + }); + + // bind refresh + this.elements.refresh_btn.on("click", function() { + me.get_data(this); + }); + + // bind resize + $(window).resize(function() { + me.render(); + }); + }, + + get_data: function(btn) { + var me = this; + wn.call({ + module: "selling", + page: "crm_funnel", + method: "get_funnel_data", + args: { + from_date: this.options.from_date, + to_date: this.options.to_date + }, + btn: btn, + callback: function(r) { + if(!r.exc) { + me.options.data = r.message; + me.render(); + } + } + }); + }, + + render: function() { + var me = this; + this.prepare(); + + var context = this.elements.context, + x_start = 0.0, + x_end = this.options.width, + x_mid = (x_end - x_start) / 2.0, + y = 0, + y_old = 0.0; + + if(this.options.total_value === 0) { + this.elements.no_data.toggle(true); + return; + } + + this.options.data.forEach(function(d) { + context.fillStyle = d.color; + context.strokeStyle = d.color; + me.draw_triangle(x_start, x_mid, x_end, y, me.options.height); + + y_old = y; + + // new y + y = y + d.height; + + // new x + var half_side = (me.options.height - y) / Math.sqrt(3); + x_start = x_mid - half_side; + x_end = x_mid + half_side; + + var y_mid = y_old + (y - y_old) / 2.0; + + me.draw_legend(x_mid, y_mid, me.options.width, me.options.height, d.value + " - " + d.title); + }); + }, + + prepare: function() { + var me = this; + + this.elements.no_data.toggle(false); + + // calculate width and height options + this.options.width = $(this.elements.funnel_wrapper).width() * 2.0 / 3.0; + this.options.height = (Math.sqrt(3) * this.options.width) / 2.0; + + // calculate total weightage + // as height decreases, area decreases by the square of the reduction + // hence, compensating by squaring the index value + this.options.total_weightage = this.options.data.reduce( + function(prev, curr, i) { return prev + Math.pow(i+1, 2) * curr.value; }, 0.0); + + // calculate height for each data + $.each(this.options.data, function(i, d) { + d.height = me.options.height * d.value * Math.pow(i+1, 2) / me.options.total_weightage; + }); + + this.elements.canvas = $('') + .appendTo(this.elements.funnel_wrapper.empty()) + .attr("width", $(this.elements.funnel_wrapper).width()) + .attr("height", this.options.height); + + this.elements.context = this.elements.canvas.get(0).getContext("2d"); + }, + + draw_triangle: function(x_start, x_mid, x_end, y, height) { + var context = this.elements.context; + context.beginPath(); + context.moveTo(x_start, y); + context.lineTo(x_end, y); + context.lineTo(x_mid, height); + context.lineTo(x_start, y); + context.closePath(); + context.fill(); + }, + + draw_legend: function(x_mid, y_mid, width, height, title) { + var context = this.elements.context; + + // draw line + context.beginPath(); + context.moveTo(x_mid, y_mid); + context.lineTo(width, y_mid); + context.closePath(); + context.stroke(); + + // draw circle + context.beginPath(); + context.arc(width, y_mid, 5, 0, Math.PI * 2, false); + context.closePath(); + context.fill(); + + // draw text + context.fillStyle = "black"; + context.textBaseline = "middle"; + context.font = "1.1em sans-serif"; + context.fillText(title, width + 20, y_mid); + } +}); \ No newline at end of file diff --git a/selling/page/sales_funnel/sales_funnel.py b/selling/page/sales_funnel/sales_funnel.py new file mode 100644 index 00000000000..be0aebe7bb8 --- /dev/null +++ b/selling/page/sales_funnel/sales_funnel.py @@ -0,0 +1,33 @@ +# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. +# License: GNU General Public License v3. See license.txt + +from __future__ import unicode_literals +import webnotes + +@webnotes.whitelist() +def get_funnel_data(from_date, to_date): + active_leads = webnotes.conn.sql("""select count(*) from `tabLead` + where (`modified` between %s and %s) + and status != "Do Not Contact" """, (from_date, to_date))[0][0] + + active_leads += webnotes.conn.sql("""select count(distinct customer) from `tabContact` + where (`modified` between %s and %s) + and status != "Passive" """, (from_date, to_date))[0][0] + + opportunities = webnotes.conn.sql("""select count(*) from `tabOpportunity` + where docstatus = 1 and (`modified` between %s and %s) + and status != "Lost" """, (from_date, to_date))[0][0] + + quotations = webnotes.conn.sql("""select count(*) from `tabQuotation` + where docstatus = 1 and (`modified` between %s and %s) + and status != "Lost" """, (from_date, to_date))[0][0] + + sales_orders = webnotes.conn.sql("""select count(*) from `tabQuotation` + where docstatus = 1 and (`modified` between %s and %s)""", (from_date, to_date))[0][0] + + return [ + { "title": "Active Leads / Customers", "value": active_leads, "color": "#B03B46" }, + { "title": "Opportunities", "value": opportunities, "color": "#F09C00" }, + { "title": "Quotations", "value": quotations, "color": "#006685" }, + { "title": "Sales Orders", "value": sales_orders, "color": "#00AD65" } + ] diff --git a/selling/page/sales_funnel/sales_funnel.txt b/selling/page/sales_funnel/sales_funnel.txt new file mode 100644 index 00000000000..b841f20fdcc --- /dev/null +++ b/selling/page/sales_funnel/sales_funnel.txt @@ -0,0 +1,33 @@ +[ + { + "creation": "2013-10-04 13:17:18", + "docstatus": 0, + "modified": "2013-10-04 13:17:18", + "modified_by": "Administrator", + "owner": "Administrator" + }, + { + "doctype": "Page", + "icon": "icon-filter", + "module": "Selling", + "name": "__common__", + "page_name": "sales-funnel", + "standard": "Yes", + "title": "Sales Funnel" + }, + { + "doctype": "Page Role", + "name": "__common__", + "parent": "sales-funnel", + "parentfield": "roles", + "parenttype": "Page", + "role": "Sales Manager" + }, + { + "doctype": "Page", + "name": "sales-funnel" + }, + { + "doctype": "Page Role" + } +] \ No newline at end of file diff --git a/selling/page/selling_home/selling_home.js b/selling/page/selling_home/selling_home.js index 4981ee77f52..ad264c94ea0 100644 --- a/selling/page/selling_home/selling_home.js +++ b/selling/page/selling_home/selling_home.js @@ -63,7 +63,7 @@ wn.module_page["Selling"] = [ "label": wn._("Selling Settings"), "route": "Form/Selling Settings", "doctype":"Selling Settings", - "description": "Settings for Selling Module" + "description": wn._("Settings for Selling Module") }, { "route":"Form/Shopping Cart Settings", @@ -160,6 +160,10 @@ wn.module_page["Selling"] = [ "label":wn._("Sales Analytics"), page: "sales-analytics" }, + { + "label":wn._("Sales Funnel"), + page: "sales-funnel" + }, ] }, { diff --git a/selling/report/customers_not_buying_since_long_time/customers_not_buying_since_long_time.js b/selling/report/customers_not_buying_since_long_time/customers_not_buying_since_long_time.js index d527b344b88..78c38286c25 100644 --- a/selling/report/customers_not_buying_since_long_time/customers_not_buying_since_long_time.js +++ b/selling/report/customers_not_buying_since_long_time/customers_not_buying_since_long_time.js @@ -5,7 +5,7 @@ wn.query_reports["Customers Not Buying Since Long Time"] = { "filters": [ { "fieldname":"days_since_last_order", - "label": "Days Since Last Order", + "label": wn._("Days Since Last Order"), "fieldtype": "Int", "default": 60 } diff --git a/selling/report/sales_person_target_variance_item_group_wise/sales_person_target_variance_item_group_wise.js b/selling/report/sales_person_target_variance_item_group_wise/sales_person_target_variance_item_group_wise.js index 5f2b89cbbd8..d41adb6ddee 100644 --- a/selling/report/sales_person_target_variance_item_group_wise/sales_person_target_variance_item_group_wise.js +++ b/selling/report/sales_person_target_variance_item_group_wise/sales_person_target_variance_item_group_wise.js @@ -5,21 +5,21 @@ wn.query_reports["Sales Person Target Variance Item Group-Wise"] = { "filters": [ { fieldname: "fiscal_year", - label: "Fiscal Year", + label: wn._("Fiscal Year"), fieldtype: "Link", options: "Fiscal Year", default: sys_defaults.fiscal_year }, { fieldname: "period", - label: "Period", + label: wn._("Period"), fieldtype: "Select", options: "Monthly\nQuarterly\nHalf-Yearly\nYearly", default: "Monthly" }, { fieldname: "target_on", - label: "Target On", + label: wn._("Target On"), fieldtype: "Select", options: "Quantity\nAmount", default: "Quantity" diff --git a/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.js b/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.js index 6ddb5f97c9d..1f62084f473 100644 --- a/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.js +++ b/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.js @@ -5,57 +5,57 @@ wn.query_reports["Sales Person-wise Transaction Summary"] = { "filters": [ { fieldname: "sales_person", - label: "Sales Person", + label: wn._("Sales Person"), fieldtype: "Link", options: "Sales Person" }, { fieldname: "doc_type", - label: "Document Type", + label: wn._("Document Type"), fieldtype: "Select", options: "Sales Order\nDelivery Note\nSales Invoice", default: "Sales Order" }, { fieldname: "from_date", - label: "From Date", + label: wn._("From Date"), fieldtype: "Date", default: wn.defaults.get_user_default("year_start_date"), }, { fieldname:"to_date", - label: "To Date", + label: wn._("To Date"), fieldtype: "Date", default: get_today() }, { fieldname:"company", - label: "Company", + label: wn._("Company"), fieldtype: "Link", options: "Company", default: wn.defaults.get_default("company") }, { fieldname:"item_group", - label: "Item Group", + label: wn._("Item Group"), fieldtype: "Link", options: "Item Group", }, { fieldname:"brand", - label: "Brand", + label: wn._("Brand"), fieldtype: "Link", options: "Brand", }, { fieldname:"customer", - label: "Customer", + label: wn._("Customer"), fieldtype: "Link", options: "Customer", }, { fieldname:"territory", - label: "Territory", + label: wn._("Territory"), fieldtype: "Link", options: "Territory", }, diff --git a/selling/report/territory_target_variance_item_group_wise/territory_target_variance_item_group_wise.js b/selling/report/territory_target_variance_item_group_wise/territory_target_variance_item_group_wise.js index 882cdb6e83a..ce2bc9f16c2 100644 --- a/selling/report/territory_target_variance_item_group_wise/territory_target_variance_item_group_wise.js +++ b/selling/report/territory_target_variance_item_group_wise/territory_target_variance_item_group_wise.js @@ -5,21 +5,21 @@ wn.query_reports["Territory Target Variance Item Group-Wise"] = { "filters": [ { fieldname: "fiscal_year", - label: "Fiscal Year", + label: wn._("Fiscal Year"), fieldtype: "Link", options: "Fiscal Year", default: sys_defaults.fiscal_year }, { fieldname: "period", - label: "Period", + label: wn._("Period"), fieldtype: "Select", options: "Monthly\nQuarterly\nHalf-Yearly\nYearly", default: "Monthly" }, { fieldname: "target_on", - label: "Target On", + label: wn._("Target On"), fieldtype: "Select", options: "Quantity\nAmount", default: "Quantity" diff --git a/selling/doctype/sales_common/sales_common.js b/selling/sales_common.js similarity index 96% rename from selling/doctype/sales_common/sales_common.js rename to selling/sales_common.js index 8203af843f3..89b60b72db6 100644 --- a/selling/doctype/sales_common/sales_common.js +++ b/selling/sales_common.js @@ -10,6 +10,7 @@ wn.provide("erpnext.selling"); wn.require("app/js/transaction.js"); +wn.require("app/js/controllers/accounts.js"); erpnext.selling.SellingController = erpnext.TransactionController.extend({ onload: function() { @@ -70,25 +71,17 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({ this.frm.set_query("batch_no", this.fname, function(doc, cdt, cdn) { var item = wn.model.get_doc(cdt, cdn); if(!item.item_code) { - wn.throw("Please enter Item Code to get batch no"); + wn.throw(wn._("Please enter Item Code to get batch no")); } else { - if(item.warehouse) { - return { - query : "selling.doctype.sales_common.sales_common.get_batch_no", - filters: { - 'item_code': item.item_code, - 'warehouse': item.warehouse, - 'posting_date': me.frm.doc.posting_date - } - } - } else { - return{ - query : "selling.doctype.sales_common.sales_common.get_batch_no", - filters: { - 'item_code': item.item_code, - 'posting_date': me.frm.doc.posting_date - } - } + filters = { + 'item_code': item.item_code, + 'posting_date': me.frm.doc.posting_date, + } + if(item.warehouse) filters["warehouse"] = item.warehouse + + return { + query : "controllers.queries.get_batch_no", + filters: filters } } }); @@ -628,16 +621,16 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({ // Help for Sales BOM items var set_sales_bom_help = function(doc) { if(!cur_frm.fields_dict.packing_list) return; - if (getchildren('Delivery Note Packing Item', doc.name, 'packing_details').length) { + if (getchildren('Packed Item', doc.name, 'packing_details').length) { $(cur_frm.fields_dict.packing_list.row.wrapper).toggle(true); if (inList(['Delivery Note', 'Sales Invoice'], doc.doctype)) { - help_msg = "
\ - For 'Sales BOM' items, warehouse, serial no and batch no \ + help_msg = "
" + + wn._("For 'Sales BOM' items, warehouse, serial no and batch no \ will be considered from the 'Packing List' table. \ If warehouse and batch no are same for all packing items for any 'Sales BOM' item, \ - those values can be entered in the main item table, values will be copied to 'Packing List' table. \ -
"; + those values can be entered in the main item table, values will be copied to 'Packing List' table.")+ + "
"; wn.meta.get_docfield(doc.doctype, 'sales_bom_help', doc.name).options = help_msg; } } else { diff --git a/selling/utils/cart.py b/selling/utils/cart.py index 7e7fb2e1035..e48059d50e3 100644 --- a/selling/utils/cart.py +++ b/selling/utils/cart.py @@ -12,8 +12,8 @@ class WebsitePriceListMissingError(webnotes.ValidationError): pass def set_cart_count(quotation=None): if not quotation: quotation = _get_cart_quotation() - webnotes.add_cookies["cart_count"] = cstr(len(quotation.doclist.get( - {"parentfield": "quotation_details"})) or "") + cart_count = cstr(len(quotation.doclist.get({"parentfield": "quotation_details"}))) + webnotes._response.set_cookie("cart_count", cart_count) @webnotes.whitelist() def get_cart_quotation(doclist=None): @@ -47,7 +47,7 @@ def place_order(): sales_order.ignore_permissions = True sales_order.insert() sales_order.submit() - webnotes.add_cookies["cart_count"] = "" + webnotes._response.set_cookie("cart_count", "") return sales_order.doc.name diff --git a/setup/doctype/authorization_control/authorization_control.py b/setup/doctype/authorization_control/authorization_control.py index ddf0791bde1..533f3988e32 100644 --- a/setup/doctype/authorization_control/authorization_control.py +++ b/setup/doctype/authorization_control/authorization_control.py @@ -9,7 +9,6 @@ from webnotes.model.bean import getlist from webnotes import session, msgprint from setup.utils import get_company_currency -sql = webnotes.conn.sql from utilities.transaction_base import TransactionBase @@ -28,10 +27,10 @@ class DocType(TransactionBase): amt_list.append(flt(x[0])) max_amount = max(amt_list) - app_dtl = sql("select approving_user, approving_role from `tabAuthorization Rule` where transaction = %s and (value = %s or value > %s) and docstatus != 2 and based_on = %s and company = %s %s" % ('%s', '%s', '%s', '%s', '%s', condition), (doctype_name, flt(max_amount), total, based_on, company)) + app_dtl = webnotes.conn.sql("select approving_user, approving_role from `tabAuthorization Rule` where transaction = %s and (value = %s or value > %s) and docstatus != 2 and based_on = %s and company = %s %s" % ('%s', '%s', '%s', '%s', '%s', condition), (doctype_name, flt(max_amount), total, based_on, company)) if not app_dtl: - app_dtl = sql("select approving_user, approving_role from `tabAuthorization Rule` where transaction = %s and (value = %s or value > %s) and docstatus != 2 and based_on = %s and ifnull(company,'') = '' %s" % ('%s', '%s', '%s', '%s', condition), (doctype_name, flt(max_amount), total, based_on)) + app_dtl = webnotes.conn.sql("select approving_user, approving_role from `tabAuthorization Rule` where transaction = %s and (value = %s or value > %s) and docstatus != 2 and based_on = %s and ifnull(company,'') = '' %s" % ('%s', '%s', '%s', '%s', condition), (doctype_name, flt(max_amount), total, based_on)) for d in app_dtl: if(d[0]): appr_users.append(d[0]) if(d[1]): appr_roles.append(d[1]) @@ -58,18 +57,18 @@ class DocType(TransactionBase): add_cond1,add_cond2 = '','' if based_on == 'Itemwise Discount': add_cond1 += " and master_name = '"+cstr(item)+"'" - itemwise_exists = sql("select value from `tabAuthorization Rule` where transaction = %s and value <= %s and based_on = %s and company = %s and docstatus != 2 %s %s" % ('%s', '%s', '%s', '%s', cond, add_cond1), (doctype_name, total, based_on, company)) + itemwise_exists = webnotes.conn.sql("select value from `tabAuthorization Rule` where transaction = %s and value <= %s and based_on = %s and company = %s and docstatus != 2 %s %s" % ('%s', '%s', '%s', '%s', cond, add_cond1), (doctype_name, total, based_on, company)) if not itemwise_exists: - itemwise_exists = sql("select value from `tabAuthorization Rule` where transaction = %s and value <= %s and based_on = %s and ifnull(company,'') = '' and docstatus != 2 %s %s" % ('%s', '%s', '%s', cond, add_cond1), (doctype_name, total, based_on)) + itemwise_exists = webnotes.conn.sql("select value from `tabAuthorization Rule` where transaction = %s and value <= %s and based_on = %s and ifnull(company,'') = '' and docstatus != 2 %s %s" % ('%s', '%s', '%s', cond, add_cond1), (doctype_name, total, based_on)) if itemwise_exists: self.get_appr_user_role(itemwise_exists, doctype_name, total, based_on, cond+add_cond1, item,company) chk = 0 if chk == 1: if based_on == 'Itemwise Discount': add_cond2 += " and ifnull(master_name,'') = ''" - appr = sql("select value from `tabAuthorization Rule` where transaction = %s and value <= %s and based_on = %s and company = %s and docstatus != 2 %s %s" % ('%s', '%s', '%s', '%s', cond, add_cond2), (doctype_name, total, based_on, company)) + appr = webnotes.conn.sql("select value from `tabAuthorization Rule` where transaction = %s and value <= %s and based_on = %s and company = %s and docstatus != 2 %s %s" % ('%s', '%s', '%s', '%s', cond, add_cond2), (doctype_name, total, based_on, company)) if not appr: - appr = sql("select value from `tabAuthorization Rule` where transaction = %s and value <= %s and based_on = %s and ifnull(company,'') = '' and docstatus != 2 %s %s"% ('%s', '%s', '%s', cond, add_cond2), (doctype_name, total, based_on)) + appr = webnotes.conn.sql("select value from `tabAuthorization Rule` where transaction = %s and value <= %s and based_on = %s and ifnull(company,'') = '' and docstatus != 2 %s %s"% ('%s', '%s', '%s', cond, add_cond2), (doctype_name, total, based_on)) self.get_appr_user_role(appr, doctype_name, total, based_on, cond+add_cond2, item, company) @@ -112,7 +111,7 @@ class DocType(TransactionBase): # ================ # Check for authorization set for individual user - based_on = [x[0] for x in sql("select distinct based_on from `tabAuthorization Rule` where transaction = %s and system_user = %s and (company = %s or ifnull(company,'')='') and docstatus != 2", (doctype_name, session['user'], company))] + based_on = [x[0] for x in webnotes.conn.sql("select distinct based_on from `tabAuthorization Rule` where transaction = %s and system_user = %s and (company = %s or ifnull(company,'')='') and docstatus != 2", (doctype_name, session['user'], company))] for d in based_on: self.bifurcate_based_on_type(doctype_name, total, av_dis, d, doc_obj, 1, company) @@ -124,7 +123,7 @@ class DocType(TransactionBase): # Specific Role # =============== # Check for authorization set on particular roles - based_on = [x[0] for x in sql("""select based_on + based_on = [x[0] for x in webnotes.conn.sql("""select based_on from `tabAuthorization Rule` where transaction = %s and system_role IN (%s) and based_on IN (%s) and (company = %s or ifnull(company,'')='') @@ -148,9 +147,9 @@ class DocType(TransactionBase): # payroll related check def get_value_based_rule(self,doctype_name,employee,total_claimed_amount,company): val_lst =[] - val = sql("select value from `tabAuthorization Rule` where transaction=%s and (to_emp=%s or to_designation IN (select designation from `tabEmployee` where name=%s)) and ifnull(value,0)< %s and company = %s and docstatus!=2",(doctype_name,employee,employee,total_claimed_amount,company)) + val = webnotes.conn.sql("select value from `tabAuthorization Rule` where transaction=%s and (to_emp=%s or to_designation IN (select designation from `tabEmployee` where name=%s)) and ifnull(value,0)< %s and company = %s and docstatus!=2",(doctype_name,employee,employee,total_claimed_amount,company)) if not val: - val = sql("select value from `tabAuthorization Rule` where transaction=%s and (to_emp=%s or to_designation IN (select designation from `tabEmployee` where name=%s)) and ifnull(value,0)< %s and ifnull(company,'') = '' and docstatus!=2",(doctype_name, employee, employee, total_claimed_amount)) + val = webnotes.conn.sql("select value from `tabAuthorization Rule` where transaction=%s and (to_emp=%s or to_designation IN (select designation from `tabEmployee` where name=%s)) and ifnull(value,0)< %s and ifnull(company,'') = '' and docstatus!=2",(doctype_name, employee, employee, total_claimed_amount)) if val: val_lst = [y[0] for y in val] @@ -158,9 +157,9 @@ class DocType(TransactionBase): val_lst.append(0) max_val = max(val_lst) - rule = sql("select name, to_emp, to_designation, approving_role, approving_user from `tabAuthorization Rule` where transaction=%s and company = %s and (to_emp=%s or to_designation IN (select designation from `tabEmployee` where name=%s)) and ifnull(value,0)= %s and docstatus!=2",(doctype_name,company,employee,employee,flt(max_val)), as_dict=1) + rule = webnotes.conn.sql("select name, to_emp, to_designation, approving_role, approving_user from `tabAuthorization Rule` where transaction=%s and company = %s and (to_emp=%s or to_designation IN (select designation from `tabEmployee` where name=%s)) and ifnull(value,0)= %s and docstatus!=2",(doctype_name,company,employee,employee,flt(max_val)), as_dict=1) if not rule: - rule = sql("select name, to_emp, to_designation, approving_role, approving_user from `tabAuthorization Rule` where transaction=%s and ifnull(company,'') = '' and (to_emp=%s or to_designation IN (select designation from `tabEmployee` where name=%s)) and ifnull(value,0)= %s and docstatus!=2",(doctype_name,employee,employee,flt(max_val)), as_dict=1) + rule = webnotes.conn.sql("select name, to_emp, to_designation, approving_role, approving_user from `tabAuthorization Rule` where transaction=%s and ifnull(company,'') = '' and (to_emp=%s or to_designation IN (select designation from `tabEmployee` where name=%s)) and ifnull(value,0)= %s and docstatus!=2",(doctype_name,employee,employee,flt(max_val)), as_dict=1) return rule @@ -175,9 +174,9 @@ class DocType(TransactionBase): if doctype_name == 'Expense Claim': rule = self.get_value_based_rule(doctype_name,doc_obj.doc.employee,doc_obj.doc.total_claimed_amount, doc_obj.doc.company) elif doctype_name == 'Appraisal': - rule = sql("select name, to_emp, to_designation, approving_role, approving_user from `tabAuthorization Rule` where transaction=%s and (to_emp=%s or to_designation IN (select designation from `tabEmployee` where name=%s)) and company = %s and docstatus!=2",(doctype_name,doc_obj.doc.employee, doc_obj.doc.employee, doc_obj.doc.company),as_dict=1) + rule = webnotes.conn.sql("select name, to_emp, to_designation, approving_role, approving_user from `tabAuthorization Rule` where transaction=%s and (to_emp=%s or to_designation IN (select designation from `tabEmployee` where name=%s)) and company = %s and docstatus!=2",(doctype_name,doc_obj.doc.employee, doc_obj.doc.employee, doc_obj.doc.company),as_dict=1) if not rule: - rule = sql("select name, to_emp, to_designation, approving_role, approving_user from `tabAuthorization Rule` where transaction=%s and (to_emp=%s or to_designation IN (select designation from `tabEmployee` where name=%s)) and ifnull(company,'') = '' and docstatus!=2",(doctype_name,doc_obj.doc.employee, doc_obj.doc.employee),as_dict=1) + rule = webnotes.conn.sql("select name, to_emp, to_designation, approving_role, approving_user from `tabAuthorization Rule` where transaction=%s and (to_emp=%s or to_designation IN (select designation from `tabEmployee` where name=%s)) and ifnull(company,'') = '' and docstatus!=2",(doctype_name,doc_obj.doc.employee, doc_obj.doc.employee),as_dict=1) if rule: for m in rule: @@ -185,7 +184,7 @@ class DocType(TransactionBase): if m['approving_user']: app_specific_user.append(m['approving_user']) elif m['approving_role']: - user_lst = [z[0] for z in sql("select distinct t1.name from `tabProfile` t1, `tabUserRole` t2 where t2.role=%s and t2.parent=t1.name and t1.name !='Administrator' and t1.name != 'Guest' and t1.docstatus !=2",m['approving_role'])] + user_lst = [z[0] for z in webnotes.conn.sql("select distinct t1.name from `tabProfile` t1, `tabUserRole` t2 where t2.role=%s and t2.parent=t1.name and t1.name !='Administrator' and t1.name != 'Guest' and t1.docstatus !=2",m['approving_role'])] for x in user_lst: if not x in app_user: app_user.append(x) diff --git a/setup/doctype/authorization_rule/authorization_rule.py b/setup/doctype/authorization_rule/authorization_rule.py index 3d2de4776d6..ea22b154b91 100644 --- a/setup/doctype/authorization_rule/authorization_rule.py +++ b/setup/doctype/authorization_rule/authorization_rule.py @@ -9,7 +9,6 @@ from webnotes.model import db_exists from webnotes.model.bean import copy_doclist from webnotes import msgprint -sql = webnotes.conn.sql @@ -19,7 +18,7 @@ class DocType: def check_duplicate_entry(self): - exists = sql("""select name, docstatus from `tabAuthorization Rule` + exists = webnotes.conn.sql("""select name, docstatus from `tabAuthorization Rule` where transaction = %s and based_on = %s and system_user = %s and system_role = %s and approving_user = %s and approving_role = %s and to_emp =%s and to_designation=%s and name != %s""", @@ -39,12 +38,12 @@ class DocType: def validate_master_name(self): if self.doc.based_on == 'Customerwise Discount' and \ - not sql("select name from tabCustomer where name = '%s' and docstatus != 2" % \ + not webnotes.conn.sql("select name from tabCustomer where name = '%s' and docstatus != 2" % \ (self.doc.master_name)): msgprint("Please select valid Customer Name for Customerwise Discount", raise_exception=1) elif self.doc.based_on == 'Itemwise Discount' and \ - not sql("select name from tabItem where name = '%s' and docstatus != 2" % \ + not webnotes.conn.sql("select name from tabItem where name = '%s' and docstatus != 2" % \ (self.doc.master_name)): msgprint("Please select valid Item Name for Itemwise Discount", raise_exception=1) elif (self.doc.based_on == 'Grand Total' or \ @@ -65,7 +64,7 @@ class DocType: Applicable To (Role).", raise_exception=1) elif self.doc.system_user and self.doc.approving_role and \ has_common([self.doc.approving_role], [x[0] for x in \ - sql("select role from `tabUserRole` where parent = '%s'" % \ + webnotes.conn.sql("select role from `tabUserRole` where parent = '%s'" % \ (self.doc.system_user))]): msgprint("System User : %s is assigned role : %s. So rule does not make sense" % (self.doc.system_user,self.doc.approving_role), raise_exception=1) diff --git a/setup/doctype/backup_manager/backup_dropbox.py b/setup/doctype/backup_manager/backup_dropbox.py index b4a8f66d4c0..3d3f428260a 100644 --- a/setup/doctype/backup_manager/backup_dropbox.py +++ b/setup/doctype/backup_manager/backup_dropbox.py @@ -61,8 +61,8 @@ def dropbox_callback(oauth_token=None, not_approved=False): allowed = 0 message = "Dropbox Access not approved." - webnotes.message_title = "Dropbox Approval" - webnotes.message = "

%s

Please close this window.

" % message + webnotes.local.message_title = "Dropbox Approval" + webnotes.local.message = "

%s

Please close this window.

" % message webnotes.conn.commit() webnotes.response['type'] = 'page' diff --git a/setup/doctype/backup_manager/backup_googledrive.py b/setup/doctype/backup_manager/backup_googledrive.py index 440d907f2ed..c72295ae627 100644 --- a/setup/doctype/backup_manager/backup_googledrive.py +++ b/setup/doctype/backup_manager/backup_googledrive.py @@ -114,9 +114,9 @@ def backup_to_gdrive(): def get_gdrive_flow(): from oauth2client.client import OAuth2WebServerFlow - import conf + from webnotes import conf - if not hasattr(conf, "gdrive_client_id"): + if not "gdrive_client_id" in conf: webnotes.msgprint(_("Please set Google Drive access keys in") + " conf.py", raise_exception=True) @@ -170,4 +170,4 @@ def create_folder(name, service, folder_id): return database['id'] if __name__=="__main__": - backup_to_gdrive() \ No newline at end of file + backup_to_gdrive() diff --git a/setup/doctype/company/company.js b/setup/doctype/company/company.js index d023f8df49a..0c864fa80aa 100644 --- a/setup/doctype/company/company.js +++ b/setup/doctype/company/company.js @@ -61,7 +61,8 @@ cur_frm.cscript.has_special_chars = function(t) { cur_frm.cscript.company_name = function(doc){ if(doc.company_name && cur_frm.cscript.has_special_chars(doc.company_name)){ - msgprint("Special Characters ! @ # $ % ^ * + = - [ ] ' ; , / { } | : < > ? are not allowed for\nCompany Name " + doc.company_name +"") + msgprint((""+wn._("Special Characters")+" ! @ # $ % ^ * + = - [ ] ' ; , / { } | : < > ? "+ + wn._("are not allowed for ")+"\n"+wn._("Company Name")+" "+ doc.company_name +"")) doc.company_name = ''; refresh_field('company_name'); } @@ -69,7 +70,8 @@ cur_frm.cscript.company_name = function(doc){ cur_frm.cscript.abbr = function(doc){ if(doc.abbr && cur_frm.cscript.has_special_chars(doc.abbr)){ - msgprint("Special Characters ! @ # $ % ^ * + = - [ ] ' ; , / { } | : < > ? are not allowed for\nAbbr " + doc.abbr +"") + msgprint(""+wn._("Special Characters ")+"! @ # $ % ^ * + = - [ ] ' ; , / { } | : < > ?" + + wn._("are not allowed for")+ "\nAbbr " + doc.abbr +"") doc.abbr = ''; refresh_field('abbr'); } diff --git a/setup/doctype/company/company.py b/setup/doctype/company/company.py index 7da231031ea..dff5569e1ed 100644 --- a/setup/doctype/company/company.py +++ b/setup/doctype/company/company.py @@ -8,7 +8,6 @@ from webnotes import _, msgprint from webnotes.utils import cstr import webnotes.defaults -sql = webnotes.conn.sql class DocType: def __init__(self,d,dl): @@ -329,4 +328,4 @@ def replace_abbr(company, old, new): for dt in ["Account", "Cost Center", "Warehouse"]: _rename_record(dt) - webnotes.conn.commit() \ No newline at end of file + webnotes.conn.commit() diff --git a/setup/doctype/company/company.txt b/setup/doctype/company/company.txt index 1ba1dde4811..eb6b9ad35f4 100644 --- a/setup/doctype/company/company.txt +++ b/setup/doctype/company/company.txt @@ -2,7 +2,7 @@ { "creation": "2013-04-10 08:35:39", "docstatus": 0, - "modified": "2013-08-28 19:15:04", + "modified": "2013-10-08 15:18:34", "modified_by": "Administrator", "owner": "Administrator" }, @@ -80,7 +80,7 @@ "fieldtype": "Select", "label": "Domain", "options": "Distribution\nManufacturing\nRetail\nServices", - "reqd": 1 + "reqd": 0 }, { "doctype": "DocField", diff --git a/setup/doctype/customer_group/customer_group.js b/setup/doctype/customer_group/customer_group.js index 2953de542d5..9541cf8e106 100644 --- a/setup/doctype/customer_group/customer_group.js +++ b/setup/doctype/customer_group/customer_group.js @@ -9,7 +9,7 @@ cur_frm.cscript.set_root_readonly = function(doc) { // read-only for root customer group if(!doc.parent_customer_group) { cur_frm.perm = [[1,0,0], [1,0,0]]; - cur_frm.set_intro("This is a root customer group and cannot be edited."); + cur_frm.set_intro(wn._("This is a root customer group and cannot be edited.")); } else { cur_frm.set_intro(null); } diff --git a/setup/doctype/customer_group/customer_group.py b/setup/doctype/customer_group/customer_group.py index 0940e1f0b3c..1264c1b3ece 100644 --- a/setup/doctype/customer_group/customer_group.py +++ b/setup/doctype/customer_group/customer_group.py @@ -5,7 +5,6 @@ from __future__ import unicode_literals import webnotes from webnotes import msgprint -sql = webnotes.conn.sql from webnotes.utils.nestedset import DocTypeNestedSet class DocType(DocTypeNestedSet): @@ -15,7 +14,7 @@ class DocType(DocTypeNestedSet): self.nsm_parent_field = 'parent_customer_group'; def validate(self): - if sql("select name from `tabCustomer Group` where name = %s and docstatus = 2", + if webnotes.conn.sql("select name from `tabCustomer Group` where name = %s and docstatus = 2", (self.doc.customer_group_name)): msgprint("""Another %s record is trashed. To untrash please go to Setup -> Recycle Bin.""" % @@ -33,7 +32,7 @@ class DocType(DocTypeNestedSet): self.doc.name, raise_exception=1) def on_trash(self): - cust = sql("select name from `tabCustomer` where ifnull(customer_group, '') = %s", + cust = webnotes.conn.sql("select name from `tabCustomer` where ifnull(customer_group, '') = %s", self.doc.name) cust = [d[0] for d in cust] if cust: @@ -42,7 +41,7 @@ class DocType(DocTypeNestedSet): To trash/delete this, remove/change customer group in customer master""" % (self.doc.name, cust or ''), raise_exception=1) - if sql("select name from `tabCustomer Group` where parent_customer_group = %s \ + if webnotes.conn.sql("select name from `tabCustomer Group` where parent_customer_group = %s \ and docstatus != 2", self.doc.name): msgprint("Child customer group exists for this customer group. \ You can not trash/cancel/delete this customer group.", raise_exception=1) diff --git a/setup/doctype/email_digest/email_digest.js b/setup/doctype/email_digest/email_digest.js index 552109231fb..d009080e98b 100644 --- a/setup/doctype/email_digest/email_digest.js +++ b/setup/doctype/email_digest/email_digest.js @@ -3,10 +3,10 @@ cur_frm.cscript.refresh = function(doc, dt, dn) { doc = locals[dt][dn]; - var save_msg = "You must Save the form before proceeding"; - var err_msg = "There was an error. One probable reason could be that you haven't saved the form. Please contact support@erpnext.com if the problem persists." + var save_msg = wn._("You must ")+ ""+wn._("Save ")+""+wn._("the form before proceeding"); + var err_msg = wn._("There was an error. One probable reason could be that you haven't saved the form. Please contact support@erpnext.com if the problem persists.") - cur_frm.add_custom_button('View Now', function() { + cur_frm.add_custom_button(wn._('View Now'), function() { doc = locals[dt][dn]; if(doc.__unsaved != 1) { return $c_obj(make_doclist(dt, dn), 'get_digest_msg', '', function(r, rt) { @@ -16,7 +16,7 @@ cur_frm.cscript.refresh = function(doc, dt, dn) { } else { //console.log(arguments); var d = new wn.ui.Dialog({ - title: 'Email Digest: ' + dn, + title: wn._('Email Digest: ') + dn, width: 800 }); @@ -29,7 +29,7 @@ cur_frm.cscript.refresh = function(doc, dt, dn) { msgprint(save_msg); } }, 1); - cur_frm.add_custom_button('Send Now', function() { + cur_frm.add_custom_button(wn._('Send Now'), function() { doc = locals[dt][dn]; if(doc.__unsaved != 1) { return $c_obj(make_doclist(dt, dn), 'send', '', function(r, rt) { @@ -38,7 +38,7 @@ cur_frm.cscript.refresh = function(doc, dt, dn) { console.log(r.exc); } else { //console.log(arguments); - msgprint('Message Sent'); + msgprint(wn._('Message Sent')); } }); } else { @@ -56,7 +56,7 @@ cur_frm.cscript.addremove_recipients = function(doc, dt, dn) { // Open a dialog and display checkboxes against email addresses doc = locals[dt][dn]; var d = new wn.ui.Dialog({ - title: 'Add/Remove Recipients', + title: wn._('Add/Remove Recipients'), width: 400 }); var dialog_div = $a(d.body, 'div', 'dialog-div', '', ''); diff --git a/setup/doctype/email_digest/email_digest.py b/setup/doctype/email_digest/email_digest.py index 07efd16ec8b..9a00723110f 100644 --- a/setup/doctype/email_digest/email_digest.py +++ b/setup/doctype/email_digest/email_digest.py @@ -457,8 +457,8 @@ def send(): from webnotes.utils import getdate now_date = now_datetime().date() - import conf - if hasattr(conf, "expires_on") and now_date > getdate(conf.expires_on): + from webnotes import conf + if "expires_on" in conf and now_date > getdate(conf.expires_on): # do not send email digests to expired accounts return diff --git a/setup/doctype/email_settings/email_settings.py b/setup/doctype/email_settings/email_settings.py index 219501eb13f..aa511eefcdd 100644 --- a/setup/doctype/email_settings/email_settings.py +++ b/setup/doctype/email_settings/email_settings.py @@ -3,7 +3,6 @@ from __future__ import unicode_literals import webnotes -sql = webnotes.conn.sql from webnotes.utils import cint diff --git a/setup/doctype/item_group/item_group.js b/setup/doctype/item_group/item_group.js index 31edef27dec..6dbb0d273bf 100644 --- a/setup/doctype/item_group/item_group.js +++ b/setup/doctype/item_group/item_group.js @@ -4,16 +4,22 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) { cur_frm.cscript.set_root_readonly(doc); - cur_frm.add_custom_button("Item Group Tree", function() { + cur_frm.add_custom_button(wn._("Item Group Tree"), function() { wn.set_route("Sales Browser", "Item Group"); }) + + if(!doc.__islocal && doc.show_in_website) { + cur_frm.add_custom_button("View In Website", function() { + window.open(doc.page_name); + }, "icon-globe"); + } } cur_frm.cscript.set_root_readonly = function(doc) { // read-only for root item group if(!doc.parent_item_group) { cur_frm.perm = [[1,0,0], [1,0,0]]; - cur_frm.set_intro("This is a root item group and cannot be edited."); + cur_frm.set_intro(wn._("This is a root item group and cannot be edited.")); } else { cur_frm.set_intro(null); } diff --git a/setup/doctype/item_group/templates/generators/item_group.html b/setup/doctype/item_group/templates/generators/item_group.html index 48db596f843..459c9896c4c 100644 --- a/setup/doctype/item_group/templates/generators/item_group.html +++ b/setup/doctype/item_group/templates/generators/item_group.html @@ -8,7 +8,7 @@ {% include "lib/website/doctype/website_slideshow/templates/includes/slideshow.html" %} {% endif %} {% if description %} -
{{ description or ""}}
+
{{ description or ""}}
{% else %}

{{ name }}

{% endif %} @@ -38,5 +38,13 @@
No items listed.
{% endif %}
+ {% endblock %} \ No newline at end of file diff --git a/setup/doctype/naming_series/naming_series.py b/setup/doctype/naming_series/naming_series.py index 9cc4de294b8..36d6a843000 100644 --- a/setup/doctype/naming_series/naming_series.py +++ b/setup/doctype/naming_series/naming_series.py @@ -8,7 +8,6 @@ from webnotes.utils import cstr from webnotes import msgprint import webnotes.model.doctype -sql = webnotes.conn.sql class DocType: def __init__(self, d, dl): @@ -23,7 +22,7 @@ class DocType: where fieldname='naming_series'""") )))), "prefixes": "\n".join([''] + [i[0] for i in - sql("""select name from tabSeries""")]) + webnotes.conn.sql("""select name from tabSeries""")]) } def scrub_options_list(self, ol): @@ -126,12 +125,43 @@ class DocType: def insert_series(self, series): """insert series if missing""" if not webnotes.conn.exists('Series', series): - sql("insert into tabSeries (name, current) values (%s,0)", (series)) + webnotes.conn.sql("insert into tabSeries (name, current) values (%s,0)", (series)) def update_series_start(self): if self.doc.prefix: self.insert_series(self.doc.prefix) - sql("update `tabSeries` set current = '%s' where name = '%s'" % (self.doc.current_value,self.doc.prefix)) + webnotes.conn.sql("update `tabSeries` set current = '%s' where name = '%s'" % (self.doc.current_value,self.doc.prefix)) msgprint("Series Updated Successfully") else: msgprint("Please select prefix first") + +def set_by_naming_series(doctype, fieldname, naming_series, hide_name_field=True): + from core.doctype.property_setter.property_setter import make_property_setter + if naming_series: + make_property_setter(doctype, "naming_series", "hidden", 0, "Check") + make_property_setter(doctype, "naming_series", "reqd", 1, "Check") + + # set values for mandatory + webnotes.conn.sql("""update `tab{doctype}` set naming_series={s} where + ifnull(naming_series, '')=''""".format(doctype=doctype, s="%s"), get_default_naming_series(doctype)) + + if hide_name_field: + make_property_setter(doctype, fieldname, "reqd", 0, "Check") + make_property_setter(doctype, fieldname, "hidden", 1, "Check") + else: + make_property_setter(doctype, "naming_series", "reqd", 0, "Check") + make_property_setter(doctype, "naming_series", "hidden", 1, "Check") + + if hide_name_field: + make_property_setter(doctype, fieldname, "hidden", 0, "Check") + make_property_setter(doctype, fieldname, "reqd", 1, "Check") + + # set values for mandatory + webnotes.conn.sql("""update `tab{doctype}` set `{fieldname}`=`name` where + ifnull({fieldname}, '')=''""".format(doctype=doctype, fieldname=fieldname)) + +def get_default_naming_series(doctype): + from webnotes.model.doctype import get_property + naming_series = get_property(doctype, "options", "naming_series") + naming_series = naming_series.split("\n") + return naming_series[0] or naming_series[1] \ No newline at end of file diff --git a/setup/doctype/notification_control/notification_control.py b/setup/doctype/notification_control/notification_control.py index 6133d9b7019..0a151152d6e 100644 --- a/setup/doctype/notification_control/notification_control.py +++ b/setup/doctype/notification_control/notification_control.py @@ -6,7 +6,6 @@ import webnotes from webnotes import msgprint -sql = webnotes.conn.sql class DocType: def __init__(self,d,dl): @@ -14,7 +13,7 @@ class DocType: def get_message(self, arg): fn = arg.lower().replace(' ', '_') + '_message' - v = sql("select value from tabSingles where field=%s and doctype=%s", (fn, 'Notification Control')) + v = webnotes.conn.sql("select value from tabSingles where field=%s and doctype=%s", (fn, 'Notification Control')) return v and v[0][0] or '' def set_message(self, arg = ''): diff --git a/setup/doctype/print_heading/print_heading.py b/setup/doctype/print_heading/print_heading.py index ba7114a22d9..134aaaf013d 100644 --- a/setup/doctype/print_heading/print_heading.py +++ b/setup/doctype/print_heading/print_heading.py @@ -7,7 +7,6 @@ import webnotes from webnotes.model import db_exists from webnotes.model.bean import copy_doclist -sql = webnotes.conn.sql diff --git a/setup/doctype/sales_partner/sales_partner.js b/setup/doctype/sales_partner/sales_partner.js index 86b77121421..351aa3d0f68 100644 --- a/setup/doctype/sales_partner/sales_partner.js +++ b/setup/doctype/sales_partner/sales_partner.js @@ -39,7 +39,7 @@ cur_frm.cscript.make_address = function() { return "select name, address_type, address_line1, address_line2, city, state, country, pincode, fax, email_id, phone, is_primary_address, is_shipping_address from tabAddress where sales_partner='"+cur_frm.docname+"' and docstatus != 2 order by is_primary_address desc" }, as_dict: 1, - no_results_message: 'No addresses created', + no_results_message: wn._('No addresses created'), render_row: function(wrapper, data) { $(wrapper).css('padding','5px 0px'); var link = $ln(wrapper,cstr(data.name), function() { loaddoc("Address", this.dn); }, {fontWeight:'bold'}); @@ -69,7 +69,7 @@ cur_frm.cscript.make_contact = function() { return "select name, first_name, last_name, email_id, phone, mobile_no, department, designation, is_primary_contact from tabContact where sales_partner='"+cur_frm.docname+"' and docstatus != 2 order by is_primary_contact desc" }, as_dict: 1, - no_results_message: 'No contacts created', + no_results_message: wn._('No contacts created'), render_row: function(wrapper, data) { $(wrapper).css('padding', '5px 0px'); var link = $ln(wrapper, cstr(data.name), function() { loaddoc("Contact", this.dn); }, {fontWeight:'bold'}); diff --git a/setup/doctype/sales_partner/sales_partner.py b/setup/doctype/sales_partner/sales_partner.py index 0d7e12d9998..9e3e2a82351 100644 --- a/setup/doctype/sales_partner/sales_partner.py +++ b/setup/doctype/sales_partner/sales_partner.py @@ -5,13 +5,16 @@ from __future__ import unicode_literals import webnotes from webnotes.utils import cint, cstr, filter_strip_join -sql = webnotes.conn.sql class DocType: def __init__(self, doc, doclist=None): self.doc = doc self.doclist = doclist + def validate(self): + if self.doc.partner_website and not self.doc.partner_website.startswith("http"): + self.doc.partner_website = "http://" + self.doc.partner_website + def on_update(self): if cint(self.doc.show_in_website): from webnotes.webutils import update_page_name @@ -24,7 +27,7 @@ class DocType: def get_contacts(self,nm): if nm: - contact_details =webnotes.conn.convert_to_lists(sql("select name, CONCAT(IFNULL(first_name,''),' ',IFNULL(last_name,'')),contact_no,email_id from `tabContact` where sales_partner = '%s'"%nm)) + contact_details =webnotes.conn.convert_to_lists(webnotes.conn.sql("select name, CONCAT(IFNULL(first_name,''),' ',IFNULL(last_name,'')),contact_no,email_id from `tabContact` where sales_partner = '%s'"%nm)) return contact_details else: return '' diff --git a/setup/doctype/sales_person/sales_person.js b/setup/doctype/sales_person/sales_person.js index 34f267e825d..ec21ead6be6 100644 --- a/setup/doctype/sales_person/sales_person.js +++ b/setup/doctype/sales_person/sales_person.js @@ -9,7 +9,7 @@ cur_frm.cscript.set_root_readonly = function(doc) { // read-only for root if(!doc.parent_sales_person) { cur_frm.perm = [[1,0,0], [1,0,0]]; - cur_frm.set_intro("This is a root sales person and cannot be edited."); + cur_frm.set_intro(wn._("This is a root sales person and cannot be edited.")); } else { cur_frm.set_intro(null); } diff --git a/setup/doctype/setup_control/README.md b/setup/doctype/setup_control/README.md deleted file mode 100644 index 909fea49daf..00000000000 --- a/setup/doctype/setup_control/README.md +++ /dev/null @@ -1 +0,0 @@ -Account setup utility on first login. \ No newline at end of file diff --git a/setup/doctype/setup_control/__init__.py b/setup/doctype/setup_control/__init__.py deleted file mode 100644 index baffc488252..00000000000 --- a/setup/doctype/setup_control/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/setup/doctype/setup_control/setup_control.py b/setup/doctype/setup_control/setup_control.py deleted file mode 100644 index 818e310425e..00000000000 --- a/setup/doctype/setup_control/setup_control.py +++ /dev/null @@ -1,255 +0,0 @@ -# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. -# License: GNU General Public License v3. See license.txt - -from __future__ import unicode_literals -import webnotes - -from webnotes.utils import cint, cstr, getdate, now, nowdate, get_defaults -from webnotes.model.doc import Document, addchild -from webnotes.model.code import get_obj -from webnotes import session, form, msgprint - -class DocType: - def __init__(self, d, dl): - self.doc, self.doclist = d, dl - - def setup_account(self, args): - import webnotes, json - if isinstance(args, basestring): - args = json.loads(args) - webnotes.conn.begin() - - self.update_profile_name(args) - add_all_roles_to(webnotes.session.user) - self.create_fiscal_year_and_company(args) - self.set_defaults(args) - create_territories() - self.create_price_lists(args) - self.create_feed_and_todo() - self.create_email_digest() - - webnotes.clear_cache() - msgprint("Company setup is complete. This page will be refreshed in a moment.") - webnotes.conn.commit() - - return { - 'sys_defaults': get_defaults(), - 'user_fullname': (args.get('first_name') or '') + (args.get('last_name') - and (" " + args.get('last_name')) or '') - } - - def update_profile_name(self, args): - args['name'] = webnotes.session.get('user') - - # Update Profile - if not args.get('last_name') or args.get('last_name')=='None': args['last_name'] = None - webnotes.conn.sql("""\ - UPDATE `tabProfile` SET first_name=%(first_name)s, - last_name=%(last_name)s - WHERE name=%(name)s AND docstatus<2""", args) - - def create_fiscal_year_and_company(self, args): - curr_fiscal_year, fy_start_date, fy_abbr = self.get_fy_details(args.get('fy_start'), True) - webnotes.bean([{ - "doctype":"Fiscal Year", - 'year': curr_fiscal_year, - 'year_start_date': fy_start_date - }]).insert() - - curr_fiscal_year, fy_start_date, fy_abbr = self.get_fy_details(args.get('fy_start')) - webnotes.bean([{ - "doctype":"Fiscal Year", - 'year': curr_fiscal_year, - 'year_start_date': fy_start_date, - }]).insert() - - - # Company - webnotes.bean([{ - "doctype":"Company", - 'domain': args.get("industry"), - 'company_name':args.get('company_name'), - 'abbr':args.get('company_abbr'), - 'default_currency':args.get('currency'), - }]).insert() - - self.curr_fiscal_year = curr_fiscal_year - - def create_price_lists(self, args): - for pl_type in ["Selling", "Buying"]: - webnotes.bean([ - { - "doctype": "Price List", - "price_list_name": "Standard " + pl_type, - "buying_or_selling": pl_type, - "currency": args["currency"] - }, - { - "doctype": "For Territory", - "parentfield": "valid_for_territories", - "territory": "All Territories" - } - ]).insert() - - def set_defaults(self, args): - # enable default currency - webnotes.conn.set_value("Currency", args.get("currency"), "enabled", 1) - - global_defaults = webnotes.bean("Global Defaults", "Global Defaults") - global_defaults.doc.fields.update({ - 'current_fiscal_year': self.curr_fiscal_year, - 'default_currency': args.get('currency'), - 'default_company':args.get('company_name'), - 'date_format': webnotes.conn.get_value("Country", args.get("country"), "date_format"), - "float_precision": 4 - }) - global_defaults.save() - - accounts_settings = webnotes.bean("Accounts Settings") - accounts_settings.doc.auto_accounting_for_stock = 1 - accounts_settings.save() - - stock_settings = webnotes.bean("Stock Settings") - stock_settings.doc.item_naming_by = "Item Code" - stock_settings.doc.valuation_method = "FIFO" - stock_settings.doc.stock_uom = "Nos" - stock_settings.doc.auto_indent = 1 - stock_settings.save() - - selling_settings = webnotes.bean("Selling Settings") - selling_settings.doc.cust_master_name = "Customer Name" - selling_settings.doc.so_required = "No" - selling_settings.doc.dn_required = "No" - selling_settings.save() - - buying_settings = webnotes.bean("Buying Settings") - buying_settings.doc.supp_master_name = "Supplier Name" - buying_settings.doc.po_required = "No" - buying_settings.doc.pr_required = "No" - buying_settings.doc.maintain_same_rate = 1 - buying_settings.save() - - notification_control = webnotes.bean("Notification Control") - notification_control.doc.quotation = 1 - notification_control.doc.sales_invoice = 1 - notification_control.doc.purchase_order = 1 - notification_control.save() - - hr_settings = webnotes.bean("HR Settings") - hr_settings.doc.emp_created_by = "Naming Series" - hr_settings.save() - - # control panel - cp = webnotes.doc("Control Panel", "Control Panel") - for k in ['country', 'time_zone', 'company_name']: - cp.fields[k] = args[k] - - cp.save() - - def create_feed_and_todo(self): - """update activty feed and create todo for creation of item, customer, vendor""" - import home - home.make_feed('Comment', 'ToDo', '', webnotes.session['user'], - '"' + 'Setup Complete. Please check your \ - To Do List' + '"', '#6B24B3') - - d = Document('ToDo') - d.description = 'Complete ERPNext Setup' - d.priority = 'High' - d.date = nowdate() - d.save(1) - - def create_email_digest(self): - """ - create a default weekly email digest - * Weekly Digest - * For all companies - * Recipients: System Managers - * Full content - * Enabled by default - """ - import webnotes - companies_list = webnotes.conn.sql("SELECT company_name FROM `tabCompany`", as_list=1) - - from webnotes.profile import get_system_managers - system_managers = get_system_managers() - if not system_managers: return - - from webnotes.model.doc import Document - for company in companies_list: - if company and company[0]: - edigest = webnotes.bean({ - "doctype": "Email Digest", - "name": "Default Weekly Digest - " + company[0], - "company": company[0], - "frequency": "Weekly", - "recipient_list": "\n".join(system_managers) - }) - - if webnotes.conn.sql("""select name from `tabEmail Digest` where name=%s""", edigest.doc.name): - continue - - for fieldname in edigest.meta.get_fieldnames({"fieldtype": "Check"}): - edigest.doc.fields[fieldname] = 1 - - edigest.insert() - - # Get Fiscal year Details - # ------------------------ - def get_fy_details(self, fy_start, last_year=False): - st = {'1st Jan':'01-01','1st Apr':'04-01','1st Jul':'07-01', '1st Oct': '10-01'} - if cint(getdate(nowdate()).month) < cint((st[fy_start].split('-'))[0]): - curr_year = getdate(nowdate()).year - 1 - else: - curr_year = getdate(nowdate()).year - - if last_year: - curr_year = curr_year - 1 - - stdt = cstr(curr_year)+'-'+cstr(st[fy_start]) - - if(fy_start == '1st Jan'): - fy = cstr(curr_year) - abbr = cstr(fy)[-2:] - else: - fy = cstr(curr_year) + '-' + cstr(curr_year+1) - abbr = cstr(curr_year)[-2:] + '-' + cstr(curr_year+1)[-2:] - return fy, stdt, abbr - - def create_profile(self, user_email, user_fname, user_lname, pwd=None): - pr = Document('Profile') - pr.first_name = user_fname - pr.last_name = user_lname - pr.name = pr.email = user_email - pr.enabled = 1 - pr.save(1) - if pwd: - webnotes.conn.sql("""insert into __Auth (user, `password`) - values (%s, password(%s)) - on duplicate key update `password`=password(%s)""", - (user_email, pwd, pwd)) - - add_all_roles_to(pr.name) - -def add_all_roles_to(name): - profile = webnotes.doc("Profile", name) - for role in webnotes.conn.sql("""select name from tabRole"""): - if role[0] not in ["Administrator", "Guest", "All", "Customer", "Supplier", "Partner"]: - d = profile.addchild("user_roles", "UserRole") - d.role = role[0] - d.insert() - -def create_territories(): - """create two default territories, one for home country and one named Rest of the World""" - from setup.utils import get_root_of - country = webnotes.conn.get_value("Control Panel", None, "country") - root_territory = get_root_of("Territory") - for name in (country, "Rest Of The World"): - if name and not webnotes.conn.exists("Territory", name): - webnotes.bean({ - "doctype": "Territory", - "territory_name": name.replace("'", ""), - "parent_territory": root_territory, - "is_group": "No" - }).insert() - diff --git a/setup/doctype/setup_control/setup_control.txt b/setup/doctype/setup_control/setup_control.txt deleted file mode 100644 index 7ebed3e4a13..00000000000 --- a/setup/doctype/setup_control/setup_control.txt +++ /dev/null @@ -1,24 +0,0 @@ -[ - { - "creation": "2012-03-27 14:36:25", - "docstatus": 0, - "modified": "2012-03-27 14:36:25", - "modified_by": "Administrator", - "owner": "Administrator" - }, - { - "doctype": "DocType", - "in_create": 1, - "issingle": 1, - "istable": 0, - "module": "Setup", - "name": "__common__", - "read_only": 1, - "section_style": "Simple", - "version": 73 - }, - { - "doctype": "DocType", - "name": "Setup Control" - } -] \ No newline at end of file diff --git a/setup/doctype/supplier_type/supplier_type.js b/setup/doctype/supplier_type/supplier_type.js index b65f67c21ca..5ebf6d51e2d 100644 --- a/setup/doctype/supplier_type/supplier_type.js +++ b/setup/doctype/supplier_type/supplier_type.js @@ -2,5 +2,5 @@ // License: GNU General Public License v3. See license.txt cur_frm.cscript.refresh = function(doc) { - cur_frm.set_intro(doc.__islocal ? "" : "There is nothing to edit.") + cur_frm.set_intro(doc.__islocal ? "" : wn._("There is nothing to edit.")) } \ No newline at end of file diff --git a/setup/doctype/territory/territory.js b/setup/doctype/territory/territory.js index 75618161854..de708b6d052 100644 --- a/setup/doctype/territory/territory.js +++ b/setup/doctype/territory/territory.js @@ -9,7 +9,7 @@ cur_frm.cscript.set_root_readonly = function(doc) { // read-only for root territory if(!doc.parent_territory) { cur_frm.perm = [[1,0,0], [1,0,0]]; - cur_frm.set_intro("This is a root territory and cannot be edited."); + cur_frm.set_intro(wn._("This is a root territory and cannot be edited.")); } else { cur_frm.set_intro(null); } diff --git a/setup/doctype/uom/uom.txt b/setup/doctype/uom/uom.txt index 6577f6c0058..51d98067552 100644 --- a/setup/doctype/uom/uom.txt +++ b/setup/doctype/uom/uom.txt @@ -2,7 +2,7 @@ { "creation": "2013-01-10 16:34:24", "docstatus": 0, - "modified": "2013-07-25 16:18:17", + "modified": "2013-10-10 15:06:53", "modified_by": "Administrator", "owner": "Administrator" }, @@ -38,22 +38,6 @@ "doctype": "DocType", "name": "UOM" }, - { - "doctype": "DocField", - "fieldname": "trash_reason", - "fieldtype": "Small Text", - "label": "Trash Reason", - "oldfieldname": "trash_reason", - "oldfieldtype": "Small Text", - "read_only": 1 - }, - { - "doctype": "DocField", - "fieldname": "uom_details", - "fieldtype": "Section Break", - "label": "UOM Details", - "oldfieldtype": "Section Break" - }, { "doctype": "DocField", "fieldname": "uom_name", diff --git a/setup/page/setup/setup.js b/setup/page/setup/setup.js index f39618685d2..ed55eb5ca95 100644 --- a/setup/page/setup/setup.js +++ b/setup/page/setup/setup.js @@ -5,12 +5,12 @@ wn.pages['Setup'].onload = function(wrapper) { if(msg_dialog && msg_dialog.display) msg_dialog.hide(); wn.ui.make_app_page({ parent: wrapper, - title: 'Setup', + title: wn._('Setup'), single_column: true }); wrapper.appframe.add_module_icon("Setup"); - wrapper.appframe.add_button("Refresh", function() { + wrapper.appframe.add_button(wn._("Refresh"), function() { wn.pages.Setup.make(wrapper); }, "icon-refresh"); @@ -110,7 +110,7 @@ wn.pages.Setup.make = function(wrapper) { }) } else if(item.single) { - $(' Edit') + $(''+wn._('Edit')+'') .appendTo($links) $links.find(".view-link") @@ -119,11 +119,11 @@ wn.pages.Setup.make = function(wrapper) { wn.set_route("Form", $(this).attr("data-doctype")); }) } else if(item.type !== "Link"){ - $(' New \ + $(''+wn._('New')+' \ | \ - View \ + '+wn._('View')+' \ | \ - Import') + '+wn._('Import')+'') .appendTo($links) $links.find(".view-link") @@ -180,11 +180,11 @@ wn.pages.Setup.make = function(wrapper) { if(r.message) { body.empty(); if(wn.boot.expires_on) { - $(body).prepend("
Account expires on " + $(body).prepend("
"+wn._("Account expires on") + wn.datetime.global_date_format(wn.boot.expires_on) + "
"); } - $completed = $('

Setup Completed

\ + $completed = $('

'+wn._("Setup Completed")+'

\
') .appendTo(body); diff --git a/setup/page/setup/setup.py b/setup/page/setup/setup.py index 1569ef00da6..caa32efa1d0 100644 --- a/setup/page/setup/setup.py +++ b/setup/page/setup/setup.py @@ -226,8 +226,6 @@ items = [ "title": "System Administration", "icon": "icon-cog" }, - { "title": "Update ERPNext", - "route": "update-manager", "type": "Link", "icon": "icon-rss" }, { "title": "Manage 3rd Party Backups", "route": "Form/Backup Manager", "type": "Link", "icon": "icon-cloud" }, { "title": "System Scheduler Errors", diff --git a/setup/page/setup_wizard/__init__.py b/setup/page/setup_wizard/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/setup/page/setup_wizard/setup_wizard.css b/setup/page/setup_wizard/setup_wizard.css new file mode 100644 index 00000000000..ad49ef0c049 --- /dev/null +++ b/setup/page/setup_wizard/setup_wizard.css @@ -0,0 +1,8 @@ +#page-setup-wizard .panel { + -webkit-box-shadow: 0px 1px 8px rgba(0,0,0,0.6); + box-shadow: 0px 1px 8px rgba(0,0,0,0.6); +} + +#page-setup-wizard .col-md-6 .control-input .btn { + width: 100%; +} diff --git a/setup/page/setup_wizard/setup_wizard.js b/setup/page/setup_wizard/setup_wizard.js new file mode 100644 index 00000000000..bec2828b1e5 --- /dev/null +++ b/setup/page/setup_wizard/setup_wizard.js @@ -0,0 +1,502 @@ +wn.pages['setup-wizard'].onload = function(wrapper) { + if(sys_defaults.company) { + wn.set_route("desktop"); + return; + } + $(".navbar:first").toggle(false); + $("body").css({"padding-top":"30px"}); + + erpnext.wiz = new wn.wiz.Wizard({ + page_name: "setup-wizard", + parent: wrapper, + on_complete: function(wiz) { + var values = wiz.get_values(); + wiz.show_working(); + wn.call({ + method: "setup.page.setup_wizard.setup_wizard.setup_account", + args: values, + callback: function(r) { + if(r.exc) { + var d = msgprint(wn._("There were errors.")); + d.custom_onhide = function() { + wn.set_route(erpnext.wiz.page_name, "0"); + } + } else { + wiz.show_complete(); + setTimeout(function() { + if(user==="Administrator") { + msgprint(wn._("Login with your new User ID") + ":" + values.email); + setTimeout(function() { + wn.app.logout(); + }, 2000); + } else { + window.location = "app.html"; + } + }, 2000); + } + } + }) + }, + title: wn._("ERPNext Setup Guide"), + welcome_html: '

\ +

'+wn._('ERPNext Setup')+'

\ +

' + + wn._('Welcome to ERPNext. Over the next few minutes we will help you setup your ERPNext account. Try and fill in as much information as you have even if it takes a bit longer. It will save you a lot of time later. Good Luck!') + + '

', + working_html: '

\ +

'+wn._('Setting up...')+'

\ +

' + + wn._('Sit tight while your system is being setup. This may take a few moments.') + + '

', + complete_html: '

\ +

'+wn._('Setup Complete!')+'

\ +

' + + wn._('Your setup is complete. Refreshing...') + + '

', + slides: [ + // User + { + title: wn._("The First User: You"), + icon: "icon-user", + fields: [ + {"fieldname": "first_name", "label": wn._("First Name"), "fieldtype": "Data", reqd:1}, + {"fieldname": "last_name", "label": wn._("Last Name"), "fieldtype": "Data", reqd:1}, + {"fieldname": "email", "label": wn._("Email Id"), "fieldtype": "Data", reqd:1, "description":"Your Login Id"}, + {"fieldname": "password", "label": wn._("Password"), "fieldtype": "Password", reqd:1}, + {fieldtype:"Attach Image", fieldname:"attach_profile", label:"Attach Your Profile..."}, + ], + help: wn._('The first user will become the System Manager (you can change that later).'), + onload: function(slide) { + if(user!=="Administrator") { + slide.form.fields_dict.password.$wrapper.toggle(false); + slide.form.fields_dict.email.$wrapper.toggle(false); + slide.form.fields_dict.first_name.set_input(wn.boot.profile.first_name); + slide.form.fields_dict.last_name.set_input(wn.boot.profile.last_name); + + delete slide.form.fields_dict.email; + delete slide.form.fields_dict.password; + } + } + }, + + // Organization + { + title: wn._("The Organization"), + icon: "icon-building", + fields: [ + {fieldname:'company_name', label: wn._('Company Name'), fieldtype:'Data', reqd:1, + placeholder: 'e.g. "My Company LLC"'}, + {fieldname:'company_abbr', label: wn._('Company Abbreviation'), fieldtype:'Data', + placeholder:'e.g. "MC"',reqd:1}, + {fieldname:'fy_start', label:'Financial Year Start Date', fieldtype:'Select', + description:'Your financial year begins on', reqd:1, + options: ['', '1st Jan', '1st Apr', '1st Jul', '1st Oct'] }, + {fieldname:'company_tagline', label: wn._('What does it do?'), fieldtype:'Data', + placeholder:'e.g. "Build tools for builders"', reqd:1}, + ], + help: wn._('The name of your company for which you are setting up this system.'), + onload: function(slide) { + slide.get_input("company_name").on("change", function() { + var parts = slide.get_input("company_name").val().split(" "); + var abbr = $.map(parts, function(p) { return p ? p.substr(0,1) : null }).join(""); + slide.get_input("company_abbr").val(abbr.toUpperCase()); + }).val(wn.boot.control_panel.company_name || "").trigger("change"); + } + }, + + // Country + { + title: wn._("Country, Timezone and Currency"), + icon: "icon-flag", + fields: [ + {fieldname:'country', label: wn._('Country'), reqd:1, + options: "", fieldtype: 'Select'}, + {fieldname:'currency', label: wn._('Default Currency'), reqd:1, + options: "", fieldtype: 'Select'}, + {fieldname:'timezone', label: wn._('Time Zone'), reqd:1, + options: "", fieldtype: 'Select'}, + ], + help: wn._('Select your home country and check the timezone and currency.'), + onload: function(slide, form) { + wn.call({ + method:"webnotes.country_info.get_country_timezone_info", + callback: function(data) { + erpnext.country_info = data.message.country_info; + erpnext.all_timezones = data.message.all_timezones; + slide.get_input("country").empty() + .add_options([""].concat(keys(erpnext.country_info).sort())); + slide.get_input("currency").empty() + .add_options(wn.utils.unique([""].concat($.map(erpnext.country_info, + function(opts, country) { return opts.currency; }))).sort()); + slide.get_input("timezone").empty() + .add_options([""].concat(erpnext.all_timezones)); + } + }) + + slide.get_input("country").on("change", function() { + var country = slide.get_input("country").val(); + var $timezone = slide.get_input("timezone"); + $timezone.empty(); + // add country specific timezones first + if(country){ + var timezone_list = erpnext.country_info[country].timezones || []; + $timezone.add_options(timezone_list.sort()); + slide.get_input("currency").val(erpnext.country_info[country].currency); + } + // add all timezones at the end, so that user has the option to change it to any timezone + $timezone.add_options([""].concat(erpnext.all_timezones)); + + }); + } + }, + + // Logo + { + icon: "icon-bookmark", + title: wn._("Logo and Letter Heads"), + help: wn._('Upload your letter head and logo - you can edit them later.'), + fields: [ + {fieldtype:"Attach Image", fieldname:"attach_letterhead", label:"Attach Letterhead..."}, + {fieldtype:"Attach Image", fieldname:"attach_logo", label:"Attach Logo..."}, + ], + }, + + // Taxes + { + icon: "icon-money", + "title": wn._("Add Taxes"), + "help": wn._("List your tax heads (e.g. VAT, Excise) (upto 3) and their standard rates. This will create a standard template, you can edit and add more later."), + "fields": [ + {fieldtype:"Data", fieldname:"tax_1", label:"Tax 1", placeholder:"e.g. VAT"}, + {fieldtype:"Column Break"}, + {fieldtype:"Data", fieldname:"tax_rate_1", label:"Rate (%)", placeholder:"e.g. 5"}, + {fieldtype:"Section Break"}, + {fieldtype:"Data", fieldname:"tax_2", label:"Tax 2", placeholder:"e.g. Customs Duty"}, + {fieldtype:"Column Break"}, + {fieldtype:"Data", fieldname:"tax_rate_2", label:"Rate (%)", placeholder:"e.g. 5"}, + {fieldtype:"Section Break"}, + {fieldtype:"Data", fieldname:"tax_3", label:"Tax 3", placeholder:"e.g. Excise"}, + {fieldtype:"Column Break"}, + {fieldtype:"Data", fieldname:"tax_rate_3", label:"Rate (%)", placeholder:"e.g. 5"}, + ], + }, + + // Items to Sell + { + icon: "icon-barcode", + "title": wn._("Your Products or Services"), + "help": wn._("List your products or services that you sell to your customers. Make sure to check the Item Group, Unit of Measure and other properties when you start."), + "fields": [ + {fieldtype:"Data", fieldname:"item_1", label:"Item 1", placeholder:"A Product or Service"}, + {fieldtype:"Column Break"}, + {fieldtype:"Attach", fieldname:"item_img_1", label:"Attach Image..."}, + {fieldtype:"Section Break"}, + {fieldtype:"Column Break"}, + {fieldtype:"Column Break"}, + {fieldtype:"Select", fieldname:"item_group_1", options:["Products", "Services", "Raw Material", "Sub Assemblies"]}, + {fieldtype:"Column Break"}, + {fieldtype:"Select", fieldname:"item_uom_1", options:["Unit", "Nos", "Box", "Pair", "Kg", "Set", "Hour", "Minute"]}, + {fieldtype:"Section Break"}, + {fieldtype:"Data", fieldname:"item_2", label:"Item 2", placeholder:"A Product or Service"}, + {fieldtype:"Column Break"}, + {fieldtype:"Attach", fieldname:"item_img_2", label:"Attach Image..."}, + {fieldtype:"Section Break"}, + {fieldtype:"Column Break"}, + {fieldtype:"Column Break"}, + {fieldtype:"Select", fieldname:"item_group_2", options:["Products", "Services", "Raw Material", "Sub Assemblies"]}, + {fieldtype:"Column Break"}, + {fieldtype:"Select", fieldname:"item_uom_2", options:["Unit", "Nos", "Box", "Pair", "Kg", "Set", "Hour", "Minute"]}, + {fieldtype:"Section Break"}, + {fieldtype:"Data", fieldname:"item_3", label:"Item 3", placeholder:"A Product or Service"}, + {fieldtype:"Column Break"}, + {fieldtype:"Attach", fieldname:"item_img_3", label:"Attach Image..."}, + {fieldtype:"Section Break"}, + {fieldtype:"Column Break"}, + {fieldtype:"Column Break"}, + {fieldtype:"Select", fieldname:"item_group_3", options:["Products", "Services", "Raw Material", "Sub Assemblies"]}, + {fieldtype:"Column Break"}, + {fieldtype:"Select", fieldname:"item_uom_3", options:["Unit", "Nos", "Box", "Pair", "Kg", "Set", "Hour", "Minute"]}, + {fieldtype:"Section Break"}, + {fieldtype:"Data", fieldname:"item_4", label:"Item 4", placeholder:"A Product or Service"}, + {fieldtype:"Column Break"}, + {fieldtype:"Attach", fieldname:"item_img_4", label:"Attach Image..."}, + {fieldtype:"Section Break"}, + {fieldtype:"Column Break"}, + {fieldtype:"Column Break"}, + {fieldtype:"Select", fieldname:"item_group_4", options:["Products", "Services", "Raw Material", "Sub Assemblies"]}, + {fieldtype:"Column Break"}, + {fieldtype:"Select", fieldname:"item_uom_4", options:["Unit", "Nos", "Box", "Pair", "Kg", "Set", "Hour", "Minute"]}, + {fieldtype:"Section Break"}, + {fieldtype:"Data", fieldname:"item_5", label:"Item 5", placeholder:"A Product or Service"}, + {fieldtype:"Column Break"}, + {fieldtype:"Attach", fieldname:"item_img_5", label:"Attach Image..."}, + {fieldtype:"Section Break"}, + {fieldtype:"Column Break"}, + {fieldtype:"Column Break"}, + {fieldtype:"Select", fieldname:"item_group_5", options:["Products", "Services", "Raw Material", "Sub Assemblies"]}, + {fieldtype:"Column Break"}, + {fieldtype:"Select", fieldname:"item_uom_5", options:["Unit", "Nos", "Box", "Pair", "Kg", "Set", "Hour", "Minute"]}, + ], + }, + + // Items to Buy + { + icon: "icon-barcode", + "title": wn._("Products or Services You Buy"), + "help": wn._("List a few products or services you buy from your suppliers or vendors. If these are same as your products, then do not add them."), + "fields": [ + {fieldtype:"Data", fieldname:"item_buy_1", label:"Item 1", placeholder:"A Product or Service"}, + {fieldtype:"Section Break"}, + {fieldtype:"Column Break"}, + {fieldtype:"Column Break"}, + {fieldtype:"Select", fieldname:"item_buy_group_1", options:["Raw Material", "Consumable", "Sub Assemblies", "Services", "Products"]}, + {fieldtype:"Column Break"}, + {fieldtype:"Select", fieldname:"item_buy_uom_1", options:["Unit", "Nos", "Box", "Pair", "Kg", "Set", "Hour", "Minute"]}, + {fieldtype:"Section Break"}, + {fieldtype:"Data", fieldname:"item_buy_2", label:"Item 2", placeholder:"A Product or Service"}, + {fieldtype:"Section Break"}, + {fieldtype:"Column Break"}, + {fieldtype:"Column Break"}, + {fieldtype:"Select", fieldname:"item_buy_group_2", options:["Raw Material", "Consumable", "Sub Assemblies", "Services", "Products"]}, + {fieldtype:"Column Break"}, + {fieldtype:"Select", fieldname:"item_buy_uom_2", options:["Unit", "Nos", "Box", "Pair", "Kg", "Set", "Hour", "Minute"]}, + {fieldtype:"Section Break"}, + {fieldtype:"Data", fieldname:"item_buy_3", label:"Item 3", placeholder:"A Product or Service"}, + {fieldtype:"Section Break"}, + {fieldtype:"Column Break"}, + {fieldtype:"Column Break"}, + {fieldtype:"Select", fieldname:"item_buy_group_3", options:["Raw Material", "Consumable", "Sub Assemblies", "Services", "Products"]}, + {fieldtype:"Column Break"}, + {fieldtype:"Select", fieldname:"item_buy_uom_3", options:["Unit", "Nos", "Box", "Pair", "Kg", "Set", "Hour", "Minute"]}, + {fieldtype:"Section Break"}, + {fieldtype:"Data", fieldname:"item_buy_4", label:"Item 4", placeholder:"A Product or Service"}, + {fieldtype:"Section Break"}, + {fieldtype:"Column Break"}, + {fieldtype:"Column Break"}, + {fieldtype:"Select", fieldname:"item_buy_group_4", options:["Raw Material", "Consumable", "Sub Assemblies", "Services", "Products"]}, + {fieldtype:"Column Break"}, + {fieldtype:"Select", fieldname:"item_buy_uom_4", options:["Unit", "Nos", "Box", "Pair", "Kg", "Set", "Hour", "Minute"]}, + {fieldtype:"Section Break"}, + {fieldtype:"Data", fieldname:"item_buy_5", label:"Item 5", placeholder:"A Product or Service"}, + {fieldtype:"Section Break"}, + {fieldtype:"Column Break"}, + {fieldtype:"Column Break"}, + {fieldtype:"Select", fieldname:"item_buy_group_5", options:["Raw Material", "Consumable", "Sub Assemblies", "Services", "Products"]}, + {fieldtype:"Column Break"}, + {fieldtype:"Select", fieldname:"item_buy_uom_5", options:["Unit", "Nos", "Box", "Pair", "Kg", "Set", "Hour", "Minute"]}, + ], + }, + + // Customers + { + icon: "icon-group", + "title": wn._("Your Customers"), + "help": wn._("List a few of your customers. They could be organizations or individuals."), + "fields": [ + {fieldtype:"Data", fieldname:"customer_1", label:"Customer 1", placeholder:"Customer Name"}, + {fieldtype:"Column Break"}, + {fieldtype:"Data", fieldname:"customer_contact_1", label:"", placeholder:"Contact Name"}, + {fieldtype:"Section Break"}, + {fieldtype:"Data", fieldname:"customer_2", label:"Customer 2", placeholder:"Customer Name"}, + {fieldtype:"Column Break"}, + {fieldtype:"Data", fieldname:"customer_contact_2", label:"", placeholder:"Contact Name"}, + {fieldtype:"Section Break"}, + {fieldtype:"Data", fieldname:"customer_3", label:"Customer 3", placeholder:"Customer Name"}, + {fieldtype:"Column Break"}, + {fieldtype:"Data", fieldname:"customer_contact_3", label:"", placeholder:"Contact Name"}, + {fieldtype:"Section Break"}, + {fieldtype:"Data", fieldname:"customer_4", label:"Customer 4", placeholder:"Customer Name"}, + {fieldtype:"Column Break"}, + {fieldtype:"Data", fieldname:"customer_contact_4", label:"", placeholder:"Contact Name"}, + {fieldtype:"Section Break"}, + {fieldtype:"Data", fieldname:"customer_5", label:"Customer 5", placeholder:"Customer Name"}, + {fieldtype:"Column Break"}, + {fieldtype:"Data", fieldname:"customer_contact_5", label:"", placeholder:"Contact Name"}, + ], + }, + + // Suppliers + { + icon: "icon-group", + "title": wn._("Your Suppliers"), + "help": wn._("List a few of your suppliers. They could be organizations or individuals."), + "fields": [ + {fieldtype:"Data", fieldname:"supplier_1", label:"Supplier 1", placeholder:"Supplier Name"}, + {fieldtype:"Column Break"}, + {fieldtype:"Data", fieldname:"supplier_contact_1", label:"", placeholder:"Contact Name"}, + {fieldtype:"Section Break"}, + {fieldtype:"Data", fieldname:"supplier_2", label:"Supplier 2", placeholder:"Supplier Name"}, + {fieldtype:"Column Break"}, + {fieldtype:"Data", fieldname:"supplier_contact_2", label:"", placeholder:"Contact Name"}, + {fieldtype:"Section Break"}, + {fieldtype:"Data", fieldname:"supplier_3", label:"Supplier 3", placeholder:"Supplier Name"}, + {fieldtype:"Column Break"}, + {fieldtype:"Data", fieldname:"supplier_contact_3", label:"", placeholder:"Contact Name"}, + {fieldtype:"Section Break"}, + {fieldtype:"Data", fieldname:"supplier_4", label:"Supplier 4", placeholder:"Supplier Name"}, + {fieldtype:"Column Break"}, + {fieldtype:"Data", fieldname:"supplier_contact_4", label:"", placeholder:"Contact Name"}, + {fieldtype:"Section Break"}, + {fieldtype:"Data", fieldname:"supplier_5", label:"Supplier 5", placeholder:"Supplier Name"}, + {fieldtype:"Column Break"}, + {fieldtype:"Data", fieldname:"supplier_contact_5", label:"", placeholder:"Contact Name"}, + ], + } + + ] + + }) +} + +wn.pages['setup-wizard'].onshow = function(wrapper) { + if(wn.get_route()[1]) + erpnext.wiz.show(wn.get_route()[1]); +} + +wn.provide("wn.wiz"); + +wn.wiz.Wizard = Class.extend({ + init: function(opts) { + $.extend(this, opts); + this.slides = this.slides; + this.slide_dict = {}; + this.show_welcome(); + }, + get_message: function(html) { + return $(repl('
\ +
%(html)s
\ +
', {html:html})) + }, + show_welcome: function() { + if(this.$welcome) + return; + var me = this; + this.$welcome = this.get_message(this.welcome_html + + '

') + .appendTo(this.parent); + + this.$welcome.find(".btn").click(function() { + me.$welcome.toggle(false); + me.welcomed = true; + wn.set_route(me.page_name, "0"); + }) + + this.current_slide = {"$wrapper": this.$welcome}; + }, + show_working: function() { + this.hide_current_slide(); + wn.set_route(this.page_name); + this.current_slide = {"$wrapper": this.get_message(this.working_html).appendTo(this.parent)}; + }, + show_complete: function() { + this.hide_current_slide(); + this.current_slide = {"$wrapper": this.get_message(this.complete_html).appendTo(this.parent)}; + }, + show: function(id) { + if(!this.welcomed) { + wn.set_route(this.page_name); + return; + } + id = cint(id); + if(this.current_slide && this.current_slide.id===id) + return; + if(!this.slide_dict[id]) { + this.slide_dict[id] = new wn.wiz.WizardSlide($.extend(this.slides[id], {wiz:this, id:id})); + this.slide_dict[id].make(); + } + + this.hide_current_slide(); + + this.current_slide = this.slide_dict[id]; + this.current_slide.$wrapper.toggle(true); + }, + hide_current_slide: function() { + if(this.current_slide) { + this.current_slide.$wrapper.toggle(false); + this.current_slide = null; + } + }, + get_values: function() { + var values = {}; + $.each(this.slide_dict, function(id, slide) { + $.extend(values, slide.values) + }) + return values; + } +}); + +wn.wiz.WizardSlide = Class.extend({ + init: function(opts) { + $.extend(this, opts); + }, + make: function() { + var me = this; + this.$wrapper = $(repl('
\ +
%(main_title)s: Step %(step)s
\ +
\ +
\ +
\ +
\ +
\ +
\ +
\ +

%(title)s


\ +

%(help)s

\ +
\ +
\ +
\ + \ +
\ +
', {help:this.help, title:this.title, main_title:this.wiz.title, step: this.id + 1, + width: (flt(this.id + 1) / (this.wiz.slides.length+1)) * 100, icon:this.icon})) + .appendTo(this.wiz.parent); + + this.body = this.$wrapper.find(".form")[0]; + + if(this.fields) { + this.form = new wn.ui.FieldGroup({ + fields: this.fields, + body: this.body, + no_submit_on_enter: true + }); + this.form.make(); + } else { + $(this.body).html(this.html) + } + + if(this.id > 0) { + this.$prev = $("") + .click(function() { + wn.set_route(me.wiz.page_name, me.id-1 + ""); + }) + .appendTo(this.$wrapper.find(".footer")) + .css({"margin-right": "5px"}); + } + if(this.id+1 < this.wiz.slides.length) { + this.$next = $("") + .click(function() { + me.values = me.form.get_values(); + if(me.values===null) + return; + wn.set_route(me.wiz.page_name, me.id+1 + ""); + }) + .appendTo(this.$wrapper.find(".footer")); + } else { + this.$complete = $("") + .click(function() { + me.values = me.form.get_values(); + if(me.values===null) + return; + me.wiz.on_complete(me.wiz); + }).appendTo(this.$wrapper.find(".footer")); + } + + if(this.onload) { + this.onload(this); + } + + }, + get_input: function(fn) { + return this.form.get_input(fn); + } +}) \ No newline at end of file diff --git a/setup/page/setup_wizard/setup_wizard.py b/setup/page/setup_wizard/setup_wizard.py new file mode 100644 index 00000000000..d506d419542 --- /dev/null +++ b/setup/page/setup_wizard/setup_wizard.py @@ -0,0 +1,354 @@ +# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. +# License: GNU General Public License v3. See license.txt + +from __future__ import unicode_literals +import webnotes, json, base64 + +from webnotes.utils import cint, cstr, getdate, now, nowdate, get_defaults +from webnotes import _ +from webnotes.utils.file_manager import save_file + +@webnotes.whitelist() +def setup_account(args=None): + # if webnotes.conn.sql("select name from tabCompany"): + # webnotes.throw(_("Setup Already Complete!!")) + + if not args: + args = webnotes.local.form_dict + if isinstance(args, basestring): + args = json.loads(args) + args = webnotes._dict(args) + + update_profile_name(args) + create_fiscal_year_and_company(args) + set_defaults(args) + create_territories() + create_price_lists(args) + create_feed_and_todo() + create_email_digest() + create_letter_head(args) + create_taxes(args) + create_items(args) + create_customers(args) + create_suppliers(args) + webnotes.conn.set_value('Control Panel', None, 'home_page', 'desktop') + + webnotes.clear_cache() + webnotes.conn.commit() + + # suppress msgprints + webnotes.local.message_log = [] + + return "okay" + +def update_profile_name(args): + if args.get("email"): + args['name'] = args.get("email") + webnotes.flags.mute_emails = True + webnotes.bean({ + "doctype":"Profile", + "email": args.get("email"), + "first_name": args.get("first_name"), + "last_name": args.get("last_name") + }).insert() + webnotes.flags.mute_emails = False + from webnotes.auth import _update_password + _update_password(args.get("email"), args.get("password")) + + else: + args['name'] = webnotes.session.user + + # Update Profile + if not args.get('last_name') or args.get('last_name')=='None': + args['last_name'] = None + webnotes.conn.sql("""update `tabProfile` SET first_name=%(first_name)s, + last_name=%(last_name)s WHERE name=%(name)s""", args) + + if args.get("attach_profile"): + filename, filetype, content = args.get("attach_profile").split(",") + fileurl = save_file(filename, content, "Profile", args.get("name"), decode=True).file_name + webnotes.conn.set_value("Profile", args.get("name"), "user_image", fileurl) + + add_all_roles_to(args.get("name")) + +def create_fiscal_year_and_company(args): + curr_fiscal_year, fy_start_date, fy_abbr = get_fy_details(args.get('fy_start'), True) + webnotes.bean([{ + "doctype":"Fiscal Year", + 'year': curr_fiscal_year, + 'year_start_date': fy_start_date + }]).insert() + + curr_fiscal_year, fy_start_date, fy_abbr = get_fy_details(args.get('fy_start')) + webnotes.bean([{ + "doctype":"Fiscal Year", + 'year': curr_fiscal_year, + 'year_start_date': fy_start_date, + }]).insert() + + + # Company + webnotes.bean([{ + "doctype":"Company", + 'domain': args.get("industry"), + 'company_name':args.get('company_name'), + 'abbr':args.get('company_abbr'), + 'default_currency':args.get('currency'), + }]).insert() + + args["curr_fiscal_year"] = curr_fiscal_year + +def create_price_lists(args): + for pl_type in ["Selling", "Buying"]: + webnotes.bean([ + { + "doctype": "Price List", + "price_list_name": "Standard " + pl_type, + "buying_or_selling": pl_type, + "currency": args["currency"] + }, + { + "doctype": "For Territory", + "parentfield": "valid_for_territories", + "territory": "All Territories" + } + ]).insert() + +def set_defaults(args): + # enable default currency + webnotes.conn.set_value("Currency", args.get("currency"), "enabled", 1) + + global_defaults = webnotes.bean("Global Defaults", "Global Defaults") + global_defaults.doc.fields.update({ + 'current_fiscal_year': args.curr_fiscal_year, + 'default_currency': args.get('currency'), + 'default_company':args.get('company_name'), + 'date_format': webnotes.conn.get_value("Country", args.get("country"), "date_format"), + "float_precision": 4 + }) + global_defaults.save() + + accounts_settings = webnotes.bean("Accounts Settings") + accounts_settings.doc.auto_accounting_for_stock = 1 + accounts_settings.save() + + stock_settings = webnotes.bean("Stock Settings") + stock_settings.doc.item_naming_by = "Item Code" + stock_settings.doc.valuation_method = "FIFO" + stock_settings.doc.stock_uom = "Nos" + stock_settings.doc.auto_indent = 1 + stock_settings.save() + + selling_settings = webnotes.bean("Selling Settings") + selling_settings.doc.cust_master_name = "Customer Name" + selling_settings.doc.so_required = "No" + selling_settings.doc.dn_required = "No" + selling_settings.save() + + buying_settings = webnotes.bean("Buying Settings") + buying_settings.doc.supp_master_name = "Supplier Name" + buying_settings.doc.po_required = "No" + buying_settings.doc.pr_required = "No" + buying_settings.doc.maintain_same_rate = 1 + buying_settings.save() + + notification_control = webnotes.bean("Notification Control") + notification_control.doc.quotation = 1 + notification_control.doc.sales_invoice = 1 + notification_control.doc.purchase_order = 1 + notification_control.save() + + hr_settings = webnotes.bean("HR Settings") + hr_settings.doc.emp_created_by = "Naming Series" + hr_settings.save() + + # control panel + cp = webnotes.doc("Control Panel", "Control Panel") + for k in ['country', 'timezone', 'company_name']: + cp.fields[k] = args[k] + + cp.save() + +def create_feed_and_todo(): + """update activty feed and create todo for creation of item, customer, vendor""" + import home + home.make_feed('Comment', 'ToDo', '', webnotes.session['user'], + 'ERNext Setup Complete!', '#6B24B3') + +def create_email_digest(): + from webnotes.profile import get_system_managers + system_managers = get_system_managers() + if not system_managers: + return + + for company in webnotes.conn.sql_list("select name FROM `tabCompany`"): + if not webnotes.conn.exists("Email Digest", "Default Weekly Digest - " + company): + edigest = webnotes.bean({ + "doctype": "Email Digest", + "name": "Default Weekly Digest - " + company, + "company": company, + "frequency": "Weekly", + "recipient_list": "\n".join(system_managers) + }) + + for fieldname in edigest.meta.get_fieldnames({"fieldtype": "Check"}): + edigest.doc.fields[fieldname] = 1 + + edigest.insert() + +def get_fy_details(fy_start, last_year=False): + st = {'1st Jan':'01-01','1st Apr':'04-01','1st Jul':'07-01', '1st Oct': '10-01'} + if cint(getdate(nowdate()).month) < cint((st[fy_start].split('-'))[0]): + curr_year = getdate(nowdate()).year - 1 + else: + curr_year = getdate(nowdate()).year + + if last_year: + curr_year = curr_year - 1 + + stdt = cstr(curr_year)+'-'+cstr(st[fy_start]) + + if(fy_start == '1st Jan'): + fy = cstr(curr_year) + abbr = cstr(fy)[-2:] + else: + fy = cstr(curr_year) + '-' + cstr(curr_year+1) + abbr = cstr(curr_year)[-2:] + '-' + cstr(curr_year+1)[-2:] + return fy, stdt, abbr + +def create_taxes(args): + for i in xrange(1,6): + if args.get("tax_" + str(i)): + webnotes.bean({ + "doctype":"Account", + "company": args.get("company_name"), + "parent_account": "Duties and Taxes - " + args.get("company_abbr"), + "account_name": args.get("tax_" + str(i)), + "group_or_ledger": "Ledger", + "is_pl_account": "No", + "account_type": "Tax", + "tax_rate": args.get("tax_rate_" + str(i)) + }).insert() + +def create_items(args): + for i in xrange(1,6): + item = args.get("item_" + str(i)) + if item: + item_group = args.get("item_group_" + str(i)) + webnotes.bean({ + "doctype":"Item", + "item_code": item, + "item_name": item, + "description": item, + "is_sales_item": "Yes", + "is_stock_item": item_group!="Services" and "Yes" or "No", + "item_group": item_group, + "stock_uom": args.get("item_uom_" + str(i)), + "default_warehouse": item_group!="Service" and ("Finished Goods - " + args.get("company_abbr")) or "" + }).insert() + + if args.get("item_img_" + str(i)): + filename, filetype, content = args.get("item_img_" + str(i)).split(",") + fileurl = save_file(filename, content, "Item", item, decode=True).file_name + webnotes.conn.set_value("Item", item, "image", fileurl) + + for i in xrange(1,6): + item = args.get("item_buy_" + str(i)) + if item: + item_group = args.get("item_buy_group_" + str(i)) + webnotes.bean({ + "doctype":"Item", + "item_code": item, + "item_name": item, + "description": item, + "is_sales_item": "No", + "is_stock_item": item_group!="Services" and "Yes" or "No", + "item_group": item_group, + "stock_uom": args.get("item_buy_uom_" + str(i)), + "default_warehouse": item_group!="Service" and ("Stores - " + args.get("company_abbr")) or "" + }).insert() + + if args.get("item_img_" + str(i)): + filename, filetype, content = args.get("item_img_" + str(i)).split(",") + fileurl = save_file(filename, content, "Item", item, decode=True).file_name + webnotes.conn.set_value("Item", item, "image", fileurl) + + +def create_customers(args): + for i in xrange(1,6): + customer = args.get("customer_" + str(i)) + if customer: + webnotes.bean({ + "doctype":"Customer", + "customer_name": customer, + "customer_type": "Company", + "customer_group": "Commercial", + "territory": args.get("country"), + "company": args.get("company_name") + }).insert() + + if args.get("customer_contact_" + str(i)): + contact = args.get("customer_contact_" + str(i)).split(" ") + webnotes.bean({ + "doctype":"Contact", + "customer": customer, + "first_name":contact[0], + "last_name": len(contact) > 1 and contact[1] or "" + }).insert() + +def create_suppliers(args): + for i in xrange(1,6): + supplier = args.get("supplier_" + str(i)) + if supplier: + webnotes.bean({ + "doctype":"Supplier", + "supplier_name": supplier, + "supplier_type": "Local", + "company": args.get("company_name") + }).insert() + + if args.get("supplier_contact_" + str(i)): + contact = args.get("supplier_contact_" + str(i)).split(" ") + webnotes.bean({ + "doctype":"Contact", + "supplier": supplier, + "first_name":contact[0], + "last_name": len(contact) > 1 and contact[1] or "" + }).insert() + + +def create_letter_head(args): + if args.get("attach_letterhead"): + lh = webnotes.bean({ + "doctype":"Letter Head", + "letter_head_name": "Standard", + "is_default": 1 + }).insert() + + filename, filetype, content = args.get("attach_letterhead").split(",") + fileurl = save_file(filename, content, "Letter Head", "Standard", decode=True).file_name + webnotes.conn.set_value("Letter Head", "Standard", "content", "" % fileurl) + + + +def add_all_roles_to(name): + profile = webnotes.doc("Profile", name) + for role in webnotes.conn.sql("""select name from tabRole"""): + if role[0] not in ["Administrator", "Guest", "All", "Customer", "Supplier", "Partner"]: + d = profile.addchild("user_roles", "UserRole") + d.role = role[0] + d.insert() + +def create_territories(): + """create two default territories, one for home country and one named Rest of the World""" + from setup.utils import get_root_of + country = webnotes.conn.get_value("Control Panel", None, "country") + root_territory = get_root_of("Territory") + for name in (country, "Rest Of The World"): + if name and not webnotes.conn.exists("Territory", name): + webnotes.bean({ + "doctype": "Territory", + "territory_name": name.replace("'", ""), + "parent_territory": root_territory, + "is_group": "No" + }).insert() \ No newline at end of file diff --git a/setup/page/setup_wizard/setup_wizard.txt b/setup/page/setup_wizard/setup_wizard.txt new file mode 100644 index 00000000000..996fd1a0591 --- /dev/null +++ b/setup/page/setup_wizard/setup_wizard.txt @@ -0,0 +1,32 @@ +[ + { + "creation": "2013-10-04 13:49:33", + "docstatus": 0, + "modified": "2013-10-04 13:49:33", + "modified_by": "Administrator", + "owner": "Administrator" + }, + { + "doctype": "Page", + "module": "Setup", + "name": "__common__", + "page_name": "setup-wizard", + "standard": "Yes", + "title": "Setup Wizard" + }, + { + "doctype": "Page Role", + "name": "__common__", + "parent": "setup-wizard", + "parentfield": "roles", + "parenttype": "Page", + "role": "System Manager" + }, + { + "doctype": "Page", + "name": "setup-wizard" + }, + { + "doctype": "Page Role" + } +] \ No newline at end of file diff --git a/setup/page/setup_wizard/test_setup_data.py b/setup/page/setup_wizard/test_setup_data.py new file mode 100644 index 00000000000..b5b63598930 --- /dev/null +++ b/setup/page/setup_wizard/test_setup_data.py @@ -0,0 +1,53 @@ + +args = { +"attach_letterhead": "erpnext.jpg,data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/4gxYSUNDX1BST0ZJTEUAAQEAAAxITGlubwIQAABtbnRyUkdCIFhZWiAHzgACAAkABgAxAABhY3NwTVNGVAAAAABJRUMgc1JHQgAAAAAAAAAAAAAAAAAA9tYAAQAAAADTLUhQICAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABFjcHJ0AAABUAAAADNkZXNjAAABhAAAAGx3dHB0AAAB8AAAABRia3B0AAACBAAAABRyWFlaAAACGAAAABRnWFlaAAACLAAAABRiWFlaAAACQAAAABRkbW5kAAACVAAAAHBkbWRkAAACxAAAAIh2dWVkAAADTAAAAIZ2aWV3AAAD1AAAACRsdW1pAAAD+AAAABRtZWFzAAAEDAAAACR0ZWNoAAAEMAAAAAxyVFJDAAAEPAAACAxnVFJDAAAEPAAACAxiVFJDAAAEPAAACAx0ZXh0AAAAAENvcHlyaWdodCAoYykgMTk5OCBIZXdsZXR0LVBhY2thcmQgQ29tcGFueQAAZGVzYwAAAAAAAAASc1JHQiBJRUM2MTk2Ni0yLjEAAAAAAAAAAAAAABJzUkdCIElFQzYxOTY2LTIuMQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWFlaIAAAAAAAAPNRAAEAAAABFsxYWVogAAAAAAAAAAAAAAAAAAAAAFhZWiAAAAAAAABvogAAOPUAAAOQWFlaIAAAAAAAAGKZAAC3hQAAGNpYWVogAAAAAAAAJKAAAA+EAAC2z2Rlc2MAAAAAAAAAFklFQyBodHRwOi8vd3d3LmllYy5jaAAAAAAAAAAAA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ACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgBGZVBZmCgAsxYgAKvLMSeAAOSTwO9AHxV4x/4KU/8E6Ph5rl74Y+IH7ff7FPgbxLps8ttqPh7xj+1R8C/DOuWFzA2ya3vdJ1rx3ZX9rPC/ySxT28ckbHa6g8UAcv/wAPYf8Agln/ANJK/wBgH/xMj9nX8f8Amo1ACf8AD2H/AIJZf9JLP2AP/EyP2de//dRu+f1oAX/h7D/wSz/6SV/sA/8AiZH7Ov8A88agA/4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AKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgBCMgg9Dwfcd/wA6AP8AFM/4LVzzXH/BWv8A4KLvPI8rr+2J8d4VZzkiK28a6hbW8YP92GCGKJB/CiKO1AH5gc4P178Dkr1B555+vP8AeoAQZz/30Oo3Hjue+P0oAXn+R65PQc8fr/eHSgA556dPoOvcdc46n8KADnrjv3Pqf5eg659aAA5//Wf9rv6jB/DJHegBOfm6Z4789O/9emRmgBecj6nvx1bt6/5NABzx069zk/e556env2oA/wBDj/gx5mmf4Yf8FErdpGMEPjv9mqeKInKRzT+GPi/FPIo7PLHbQI57rEg/hoA/u7oAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKAP8AFF/4LS/8paf+CjPr/wANkfH3/wBTvVPf/wDX60AfmMc4Of8A638PU8H1/wA4oAQZyPXLc8dcc9+oP4GgAGc47kLnt0A98nvnj/64ApyScjsR147d+OvvjjmgAyc49we3r9c/Q9c8HrQAN7+/6sMDr7df60AHPzevGenp356EfzPXFABzkdcZPp1+b3z/AJ9aADnAHvknj+96e/8AkmgD/Q0/4Md/+Sb/APBRf/sdf2ZP/Ub+M1AH939ABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQB/ijf8ABaX/AJS0/wDBRn/s8j4+8/8Ac+ap3/zzQB+Y3+Prx1Ht/TqT60AIM+p/i53c+nPH5dcGgBec9+MdT+PoefXnoe+RQAvPX29ePr06/gaADBz1PXPX8x06fj+XWgBDn3/P1P8AnHXjIoAOeRz25z/9bvxnPqT9QA7g5PUjrx3P+fT8KADkfn1J56/5789OtAH+hn/wY7/8k3/4KL/9jr+zJ/6jfxmoA/u/oAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKAP8UX/AILS/wDKWn/gozxn/jMj4+9s/wDM+ap+fNAH5jEdeP8Ax0H+76/j+vpQAgHPT1/g/L3/AK9jQAd+hxx/APxoAO7cHv8AwD1/X/JoACOenf8AuZH59f8APFACkdePX+EH+L/D9OaAE7Hj0/gH4/8A1/060ALjnoOp/g7c9+n4/ie9ABj2/wDHPf8AT8e3PWgD/Q0/4Md/+Sb/APBRf/sdf2ZP/Ub+M3+fegD+7+gAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoA/xRf+C0v/KWn/goz/2eR8fffr481X/P55oA/Mc85P8AMH1HXuenP/6qAGjqOB1bnB75xn2Pbnp34NAC4Oc46Y7ZPAHTk/j+mTQAYPXA5z29wfm75/Dr3oAMHrhfXpz/ACz75657UABHt+nqwPPf/HnPNAAAeRgdeuODj/PPpk0AHcH/AGj2OepOeme/596ADHTgdR7H72eOvGPf1zQB/oaf8GO//JN/+Ci//Y6/syf+o38ZqAP7v6ACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKAMzWda0jw7pOp69r+qadomiaLp97q+saxq99a6ZpWk6VptvJeajqep6jfTQWWn6fY2sUtzeX15PDa2sEbzTyxxqWAB+H/AMUv+DlH/giz8JfE194T139trwp4k1bTbmW0vp/hl4A+LfxT8PRzRMysLXxf4D8C654U1WLKnFxo+s6hbE8CY9wDzP8A4io/+CIf/R2mu/8AiPH7RX/zsqAD/iKj/wCCIf8A0dprv/iPH7RX/wA7KgA/4io/+CIf/R2mu/8AiPH7RX/zsqAD/iKj/wCCIf8A0dprv/iPH7RX/wA7KgA/4io/+CIf/R2mu/8AiPH7RX/zsqAP8xH/AIKa/Gj4d/tF/wDBQn9s747/AAi1yTxN8MPi7+0n8XPiF4B8QTaVquhzaz4U8U+LL/VNE1J9H12007WdNa7sp45WstTsbS+t9xjubeGUFFAPho55+uc8e3v25/TnPUATJz27+mef+Bfn/XrQADIPYZx6c8fX/H+VAC5OfpnnjPb/AGvz6dqADJz/APqzj/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p1Hf29+e3f8ehoAUfeHrk/zb/PX0oAQHgDscdSP73p1NAH+hr/AMGO/wDyTf8A4KL/APY6/syf+o38Zs0Af3f0AFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFAH+KL/wWj/5S0f8FGucf8Zk/H/r/wBj7qn/AOv9fqAfmOfbHXp+K+3uT+INADefUfxenb8PXk9c9aAF5yeR2z05yB7c5/CgBeeeRj6j1+n4d+aADnPUYz6j8unX8f8AGgAOfUfp/e+nbpnnmgBMnnkZyOcj0+nft/8AW5AF5yPqf/Zuen659etACc8HIPTPQ9W+n9RyPagD/Q0/4Md/+Sb/APBRf/sdf2ZP/Ub+M1AH939ABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQB/ii/8ABaT/AJSz/wDBRr/s8j4//wDqe6pQB+Yx9D0z9B1Tt+P86ADPvzh/55/+vQAA+uCTjr7qO3Xn2/HHWgBCcgjjvnkdcjnOePofpQAuQfrn27N09f8AH6mgBD156d8+z/8A16AAkHP1/mp/qf1J9aAFB5x7k/q9ACA56nk7fTsx7UAf6Gv/AAY7/wDJN/8Agov/ANjr+zJ/6jfxmoA/u/oAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAa2drbeWwSo9Tjj9aAP8bP/g4Y+B3jL4Ef8FhP23tK8XaZcWdv8R/i5qfxz8H6jIjiy8QeDPjNbW/jXS9U0q4Py3dtZ6hfax4bvpYiyW+uaBq+nE+fZyKAD8WSc56fjn/Z64P8vb/aoATjPbv/AHvQ+v69/TmgA4yDx2/vdgPw+mT9aADj5unP+96jr/8AWzz7ZoAON3bOf9rPX8s/pQAp79Oh65/vd8H1/HPtzQAnGD93qP73v+P+TntQA7+IHHr655J98eucn1x2oAb6dP8Ax7+91H/1+/4UAf6UP/BlL8DvGfgz9kD9rD4767plzpvhb43/ABu8HeFPA812jRHXbL4K+FNYtvEOu6crAC50hfEfj+58OpfRFon1fw/rViT5thKoAP7VKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgD8dP+Cuv/AARY/Zj/AOCu3w40LSvifd6l8MPjf8PbW/t/hP8AtA+ENMsdS8S+GrLUpRdX3hLxXod7LZ2nj74e3t8F1NvDV9qOl6hpGq+fqPhbxD4fn1PXBqoB/F34x/4Mof8AgovZ67eweAP2m/2KPEvhpJpV0/VvF/iP47eB9durc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FABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFAH/2Q==", +"attach_logo": "logo-2013-color-small.png,data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAEJGlDQ1BJQ0MgUHJvZmlsZQAAOBGFVd9v21QUPolvUqQWPyBYR4eKxa9VU1u5GxqtxgZJk6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/3XOPGf8zf/ALDsN/7th+wV/wAkc8S/9la8d/8AoWl19Vf8Ebry7Pwy+Kdgbq5NjH8YfG9zHZmeU2iXElv4eSSdLct5KzSIiK8qoHdURWYhQAUV5WY/7lg/+vVX/wBKonr5X/yMsw/6+0f/AEmsfz4f8FEru6s/+CNf/BS+W0ubi1lb4yX9q0lvNJBI1rffGD4L2d7bM8TKxgvLO4ntbqEkx3FtPNBMrxSOjfYv/BC9msf+CeHwnt7JjZ28+j+CzNBak28Mxk+EHwwmkMsUWxJC8skkrl1JaSR3bLMxJRWuG/3jA/8AYvf/AKkMxxn+6Zj/ANjOX/qPRPpr9hn/AJFj44f9nGfET/03+F6d+xL/AMeH7Qf/AGcZ4/8A/RWlUUV6FD/mB/w4n9DzcXvmnrg/ziN/Yu/4+/2l/wDs4zx1/wCjIam/Y7/5Dv7U3/ZyXj3/ANLHoop0t8D64n8pBit8z/wYL86R8MeOfFvivwhp37QN94S8TeIfC97dfteeLbS5vPDutalol1cWv2DxJL9mnuNNubaWW382KOXyZHaPzI0fbuRSPnzwz8Xviz4K1LVdY8G/FD4ieEtX128m1HXNV8M+NfEug6lrOoXG/wC0X2q32lanaXWo3k/mP511eSzTy733u245KK8LFfwv/B//ALcfSYT436YT/wBwnLeLPE3iPx74Y+IXgjx14g1vxp4L+Ld9Z6n8VvCPizVb/wAR+GPibqWnalBrOn6h8QtA1i4vNK8aX1jq9ra6rZ3fiS01K4tdStoL6CRLqGOVe28B/HD41fCzwd4d+Hfwx+L/AMUfhx8P/CGmw6N4T8DeA/iB4s8IeDvC+j2xY2+k+HfDPh/VtO0XRdNgLsYbHTbG2tYizbIl3HJRXjPf5R/JHtnW/wDDV/7Uv/Rynx+/8PH8RP8A5o6P+Gr/ANqX/o5T4/f+Hj+In/zR0UUgD/hq/wDal/6OU+P3/h4/iJ/80dFFFAH/2Q==", +"company_abbr": "WN", +"company_name": "Web Notes", +"company_tagline": "Open Source ERP", +"country": "India", +"currency": "INR", +"customer_1": "RIGPL", +"customer_2": "Mahesh Engg", +"customer_contact_1": "Aditya Duggal", +"customer_contact_2": "Mahesh Malani", +"first_name": "Rushabh", +"fy_start": "1st Apr", +"item_1": "Enterprise Plan", +"item_2": "Small Business", +"item_3": "Solo", +"item_4": "Manual", +"item_buy_1": "Server Hosting", +"item_buy_2": "Adwords", +"item_buy_group_1": "Services", +"item_buy_group_2": "Services", +"item_buy_group_3": "Raw Material", +"item_buy_group_4": "Raw Material", +"item_buy_group_5": "Raw Material", +"item_buy_uom_1": "Unit", +"item_buy_uom_2": "Unit", +"item_buy_uom_3": "Unit", +"item_buy_uom_4": "Unit", +"item_buy_uom_5": "Unit", +"item_group_1": "Services", +"item_group_2": "Services", +"item_group_3": "Services", +"item_group_4": "Products", +"item_group_5": "Products", +"item_img_1": "logo-2013-color-small.png,data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAEJGlDQ1BJQ0MgUHJvZmlsZQAAOBGFVd9v21QUPolvUqQWPyBYR4eKxa9VU1u5GxqtxgZJk6XtShal6dgqJOQ6N4mpGwfb6baqT3uBNwb8AUDZAw9IPCENBmJ72fbAtElThyqqSUh76MQPISbtBVXhu3ZiJ1PEXPX6yznfOec7517bRD1fabWaGVWIlquunc8klZOnFpSeTYrSs9RLA9Sr6U4tkcvNEi7BFffO6+EdigjL7ZHu/k72I796i9zRiSJPwG4VHX0Z+AxRzNRrtksUvwf7+Gm3BtzzHPDTNgQCqwKXfZwSeNHHJz1OIT8JjtAq6xWtCLwGPLzYZi+3YV8DGMiT4VVuG7oiZpGzrZJhcs/hL49xtzH/Dy6bdfTsXYNY+5yluWO4D4neK/ZUvok/17X0HPBLsF+vuUlhfwX4j/rSfAJ4H1H0qZJ9dN7nR19frRTeBt4Fe9FwpwtN+2p1MXscGLHR9SXrmMgjONd1ZxKzpBeA71b4tNhj6JGoyFNp4GHgwUp9qplfmnFW5oTdy7NamcwCI49kv6fN5IAHgD+0rbyoBc3SOjczohbyS1drbq6p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M42xMJcErzh07xjo8RSVTLKoxSNadrW8Ta52oZodBIH0EDEHSx9yU2EMIGIL0kLGMqOkjYAiSPuamxB5CwBCkh4xlRE0fAUOQ9DE3JfYQAoYgPWQsI2r6CBiCpI+5KbGHEDAE6SFjGVHTR8AQJH3MTYk9hIAhSA8Zy4iaPgKGIOljbkrsIQQMQXrIWEbU9BEwBEkfc1NiDyFgCNJDxjKipo+AIUj6mJsSewgBQ5AeMpYRNX0EDEHSx9yU2EMIGIL0kLGMqOkjYAiSPuamxB5CwBCkh4xlRE0fAUOQ9DE3JfYQAoYgPWQsI2r6CBiCpI+5KbGHEDAESTAWpjjjpGp9l6hT+L/vVGurQoYgteAshAeEDOYxKSdWM8CEz+G81LWu6In91IG6UCelG6WOdO0JBVIW0hAkAXBfus+gqj0Ph8pgmt6ejyVKB+hCnZRuCfpv9sMNzpy/ieDiJNlR4+pbV+/+D8zt/H5ofxZ7s73aNEH0gL2tMj4vwfJtX3/PY098SFl0ha6byMJ1qWoiSC2YQI5jh0Q4ubcQdyOCXIB7DYEcJTparct03a/IAdmVDkoX6ISklnnoy7us9ljCRJAEHCex1McEpur/ztW7Pwpa3AVulFELz+EytuNZwehOFs7bzqUGAkQ/riabxe9b3/XYE1+p6pYAwaY+bAiSZP4VzY9vX7PnA7gLuR2XvAS0KIEoWNvb6uoKWEnigwxY+4frEFpcLOdprOVwx7sfffxedd0K3RLz2aQnGILUYfiVNe33r7lij2c574PDvQmhYw8cbriOLLp2Cgg9j2bh4yDyj13L/8afP/rU4xRmpU5dE64HCv5/TkFf8RZsb3gAAAAASUVORK5CYII=", +"item_uom_1": "Unit", +"item_uom_2": "Unit", +"item_uom_3": "Unit", +"item_uom_4": "Unit", +"item_uom_5": "Unit", +"last_name": "Mehta", +"supplier_1": "Google", +"supplier_2": "Hetzner", +"supplier_3": "Digital Ocean", +"tax_1": "Service Tax", +"tax_rate_1": "12.5", +"timezone": "Asia/Calcutta", +"password": "password", +"email": "test@erpnext.com", +} \ No newline at end of file diff --git a/setup/page/setup_wizard/test_setup_wizard.py b/setup/page/setup_wizard/test_setup_wizard.py new file mode 100644 index 00000000000..7f09a9bfeab --- /dev/null +++ b/setup/page/setup_wizard/test_setup_wizard.py @@ -0,0 +1,14 @@ +# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. +# License: GNU General Public License v3. See license.txt + +from __future__ import unicode_literals +import webnotes + +from setup.page.setup_wizard.test_setup_data import args +from setup.page.setup_wizard.setup_wizard import setup_account + +if __name__=="__main__": + webnotes.connect() + webnotes.local.form_dict = webnotes._dict(args) + setup_account() + \ No newline at end of file diff --git a/startup/__init__.py b/startup/__init__.py index 227846c46dc..802daac9b3b 100644 --- a/startup/__init__.py +++ b/startup/__init__.py @@ -27,8 +27,6 @@ profile_defaults = { "Territory": "territory" } -application_home_page = "desktop" - # add startup propertes mail_footer = """
Sent via ERPNext
""" diff --git a/startup/boot.py b/startup/boot.py index 886b805db43..d27c0b73e39 100644 --- a/startup/boot.py +++ b/startup/boot.py @@ -32,9 +32,9 @@ def boot_session(bootinfo): # load subscription info - import conf + from webnotes import conf for key in ['max_users', 'expires_on', 'max_space', 'status', 'commercial_support']: - if hasattr(conf, key): bootinfo[key] = getattr(conf, key) + if key in conf: bootinfo[key] = conf.get(key) bootinfo['docs'] += webnotes.conn.sql("""select name, default_currency, cost_center from `tabCompany`""", as_dict=1, update={"doctype":":Company"}) @@ -53,4 +53,4 @@ def get_letter_heads(): ret = webnotes.conn.sql("""select name, content from `tabLetter Head` where ifnull(disabled,0)=0""") return dict(ret) - \ No newline at end of file + diff --git a/startup/event_handlers.py b/startup/event_handlers.py index 57345f3ca06..a0126118bb1 100644 --- a/startup/event_handlers.py +++ b/startup/event_handlers.py @@ -35,13 +35,13 @@ def on_login_post_session(login_manager): set_cart_count() def on_logout(login_manager): - webnotes.add_cookies["cart_count"] = "" + webnotes._response.set_cookie("cart_count", "") def check_if_expired(): """check if account is expired. If expired, do not allow login""" - import conf + from webnotes import conf # check if expires_on is specified - if not hasattr(conf, 'expires_on'): return + if not 'expires_on' in conf: return # check if expired from datetime import datetime, date @@ -65,9 +65,6 @@ def check_if_expired(): raise webnotes.AuthenticationError def on_build(): - from website.doctype.website_settings.make_web_include_files import make - make() - from home.page.latest_updates import latest_updates latest_updates.make() @@ -75,4 +72,4 @@ def comment_added(doc): """add comment to feed""" home.make_feed('Comment', doc.comment_doctype, doc.comment_docname, doc.comment_by, '"' + doc.comment + '"', '#6B24B3') - \ No newline at end of file + diff --git a/startup/install.py b/startup/install.py index d79559426be..fd7221380dc 100644 --- a/startup/install.py +++ b/startup/install.py @@ -13,13 +13,13 @@ def post_import(): import_country_and_currency() # home page - webnotes.conn.set_value('Control Panel', None, 'home_page', 'desktop') + webnotes.conn.set_value('Control Panel', None, 'home_page', 'setup-wizard') # features feature_setup() # all roles to Administrator - from setup.doctype.setup_control.setup_control import add_all_roles_to + from setup.page.setup_wizard.setup_wizard import add_all_roles_to add_all_roles_to("Administrator") webnotes.conn.commit() @@ -71,6 +71,7 @@ def import_defaults(): {'doctype': 'Item Group', 'item_group_name': 'Raw Material', 'is_group': 'No', 'parent_item_group': 'All Item Groups'}, {'doctype': 'Item Group', 'item_group_name': 'Services', 'is_group': 'No', 'parent_item_group': 'All Item Groups'}, {'doctype': 'Item Group', 'item_group_name': 'Sub Assemblies', 'is_group': 'No', 'parent_item_group': 'All Item Groups'}, + {'doctype': 'Item Group', 'item_group_name': 'Consumable', 'is_group': 'No', 'parent_item_group': 'All Item Groups'}, # deduction type {'doctype': 'Deduction Type', 'name': 'Income Tax', 'description': 'Income Tax', 'deduction_name': 'Income Tax'}, diff --git a/stock/doctype/bin/bin.py b/stock/doctype/bin/bin.py index c419cad43bb..014c47abd49 100644 --- a/stock/doctype/bin/bin.py +++ b/stock/doctype/bin/bin.py @@ -5,7 +5,6 @@ from __future__ import unicode_literals import webnotes from webnotes.utils import add_days, cint,flt, nowdate, get_url_to_form, formatdate from webnotes import msgprint, _ -sql = webnotes.conn.sql import webnotes.defaults @@ -61,7 +60,7 @@ class DocType: self.doc.save() def get_first_sle(self): - sle = sql(""" + sle = webnotes.conn.sql(""" select * from `tabStock Ledger Entry` where item_code = %s and warehouse = %s diff --git a/stock/doctype/delivery_note/delivery_note.js b/stock/doctype/delivery_note/delivery_note.js index 84e65dabddf..210b3926fca 100644 --- a/stock/doctype/delivery_note/delivery_note.js +++ b/stock/doctype/delivery_note/delivery_note.js @@ -9,7 +9,7 @@ cur_frm.cscript.sales_team_fname = "sales_team"; wn.require('app/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.js'); wn.require('app/utilities/doctype/sms_control/sms_control.js'); -wn.require('app/selling/doctype/sales_common/sales_common.js'); +wn.require('app/selling/sales_common.js'); wn.require('app/accounts/doctype/sales_invoice/pos.js'); wn.provide("erpnext.stock"); @@ -22,24 +22,24 @@ erpnext.stock.DeliveryNoteController = erpnext.selling.SellingController.extend( var from_sales_invoice = false; from_sales_invoice = cur_frm.get_doclist({parentfield: "delivery_note_details"}) .some(function(item) { - return item.prevdoc_doctype==="Sales Invoice" ? true : false; + return item.against_sales_invoice ? true : false; }); if(!from_sales_invoice) - cur_frm.add_custom_button('Make Invoice', this.make_sales_invoice); + cur_frm.add_custom_button(wn._('Make Invoice'), this.make_sales_invoice); } if(flt(doc.per_installed, 2) < 100 && doc.docstatus==1) - cur_frm.add_custom_button('Make Installation Note', this.make_installation_note); + cur_frm.add_custom_button(wn._('Make Installation Note'), this.make_installation_note); if (doc.docstatus==1) { - cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms); + cur_frm.add_custom_button(wn._('Send SMS'), cur_frm.cscript.send_sms); this.show_stock_ledger(); this.show_general_ledger(); } if(doc.docstatus==0 && !doc.__islocal) { - cur_frm.add_custom_button('Make Packing Slip', cur_frm.cscript['Make Packing Slip']); + cur_frm.add_custom_button(wn._('Make Packing Slip'), cur_frm.cscript['Make Packing Slip']); } set_print_hide(doc, dt, dn); @@ -113,13 +113,6 @@ cur_frm.fields_dict['project_name'].get_query = function(doc, cdt, cdn) { } } -cur_frm.cscript.serial_no = function(doc, cdt, cdn) { - var d = locals[cdt][cdn]; - if (d.serial_no) { - return get_server_fields('get_serial_details',d.serial_no,'delivery_note_details',doc,cdt,cdn,1); - } -} - cur_frm.fields_dict['transporter_name'].get_query = function(doc) { return{ filters: { 'supplier_type': "transporter" } @@ -181,12 +174,12 @@ cur_frm.pformat.sales_order_no= function(doc, cdt, cdn){ if(cl.length){ prevdoc_list = new Array(); for(var i=0;i {% include "app/stock/doctype/item/templates/includes/product_page.js" %} + + $(function() { + if(window.logged_in && getCookie("system_user")==="yes") { + wn.require("lib/js/wn/website/editable.js"); + wn.make_editable($('[itemprop="description"]'), "Item", "{{ name }}", "web_long_description"); + } + }) + {% endblock %} diff --git a/stock/doctype/item/templates/includes/product_list.js b/stock/doctype/item/templates/includes/product_list.js index 2856bde3d71..efcbe0b2a57 100644 --- a/stock/doctype/item/templates/includes/product_list.js +++ b/stock/doctype/item/templates/includes/product_list.js @@ -12,7 +12,7 @@ window.get_product_list = function() { $.ajax({ method: "GET", - url: "server.py", + url: "/", dataType: "json", data: { cmd: "selling.utils.product.get_product_list", diff --git a/stock/doctype/item/test_item.py b/stock/doctype/item/test_item.py index 12bb4e05783..c8930abc978 100644 --- a/stock/doctype/item/test_item.py +++ b/stock/doctype/item/test_item.py @@ -31,7 +31,7 @@ test_records = [ "is_sales_item": "Yes", "is_service_item": "No", "inspection_required": "No", - "is_pro_applicable": "No", + "is_pro_applicable": "Yes", "is_sub_contracted_item": "No", "stock_uom": "_Test UOM", "default_income_account": "Sales - _TC", @@ -45,6 +45,26 @@ test_records = [ "material_request_type": "Purchase" }, ], + [{ + "doctype": "Item", + "item_code": "_Test Item 2", + "item_name": "_Test Item 2", + "description": "_Test Item 2", + "item_group": "_Test Item Group", + "is_stock_item": "Yes", + "is_asset_item": "No", + "has_batch_no": "No", + "has_serial_no": "No", + "is_purchase_item": "Yes", + "is_sales_item": "Yes", + "is_service_item": "No", + "inspection_required": "No", + "is_pro_applicable": "Yes", + "is_sub_contracted_item": "No", + "stock_uom": "_Test UOM", + "default_income_account": "Sales - _TC", + "default_warehouse": "_Test Warehouse - _TC", + }], [{ "doctype": "Item", "item_code": "_Test Item Home Desktop 100", @@ -63,6 +83,7 @@ test_records = [ "inspection_required": "No", "is_pro_applicable": "No", "is_sub_contracted_item": "No", + "is_manufactured_item": "No", "stock_uom": "_Test UOM" }, { @@ -88,6 +109,7 @@ test_records = [ "inspection_required": "No", "is_pro_applicable": "No", "is_sub_contracted_item": "No", + "is_manufactured_item": "No", "stock_uom": "_Test UOM" }], [{ @@ -182,8 +204,49 @@ test_records = [ "is_sales_item": "Yes", "is_service_item": "No", "inspection_required": "No", - "is_pro_applicable": "No", + "is_pro_applicable": "Yes", "is_sub_contracted_item": "No", "stock_uom": "_Test UOM" }], + [{ + "doctype": "Item", + "item_code": "_Test Item Home Desktop Manufactured", + "item_name": "_Test Item Home Desktop Manufactured", + "description": "_Test Item Home Desktop Manufactured", + "item_group": "_Test Item Group Desktops", + "default_warehouse": "_Test Warehouse - _TC", + "default_income_account": "Sales - _TC", + "is_stock_item": "Yes", + "is_asset_item": "No", + "has_batch_no": "No", + "has_serial_no": "No", + "is_purchase_item": "Yes", + "is_sales_item": "Yes", + "is_service_item": "No", + "inspection_required": "No", + "is_pro_applicable": "Yes", + "is_sub_contracted_item": "No", + "is_manufactured_item": "Yes", + "stock_uom": "_Test UOM" + }], + [{ + "doctype": "Item", + "item_code": "_Test FG Item 2", + "item_name": "_Test FG Item 2", + "description": "_Test FG Item 2", + "item_group": "_Test Item Group Desktops", + "is_stock_item": "Yes", + "default_warehouse": "_Test Warehouse - _TC", + "default_income_account": "Sales - _TC", + "is_asset_item": "No", + "has_batch_no": "No", + "has_serial_no": "No", + "is_purchase_item": "Yes", + "is_sales_item": "Yes", + "is_service_item": "No", + "inspection_required": "No", + "is_pro_applicable": "Yes", + "is_sub_contracted_item": "Yes", + "stock_uom": "_Test UOM" + }], ] \ No newline at end of file diff --git a/stock/doctype/material_request/material_request.js b/stock/doctype/material_request/material_request.js index 6931181dbac..9fc852f87b8 100644 --- a/stock/doctype/material_request/material_request.js +++ b/stock/doctype/material_request/material_request.js @@ -21,23 +21,27 @@ erpnext.buying.MaterialRequestController = erpnext.buying.BuyingController.exten + wn._("Fulfilled"), cint(doc.per_ordered)); } - if(doc.docstatus == 1 && doc.status != 'Stopped'){ + if(doc.docstatus==0) { + cur_frm.add_custom_button(wn._("Get Items from BOM"), cur_frm.cscript.get_items_from_bom, "icon-sitemap"); + } + + if(doc.docstatus == 1 && doc.status != 'Stopped') { if(doc.material_request_type === "Purchase") - cur_frm.add_custom_button("Make Supplier Quotation", + cur_frm.add_custom_button(wn._("Make Supplier Quotation"), this.make_supplier_quotation); if(doc.material_request_type === "Transfer" && doc.status === "Submitted") - cur_frm.add_custom_button("Transfer Material", this.make_stock_entry); + cur_frm.add_custom_button(wn._("Transfer Material"), this.make_stock_entry); if(flt(doc.per_ordered, 2) < 100) { if(doc.material_request_type === "Purchase") - cur_frm.add_custom_button('Make Purchase Order', + cur_frm.add_custom_button(wn._('Make Purchase Order'), this.make_purchase_order); - cur_frm.add_custom_button('Stop Material Request', + cur_frm.add_custom_button(wn._('Stop Material Request'), cur_frm.cscript['Stop Material Request']); } - cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms); + cur_frm.add_custom_button(wn._('Send SMS'), cur_frm.cscript.send_sms); } @@ -58,11 +62,58 @@ erpnext.buying.MaterialRequestController = erpnext.buying.BuyingController.exten } if(doc.docstatus == 1 && doc.status == 'Stopped') - cur_frm.add_custom_button('Unstop Material Request', + cur_frm.add_custom_button(wn._('Unstop Material Request'), cur_frm.cscript['Unstop Material Request']); }, + schedule_date: function(doc, cdt, cdn) { + var val = locals[cdt][cdn].schedule_date; + if(val) { + $.each(wn.model.get("Material Request Item", { parent: cur_frm.doc.name }), function(i, d) { + if(!d.schedule_date) { + d.schedule_date = val; + } + }); + refresh_field("indent_details"); + } + }, + + get_items_from_bom: function() { + var d = new wn.ui.Dialog({ + title: wn._("Get Items from BOM"), + fields: [ + {"fieldname":"bom", "fieldtype":"Link", "label":wn._("BOM"), + options:"BOM"}, + {"fieldname":"fetch_exploded", "fieldtype":"Check", + "label":wn._("Fetch exploded BOM (including sub-assemblies)"), "default":1}, + {fieldname:"fetch", "label":wn._("Get Items from BOM"), "fieldtype":"Button"} + ] + }); + d.get_input("fetch").on("click", function() { + var values = d.get_values(); + if(!values) return; + + wn.call({ + method:"manufacturing.doctype.bom.bom.get_bom_items", + args: values, + callback: function(r) { + $.each(r.message, function(i, item) { + var d = wn.model.add_child(cur_frm.doc, "Material Request Item", "indent_details"); + d.item_code = item.item_code; + d.description = item.description; + d.warehouse = item.default_warehouse; + d.uom = item.stock_uom; + d.qty = item.qty; + }); + d.hide(); + refresh_field("indent_details"); + } + }); + }); + d.show(); + }, + tc_name: function() { this.get_terms(); }, @@ -103,12 +154,12 @@ $.extend(cur_frm.cscript, new erpnext.buying.MaterialRequestController({frm: cur cur_frm.cscript.qty = function(doc, cdt, cdn) { var d = locals[cdt][cdn]; if (flt(d.qty) < flt(d.min_order_qty)) - alert("Warning: Material Requested Qty is less than Minimum Order Qty"); + alert(wn._("Warning: Material Requested Qty is less than Minimum Order Qty")); }; cur_frm.cscript['Stop Material Request'] = function() { var doc = cur_frm.doc; - var check = confirm("Do you really want to STOP this Material Request?"); + var check = confirm(wn._("Do you really want to STOP this Material Request?")); if (check) { return $c('runserverobj', args={'method':'update_status', 'arg': 'Stopped', 'docs': wn.model.compress(make_doclist(doc.doctype, doc.name))}, function(r,rt) { @@ -119,7 +170,7 @@ cur_frm.cscript['Stop Material Request'] = function() { cur_frm.cscript['Unstop Material Request'] = function(){ var doc = cur_frm.doc; - var check = confirm("Do you really want to UNSTOP this Material Request?"); + var check = confirm(wn._("Do you really want to UNSTOP this Material Request?")); if (check) { return $c('runserverobj', args={'method':'update_status', 'arg': 'Submitted','docs': wn.model.compress(make_doclist(doc.doctype, doc.name))}, function(r,rt) { diff --git a/stock/doctype/material_request/material_request.py b/stock/doctype/material_request/material_request.py index d1672ba12c1..4af86dac69b 100644 --- a/stock/doctype/material_request/material_request.py +++ b/stock/doctype/material_request/material_request.py @@ -20,10 +20,6 @@ class DocType(BuyingController): self.tname = 'Material Request Item' self.fname = 'indent_details' - # get available qty at warehouse - def get_bin_details(self, arg = ''): - return get_obj(dt='Purchase Common').get_bin_details(arg) - def check_if_already_pulled(self): pass#if self.[d.sales_order_no for d in getlist(self.doclist, 'indent_details')] @@ -100,9 +96,6 @@ class DocType(BuyingController): update_bin(args) def on_submit(self): - purchase_controller = webnotes.get_obj("Purchase Common") - purchase_controller.is_item_table_empty(self) - webnotes.conn.set(self.doc,'status','Submitted') self.update_bin(is_submit = 1, is_stopped = 0) diff --git a/stock/doctype/material_request/material_request.txt b/stock/doctype/material_request/material_request.txt index a5f092d7cbb..5fd576aab66 100644 --- a/stock/doctype/material_request/material_request.txt +++ b/stock/doctype/material_request/material_request.txt @@ -2,12 +2,13 @@ { "creation": "2013-03-07 14:48:38", "docstatus": 0, - "modified": "2013-08-08 14:22:27", + "modified": "2013-10-02 14:24:42", "modified_by": "Administrator", "owner": "Administrator" }, { "allow_attach": 1, + "allow_import": 1, "allow_print": 0, "autoname": "naming_series:", "doctype": "DocType", diff --git a/stock/doctype/material_request_item/material_request_item.txt b/stock/doctype/material_request_item/material_request_item.txt index dae97e09295..2ef4acd531e 100644 --- a/stock/doctype/material_request_item/material_request_item.txt +++ b/stock/doctype/material_request_item/material_request_item.txt @@ -2,7 +2,7 @@ { "creation": "2013-02-22 01:28:02", "docstatus": 0, - "modified": "2013-08-07 14:45:11", + "modified": "2013-10-11 14:21:32", "modified_by": "Administrator", "owner": "Administrator" }, @@ -138,7 +138,7 @@ "oldfieldname": "item_name", "oldfieldtype": "Data", "print_width": "100px", - "reqd": 1, + "reqd": 0, "search_index": 1, "width": "100px" }, diff --git a/stock/doctype/packed_item/__init__.py b/stock/doctype/packed_item/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/stock/doctype/packed_item/packed_item.py b/stock/doctype/packed_item/packed_item.py new file mode 100644 index 00000000000..fc259585b6e --- /dev/null +++ b/stock/doctype/packed_item/packed_item.py @@ -0,0 +1,105 @@ +# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. +# MIT License. See license.txt + +# For license information, please see license.txt + +from __future__ import unicode_literals +import webnotes +from webnotes.utils import cstr, flt +from webnotes.model.doc import addchild +from webnotes.model.bean import getlist + +class DocType: + def __init__(self, d, dl): + self.doc, self.doclist = d, dl + +def get_sales_bom_items(item_code): + return webnotes.conn.sql("""select t1.item_code, t1.qty, t1.uom + from `tabSales BOM Item` t1, `tabSales BOM` t2 + where t2.new_item_code=%s and t1.parent = t2.name""", item_code, as_dict=1) + +def get_packing_item_details(item): + return webnotes.conn.sql("""select item_name, description, stock_uom from `tabItem` + where name = %s""", item, as_dict = 1)[0] + +def get_bin_qty(item, warehouse): + det = webnotes.conn.sql("""select actual_qty, projected_qty from `tabBin` + where item_code = %s and warehouse = %s""", (item, warehouse), as_dict = 1) + return det and det[0] or '' + +def update_packing_list_item(obj, packing_item_code, qty, warehouse, line, packing_list_idx): + bin = get_bin_qty(packing_item_code, warehouse) + item = get_packing_item_details(packing_item_code) + + # check if exists + exists = 0 + for d in getlist(obj.doclist, 'packing_details'): + if d.parent_item == line.item_code and d.item_code == packing_item_code and d.parent_detail_docname == line.name: + pi, exists = d, 1 + break + + if not exists: + pi = addchild(obj.doc, 'packing_details', 'Packed Item', obj.doclist) + + pi.parent_item = line.item_code + pi.item_code = packing_item_code + pi.item_name = item['item_name'] + pi.parent_detail_docname = line.name + pi.description = item['description'] + pi.uom = item['stock_uom'] + pi.qty = flt(qty) + pi.actual_qty = bin and flt(bin['actual_qty']) or 0 + pi.projected_qty = bin and flt(bin['projected_qty']) or 0 + if not pi.warehouse: + pi.warehouse = warehouse + if not pi.batch_no: + pi.batch_no = cstr(line.batch_no) + pi.idx = packing_list_idx + + # saved, since this function is called on_update of delivery note + pi.save() + + packing_list_idx += 1 + + +def make_packing_list(obj, item_table_fieldname): + """make packing list for sales bom item""" + packing_list_idx = 0 + parent_items = [] + for d in obj.doclist.get({"parentfield": item_table_fieldname}): + warehouse = (item_table_fieldname == "sales_order_details") \ + and d.reserved_warehouse or d.warehouse + if webnotes.conn.get_value("Sales BOM", {"new_item_code": d.item_code}): + for i in get_sales_bom_items(d.item_code): + update_packing_list_item(obj, i['item_code'], flt(i['qty'])*flt(d.qty), + warehouse, d, packing_list_idx) + + if [d.item_code, d.name] not in parent_items: + parent_items.append([d.item_code, d.name]) + + obj.doclist = cleanup_packing_list(obj, parent_items) + + return obj.doclist + +def cleanup_packing_list(obj, parent_items): + """Remove all those child items which are no longer present in main item table""" + delete_list = [] + for d in obj.doclist.get({"parentfield": "packing_details"}): + if [d.parent_item, d.parent_detail_docname] not in parent_items: + # mark for deletion from doclist + delete_list.append(d.name) + + if not delete_list: + return obj.doclist + + # delete from doclist + obj.doclist = webnotes.doclist(filter(lambda d: d.name not in delete_list, obj.doclist)) + + # delete from db + webnotes.conn.sql("""\ + delete from `tabPacked Item` + where name in (%s)""" + % (", ".join(["%s"] * len(delete_list))), + tuple(delete_list)) + + return obj.doclist \ No newline at end of file diff --git a/stock/doctype/delivery_note_packing_item/delivery_note_packing_item.txt b/stock/doctype/packed_item/packed_item.txt similarity index 96% rename from stock/doctype/delivery_note_packing_item/delivery_note_packing_item.txt rename to stock/doctype/packed_item/packed_item.txt index 441b13a1a9f..8320502cf76 100644 --- a/stock/doctype/delivery_note_packing_item/delivery_note_packing_item.txt +++ b/stock/doctype/packed_item/packed_item.txt @@ -2,7 +2,7 @@ { "creation": "2013-02-22 01:28:00", "docstatus": 0, - "modified": "2013-07-10 14:54:08", + "modified": "2013-10-16 16:37:31", "modified_by": "Administrator", "owner": "Administrator" }, @@ -15,14 +15,14 @@ { "doctype": "DocField", "name": "__common__", - "parent": "Delivery Note Packing Item", + "parent": "Packed Item", "parentfield": "fields", "parenttype": "DocType", "permlevel": 0 }, { "doctype": "DocType", - "name": "Delivery Note Packing Item" + "name": "Packed Item" }, { "doctype": "DocField", diff --git a/stock/doctype/packing_slip/packing_slip.js b/stock/doctype/packing_slip/packing_slip.js index eba20c5579e..f0a0ba57fc5 100644 --- a/stock/doctype/packing_slip/packing_slip.js +++ b/stock/doctype/packing_slip/packing_slip.js @@ -45,13 +45,13 @@ cur_frm.cscript.validate = function(doc, cdt, cdn) { cur_frm.cscript.validate_case_nos = function(doc) { doc = locals[doc.doctype][doc.name]; if(cint(doc.from_case_no)==0) { - msgprint("Case No. cannot be 0") + msgprint(wn._("Case No. cannot be 0")) validated = false; } else if(!cint(doc.to_case_no)) { doc.to_case_no = doc.from_case_no; refresh_field('to_case_no'); } else if(cint(doc.to_case_no) < cint(doc.from_case_no)) { - msgprint("'To Case No.' cannot be less than 'From Case No.'"); + msgprint(wn._("'To Case No.' cannot be less than 'From Case No.'")); validated = false; } } @@ -72,14 +72,14 @@ cur_frm.cscript.validate_duplicate_items = function(doc, ps_detail) { for(var i=0; i now())""", (arg.get('item_code')), as_dict = 1) @@ -397,7 +394,7 @@ class DocType(StockController): def get_uom_details(self, arg = ''): arg, ret = eval(arg), {} - uom = sql("""select conversion_factor from `tabUOM Conversion Detail` + uom = webnotes.conn.sql("""select conversion_factor from `tabUOM Conversion Detail` where parent = %s and uom = %s""", (arg['item_code'], arg['uom']), as_dict = 1) if not uom or not flt(uom[0].conversion_factor): msgprint("There is no Conversion Factor for UOM '%s' in Item '%s'" % (arg['uom'], @@ -487,77 +484,16 @@ class DocType(StockController): self.get_stock_and_rate() def get_bom_raw_materials(self, qty): - """ - get all items from flat bom except - child items of sub-contracted and sub assembly items - and sub assembly items itself. - """ + from manufacturing.doctype.bom.bom import get_bom_items_as_dict + # item dict = { item_code: {qty, description, stock_uom} } - item_dict = {} + item_dict = get_bom_items_as_dict(self.doc.bom_no, qty=qty, fetch_exploded = self.doc.use_multi_level_bom) - def _make_items_dict(items_list): - """makes dict of unique items with it's qty""" - for item in items_list: - if item_dict.has_key(item.item_code): - item_dict[item.item_code]["qty"] += flt(item.qty) - else: - item_dict[item.item_code] = { - "qty": flt(item.qty), - "item_name": item.item_name, - "description": item.description, - "stock_uom": item.stock_uom, - "from_warehouse": item.default_warehouse, - "expense_account": item.purchase_account, - "cost_center": item.cost_center - } - - if self.doc.use_multi_level_bom: - # get all raw materials with sub assembly childs - fl_bom_sa_child_item = sql("""select - fb.item_code, - ifnull(sum(fb.qty_consumed_per_unit),0)*%s as qty, - fb.description, - fb.stock_uom, - it.item_name, - it.default_warehouse, - it.purchase_account, - it.cost_center - from - `tabBOM Explosion Item` fb,`tabItem` it - where - it.name = fb.item_code - and ifnull(it.is_pro_applicable, 'No') = 'No' - and ifnull(it.is_sub_contracted_item, 'No') = 'No' - and fb.docstatus < 2 - and fb.parent=%s group by item_code, stock_uom""", - (qty, self.doc.bom_no), as_dict=1) - - if fl_bom_sa_child_item: - _make_items_dict(fl_bom_sa_child_item) - else: - # get only BOM items - fl_bom_sa_items = sql("""select - `tabItem`.item_code, - `tabItem`.item_name, - ifnull(sum(`tabBOM Item`.qty_consumed_per_unit), 0) *%s as qty, - `tabItem`.description, - `tabItem`.stock_uom, - `tabItem`.default_warehouse, - `tabItem`.purchase_account, - `tabItem`.cost_center - from - `tabBOM Item`, `tabItem` - where - `tabBOM Item`.parent = %s and - `tabBOM Item`.item_code = tabItem.name and - `tabBOM Item`.docstatus < 2 - group by item_code""", (qty, self.doc.bom_no), as_dict=1) - - if fl_bom_sa_items: - _make_items_dict(fl_bom_sa_items) + for item in item_dict.values(): + item.from_warehouse = item.default_warehouse return item_dict - + def get_pending_raw_materials(self, pro_obj): """ issue (item quantity) that is pending to issue or desire to transfer, @@ -597,7 +533,7 @@ class DocType(StockController): def get_issued_qty(self): issued_item_qty = {} - result = sql("""select t1.item_code, sum(t1.qty) + result = webnotes.conn.sql("""select t1.item_code, sum(t1.qty) from `tabStock Entry Detail` t1, `tabStock Entry` t2 where t1.parent = t2.name and t2.production_order = %s and t2.docstatus = 1 and t2.purpose = 'Material Transfer' @@ -654,7 +590,7 @@ class DocType(StockController): def get_cust_addr(self): from utilities.transaction_base import get_default_address, get_address_display - res = sql("select customer_name from `tabCustomer` where name = '%s'"%self.doc.customer) + res = webnotes.conn.sql("select customer_name from `tabCustomer` where name = '%s'"%self.doc.customer) address_display = None customer_address = get_default_address("customer", self.doc.customer) if customer_address: @@ -675,7 +611,7 @@ class DocType(StockController): def get_supp_addr(self): from utilities.transaction_base import get_default_address, get_address_display - res = sql("""select supplier_name from `tabSupplier` + res = webnotes.conn.sql("""select supplier_name from `tabSupplier` where name=%s""", self.doc.supplier) address_display = None supplier_address = get_default_address("customer", self.doc.customer) @@ -914,8 +850,7 @@ def make_return_jv_from_delivery_note(se, ref): ref.doclist[0].name) if not invoices_against_delivery: - sales_orders_against_delivery = [d.prevdoc_docname for d in - ref.doclist.get({"prevdoc_doctype": "Sales Order"}) if d.prevdoc_docname] + sales_orders_against_delivery = [d.against_sales_order for d in ref.doclist if d.against_sales_order] if sales_orders_against_delivery: invoices_against_delivery = get_invoice_list("Sales Invoice Item", "sales_order", diff --git a/stock/doctype/stock_entry/test_stock_entry.py b/stock/doctype/stock_entry/test_stock_entry.py index 3a18c696939..b8e168a8eb2 100644 --- a/stock/doctype/stock_entry/test_stock_entry.py +++ b/stock/doctype/stock_entry/test_stock_entry.py @@ -1,9 +1,6 @@ # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. # License: GNU General Public License v3. See license.txt -# ERPNext - web based ERP (http://erpnext.com) -# For license information, please see license.txt - from __future__ import unicode_literals import webnotes, unittest from webnotes.utils import flt @@ -47,7 +44,6 @@ class TestStockEntry(unittest.TestCase): self._clear_stock_account_balance() webnotes.bean("Profile", "test2@example.com").get_controller()\ .add_roles("Sales User", "Sales Manager", "Material User", "Material Manager") - webnotes.session.user = "test2@example.com" from stock.utils import InvalidWarehouseCompany @@ -67,7 +63,6 @@ class TestStockEntry(unittest.TestCase): webnotes.bean("Profile", "test2@example.com").get_controller()\ .add_roles("Sales User", "Sales Manager", "Material User", "Material Manager") - webnotes.session.user = "test@example.com" st1 = webnotes.bean(copy=test_records[0]) st1.doc.company = "_Test Company 1" diff --git a/stock/doctype/stock_ledger/stock_ledger.py b/stock/doctype/stock_ledger/stock_ledger.py new file mode 100644 index 00000000000..1624b007d3c --- /dev/null +++ b/stock/doctype/stock_ledger/stock_ledger.py @@ -0,0 +1,57 @@ +# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. +# License: GNU General Public License v3. See license.txt + +from __future__ import unicode_literals +import webnotes + +from webnotes.utils import add_days, cstr, flt, nowdate, cint, now +from webnotes.model.doc import Document +from webnotes.model.bean import getlist +from webnotes.model.code import get_obj +from webnotes import session, msgprint +from stock.utils import get_valid_serial_nos + + +class DocType: + def __init__(self, doc, doclist=[]): + self.doc = doc + self.doclist = doclist + + def update_stock(self, values, is_amended = 'No'): + for v in values: + sle_id = '' + + # reverse quantities for cancel + if v.get('is_cancelled') == 'Yes': + v['actual_qty'] = -flt(v['actual_qty']) + # cancel matching entry + webnotes.conn.sql("""update `tabStock Ledger Entry` set is_cancelled='Yes', + modified=%s, modified_by=%s + where voucher_no=%s and voucher_type=%s""", + (now(), webnotes.session.user, v['voucher_no'], v['voucher_type'])) + + if v.get("actual_qty"): + sle_id = self.make_entry(v) + + args = v.copy() + args.update({ + "sle_id": sle_id, + "is_amended": is_amended + }) + + get_obj('Warehouse', v["warehouse"]).update_bin(args) + + + def make_entry(self, args): + args.update({"doctype": "Stock Ledger Entry"}) + sle = webnotes.bean([args]) + sle.ignore_permissions = 1 + sle.insert() + return sle.doc.name + + def repost(self): + """ + Repost everything! + """ + for wh in webnotes.conn.sql("select name from tabWarehouse"): + get_obj('Warehouse', wh[0]).repost_stock() diff --git a/stock/doctype/stock_ledger_entry/stock_ledger_entry.py b/stock/doctype/stock_ledger_entry/stock_ledger_entry.py index 1738efcf3f5..d2f8704f86a 100644 --- a/stock/doctype/stock_ledger_entry/stock_ledger_entry.py +++ b/stock/doctype/stock_ledger_entry/stock_ledger_entry.py @@ -14,7 +14,6 @@ class DocType(DocListController): def validate(self): from stock.utils import validate_warehouse_user, validate_warehouse_company - self.validate_mandatory() self.validate_item() validate_warehouse_user(self.doc.warehouse) diff --git a/stock/doctype/stock_reconciliation/stock_reconciliation.js b/stock/doctype/stock_reconciliation/stock_reconciliation.js index 7373648972b..481a0038edb 100644 --- a/stock/doctype/stock_reconciliation/stock_reconciliation.js +++ b/stock/doctype/stock_reconciliation/stock_reconciliation.js @@ -48,13 +48,13 @@ erpnext.stock.StockReconciliation = erpnext.stock.StockController.extend({ this.show_download_template(); this.show_upload(); if(this.frm.doc.reconciliation_json) { - this.frm.set_intro("You can submit this Stock Reconciliation."); + this.frm.set_intro(wn._("You can submit this Stock Reconciliation.")); } else { - this.frm.set_intro("Download the Template, fill appropriate data and \ - attach the modified file."); + this.frm.set_intro(wn._("Download the Template, fill appropriate data and \ + attach the modified file.")); } } else if(this.frm.doc.docstatus == 1) { - this.frm.set_intro("Cancelling this Stock Reconciliation will nullify its effect."); + this.frm.set_intro(wn._("Cancelling this Stock Reconciliation will nullify its effect.")); this.show_stock_ledger(); this.show_general_ledger(); } else { @@ -66,20 +66,20 @@ erpnext.stock.StockReconciliation = erpnext.stock.StockController.extend({ show_download_template: function() { var me = this; - this.frm.add_custom_button("Download Template", function() { - this.title = "Stock Reconcilation Template"; - wn.tools.downloadify([["Stock Reconciliation"], + this.frm.add_custom_button(wn._("Download Template"), function() { + this.title = wn._("Stock Reconcilation Template"); + wn.tools.downloadify([[wn._("Stock Reconciliation")], ["----"], - ["Stock Reconciliation can be used to update the stock on a particular date," - + " usually as per physical inventory."], - ["When submitted, the system creates difference entries" - + " to set the given stock and valuation on this date."], - ["It can also be used to create opening stock entries and to fix stock value."], + [wn._("Stock Reconciliation can be used to update the stock on a particular date, ") + + wn._("usually as per physical inventory.")], + [wn._("When submitted, the system creates difference entries ") + + wn._("to set the given stock and valuation on this date.")], + [wn._("It can also be used to create opening stock entries and to fix stock value.")], ["----"], - ["Notes:"], - ["Item Code and Warehouse should already exist."], - ["You can update either Quantity or Valuation Rate or both."], - ["If no change in either Quantity or Valuation Rate, leave the cell blank."], + [wn._("Notes:")], + [wn._("Item Code and Warehouse should already exist.")], + [wn._("You can update either Quantity or Valuation Rate or both.")], + [wn._("If no change in either Quantity or Valuation Rate, leave the cell blank.")], ["----"], ["Item Code", "Warehouse", "Quantity", "Valuation Rate"]], null, this); return false; @@ -113,8 +113,8 @@ erpnext.stock.StockReconciliation = erpnext.stock.StockController.extend({ show_download_reconciliation_data: function() { var me = this; if(this.frm.doc.reconciliation_json) { - this.frm.add_custom_button("Download Reconcilation Data", function() { - this.title = "Stock Reconcilation Data"; + this.frm.add_custom_button(wn._("Download Reconcilation Data"), function() { + this.title = wn._("Stock Reconcilation Data"); wn.tools.downloadify(JSON.parse(me.frm.doc.reconciliation_json), null, this); return false; }, "icon-download"); diff --git a/stock/doctype/stock_settings/stock_settings.py b/stock/doctype/stock_settings/stock_settings.py index bc7dcba4fdf..e4572578cae 100644 --- a/stock/doctype/stock_settings/stock_settings.py +++ b/stock/doctype/stock_settings/stock_settings.py @@ -6,6 +6,7 @@ from __future__ import unicode_literals import webnotes + class DocType: def __init__(self, d, dl): self.doc, self.doclist = d, dl @@ -14,3 +15,8 @@ class DocType: for key in ["item_naming_by", "item_group", "stock_uom", "allow_negative_stock"]: webnotes.conn.set_default(key, self.doc.fields.get(key, "")) + + from setup.doctype.naming_series.naming_series import set_by_naming_series + set_by_naming_series("Item", "item_code", + self.doc.get("item_naming_by")=="Naming Series", hide_name_field=True) + diff --git a/stock/doctype/stock_uom_replace_utility/stock_uom_replace_utility.py b/stock/doctype/stock_uom_replace_utility/stock_uom_replace_utility.py index 321e3c98077..1f1bafabc8b 100644 --- a/stock/doctype/stock_uom_replace_utility/stock_uom_replace_utility.py +++ b/stock/doctype/stock_uom_replace_utility/stock_uom_replace_utility.py @@ -10,7 +10,6 @@ from webnotes.model.bean import copy_doclist from webnotes.model.code import get_obj from webnotes import msgprint, _ -sql = webnotes.conn.sql class DocType: def __init__(self, d, dl=[]): @@ -34,7 +33,7 @@ class DocType: msgprint("Please Enter Conversion Factor.") raise Exception - stock_uom = sql("select stock_uom from `tabItem` where name = '%s'" % self.doc.item_code) + stock_uom = webnotes.conn.sql("select stock_uom from `tabItem` where name = '%s'" % self.doc.item_code) stock_uom = stock_uom and stock_uom[0][0] if cstr(self.doc.new_stock_uom) == cstr(stock_uom): msgprint("Item Master is already updated with New Stock UOM " + cstr(self.doc.new_stock_uom)) @@ -50,9 +49,9 @@ class DocType: def update_bin(self): # update bin if flt(self.doc.conversion_factor) != flt(1): - sql("update `tabBin` set stock_uom = '%s' , indented_qty = ifnull(indented_qty,0) * %s, ordered_qty = ifnull(ordered_qty,0) * %s, reserved_qty = ifnull(reserved_qty,0) * %s, planned_qty = ifnull(planned_qty,0) * %s, projected_qty = actual_qty + ordered_qty + indented_qty + planned_qty - reserved_qty where item_code = '%s'" % (self.doc.new_stock_uom, self.doc.conversion_factor, self.doc.conversion_factor, self.doc.conversion_factor, self.doc.conversion_factor, self.doc.item_code) ) + webnotes.conn.sql("update `tabBin` set stock_uom = '%s' , indented_qty = ifnull(indented_qty,0) * %s, ordered_qty = ifnull(ordered_qty,0) * %s, reserved_qty = ifnull(reserved_qty,0) * %s, planned_qty = ifnull(planned_qty,0) * %s, projected_qty = actual_qty + ordered_qty + indented_qty + planned_qty - reserved_qty where item_code = '%s'" % (self.doc.new_stock_uom, self.doc.conversion_factor, self.doc.conversion_factor, self.doc.conversion_factor, self.doc.conversion_factor, self.doc.item_code) ) else: - sql("update `tabBin` set stock_uom = '%s' where item_code = '%s'" % (self.doc.new_stock_uom, self.doc.item_code) ) + webnotes.conn.sql("update `tabBin` set stock_uom = '%s' where item_code = '%s'" % (self.doc.new_stock_uom, self.doc.item_code) ) # acknowledge user msgprint(" All Bins Updated Successfully.") @@ -62,16 +61,16 @@ class DocType: from stock.stock_ledger import update_entries_after if flt(self.doc.conversion_factor) != flt(1): - sql("update `tabStock Ledger Entry` set stock_uom = '%s', actual_qty = ifnull(actual_qty,0) * '%s' where item_code = '%s' " % (self.doc.new_stock_uom, self.doc.conversion_factor, self.doc.item_code)) + webnotes.conn.sql("update `tabStock Ledger Entry` set stock_uom = '%s', actual_qty = ifnull(actual_qty,0) * '%s' where item_code = '%s' " % (self.doc.new_stock_uom, self.doc.conversion_factor, self.doc.item_code)) else: - sql("update `tabStock Ledger Entry` set stock_uom = '%s' where item_code = '%s' " % (self.doc.new_stock_uom, self.doc.item_code)) + webnotes.conn.sql("update `tabStock Ledger Entry` set stock_uom = '%s' where item_code = '%s' " % (self.doc.new_stock_uom, self.doc.item_code)) # acknowledge user msgprint("Stock Ledger Entries Updated Successfully.") # update item valuation if flt(self.doc.conversion_factor) != flt(1): - wh = sql("select name from `tabWarehouse`") + wh = webnotes.conn.sql("select name from `tabWarehouse`") for w in wh: update_entries_after({"item_code": self.doc.item_code, "warehouse": w[0]}) diff --git a/stock/doctype/warehouse/warehouse.js b/stock/doctype/warehouse/warehouse.js index 2a58a387f88..c33f09a9a23 100644 --- a/stock/doctype/warehouse/warehouse.js +++ b/stock/doctype/warehouse/warehouse.js @@ -7,11 +7,11 @@ cur_frm.cscript.refresh = function(doc) { cur_frm.cscript.merge = function(doc, cdt, cdn) { if (!doc.merge_with) { - msgprint("Please enter the warehouse to which you want to merge?"); + msgprint(wn._("Please enter the warehouse to which you want to merge?")); return; } - var check = confirm("Are you sure you want to merge this warehouse into " - + doc.merge_with + "?"); + var check = confirm(wn._("Are you sure you want to merge this warehouse into " + + doc.merge_with + "?")); if (check) { return $c_obj(make_doclist(cdt, cdn), 'merge_warehouses', '', ''); } diff --git a/stock/doctype/warehouse/warehouse.py b/stock/doctype/warehouse/warehouse.py index cfa278278d0..89d2ee1688d 100644 --- a/stock/doctype/warehouse/warehouse.py +++ b/stock/doctype/warehouse/warehouse.py @@ -3,12 +3,9 @@ from __future__ import unicode_literals import webnotes - from webnotes.utils import cint, validate_email_add from webnotes import msgprint, _ -sql = webnotes.conn.sql - class DocType: def __init__(self, doc, doclist=[]): self.doc = doc @@ -31,8 +28,8 @@ class DocType: if not webnotes.conn.get_value("Account", {"account_type": "Warehouse", "master_name": self.doc.name}) and not webnotes.conn.get_value("Account", {"account_name": self.doc.warehouse_name}): - if self.doc.__islocal or not webnotes.conn.get_value("Stock Ledger Entry", - {"warehouse": self.doc.name}): + if self.doc.fields.get("__islocal") or not webnotes.conn.get_value( + "Stock Ledger Entry", {"warehouse": self.doc.name}): self.validate_parent_account() ac_bean = webnotes.bean({ "doctype": "Account", @@ -58,7 +55,16 @@ class DocType: else: webnotes.throw(_("Please enter account group under which account \ for warehouse ") + self.doc.name +_(" will be created")) - + + def on_rename(self, new, old, merge=False): + webnotes.conn.set_value("Account", {"account_type": "Warehouse", "master_name": old}, + "master_name", new) + + if merge: + from stock.stock_ledger import update_entries_after + for item_code in webnotes.conn.sql("""select item_code from `tabBin` + where warehouse=%s""", new): + update_entries_after({"item_code": item_code, "warehouse": new}) def merge_warehouses(self): webnotes.conn.auto_commit_on_many_writes = 1 @@ -93,14 +99,15 @@ class DocType: def on_trash(self): # delete bin - bins = sql("select * from `tabBin` where warehouse = %s", self.doc.name, as_dict=1) + bins = webnotes.conn.sql("select * from `tabBin` where warehouse = %s", + self.doc.name, as_dict=1) for d in bins: if d['actual_qty'] or d['reserved_qty'] or d['ordered_qty'] or \ d['indented_qty'] or d['projected_qty'] or d['planned_qty']: msgprint("""Warehouse: %s can not be deleted as qty exists for item: %s""" % (self.doc.name, d['item_code']), raise_exception=1) else: - sql("delete from `tabBin` where name = %s", d['name']) + webnotes.conn.sql("delete from `tabBin` where name = %s", d['name']) warehouse_account = webnotes.conn.get_value("Account", {"account_type": "Warehosue", "master_name": self.doc.name}) @@ -108,19 +115,10 @@ class DocType: webnotes.delete_doc("Account", warehouse_account) # delete cancelled sle - if sql("""select name from `tabStock Ledger Entry` where warehouse = %s""", self.doc.name): + if webnotes.conn.sql("""select name from `tabStock Ledger Entry` where warehouse = %s""", + self.doc.name): msgprint("""Warehosue can not be deleted as stock ledger entry exists for this warehouse.""", raise_exception=1) else: - sql("delete from `tabStock Ledger Entry` where warehouse = %s", self.doc.name) - - def on_rename(self, newdn, olddn, merge=False): - account = webnotes.conn.get_value("Account", {"account_type": "Warehouse", - "master_name": olddn}) - webnotes.conn.set_value("Account", account, "master_name", newdn) - - if merge: - from stock.stock_ledger import update_entries_after - for item_code in webnotes.conn.sql("""select item_code from `tabBin` - where warehouse=%s""", newdn): - update_entries_after({"item_code": item_code, "warehouse": newdn}) + webnotes.conn.sql("delete from `tabStock Ledger Entry` where warehouse = %s", + self.doc.name) diff --git a/stock/page/stock_ageing/stock_ageing.js b/stock/page/stock_ageing/stock_ageing.js index 920ac848d05..914999b2052 100644 --- a/stock/page/stock_ageing/stock_ageing.js +++ b/stock/page/stock_ageing/stock_ageing.js @@ -5,7 +5,7 @@ wn.pages['stock-ageing'].onload = function(wrapper) { wn.ui.make_app_page({ parent: wrapper, - title: 'Stock Ageing', + title: wn._('Stock Ageing'), single_column: true }); @@ -21,7 +21,7 @@ wn.require("app/js/stock_grid_report.js"); erpnext.StockAgeing = erpnext.StockGridReport.extend({ init: function(wrapper) { this._super({ - title: "Stock Ageing", + title: wn._("Stock Ageing"), page: wrapper, parent: $(wrapper).find('.layout-main'), appframe: wrapper.appframe, @@ -30,37 +30,37 @@ erpnext.StockAgeing = erpnext.StockGridReport.extend({ }, setup_columns: function() { this.columns = [ - {id: "name", name: "Item", field: "name", width: 300, + {id: "name", name: wn._("Item"), field: "name", width: 300, link_formatter: { open_btn: true, doctype: '"Item"' }}, - {id: "item_name", name: "Item Name", field: "item_name", + {id: "item_name", name: wn._("Item Name"), field: "item_name", width: 100, formatter: this.text_formatter}, - {id: "description", name: "Description", field: "description", + {id: "description", name: wn._("Description"), field: "description", width: 200, formatter: this.text_formatter}, - {id: "brand", name: "Brand", field: "brand", width: 100}, - {id: "average_age", name: "Average Age", field: "average_age", + {id: "brand", name: wn._("Brand"), field: "brand", width: 100}, + {id: "average_age", name: wn._("Average Age"), field: "average_age", formatter: this.currency_formatter}, - {id: "earliest", name: "Earliest", field: "earliest", + {id: "earliest", name: wn._("Earliest"), field: "earliest", formatter: this.currency_formatter}, - {id: "latest", name: "Latest", field: "latest", + {id: "latest", name: wn._("Latest"), field: "latest", formatter: this.currency_formatter}, {id: "stock_uom", name: "UOM", field: "stock_uom", width: 100}, ]; }, filters: [ - {fieldtype:"Select", label: "Warehouse", link:"Warehouse", + {fieldtype:"Select", label: wn._("Warehouse"), link:"Warehouse", default_value: "Select Warehouse..."}, - {fieldtype:"Select", label: "Brand", link:"Brand", + {fieldtype:"Select", label: wn._("Brand"), link:"Brand", default_value: "Select Brand...", filter: function(val, item, opts) { return val == opts.default_value || item.brand == val; }, link_formatter: {filter_input: "brand"}}, - {fieldtype:"Select", label: "Plot By", + {fieldtype:"Select", label: wn._("Plot By"), options: ["Average Age", "Earliest", "Latest"]}, - {fieldtype:"Date", label: "To Date"}, - {fieldtype:"Button", label: "Refresh", icon:"icon-refresh icon-white", cssClass:"btn-info"}, - {fieldtype:"Button", label: "Reset Filters"} + {fieldtype:"Date", label: wn._("To Date")}, + {fieldtype:"Button", label: wn._("Refresh"), icon:"icon-refresh icon-white", cssClass:"btn-info"}, + {fieldtype:"Button", label: wn._("Reset Filters")} ], setup_filters: function() { var me = this; diff --git a/stock/page/stock_analytics/stock_analytics.js b/stock/page/stock_analytics/stock_analytics.js index 547f5ac844a..d5aa219cde7 100644 --- a/stock/page/stock_analytics/stock_analytics.js +++ b/stock/page/stock_analytics/stock_analytics.js @@ -5,7 +5,7 @@ wn.pages['stock-analytics'].onload = function(wrapper) { wn.ui.make_app_page({ parent: wrapper, - title: 'Stock Analytics', + title: wn._('Stock Analytics'), single_column: true }); diff --git a/stock/page/stock_balance/stock_balance.js b/stock/page/stock_balance/stock_balance.js index b45a610be88..c6b9fda1183 100644 --- a/stock/page/stock_balance/stock_balance.js +++ b/stock/page/stock_balance/stock_balance.js @@ -6,7 +6,7 @@ wn.require("app/js/stock_analytics.js"); wn.pages['stock-balance'].onload = function(wrapper) { wn.ui.make_app_page({ parent: wrapper, - title: 'Stock Balance', + title: wn._('Stock Balance'), single_column: true }); @@ -20,58 +20,58 @@ wn.pages['stock-balance'].onload = function(wrapper) { erpnext.StockBalance = erpnext.StockAnalytics.extend({ init: function(wrapper) { this._super(wrapper, { - title: "Stock Balance", + title: wn._("Stock Balance"), doctypes: ["Item", "Item Group", "Warehouse", "Stock Ledger Entry", "Brand", "Stock Entry", "Project"], }); }, setup_columns: function() { this.columns = [ - {id: "name", name: "Item", field: "name", width: 300, + {id: "name", name: wn._("Item"), field: "name", width: 300, formatter: this.tree_formatter}, - {id: "item_name", name: "Item Name", field: "item_name", width: 100}, - {id: "description", name: "Description", field: "description", width: 200, + {id: "item_name", name: wn._("Item Name"), field: "item_name", width: 100}, + {id: "description", name: wn._("Description"), field: "description", width: 200, formatter: this.text_formatter}, - {id: "brand", name: "Brand", field: "brand", width: 100}, - {id: "stock_uom", name: "UOM", field: "stock_uom", width: 100}, - {id: "opening_qty", name: "Opening Qty", field: "opening_qty", width: 100, + {id: "brand", name: wn._("Brand"), field: "brand", width: 100}, + {id: "stock_uom", name: wn._("UOM"), field: "stock_uom", width: 100}, + {id: "opening_qty", name: wn._("Opening Qty"), field: "opening_qty", width: 100, formatter: this.currency_formatter}, - {id: "inflow_qty", name: "In Qty", field: "inflow_qty", width: 100, + {id: "inflow_qty", name: wn._("In Qty"), field: "inflow_qty", width: 100, formatter: this.currency_formatter}, - {id: "outflow_qty", name: "Out Qty", field: "outflow_qty", width: 100, + {id: "outflow_qty", name: wn._("Out Qty"), field: "outflow_qty", width: 100, formatter: this.currency_formatter}, - {id: "closing_qty", name: "Closing Qty", field: "closing_qty", width: 100, + {id: "closing_qty", name: wn._("Closing Qty"), field: "closing_qty", width: 100, formatter: this.currency_formatter}, - {id: "opening_value", name: "Opening Value", field: "opening_value", width: 100, + {id: "opening_value", name: wn._("Opening Value"), field: "opening_value", width: 100, formatter: this.currency_formatter}, - {id: "inflow_value", name: "In Value", field: "inflow_value", width: 100, + {id: "inflow_value", name: wn._("In Value"), field: "inflow_value", width: 100, formatter: this.currency_formatter}, - {id: "outflow_value", name: "Out Value", field: "outflow_value", width: 100, + {id: "outflow_value", name: wn._("Out Value"), field: "outflow_value", width: 100, formatter: this.currency_formatter}, - {id: "closing_value", name: "Closing Value", field: "closing_value", width: 100, + {id: "closing_value", name: wn._("Closing Value"), field: "closing_value", width: 100, formatter: this.currency_formatter}, ]; }, filters: [ - {fieldtype:"Select", label: "Brand", link:"Brand", + {fieldtype:"Select", label: wn._("Brand"), link:"Brand", default_value: "Select Brand...", filter: function(val, item, opts) { return val == opts.default_value || item.brand == val || item._show; }, link_formatter: {filter_input: "brand"}}, - {fieldtype:"Select", label: "Warehouse", link:"Warehouse", + {fieldtype:"Select", label: wn._("Warehouse"), link:"Warehouse", default_value: "Select Warehouse...", filter: function(val, item, opts, me) { return me.apply_zero_filter(val, item, opts, me); }}, - {fieldtype:"Select", label: "Project", link:"Project", + {fieldtype:"Select", label: wn._("Project"), link:"Project", default_value: "Select Project...", filter: function(val, item, opts, me) { return me.apply_zero_filter(val, item, opts, me); }, link_formatter: {filter_input: "project"}}, - {fieldtype:"Date", label: "From Date"}, - {fieldtype:"Label", label: "To"}, - {fieldtype:"Date", label: "To Date"}, - {fieldtype:"Button", label: "Refresh", icon:"icon-refresh icon-white", cssClass:"btn-info"}, - {fieldtype:"Button", label: "Reset Filters"} + {fieldtype:"Date", label: wn._("From Date")}, + {fieldtype:"Label", label: wn._("To")}, + {fieldtype:"Date", label: wn._("To Date")}, + {fieldtype:"Button", label: wn._("Refresh"), icon:"icon-refresh icon-white", cssClass:"btn-info"}, + {fieldtype:"Button", label: wn._("Reset Filters")} ], setup_plot_check: function() { diff --git a/stock/page/stock_home/stock_home.js b/stock/page/stock_home/stock_home.js index ecfc6fe5717..4998a19da94 100644 --- a/stock/page/stock_home/stock_home.js +++ b/stock/page/stock_home/stock_home.js @@ -111,7 +111,7 @@ wn.module_page["Stock"] = [ "label": wn._("Stock Settings"), "route": "Form/Stock Settings", "doctype":"Stock Settings", - "description": "Settings for Stock Module" + "description": wn._("Settings for Stock Module") }, { "route":"Sales Browser/Item Group", diff --git a/stock/page/stock_ledger/stock_ledger.js b/stock/page/stock_ledger/stock_ledger.js index c83fc0ec129..66071401868 100644 --- a/stock/page/stock_ledger/stock_ledger.js +++ b/stock/page/stock_ledger/stock_ledger.js @@ -4,7 +4,7 @@ wn.pages['stock-ledger'].onload = function(wrapper) { wn.ui.make_app_page({ parent: wrapper, - title: 'Stock Ledger', + title: wn._('Stock Ledger'), single_column: true }); @@ -17,7 +17,7 @@ wn.require("app/js/stock_grid_report.js"); erpnext.StockLedger = erpnext.StockGridReport.extend({ init: function(wrapper) { this._super({ - title: "Stock Ledger", + title: wn._("Stock Ledger"), page: wrapper, parent: $(wrapper).find('.layout-main'), appframe: wrapper.appframe, @@ -28,29 +28,29 @@ erpnext.StockLedger = erpnext.StockGridReport.extend({ setup_columns: function() { this.hide_balance = (this.is_default("item_code") || this.voucher_no) ? true : false; this.columns = [ - {id: "posting_datetime", name: "Posting Date", field: "posting_datetime", width: 120, + {id: "posting_datetime", name: wn._("Posting Date"), field: "posting_datetime", width: 120, formatter: this.date_formatter}, - {id: "item_code", name: "Item Code", field: "item_code", width: 160, + {id: "item_code", name: wn._("Item Code"), field: "item_code", width: 160, link_formatter: { filter_input: "item_code", open_btn: true, doctype: '"Item"', }}, - {id: "description", name: "Description", field: "description", width: 200, + {id: "description", name: wn._("Description"), field: "description", width: 200, formatter: this.text_formatter}, - {id: "warehouse", name: "Warehouse", field: "warehouse", width: 100, + {id: "warehouse", name: wn._("Warehouse"), field: "warehouse", width: 100, link_formatter: {filter_input: "warehouse"}}, - {id: "brand", name: "Brand", field: "brand", width: 100}, - {id: "stock_uom", name: "UOM", field: "stock_uom", width: 100}, - {id: "qty", name: "Qty", field: "qty", width: 100, + {id: "brand", name: wn._("Brand"), field: "brand", width: 100}, + {id: "stock_uom", name: wn._("UOM"), field: "stock_uom", width: 100}, + {id: "qty", name: wn._("Qty"), field: "qty", width: 100, formatter: this.currency_formatter}, - {id: "balance", name: "Balance Qty", field: "balance", width: 100, + {id: "balance", name: wn._("Balance Qty"), field: "balance", width: 100, formatter: this.currency_formatter, hidden: this.hide_balance}, - {id: "balance_value", name: "Balance Value", field: "balance_value", width: 100, + {id: "balance_value", name: wn._("Balance Value"), field: "balance_value", width: 100, formatter: this.currency_formatter, hidden: this.hide_balance}, - {id: "voucher_type", name: "Voucher Type", field: "voucher_type", width: 120}, - {id: "voucher_no", name: "Voucher No", field: "voucher_no", width: 160, + {id: "voucher_type", name: wn._("Voucher Type"), field: "voucher_type", width: 120}, + {id: "voucher_no", name: wn._("Voucher No"), field: "voucher_no", width: 160, link_formatter: { filter_input: "voucher_no", open_btn: true, @@ -60,11 +60,11 @@ erpnext.StockLedger = erpnext.StockGridReport.extend({ }, filters: [ - {fieldtype:"Select", label: "Warehouse", link:"Warehouse", + {fieldtype:"Select", label: wn._("Warehouse"), link:"Warehouse", default_value: "Select Warehouse...", filter: function(val, item, opts) { return item.warehouse == val || val == opts.default_value; }}, - {fieldtype:"Link", label: "Item Code", link:"Item", default_value: "Select Item...", + {fieldtype:"Link", label: wn._("Item Code"), link:"Item", default_value: "Select Item...", filter: function(val, item, opts) { return item.item_code == val || !val; }}, @@ -72,20 +72,20 @@ erpnext.StockLedger = erpnext.StockGridReport.extend({ default_value: "Select Brand...", filter: function(val, item, opts) { return val == opts.default_value || item.brand == val || item._show; }, link_formatter: {filter_input: "brand"}}, - {fieldtype:"Data", label: "Voucher No", + {fieldtype:"Data", label: wn._("Voucher No"), filter: function(val, item, opts) { if(!val) return true; return (item.voucher_no && item.voucher_no.indexOf(val)!=-1); }}, - {fieldtype:"Date", label: "From Date", filter: function(val, item) { + {fieldtype:"Date", label: wn._("From Date"), filter: function(val, item) { return dateutil.str_to_obj(val) <= dateutil.str_to_obj(item.posting_date); }}, - {fieldtype:"Label", label: "To"}, - {fieldtype:"Date", label: "To Date", filter: function(val, item) { + {fieldtype:"Label", label: wn._("To")}, + {fieldtype:"Date", label: wn._("To Date"), filter: function(val, item) { return dateutil.str_to_obj(val) >= dateutil.str_to_obj(item.posting_date); }}, - {fieldtype:"Button", label: "Refresh", icon:"icon-refresh icon-white", cssClass:"btn-info"}, - {fieldtype:"Button", label: "Reset Filters"} + {fieldtype:"Button", label: wn._("Refresh"), icon:"icon-refresh icon-white", cssClass:"btn-info"}, + {fieldtype:"Button", label: wn._("Reset Filters")} ], setup_filters: function() { diff --git a/stock/page/stock_level/stock_level.js b/stock/page/stock_level/stock_level.js index df7c8c5d4d5..a6cc6a8209d 100644 --- a/stock/page/stock_level/stock_level.js +++ b/stock/page/stock_level/stock_level.js @@ -4,7 +4,7 @@ wn.pages['stock-level'].onload = function(wrapper) { wn.ui.make_app_page({ parent: wrapper, - title: 'Stock Level', + title: wn._('Stock Level'), single_column: true }); @@ -22,7 +22,7 @@ erpnext.StockLevel = erpnext.StockGridReport.extend({ var me = this; this._super({ - title: "Stock Level", + title: wn._("Stock Level"), page: wrapper, parent: $(wrapper).find('.layout-main'), appframe: wrapper.appframe, @@ -37,70 +37,70 @@ erpnext.StockLevel = erpnext.StockGridReport.extend({ Projected Qty = Actual Qty + Planned Qty + Requested Qty \ + Ordered Qty - Reserved Qty \
    \ -
  • Actual Qty: Quantity available in the warehouse.
  • \ -
  • Planned Qty: Quantity, for which, Production Order has been raised, \ - but is pending to be manufactured.
  • \ -
  • Requested Qty: Quantity requested for purchase, but not ordered.
  • \ -
  • Ordered Qty: Quantity ordered for purchase, but not received.
  • \ -
  • Reserved Qty: Quantity ordered for sale, but not delivered.
  • \ -
\ +
  • "+wn._("Actual Qty: Quantity available in the warehouse.") +"
  • "+ + "
  • "+wn._("Planned Qty: Quantity, for which, Production Order has been raised,")+ + wn._("but is pending to be manufactured.")+ "
  • " + + "
  • "+wn._("Requested Qty: Quantity requested for purchase, but not ordered.") + "
  • " + + "
  • " + wn._("Ordered Qty: Quantity ordered for purchase, but not received.")+ "
  • " + + "
  • " + wn._("Reserved Qty: Quantity ordered for sale, but not delivered.") + "
  • " + + " \ "); }); }, setup_columns: function() { this.columns = [ - {id: "item_code", name: "Item Code", field: "item_code", width: 160, + {id: "item_code", name: wn._("Item Code"), field: "item_code", width: 160, link_formatter: { filter_input: "item_code", open_btn: true, doctype: '"Item"', }}, - {id: "item_name", name: "Item Name", field: "item_name", width: 100, + {id: "item_name", name: wn._("Item Name"), field: "item_name", width: 100, formatter: this.text_formatter}, - {id: "description", name: "Description", field: "description", width: 200, + {id: "description", name: wn._("Description"), field: "description", width: 200, formatter: this.text_formatter}, - {id: "brand", name: "Brand", field: "brand", width: 100, + {id: "brand", name: wn._("Brand"), field: "brand", width: 100, link_formatter: {filter_input: "brand"}}, - {id: "warehouse", name: "Warehouse", field: "warehouse", width: 100, + {id: "warehouse", name: wn._("Warehouse"), field: "warehouse", width: 100, link_formatter: {filter_input: "warehouse"}}, - {id: "uom", name: "UOM", field: "uom", width: 60}, - {id: "actual_qty", name: "Actual Qty", + {id: "uom", name: wn._("UOM"), field: "uom", width: 60}, + {id: "actual_qty", name: wn._("Actual Qty"), field: "actual_qty", width: 80, formatter: this.currency_formatter}, - {id: "planned_qty", name: "Planned Qty", + {id: "planned_qty", name: wn._("Planned Qty"), field: "planned_qty", width: 80, formatter: this.currency_formatter}, - {id: "requested_qty", name: "Requested Qty", + {id: "requested_qty", name: wn._("Requested Qty"), field: "requested_qty", width: 80, formatter: this.currency_formatter}, - {id: "ordered_qty", name: "Ordered Qty", + {id: "ordered_qty", name: wn._("Ordered Qty"), field: "ordered_qty", width: 80, formatter: this.currency_formatter}, - {id: "reserved_qty", name: "Reserved Qty", + {id: "reserved_qty", name: wn._("Reserved Qty"), field: "reserved_qty", width: 80, formatter: this.currency_formatter}, - {id: "projected_qty", name: "Projected Qty", + {id: "projected_qty", name: wn._("Projected Qty"), field: "projected_qty", width: 80, formatter: this.currency_formatter}, - {id: "re_order_level", name: "Re-Order Level", + {id: "re_order_level", name: wn._("Re-Order Level"), field: "re_order_level", width: 80, formatter: this.currency_formatter}, - {id: "re_order_qty", name: "Re-Order Qty", + {id: "re_order_qty", name: wn._("Re-Order Qty"), field: "re_order_qty", width: 80, formatter: this.currency_formatter}, ]; }, filters: [ - {fieldtype:"Link", label: "Item Code", link:"Item", default_value: "Select Item...", + {fieldtype:"Link", label: wn._("Item Code"), link:"Item", default_value: "Select Item...", filter: function(val, item, opts) { return item.item_code == val || !val; }}, - {fieldtype:"Select", label: "Warehouse", link:"Warehouse", + {fieldtype:"Select", label: wn._("Warehouse"), link:"Warehouse", default_value: "Select Warehouse...", filter: function(val, item, opts) { return item.warehouse == val || val == opts.default_value; }}, - {fieldtype:"Select", label: "Brand", link:"Brand", + {fieldtype:"Select", label: wn._("Brand"), link:"Brand", default_value: "Select Brand...", filter: function(val, item, opts) { return val == opts.default_value || item.brand == val; }}, - {fieldtype:"Button", label: "Refresh", icon:"icon-refresh icon-white", cssClass:"btn-info"}, - {fieldtype:"Button", label: "Reset Filters"} + {fieldtype:"Button", label: wn._("Refresh"), icon:"icon-refresh icon-white", cssClass:"btn-info"}, + {fieldtype:"Button", label: wn._("Reset Filters")} ], setup_filters: function() { diff --git a/stock/report/batch_wise_balance_history/batch_wise_balance_history.js b/stock/report/batch_wise_balance_history/batch_wise_balance_history.js index a9d64777541..2b174872b2e 100644 --- a/stock/report/batch_wise_balance_history/batch_wise_balance_history.js +++ b/stock/report/batch_wise_balance_history/batch_wise_balance_history.js @@ -5,14 +5,14 @@ wn.query_reports["Batch-Wise Balance History"] = { "filters": [ { "fieldname":"from_date", - "label": "From Date", + "label": wn._("From Date"), "fieldtype": "Date", "width": "80", "default": sys_defaults.year_start_date, }, { "fieldname":"to_date", - "label": "To Date", + "label": wn._("To Date"), "fieldtype": "Date", "width": "80", "default": wn.datetime.get_today() diff --git a/stock/report/itemwise_recommended_reorder_level/itemwise_recommended_reorder_level.js b/stock/report/itemwise_recommended_reorder_level/itemwise_recommended_reorder_level.js index 410feabf759..c22672865c6 100644 --- a/stock/report/itemwise_recommended_reorder_level/itemwise_recommended_reorder_level.js +++ b/stock/report/itemwise_recommended_reorder_level/itemwise_recommended_reorder_level.js @@ -5,13 +5,13 @@ wn.query_reports["Itemwise Recommended Reorder Level"] = { "filters": [ { "fieldname":"from_date", - "label": "From Date", + "label": wn._("From Date"), "fieldtype": "Date", "default": sys_defaults.year_start_date }, { "fieldname":"to_date", - "label": "To Date", + "label": wn._("To Date"), "fieldtype": "Date", "default": get_today() } diff --git a/stock/report/warehouse_wise_stock_balance/warehouse_wise_stock_balance.js b/stock/report/warehouse_wise_stock_balance/warehouse_wise_stock_balance.js index 942b4651bfd..1b0523cc12d 100644 --- a/stock/report/warehouse_wise_stock_balance/warehouse_wise_stock_balance.js +++ b/stock/report/warehouse_wise_stock_balance/warehouse_wise_stock_balance.js @@ -5,14 +5,14 @@ wn.query_reports["Warehouse-Wise Stock Balance"] = { "filters": [ { "fieldname":"from_date", - "label": "From Date", + "label": wn._("From Date"), "fieldtype": "Date", "width": "80", "default": sys_defaults.year_start_date, }, { "fieldname":"to_date", - "label": "To Date", + "label": wn._("To Date"), "fieldtype": "Date", "width": "80", "default": wn.datetime.get_today() diff --git a/stock/stock_ledger.py b/stock/stock_ledger.py index 197aa0d5ab1..1555dab0bd8 100644 --- a/stock/stock_ledger.py +++ b/stock/stock_ledger.py @@ -10,6 +10,9 @@ import json # future reposting class NegativeStockError(webnotes.ValidationError): pass +_exceptions = webnotes.local('stockledger_exceptions') +# _exceptions = [] + def make_sl_entries(sl_entries, is_amended=None): if sl_entries: from stock.utils import update_bin @@ -55,7 +58,6 @@ def delete_cancelled_entry(voucher_type, voucher_no): webnotes.conn.sql("""delete from `tabStock Ledger Entry` where voucher_type=%s and voucher_no=%s""", (voucher_type, voucher_no)) -_exceptions = [] def update_entries_after(args, verbose=1): """ update valution rate and qty after transaction @@ -68,8 +70,8 @@ def update_entries_after(args, verbose=1): "posting_time": "12:00" } """ - global _exceptions - _exceptions = [] + if not _exceptions: + webnotes.local.stockledger_exceptions = [] previous_sle = get_sle_before_datetime(args) @@ -190,10 +192,12 @@ def validate_negative_stock(qty_after_transaction, sle): will not consider cancelled entries """ diff = qty_after_transaction + flt(sle.actual_qty) + + if not _exceptions: + webnotes.local.stockledger_exceptions = [] if diff < 0 and abs(diff) > 0.0001: # negative stock! - global _exceptions exc = sle.copy().update({"diff": diff}) _exceptions.append(exc) return False @@ -327,4 +331,4 @@ def get_previous_sle(args, for_update=False): sle = get_stock_ledger_entries(args, ["name != %(sle)s", "timestamp(posting_date, posting_time) <= timestamp(%(posting_date)s, %(posting_time)s)"], "desc", "limit 1", for_update=for_update) - return sle and sle[0] or {} \ No newline at end of file + return sle and sle[0] or {} diff --git a/stock/utils.py b/stock/utils.py index 0f801c74bc1..b3980e479d7 100644 --- a/stock/utils.py +++ b/stock/utils.py @@ -252,10 +252,10 @@ def get_buying_amount(voucher_type, voucher_no, item_row, stock_ledger_entries): def reorder_item(): """ Reorder item if stock reaches reorder level""" - if not hasattr(webnotes, "auto_indent"): - webnotes.auto_indent = cint(webnotes.conn.get_value('Stock Settings', None, 'auto_indent')) + if getattr(webnotes.local, "auto_indent", None) is None: + webnotes.local.auto_indent = cint(webnotes.conn.get_value('Stock Settings', None, 'auto_indent')) - if webnotes.auto_indent: + if webnotes.local.auto_indent: material_requests = {} bin_list = webnotes.conn.sql("""select item_code, warehouse, projected_qty from tabBin where ifnull(item_code, '') != '' and ifnull(warehouse, '') != '' @@ -340,18 +340,18 @@ def create_material_request(material_requests): mr_list.append(mr_bean) except: - if webnotes.message_log: - exceptions_list.append([] + webnotes.message_log) - webnotes.message_log = [] + if webnotes.local.message_log: + exceptions_list.append([] + webnotes.local.message_log) + webnotes.local.message_log = [] else: exceptions_list.append(webnotes.getTraceback()) if mr_list: - if not hasattr(webnotes, "reorder_email_notify"): - webnotes.reorder_email_notify = cint(webnotes.conn.get_value('Stock Settings', None, + if getattr(webnotes.local, "reorder_email_notify", None) is None: + webnotes.local.reorder_email_notify = cint(webnotes.conn.get_value('Stock Settings', None, 'reorder_email_notify')) - if(webnotes.reorder_email_notify): + if(webnotes.local.reorder_email_notify): send_email_notification(mr_list) if exceptions_list: @@ -393,4 +393,4 @@ def notify_errors(exceptions_list): Administrator""" % ("\n\n".join(["\n".join(msg) for msg in exceptions_list]),) from webnotes.profile import get_system_managers - sendmail(get_system_managers(), subject=subject, msg=msg) \ No newline at end of file + sendmail(get_system_managers(), subject=subject, msg=msg) diff --git a/support/doctype/customer_issue/customer_issue.js b/support/doctype/customer_issue/customer_issue.js index 5b670d452c2..d161a78a780 100644 --- a/support/doctype/customer_issue/customer_issue.js +++ b/support/doctype/customer_issue/customer_issue.js @@ -6,7 +6,7 @@ wn.provide("erpnext.support"); erpnext.support.CustomerIssue = wn.ui.form.Controller.extend({ refresh: function() { if((cur_frm.doc.status=='Open' || cur_frm.doc.status == 'Work In Progress')) { - cur_frm.add_custom_button('Make Maintenance Visit', this.make_maintenance_visit) + cur_frm.add_custom_button(wn._('Make Maintenance Visit'), this.make_maintenance_visit) } }, diff --git a/support/doctype/customer_issue/customer_issue.py b/support/doctype/customer_issue/customer_issue.py index 910e9b845d3..c099bf699ee 100644 --- a/support/doctype/customer_issue/customer_issue.py +++ b/support/doctype/customer_issue/customer_issue.py @@ -7,7 +7,6 @@ import webnotes from webnotes import session, msgprint from webnotes.utils import today -sql = webnotes.conn.sql from utilities.transaction_base import TransactionBase @@ -28,7 +27,7 @@ class DocType(TransactionBase): self.doc.resolved_by = webnotes.session.user def on_cancel(self): - lst = sql("select t1.name from `tabMaintenance Visit` t1, `tabMaintenance Visit Purpose` t2 where t2.parent = t1.name and t2.prevdoc_docname = '%s' and t1.docstatus!=2"%(self.doc.name)) + lst = webnotes.conn.sql("select t1.name from `tabMaintenance Visit` t1, `tabMaintenance Visit Purpose` t2 where t2.parent = t1.name and t2.prevdoc_docname = '%s' and t1.docstatus!=2"%(self.doc.name)) if lst: lst1 = ','.join([x[0] for x in lst]) msgprint("Maintenance Visit No. "+lst1+" already created against this customer issue. So can not be Cancelled") diff --git a/support/doctype/maintenance_schedule/maintenance_schedule.js b/support/doctype/maintenance_schedule/maintenance_schedule.js index 6b693435ab4..bdcdd3d935a 100644 --- a/support/doctype/maintenance_schedule/maintenance_schedule.js +++ b/support/doctype/maintenance_schedule/maintenance_schedule.js @@ -91,7 +91,7 @@ cur_frm.cscript.periodicity = function(doc, cdt, cdn){ return get_server_fields('get_no_of_visits',docstring(arg),'item_maintenance_detail',doc, cdt, cdn, 1); } else{ - msgprint("Please enter Start Date and End Date"); + msgprint(wn._("Please enter Start Date and End Date")); } } @@ -103,7 +103,7 @@ cur_frm.cscript.generate_schedule = function(doc, cdt, cdn) { } ); } else { - alert("Please save the document before generating maintenance schedule"); + alert(wn._("Please save the document before generating maintenance schedule")); } } diff --git a/support/doctype/maintenance_schedule/maintenance_schedule.py b/support/doctype/maintenance_schedule/maintenance_schedule.py index 59d3f8eb383..1682da5afa5 100644 --- a/support/doctype/maintenance_schedule/maintenance_schedule.py +++ b/support/doctype/maintenance_schedule/maintenance_schedule.py @@ -9,7 +9,6 @@ from webnotes.model.doc import addchild from webnotes.model.bean import getlist from webnotes import msgprint -sql = webnotes.conn.sql from utilities.transaction_base import TransactionBase, delete_events @@ -20,7 +19,7 @@ class DocType(TransactionBase): self.doclist = doclist def get_item_details(self, item_code): - item = sql("select item_name, description from `tabItem` where name = '%s'" %(item_code), as_dict=1) + item = webnotes.conn.sql("select item_name, description from `tabItem` where name = '%s'" %(item_code), as_dict=1) ret = { 'item_name': item and item[0]['item_name'] or '', 'description' : item and item[0]['description'] or '' @@ -30,7 +29,7 @@ class DocType(TransactionBase): def generate_schedule(self): self.doclist = self.doc.clear_table(self.doclist, 'maintenance_schedule_detail') count = 0 - sql("delete from `tabMaintenance Schedule Detail` where parent='%s'" %(self.doc.name)) + webnotes.conn.sql("delete from `tabMaintenance Schedule Detail` where parent='%s'" %(self.doc.name)) for d in getlist(self.doclist, 'item_maintenance_detail'): self.validate_maintenance_detail() s_list =[] @@ -67,7 +66,7 @@ class DocType(TransactionBase): email_map[d.incharge_name] = webnotes.bean("Sales Person", d.incharge_name).run_method("get_email_id") - scheduled_date =sql("select scheduled_date from `tabMaintenance Schedule Detail` \ + scheduled_date =webnotes.conn.sql("select scheduled_date from `tabMaintenance Schedule Detail` \ where incharge_name='%s' and item_code='%s' and parent='%s' " %(d.incharge_name, \ d.item_code, self.doc.name), as_dict=1) @@ -172,7 +171,7 @@ class DocType(TransactionBase): def validate_sales_order(self): for d in getlist(self.doclist, 'item_maintenance_detail'): if d.prevdoc_docname: - chk = sql("select t1.name from `tabMaintenance Schedule` t1, `tabMaintenance Schedule Item` t2 where t2.parent=t1.name and t2.prevdoc_docname=%s and t1.docstatus=1", d.prevdoc_docname) + chk = webnotes.conn.sql("select t1.name from `tabMaintenance Schedule` t1, `tabMaintenance Schedule Item` t2 where t2.parent=t1.name and t2.prevdoc_docname=%s and t1.docstatus=1", d.prevdoc_docname) if chk: msgprint("Maintenance Schedule against "+d.prevdoc_docname+" already exist") raise Exception @@ -186,7 +185,7 @@ class DocType(TransactionBase): cur_s_no = cur_serial_no.split(',') for x in cur_s_no: - chk = sql("select name, status from `tabSerial No` where docstatus!=2 and name=%s", (x)) + chk = webnotes.conn.sql("select name, status from `tabSerial No` where docstatus!=2 and name=%s", (x)) chk1 = chk and chk[0][0] or '' status = chk and chk[0][1] or '' @@ -209,7 +208,7 @@ class DocType(TransactionBase): cur_s_no = cur_serial_no.split(',') for x in cur_s_no: - dt = sql("select delivery_date from `tabSerial No` where name = %s", x) + dt = webnotes.conn.sql("select delivery_date from `tabSerial No` where name = %s", x) dt = dt and dt[0][0] or '' if dt: @@ -225,7 +224,7 @@ class DocType(TransactionBase): cur_s_no = cur_serial_no.split(',') for x in cur_s_no: - sql("update `tabSerial No` set amc_expiry_date = '%s', maintenance_status = 'Under AMC' where name = '%s'"% (amc_end_date,x)) + webnotes.conn.sql("update `tabSerial No` set amc_expiry_date = '%s', maintenance_status = 'Under AMC' where name = '%s'"% (amc_end_date,x)) def on_update(self): webnotes.conn.set(self.doc, 'status', 'Draft') @@ -233,7 +232,7 @@ class DocType(TransactionBase): def validate_serial_no_warranty(self): for d in getlist(self.doclist, 'item_maintenance_detail'): if cstr(d.serial_no).strip(): - dt = sql("""select warranty_expiry_date, amc_expiry_date + dt = webnotes.conn.sql("""select warranty_expiry_date, amc_expiry_date from `tabSerial No` where name = %s""", d.serial_no, as_dict=1) if dt[0]['warranty_expiry_date'] and dt[0]['warranty_expiry_date'] >= d.start_date: webnotes.msgprint("""Serial No: %s is already under warranty upto %s. diff --git a/support/doctype/maintenance_visit/maintenance_visit.py b/support/doctype/maintenance_visit/maintenance_visit.py index bf8767becec..60cc3712a60 100644 --- a/support/doctype/maintenance_visit/maintenance_visit.py +++ b/support/doctype/maintenance_visit/maintenance_visit.py @@ -8,7 +8,6 @@ from webnotes.utils import cstr from webnotes.model.bean import getlist from webnotes import msgprint -sql = webnotes.conn.sql from utilities.transaction_base import TransactionBase @@ -19,7 +18,7 @@ class DocType(TransactionBase): self.doclist = doclist def get_item_details(self, item_code): - item = sql("select item_name,description from `tabItem` where name = '%s'" %(item_code), as_dict=1) + item = webnotes.conn.sql("select item_name,description from `tabItem` where name = '%s'" %(item_code), as_dict=1) ret = { 'item_name' : item and item[0]['item_name'] or '', 'description' : item and item[0]['description'] or '' @@ -28,7 +27,7 @@ class DocType(TransactionBase): def validate_serial_no(self): for d in getlist(self.doclist, 'maintenance_visit_details'): - if d.serial_no and not sql("select name from `tabSerial No` where name = '%s' and docstatus != 2" % d.serial_no): + if d.serial_no and not webnotes.conn.sql("select name from `tabSerial No` where name = '%s' and docstatus != 2" % d.serial_no): msgprint("Serial No: "+ d.serial_no + " not exists in the system") raise Exception @@ -52,7 +51,7 @@ class DocType(TransactionBase): elif self.doc.completion_status == 'Partially Completed': status = 'Work In Progress' else: - nm = sql("select t1.name, t1.mntc_date, t2.service_person, t2.work_done from `tabMaintenance Visit` t1, `tabMaintenance Visit Purpose` t2 where t2.parent = t1.name and t1.completion_status = 'Partially Completed' and t2.prevdoc_docname = %s and t1.name!=%s and t1.docstatus = 1 order by t1.name desc limit 1", (d.prevdoc_docname, self.doc.name)) + nm = webnotes.conn.sql("select t1.name, t1.mntc_date, t2.service_person, t2.work_done from `tabMaintenance Visit` t1, `tabMaintenance Visit Purpose` t2 where t2.parent = t1.name and t1.completion_status = 'Partially Completed' and t2.prevdoc_docname = %s and t1.name!=%s and t1.docstatus = 1 order by t1.name desc limit 1", (d.prevdoc_docname, self.doc.name)) if nm: status = 'Work In Progress' @@ -65,7 +64,7 @@ class DocType(TransactionBase): service_person = '' work_done = '' - sql("update `tabCustomer Issue` set resolution_date=%s, resolved_by=%s, resolution_details=%s, status=%s where name =%s",(mntc_date,service_person,work_done,status,d.prevdoc_docname)) + webnotes.conn.sql("update `tabCustomer Issue` set resolution_date=%s, resolved_by=%s, resolution_details=%s, status=%s where name =%s",(mntc_date,service_person,work_done,status,d.prevdoc_docname)) def check_if_last_visit(self): @@ -77,7 +76,7 @@ class DocType(TransactionBase): check_for_doctype = d.prevdoc_doctype if check_for_docname: - check = sql("select t1.name from `tabMaintenance Visit` t1, `tabMaintenance Visit Purpose` t2 where t2.parent = t1.name and t1.name!=%s and t2.prevdoc_docname=%s and t1.docstatus = 1 and (t1.mntc_date > %s or (t1.mntc_date = %s and t1.mntc_time > %s))", (self.doc.name, check_for_docname, self.doc.mntc_date, self.doc.mntc_date, self.doc.mntc_time)) + check = webnotes.conn.sql("select t1.name from `tabMaintenance Visit` t1, `tabMaintenance Visit Purpose` t2 where t2.parent = t1.name and t1.name!=%s and t2.prevdoc_docname=%s and t1.docstatus = 1 and (t1.mntc_date > %s or (t1.mntc_date = %s and t1.mntc_time > %s))", (self.doc.name, check_for_docname, self.doc.mntc_date, self.doc.mntc_date, self.doc.mntc_time)) if check: check_lst = [x[0] for x in check] diff --git a/support/doctype/newsletter/newsletter.js b/support/doctype/newsletter/newsletter.js index 05311963cb9..b532b299bbc 100644 --- a/support/doctype/newsletter/newsletter.js +++ b/support/doctype/newsletter/newsletter.js @@ -16,7 +16,7 @@ cur_frm.cscript.refresh = function(doc) { erpnext.hide_naming_series(); if(!doc.__islocal && !cint(doc.email_sent) && !doc.__unsaved && inList(wn.boot.profile.can_write, doc.doctype)) { - cur_frm.add_custom_button('Send', function() { + cur_frm.add_custom_button(wn._('Send'), function() { return $c_obj(make_doclist(doc.doctype, doc.name), 'send_emails', '', function(r) { cur_frm.refresh(); }); diff --git a/support/doctype/newsletter/newsletter.py b/support/doctype/newsletter/newsletter.py index b201cc55865..b480b7dd88a 100644 --- a/support/doctype/newsletter/newsletter.py +++ b/support/doctype/newsletter/newsletter.py @@ -76,22 +76,25 @@ class DocType(): sender = self.doc.send_from or webnotes.utils.get_formatted_email(self.doc.owner) from webnotes.utils.email_lib.bulk import send - webnotes.conn.auto_commit_on_many_writes = True + + if not webnotes.flags.in_test: + webnotes.conn.auto_commit_on_many_writes = True send(recipients = self.recipients, sender = sender, subject = self.doc.subject, message = self.doc.message, doctype = self.send_to_doctype, email_field = "email_id", ref_doctype = self.doc.doctype, ref_docname = self.doc.name) - webnotes.conn.auto_commit_on_many_writes = False + if not webnotes.flags.in_test: + webnotes.conn.auto_commit_on_many_writes = False def validate_send(self): if self.doc.fields.get("__islocal"): webnotes.msgprint(_("""Please save the Newsletter before sending."""), raise_exception=1) - import conf - if getattr(conf, "status", None) == "Trial": + from webnotes import conf + if (conf.get("status") or None) == "Trial": webnotes.msgprint(_("""Sending newsletters is not allowed for Trial users, \ to prevent abuse of this feature."""), raise_exception=1) @@ -105,10 +108,10 @@ def get_lead_options(): } -lead_naming_series = None def create_lead(email_id): """create a lead if it does not exist""" from email.utils import parseaddr + from webnotes.model.doc import get_default_naming_series real_name, email_id = parseaddr(email_id) if webnotes.conn.get_value("Lead", {"email_id": email_id}): @@ -119,24 +122,8 @@ def create_lead(email_id): "email_id": email_id, "lead_name": real_name or email_id, "status": "Contacted", - "naming_series": lead_naming_series or get_lead_naming_series(), + "naming_series": get_default_naming_series("Lead"), "company": webnotes.conn.get_default("company"), "source": "Email" }) - lead.insert() - -def get_lead_naming_series(): - """gets lead's default naming series""" - global lead_naming_series - naming_series_field = webnotes.get_doctype("Lead").get_field("naming_series") - if naming_series_field.default: - lead_naming_series = naming_series_field.default - else: - latest_naming_series = webnotes.conn.sql("""select naming_series - from `tabLead` order by creation desc limit 1""") - if latest_naming_series: - lead_naming_series = latest_naming_series[0][0] - else: - lead_naming_series = filter(None, naming_series_field.options.split("\n"))[0] - - return lead_naming_series + lead.insert() \ No newline at end of file diff --git a/support/doctype/newsletter/test_newsletter.py b/support/doctype/newsletter/test_newsletter.py index fae3e40c49b..3f4e021bb36 100644 --- a/support/doctype/newsletter/test_newsletter.py +++ b/support/doctype/newsletter/test_newsletter.py @@ -45,20 +45,23 @@ test_records =[ "subject": "_Test Newsletter to Lead", "send_to_type": "Lead", "lead_source": "All", - "message": "This is a test newsletter" + "message": "This is a test newsletter", + "send_from": "admin@example.com" }], [{ "doctype": "Newsletter", "subject": "_Test Newsletter to Contact", "send_to_type": "Contact", "contact_type": "Customer", - "message": "This is a test newsletter" + "message": "This is a test newsletter", + "send_from": "admin@example.com" }], [{ "doctype": "Newsletter", "subject": "_Test Newsletter to Custom", "send_to_type": "Custom", "email_list": "test_custom@example.com, test_custom1@example.com, test_custom2@example.com", - "message": "This is a test newsletter" + "message": "This is a test newsletter", + "send_from": "admin@example.com" }], ] diff --git a/support/doctype/support_ticket/get_support_mails.py b/support/doctype/support_ticket/get_support_mails.py index 4dcb59e4fe6..395052aa27e 100644 --- a/support/doctype/support_ticket/get_support_mails.py +++ b/support/doctype/support_ticket/get_support_mails.py @@ -54,7 +54,7 @@ Original Query: def auto_close_tickets(self): webnotes.conn.sql("""update `tabSupport Ticket` set status = 'Closed' - where status = 'Waiting for Customer' + where status = 'Replied' and date_sub(curdate(),interval 15 Day) > modified""") def get_support_mails(): @@ -81,7 +81,7 @@ def add_support_communication(subject, content, sender, docname=None, mail=None) make(content=content, sender=sender, subject = subject, doctype="Support Ticket", name=ticket.doc.name, - date=mail.date if mail else today()) + date=mail.date if mail else today(), sent_or_received="Received") if mail: mail.save_attachments_in_doc(ticket.doc) diff --git a/support/doctype/support_ticket/support_ticket.js b/support/doctype/support_ticket/support_ticket.js index 0e612734393..bcd36581f36 100644 --- a/support/doctype/support_ticket/support_ticket.js +++ b/support/doctype/support_ticket/support_ticket.js @@ -6,7 +6,7 @@ cur_frm.fields_dict.customer.get_query = function(doc,cdt,cdn) { wn.provide("erpnext.support"); // TODO commonify this code -erpnext.support.CustomerIssue = wn.ui.form.Controller.extend({ +erpnext.support.SupportTicket = wn.ui.form.Controller.extend({ customer: function() { var me = this; if(this.frm.doc.customer) { @@ -18,13 +18,13 @@ erpnext.support.CustomerIssue = wn.ui.form.Controller.extend({ } }); -$.extend(cur_frm.cscript, new erpnext.support.CustomerIssue({frm: cur_frm})); +$.extend(cur_frm.cscript, new erpnext.support.SupportTicket({frm: cur_frm})); $.extend(cur_frm.cscript, { onload: function(doc, dt, dn) { if(in_list(user_roles,'System Manager')) { - cur_frm.footer.help_area.innerHTML = '

    Email Settings
    \ - Integrate incoming support emails to Support Ticket

    '; + cur_frm.footer.help_area.innerHTML = '

    '+wn._("Email Settings")+'
    \ + '+wn._("Integrate incoming support emails to Support Ticket")+'

    '; } }, diff --git a/support/doctype/support_ticket/support_ticket.py b/support/doctype/support_ticket/support_ticket.py index bf2a9fbabed..eb68ff3bea8 100644 --- a/support/doctype/support_ticket/support_ticket.py +++ b/support/doctype/support_ticket/support_ticket.py @@ -14,7 +14,7 @@ class DocType(TransactionBase): def get_sender(self, comm): return webnotes.conn.get_value('Email Settings',None,'support_email') - + def get_subject(self, comm): return '[' + self.doc.name + '] ' + (comm.subject or 'No Subject Specified') @@ -35,16 +35,7 @@ class DocType(TransactionBase): if self.doc.status == "Closed": from webnotes.widgets.form.assign_to import clear clear(self.doc.doctype, self.doc.name) - - def on_communication(self, comm): - if comm.sender == self.get_sender(comm) or \ - webnotes.conn.get_value("Profile", extract_email_id(comm.sender), "user_type")=="System User": - self.doc.status = "Waiting for Customer" - else: - self.doc.status = "Open" - self.update_status() - self.doc.save() - + def set_lead_contact(self, email_id): import email.utils email_id = email.utils.parseaddr(email_id) diff --git a/support/doctype/support_ticket/support_ticket.txt b/support/doctype/support_ticket/support_ticket.txt index 9f385b2d25b..76d9dcfb1e9 100644 --- a/support/doctype/support_ticket/support_ticket.txt +++ b/support/doctype/support_ticket/support_ticket.txt @@ -2,7 +2,7 @@ { "creation": "2013-02-01 10:36:25", "docstatus": 0, - "modified": "2013-09-10 10:54:02", + "modified": "2013-10-03 16:45:41", "modified_by": "Administrator", "owner": "Administrator" }, @@ -71,7 +71,7 @@ "no_copy": 1, "oldfieldname": "status", "oldfieldtype": "Select", - "options": "\nOpen\nTo Reply\nWaiting for Customer\nHold\nClosed", + "options": "Open\nReplied\nHold\nClosed", "read_only": 0, "reqd": 0, "search_index": 1 diff --git a/support/page/support_analytics/support_analytics.js b/support/page/support_analytics/support_analytics.js index 7e449178a68..ecc07496241 100644 --- a/support/page/support_analytics/support_analytics.js +++ b/support/page/support_analytics/support_analytics.js @@ -4,7 +4,7 @@ wn.pages['support-analytics'].onload = function(wrapper) { wn.ui.make_app_page({ parent: wrapper, - title: 'Support Analytics', + title: wn._('Support Analytics'), single_column: true }); @@ -18,7 +18,7 @@ wn.pages['support-analytics'].onload = function(wrapper) { erpnext.SupportAnalytics = wn.views.GridReportWithPlot.extend({ init: function(wrapper) { this._super({ - title: "Support Analtyics", + title: wn._("Support Analtyics"), page: wrapper, parent: $(wrapper).find('.layout-main'), appframe: wrapper.appframe, @@ -27,22 +27,22 @@ erpnext.SupportAnalytics = wn.views.GridReportWithPlot.extend({ }, filters: [ - {fieldtype:"Select", label: "Fiscal Year", link:"Fiscal Year", + {fieldtype:"Select", label: wn._("Fiscal Year"), link:"Fiscal Year", default_value: "Select Fiscal Year..."}, - {fieldtype:"Date", label: "From Date"}, - {fieldtype:"Label", label: "To"}, - {fieldtype:"Date", label: "To Date"}, - {fieldtype:"Select", label: "Range", + {fieldtype:"Date", label: wn._("From Date")}, + {fieldtype:"Label", label: wn._("To")}, + {fieldtype:"Date", label: wn._("To Date")}, + {fieldtype:"Select", label: wn._("Range"), options:["Daily", "Weekly", "Monthly", "Quarterly", "Yearly"]}, - {fieldtype:"Button", label: "Refresh", icon:"icon-refresh icon-white", cssClass:"btn-info"}, - {fieldtype:"Button", label: "Reset Filters"} + {fieldtype:"Button", label: wn._("Refresh"), icon:"icon-refresh icon-white", cssClass:"btn-info"}, + {fieldtype:"Button", label: wn._("Reset Filters")} ], setup_columns: function() { var std_columns = [ - {id: "check", name: "Plot", field: "check", width: 30, + {id: "check", name: wn._("Plot"), field: "check", width: 30, formatter: this.check_formatter}, - {id: "status", name: "Status", field: "status", width: 100}, + {id: "status", name: wn._("Status"), field: "status", width: 100}, ]; this.make_date_range_columns(); this.columns = std_columns.concat(this.columns); diff --git a/translations/ar.csv b/translations/ar.csv index 9e075a8c1a6..98565806bfa 100644 --- a/translations/ar.csv +++ b/translations/ar.csv @@ -814,7 +814,7 @@ Delivery Note Item,ملاحظة تسليم السلعة Delivery Note Items,ملاحظة عناصر التسليم Delivery Note Message,ملاحظة تسليم رسالة Delivery Note No,ملاحظة لا تسليم -Delivery Note Packing Item,ملاحظة التوصيل التغليف +Packed Item,ملاحظة التوصيل التغليف Delivery Note Required,ملاحظة التسليم المطلوبة Delivery Note Trends,ملاحظة اتجاهات التسليم Delivery Status,حالة التسليم diff --git a/translations/de.csv b/translations/de.csv index ccb2c88fc2f..7cf514e3ec9 100644 --- a/translations/de.csv +++ b/translations/de.csv @@ -814,7 +814,7 @@ Delivery Note Item,Lieferscheinposition Delivery Note Items,Lieferscheinpositionen Delivery Note Message,Lieferschein Nachricht Delivery Note No,Lieferschein Nein -Delivery Note Packing Item,Lieferschein Verpackung Artikel +Packed Item,Lieferschein Verpackung Artikel Delivery Note Required,Lieferschein erforderlich Delivery Note Trends,Lieferschein Trends Delivery Status,Lieferstatus diff --git a/translations/el.csv b/translations/el.csv index 7d429bb4e17..8b604e7c4b7 100644 --- a/translations/el.csv +++ b/translations/el.csv @@ -827,7 +827,7 @@ Delivery Note Item,Αποστολή στοιχείων Σημείωση Delivery Note Items,Σημείωση Στοιχεία Παράδοσης Delivery Note Message,Αποστολή μηνύματος Σημείωση Delivery Note No,Σημείωση παράδοσης αριθ. -Delivery Note Packing Item,Παράδοση Θέση Συσκευασία Σημείωση +Packed Item,Παράδοση Θέση Συσκευασία Σημείωση Delivery Note Required,Σημείωση παράδοσης Απαιτείται Delivery Note Trends,Τάσεις Σημείωση Παράδοση Delivery Status,Κατάσταση παράδοσης diff --git a/translations/es.csv b/translations/es.csv index d30649d4cf7..4ab32b5eb79 100644 --- a/translations/es.csv +++ b/translations/es.csv @@ -814,7 +814,7 @@ Delivery Note Item,Nota de entrega del artículo Delivery Note Items,Artículos de entrega Nota Delivery Note Message,Entrega de mensajes Nota Delivery Note No,Entrega Nota No -Delivery Note Packing Item,Nota de Entrega Embalaje artículo +Packed Item,Nota de Entrega Embalaje artículo Delivery Note Required,Nota de entrega requerida Delivery Note Trends,Tendencias albarán Delivery Status,Estado de entrega diff --git a/translations/fr.csv b/translations/fr.csv index dacdd2f27f5..d9c0d8718e9 100644 --- a/translations/fr.csv +++ b/translations/fr.csv @@ -814,7 +814,7 @@ Delivery Note Item,Point de Livraison Delivery Note Items,Articles bordereau de livraison Delivery Note Message,Note Message de livraison Delivery Note No,Remarque Aucune livraison -Delivery Note Packing Item,Article d'emballage de livraison Note +Packed Item,Article d'emballage de livraison Note Delivery Note Required,Remarque livraison requis Delivery Note Trends,Bordereau de livraison Tendances Delivery Status,Delivery Status diff --git a/translations/hi.csv b/translations/hi.csv index 6f9576c5b4c..8e2fcaf5ed0 100644 --- a/translations/hi.csv +++ b/translations/hi.csv @@ -814,7 +814,7 @@ Delivery Note Item,डिलिवरी नोट आइटम Delivery Note Items,डिलिवरी नोट आइटम Delivery Note Message,डिलिवरी नोट संदेश Delivery Note No,डिलिवरी नोट -Delivery Note Packing Item,डिलिवरी नोट पैकिंग आइटम +Packed Item,डिलिवरी नोट पैकिंग आइटम Delivery Note Required,डिलिवरी नोट आवश्यक Delivery Note Trends,डिलिवरी नोट रुझान Delivery Status,डिलिवरी स्थिति diff --git a/translations/hr.csv b/translations/hr.csv index d60f85b96c7..20b5cc7421b 100644 --- a/translations/hr.csv +++ b/translations/hr.csv @@ -814,7 +814,7 @@ Delivery Note Item,Otpremnica artikla Delivery Note Items,Način Napomena Stavke Delivery Note Message,Otpremnica Poruka Delivery Note No,Dostava Napomena Ne -Delivery Note Packing Item,Dostava Napomena Pakiranje artikla +Packed Item,Dostava Napomena Pakiranje artikla Delivery Note Required,Dostava Napomena Obavezno Delivery Note Trends,Otpremnici trendovi Delivery Status,Status isporuke diff --git a/translations/it.csv b/translations/it.csv index c91fc84759f..e9e21064f93 100644 --- a/translations/it.csv +++ b/translations/it.csv @@ -822,7 +822,7 @@ Delivery Note Item,Nota articolo Consegna Delivery Note Items,Nota Articoli Consegna Delivery Note Message,Nota Messaggio Consegna Delivery Note No,Nota Consegna N. -Delivery Note Packing Item,Nota Consegna Imballaggio articolo +Packed Item,Nota Consegna Imballaggio articolo Delivery Note Required,Nota Consegna Richiesta Delivery Note Trends,Nota Consegna Tendenza Delivery Status,Stato Consegna diff --git a/translations/nl.csv b/translations/nl.csv index 3cc71524f6c..c9b5aa214a4 100644 --- a/translations/nl.csv +++ b/translations/nl.csv @@ -814,7 +814,7 @@ Delivery Note Item,Levering Note Item Delivery Note Items,Levering Opmerking Items Delivery Note Message,Levering Opmerking Bericht Delivery Note No,Levering aantekening -Delivery Note Packing Item,Levering Opmerking Verpakking Item +Packed Item,Levering Opmerking Verpakking Item Delivery Note Required,Levering Opmerking Verplicht Delivery Note Trends,Delivery Note Trends Delivery Status,Delivery Status diff --git a/translations/pt-BR.csv b/translations/pt-BR.csv index 274c7d4947b..7dfb0a2af85 100644 --- a/translations/pt-BR.csv +++ b/translations/pt-BR.csv @@ -814,7 +814,7 @@ Delivery Note Item,Item da Guia de Remessa Delivery Note Items,Itens da Guia de Remessa Delivery Note Message,Mensagem da Guia de Remessa Delivery Note No,Nº da Guia de Remessa -Delivery Note Packing Item,Item do Pacote da Guia de Remessa +Packed Item,Item do Pacote da Guia de Remessa Delivery Note Required,Guia de Remessa Obrigatória Delivery Note Trends,Nota de entrega Trends Delivery Status,Estado da entrega diff --git a/translations/pt.csv b/translations/pt.csv index 31d20bcd460..900d4daa179 100644 --- a/translations/pt.csv +++ b/translations/pt.csv @@ -814,7 +814,7 @@ Delivery Note Item,Item Nota de Entrega Delivery Note Items,Nota Itens de entrega Delivery Note Message,Mensagem Nota de Entrega Delivery Note No,Nota de Entrega Não -Delivery Note Packing Item,Entrega do item embalagem Nota +Packed Item,Entrega do item embalagem Nota Delivery Note Required,Nota de Entrega Obrigatório Delivery Note Trends,Nota de entrega Trends Delivery Status,Estado entrega diff --git a/translations/sr.csv b/translations/sr.csv index aa14049f254..fc9513b4c24 100644 --- a/translations/sr.csv +++ b/translations/sr.csv @@ -814,7 +814,7 @@ Delivery Note Item,Испорука Напомена Ставка Delivery Note Items,Достава Напомена Ставке Delivery Note Message,Испорука Напомена порука Delivery Note No,Испорука Напомена Не -Delivery Note Packing Item,Испорука Напомена Паковање јединице +Packed Item,Испорука Напомена Паковање јединице Delivery Note Required,Испорука Напомена Обавезно Delivery Note Trends,Достава Напомена трендови Delivery Status,Статус испоруке diff --git a/translations/ta.csv b/translations/ta.csv index 74cc74b6952..f21f27b8259 100644 --- a/translations/ta.csv +++ b/translations/ta.csv @@ -814,7 +814,7 @@ Delivery Note Item,டெலிவரி குறிப்பு பொர Delivery Note Items,டெலிவரி குறிப்பு உருப்படிகள் Delivery Note Message,டெலிவரி குறிப்பு செய்தி Delivery Note No,டெலிவரி குறிப்பு இல்லை -Delivery Note Packing Item,டெலிவரி குறிப்பு தடைக்காப்பு பொருள் +Packed Item,டெலிவரி குறிப்பு தடைக்காப்பு பொருள் Delivery Note Required,டெலிவரி குறிப்பு தேவை Delivery Note Trends,பந்து குறிப்பு போக்குகள் Delivery Status,விநியோக நிலைமை diff --git a/translations/th.csv b/translations/th.csv index 7a461f070fa..3cf2d9c210c 100644 --- a/translations/th.csv +++ b/translations/th.csv @@ -814,7 +814,7 @@ Delivery Note Item,รายการจัดส่งสินค้าหม Delivery Note Items,รายการจัดส่งสินค้าหมายเหตุ Delivery Note Message,ข้อความหมายเหตุจัดส่งสินค้า Delivery Note No,หมายเหตุจัดส่งสินค้าไม่มี -Delivery Note Packing Item,จัดส่งสินค้าบรรจุหมายเหตุ +Packed Item,จัดส่งสินค้าบรรจุหมายเหตุ Delivery Note Required,หมายเหตุจัดส่งสินค้าที่จำเป็น Delivery Note Trends,แนวโน้มหมายเหตุการจัดส่งสินค้า Delivery Status,สถานะการจัดส่งสินค้า diff --git a/utilities/demo/demo-login.js b/utilities/demo/demo-login.js index 509057b9ef9..03fe6b96b91 100644 --- a/utilities/demo/demo-login.js +++ b/utilities/demo/demo-login.js @@ -14,9 +14,9 @@ $(document).ready(function() { callback: function(r) { $(me).prop("disabled", false); if(r.exc) { - alert("Error, please contact support@erpnext.com"); + alert(wn._("Error, please contact support@erpnext.com")); } else { - console.log("Logged In"); + console.log(wn._("Logged In")); window.location.href = "app.html"; } } diff --git a/utilities/demo/demo_control_panel.py b/utilities/demo/demo_control_panel.py index 1f381d5eb6e..694f7d1201e 100644 --- a/utilities/demo/demo_control_panel.py +++ b/utilities/demo/demo_control_panel.py @@ -1,13 +1,16 @@ +from __future__ import unicode_literals +import webnotes - def on_login(self): - from webnotes.utils import validate_email_add - import conf - if hasattr(conf, "demo_notify_url"): - if webnotes.form_dict.lead_email and validate_email_add(webnotes.form_dict.lead_email): - import requests - response = requests.post(conf.demo_notify_url, data={ - "cmd":"portal.utils.send_message", - "subject":"Logged into Demo", - "sender": webnotes.form_dict.lead_email, - "message": "via demo.erpnext.com" - }) \ No newline at end of file +class CustomDocType(DocType): + def on_login(self): + from webnotes.utils import validate_email_add + from webnotes import conf + if "demo_notify_url" in conf: + if webnotes.form_dict.lead_email and validate_email_add(webnotes.form_dict.lead_email): + import requests + response = requests.post(conf.demo_notify_url, data={ + "cmd":"portal.utils.send_message", + "subject":"Logged into Demo", + "sender": webnotes.form_dict.lead_email, + "message": "via demo.erpnext.com" + }) diff --git a/utilities/demo/demo_docs/Lead.csv b/utilities/demo/demo_docs/Lead.csv index c00ab441625..a7004e4810e 100644 --- a/utilities/demo/demo_docs/Lead.csv +++ b/utilities/demo/demo_docs/Lead.csv @@ -1,68 +1,68 @@ -Data Import Template,,,,,,,,,,,,,,,,,,,,,,,,,,, -Table:,Lead,,,,,,,,,,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,,,,,,,,,,,, -Notes:,,,,,,,,,,,,,,,,,,,,,,,,,,, -Please do not change the template headings.,,,,,,,,,,,,,,,,,,,,,,,,,,, -First data column must be blank.,,,,,,,,,,,,,,,,,,,,,,,,,,, -Only mandatory fields are necessary for new records. You can delete non-mandatory columns if you wish.,,,,,,,,,,,,,,,,,,,,,,,,,,, -"For updating, you can update only selective columns.",,,,,,,,,,,,,,,,,,,,,,,,,,, -"If you are uploading new records, leave the ""name"" (ID) column blank.",,,,,,,,,,,,,,,,,,,,,,,,,,, -"If you are uploading new records, ""Naming Series"" becomes mandatory, if present.",,,,,,,,,,,,,,,,,,,,,,,,,,, -You can only upload upto 5000 records in one go. (may be less in some cases),,,,,,,,,,,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,,,,,,,,,,,, -Column Labels,ID,Contact Name,Status,Naming Series,Company Name,Email Id,Source,From Customer,Campaign Name,Remark,Phone,Mobile No.,Fax,Website,Territory,Lead Type,Lead Owner,Market Segment,Industry,Request Type,Lost Reason,Next Contact By,Next Contact Date,Last Contact Date,Company,Unsubscribed,Blog Subscriber -Column Name:,name,lead_name,status,naming_series,company_name,email_id,source,customer,campaign_name,remark,phone,mobile_no,fax,website,territory,type,lead_owner,market_segment,industry,request_type,order_lost_reason,contact_by,contact_date,last_contact_date,company,unsubscribed,blog_subscriber -Mandatory:,Yes,Yes,Yes,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No -Type:,Data (text),Data,Select,Select,Data,Data,Select,Link,Link,Small Text,Data,Data,Data,Data,Link,Select,Link,Select,Link,Select,Link,Link,Date,Date,Link,Check,Check -Info:,,,"One of: Open, Replied, Attempted to Contact, Contact in Future, Contacted, Interested, Not interested, Lead Lost, Converted","One of: LEAD, LEAD/10-11/, LEAD/MUMBAI/",,,"One of: Advertisement, Blog Post, Campaign, Call, Customer, Exhibition, Supplier, Website, Email",Valid Customer,Valid Campaign,,,,,,Valid Territory,"One of: Client, Channel Partner, Consultant",Valid Profile,"One of: Lower Income, Middle Income, Upper Income",Valid Industry Type,"One of: Product Enquiry, Request for Information, Suggestions, Other",Valid Quotation Lost Reason,Valid Profile,,,Valid Company,0 or 1,0 or 1 -Start entering data below this line,,,,,,,,,,,,,,,,,,,,,,,,,,, -,,Mart Lakeman,Passive,,Zany Brainy,MartLakeman@einrot.com,,,,,,,,,,,,,,,,,,,,, -,,Saga Lundqvist,Passive,,Patterson-Fletcher,SagaLundqvist@dayrep.com,,,,,,,,,,,,,,,,,,,,, -,,Adna Sjöberg,Passive,,Griff's Hamburgers,AdnaSjoberg@gustr.com,,,,,,,,,,,,,,,,,,,,, -,,Ida Svendsen,Passive,,Rhodes Furniture,IdaDSvendsen@superrito.com,,,,,,,,,,,,,,,,,,,,, -,,Emppu Hämeenniemi,Passive,,Burger Chef,EmppuHameenniemi@teleworm.us,,,,,,,,,,,,,,,,,,,,, -,,Eugenio Pisano,Passive,,Stratabiz,EugenioPisano@cuvox.de,,,,,,,,,,,,,,,,,,,,, -,,Semhar Hagos,Passive,,Home Quarters Warehouse,SemharHagos@einrot.com,,,,,,,,,,,,,,,,,,,,, -,,Branimira Ivanković,Passive,,Enviro Architectural Designs,BranimiraIvankovic@einrot.com,,,,,,,,,,,,,,,,,,,,, -,,Shelly Fields,Passive,,Ideal Garden Management,ShellyLFields@superrito.com,,,,,,,,,,,,,,,,,,,,, -,,Leo Mikulić,Passive,,Listen Up,LeoMikulic@gustr.com,,,,,,,,,,,,,,,,,,,,, -,,Denisa Jarošová,Passive,,I. Magnin,DenisaJarosova@teleworm.us,,,,,,,,,,,,,,,,,,,,, -,,Janek Rutkowski,Passive,,First Rate Choice,JanekRutkowski@dayrep.com,,,,,,,,,,,,,,,,,,,,, -,,美月 宇藤,Passive,,Multi Tech Development,mm@gustr.com,,,,,,,,,,,,,,,,,,,,, -,,Даниил Афанасьев,Passive,,National Auto Parts,dd@einrot.com,,,,,,,,,,,,,,,,,,,,, -,,Zorislav Petković,Passive,,Integra Investment Plan,ZorislavPetkovic@cuvox.de,,,,,,,,,,,,,,,,,,,,, -,,Nanao Niwa,Passive,,The Lawn Guru,NanaoNiwa@superrito.com,,,,,,,,,,,,,,,,,,,,, -,,Hreiðar Jörundsson,Passive,,Buena Vista Realty Service,HreiarJorundsson@armyspy.com,,,,,,,,,,,,,,,,,,,,, -,,Lai Chu,Passive,,Bountiful Harvest Health Food Store,ChuThiBichLai@einrot.com,,,,,,,,,,,,,,,,,,,,, -,,Victor Aksakov,Passive,,P. Samuels Men's Clothiers,VictorAksakov@dayrep.com,,,,,,,,,,,,,,,,,,,,, -,,Saidalim Bisliev,Passive,,Vinyl Fever,SaidalimBisliev@cuvox.de,,,,,,,,,,,,,,,,,,,,, -,,Totte Jakobsson,Passive,,Garden Master,TotteJakobsson@armyspy.com,,,,,,,,,,,,,,,,,,,,, -,,Naná Armas,Passive,,Big Apple,NanaArmasRobles@cuvox.de,,,,,,,,,,,,,,,,,,,,, -,,Walerian Duda,Passive,,Monk House Sales,WalerianDuda@dayrep.com,,,,,,,,,,,,,,,,,,,,, -,,Moarimikashi ,Passive,,ManCharm,Moarimikashi@teleworm.us,,,,,,,,,,,,,,,,,,,,, -,,Dobromił Dąbrowski ,Passive,,Custom Lawn Care,DobromilDabrowski@dayrep.com,,,,,,,,,,,,,,,,,,,,, -,,Teigan Sinclair,Passive,,The Serendipity Dip,TeiganSinclair@gustr.com,,,,,,,,,,,,,,,,,,,,, -,,Fahad Guirguis,Passive,,Cavages,FahadSaidGuirguis@gustr.com,,,,,,,,,,,,,,,,,,,,, -,,Morten Olsen,Passive,,Gallenkamp,MortenJOlsen@armyspy.com,,,,,,,,,,,,,,,,,,,,, -,,Christian Baecker,Passive,,Webcom Business Services,ChristianBaecker@armyspy.com,,,,,,,,,,,,,,,,,,,,, -,,Sebastianus Dohmen,Passive,,Accord Investments,SebastianusDohmen@cuvox.de,,,,,,,,,,,,,,,,,,,,, -,,Eero Koskinen,Passive,,American Appliance,EeroKoskinen@superrito.com,,,,,,,,,,,,,,,,,,,,, -,,富奎 盧,Passive,,Bettendorf's,LuFuKui@teleworm.us,,,,,,,,,,,,,,,,,,,,, -,,Milica Jelić,Passive,,House Of Denmark,MilicaJelic@dayrep.com,,,,,,,,,,,,,,,,,,,,, -,,Barbora Holubová,Passive,,10000 Auto Parts,BarboraHolubova@cuvox.de,,,,,,,,,,,,,,,,,,,,, -,,Marta Kos,Passive,,Mages,MartaKos@einrot.com,,,,,,,,,,,,,,,,,,,,, -,,Simret Zula,Passive,,CSK Auto,SimretZula@cuvox.de,,,,,,,,,,,,,,,,,,,,, -,,Kamil Chlubna,Passive,,Eagle Hardware & Garden,KamilChlubna@einrot.com,,,,,,,,,,,,,,,,,,,,, -,,Aceline Bolduc,Passive,,Rustler Steak House,AcelineBolduc@armyspy.com,,,,,,,,,,,,,,,,,,,,, -,,Lucie Stupková,Passive,,ABCO Foods,LucieStupkova@gustr.com,,,,,,,,,,,,,,,,,,,,, -,,Roland Solvik,Passive,,Trak Auto,RolandSolvik@cuvox.de,,,,,,,,,,,,,,,,,,,,, -,,Mekirinzukushitakufu ,Passive,,Choices,Mekirinzukushitakufu@teleworm.us,,,,,,,,,,,,,,,,,,,,, -,,Mukharbek Sultanovich,Passive,,Megatronic,MukharbekSultanovich@cuvox.de,,,,,,,,,,,,,,,,,,,,, -,,Osman Amanuel,Passive,,Handy Dan,OsmanAmanuel@dayrep.com,,,,,,,,,,,,,,,,,,,,, -,,幸子 阪部,Passive,,Channel Home Centers,dd@armyspy.com,,,,,,,,,,,,,,,,,,,,, -,,Masakazu Kamitani,Passive,,Honest Air Group,MasakazuKamitani@superrito.com,,,,,,,,,,,,,,,,,,,,, -,,Omran Sabbagh,Passive,,Pleasures and Pasttimes,OmranNuhaidSabbagh@einrot.com,,,,,,,,,,,,,,,,,,,,, -,,Rikako Matsumura,Passive,,Lazysize,RikakoMatsumura@einrot.com,,,,,,,,,,,,,,,,,,,,, -,,Anayolisa Chukwukadibia,Passive,,Prestiga-Biz,AnayolisaChukwukadibia@einrot.com,,,,,,,,,,,,,,,,,,,,, -,,Gudmunda Hinna,Passive,,Childs Restaurants,GudmundaHinna@armyspy.com,,,,,,,,,,,,,,,,,,,,, \ No newline at end of file +Data Import Template,,,,,,,,,,,,,,,,,,,,,,,,,, +Table:,Lead,,,,,,,,,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,,,,,,,,,,, +Notes:,,,,,,,,,,,,,,,,,,,,,,,,,, +Please do not change the template headings.,,,,,,,,,,,,,,,,,,,,,,,,,, +First data column must be blank.,,,,,,,,,,,,,,,,,,,,,,,,,, +Only mandatory fields are necessary for new records. You can delete non-mandatory columns if you wish.,,,,,,,,,,,,,,,,,,,,,,,,,, +"For updating, you can update only selective columns.",,,,,,,,,,,,,,,,,,,,,,,,,, +"If you are uploading new records, leave the ""name"" (ID) column blank.",,,,,,,,,,,,,,,,,,,,,,,,,, +"If you are uploading new records, ""Naming Series"" becomes mandatory, if present.",,,,,,,,,,,,,,,,,,,,,,,,,, +You can only upload upto 5000 records in one go. (may be less in some cases),,,,,,,,,,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,,,,,,,,,,, +Column Labels,ID,Contact Name,Status,Naming Series,Company Name,Email Id,Source,From Customer,Campaign Name,Remark,Phone,Mobile No.,Fax,Website,Territory,Lead Type,Lead Owner,Market Segment,Industry,Request Type,Next Contact By,Next Contact Date,Company,Unsubscribed,Blog Subscriber, +Column Name:,name,lead_name,status,naming_series,company_name,email_id,source,customer,campaign_name,remark,phone,mobile_no,fax,website,territory,type,lead_owner,market_segment,industry,request_type,contact_by,contact_date,company,unsubscribed,blog_subscriber, +Mandatory:,Yes,Yes,Yes,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No, +Type:,Data (text),Data,Select,Select,Data,Data,Select,Link,Link,Small Text,Data,Data,Data,Data,Link,Select,Link,Select,Link,Select,Link,Date,Link,Check,Check, +Info:,,,"Lead, Open, Replied, Opportunity, Interested, Converted, Do Not Contact","One of: LEAD, LEAD/10-11/, LEAD/MUMBAI/",,,"One of: Advertisement, Blog Post, Campaign, Call, Customer, Exhibition, Supplier, Website, Email",Valid Customer,Valid Campaign,,,,,,Valid Territory,"One of: Client, Channel Partner, Consultant",Valid Profile,"One of: Lower Income, Middle Income, Upper Income",Valid Industry Type,"One of: Product Enquiry, Request for Information, Suggestions, Other",Valid Profile,,Valid Company,0 or 1,0 or 1, +Start entering data below this line,,,,,,,,,,,,,,,,,,,,,,,,,, +,,Mart Lakeman,Lead,,Zany Brainy,MartLakeman@einrot.com,,,,,,,,,,,,,,,,,,,, +,,Saga Lundqvist,Lead,,Patterson-Fletcher,SagaLundqvist@dayrep.com,,,,,,,,,,,,,,,,,,,, +,,Adna Sjöberg,Lead,,Griff's Hamburgers,AdnaSjoberg@gustr.com,,,,,,,,,,,,,,,,,,,, +,,Ida Svendsen,Lead,,Rhodes Furniture,IdaDSvendsen@superrito.com,,,,,,,,,,,,,,,,,,,, +,,Emppu Hämeenniemi,Lead,,Burger Chef,EmppuHameenniemi@teleworm.us,,,,,,,,,,,,,,,,,,,, +,,Eugenio Pisano,Lead,,Stratabiz,EugenioPisano@cuvox.de,,,,,,,,,,,,,,,,,,,, +,,Semhar Hagos,Lead,,Home Quarters Warehouse,SemharHagos@einrot.com,,,,,,,,,,,,,,,,,,,, +,,Branimira Ivanković,Lead,,Enviro Architectural Designs,BranimiraIvankovic@einrot.com,,,,,,,,,,,,,,,,,,,, +,,Shelly Fields,Lead,,Ideal Garden Management,ShellyLFields@superrito.com,,,,,,,,,,,,,,,,,,,, +,,Leo Mikulić,Lead,,Listen Up,LeoMikulic@gustr.com,,,,,,,,,,,,,,,,,,,, +,,Denisa Jarošová,Lead,,I. Magnin,DenisaJarosova@teleworm.us,,,,,,,,,,,,,,,,,,,, +,,Janek Rutkowski,Lead,,First Rate Choice,JanekRutkowski@dayrep.com,,,,,,,,,,,,,,,,,,,, +,,美月 宇藤,Lead,,Multi Tech Development,mm@gustr.com,,,,,,,,,,,,,,,,,,,, +,,Даниил Афанасьев,Lead,,National Auto Parts,dd@einrot.com,,,,,,,,,,,,,,,,,,,, +,,Zorislav Petković,Lead,,Integra Investment Plan,ZorislavPetkovic@cuvox.de,,,,,,,,,,,,,,,,,,,, +,,Nanao Niwa,Lead,,The Lawn Guru,NanaoNiwa@superrito.com,,,,,,,,,,,,,,,,,,,, +,,Hreiðar Jörundsson,Lead,,Buena Vista Realty Service,HreiarJorundsson@armyspy.com,,,,,,,,,,,,,,,,,,,, +,,Lai Chu,Lead,,Bountiful Harvest Health Food Store,ChuThiBichLai@einrot.com,,,,,,,,,,,,,,,,,,,, +,,Victor Aksakov,Lead,,P. Samuels Men's Clothiers,VictorAksakov@dayrep.com,,,,,,,,,,,,,,,,,,,, +,,Saidalim Bisliev,Lead,,Vinyl Fever,SaidalimBisliev@cuvox.de,,,,,,,,,,,,,,,,,,,, +,,Totte Jakobsson,Lead,,Garden Master,TotteJakobsson@armyspy.com,,,,,,,,,,,,,,,,,,,, +,,Naná Armas,Lead,,Big Apple,NanaArmasRobles@cuvox.de,,,,,,,,,,,,,,,,,,,, +,,Walerian Duda,Lead,,Monk House Sales,WalerianDuda@dayrep.com,,,,,,,,,,,,,,,,,,,, +,,Moarimikashi ,Lead,,ManCharm,Moarimikashi@teleworm.us,,,,,,,,,,,,,,,,,,,, +,,Dobromił Dąbrowski ,Lead,,Custom Lawn Care,DobromilDabrowski@dayrep.com,,,,,,,,,,,,,,,,,,,, +,,Teigan Sinclair,Lead,,The Serendipity Dip,TeiganSinclair@gustr.com,,,,,,,,,,,,,,,,,,,, +,,Fahad Guirguis,Lead,,Cavages,FahadSaidGuirguis@gustr.com,,,,,,,,,,,,,,,,,,,, +,,Morten Olsen,Lead,,Gallenkamp,MortenJOlsen@armyspy.com,,,,,,,,,,,,,,,,,,,, +,,Christian Baecker,Lead,,Webcom Business Services,ChristianBaecker@armyspy.com,,,,,,,,,,,,,,,,,,,, +,,Sebastianus Dohmen,Lead,,Accord Investments,SebastianusDohmen@cuvox.de,,,,,,,,,,,,,,,,,,,, +,,Eero Koskinen,Lead,,American Appliance,EeroKoskinen@superrito.com,,,,,,,,,,,,,,,,,,,, +,,富奎 盧,Lead,,Bettendorf's,LuFuKui@teleworm.us,,,,,,,,,,,,,,,,,,,, +,,Milica Jelić,Lead,,House Of Denmark,MilicaJelic@dayrep.com,,,,,,,,,,,,,,,,,,,, +,,Barbora Holubová,Lead,,10000 Auto Parts,BarboraHolubova@cuvox.de,,,,,,,,,,,,,,,,,,,, +,,Marta Kos,Lead,,Mages,MartaKos@einrot.com,,,,,,,,,,,,,,,,,,,, +,,Simret Zula,Lead,,CSK Auto,SimretZula@cuvox.de,,,,,,,,,,,,,,,,,,,, +,,Kamil Chlubna,Lead,,Eagle Hardware & Garden,KamilChlubna@einrot.com,,,,,,,,,,,,,,,,,,,, +,,Aceline Bolduc,Lead,,Rustler Steak House,AcelineBolduc@armyspy.com,,,,,,,,,,,,,,,,,,,, +,,Lucie Stupková,Lead,,ABCO Foods,LucieStupkova@gustr.com,,,,,,,,,,,,,,,,,,,, +,,Roland Solvik,Lead,,Trak Auto,RolandSolvik@cuvox.de,,,,,,,,,,,,,,,,,,,, +,,Mekirinzukushitakufu ,Lead,,Choices,Mekirinzukushitakufu@teleworm.us,,,,,,,,,,,,,,,,,,,, +,,Mukharbek Sultanovich,Lead,,Megatronic,MukharbekSultanovich@cuvox.de,,,,,,,,,,,,,,,,,,,, +,,Osman Amanuel,Lead,,Handy Dan,OsmanAmanuel@dayrep.com,,,,,,,,,,,,,,,,,,,, +,,幸子 阪部,Lead,,Channel Home Centers,dd@armyspy.com,,,,,,,,,,,,,,,,,,,, +,,Masakazu Kamitani,Lead,,Honest Air Group,MasakazuKamitani@superrito.com,,,,,,,,,,,,,,,,,,,, +,,Omran Sabbagh,Lead,,Pleasures and Pasttimes,OmranNuhaidSabbagh@einrot.com,,,,,,,,,,,,,,,,,,,, +,,Rikako Matsumura,Lead,,Lazysize,RikakoMatsumura@einrot.com,,,,,,,,,,,,,,,,,,,, +,,Anayolisa Chukwukadibia,Lead,,Prestiga-Biz,AnayolisaChukwukadibia@einrot.com,,,,,,,,,,,,,,,,,,,, +,,Gudmunda Hinna,Lead,,Childs Restaurants,GudmundaHinna@armyspy.com,,,,,,,,,,,,,,,,,,,, \ No newline at end of file diff --git a/utilities/demo/demo_docs/Profile.csv b/utilities/demo/demo_docs/Profile.csv index 2e7a2cee15e..eb456c16ad9 100644 --- a/utilities/demo/demo_docs/Profile.csv +++ b/utilities/demo/demo_docs/Profile.csv @@ -1,40 +1,40 @@ -Data Import Template,,,,,,,,,,,,,,,,,,,,, -Table:,Profile,,,,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,,,,,, -Notes:,,,,,,,,,,,,,,,,,,,,, -Please do not change the template headings.,,,,,,,,,,,,,,,,,,,,, -First data column must be blank.,,,,,,,,,,,,,,,,,,,,, -"If you are uploading new records, leave the ""name"" (ID) column blank.",,,,,,,,,,,,,,,,,,,,, -"If you are uploading new records, ""Naming Series"" becomes mandatory, if present.",,,,,,,,,,,,,,,,,,,,, -Only mandatory fields are necessary for new records. You can delete non-mandatory columns if you wish.,,,,,,,,,,,,,,,,,,,,, -"For updating, you can update only selective columns.",,,,,,,,,,,,,,,,,,,,, -You can only upload upto 5000 records in one go. (may be less in some cases),,,,,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,,,,,, -DocType:,Profile,,,,,,,,,,,,,,,,,,,, -Column Labels:,ID,Email,First Name,User Type,Enabled,Middle Name (Optional),Last Name,Send Invite Email,Language,Birth Date,Gender,New Password,User Image,Background Image,Bio,Email Signature,Login After,Login Before,Restrict IP,Last Login,Last IP -Column Name:,name,email,first_name,user_type,enabled,middle_name,last_name,send_invite_email,language,birth_date,gender,new_password,user_image,background_image,bio,email_signature,login_after,login_before,restrict_ip,last_login,last_ip -Mandatory:,Yes,Yes,Yes,Yes,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No -Type:,Data (text),Data,Data,Select,Check,Data,Data,Check,Select,Date,Select,Password,Select,Select,Small Text,Small Text,Int,Int,Data,Read Only,Read Only -Info:,,,,"One of: System User, Website User",0 or 1,,,0 or 1,"One of: العربية, Deutsch, english, español, français, हिंदी, Hrvatski, nederlands, português, português brasileiro, српски, தமிழ், ไทย",,"One of: Male, Female, Other",,One of: attach_files:,One of: attach_files:,,,Integer,Integer,,, -Start entering data below this line,,,,,,,,,,,,,,,,,,,,, -,,DikmanShervashidze@armyspy.com,Dikman,System User,1,V,Shervashidze,0,,,,testpass,,,,,,,,, -,,Zukutakitoteka@teleworm.us,Zukutakitoteka,System User,1,,,0,,,,testpass,,,,,,,,, -,,HatsueKashiwagi@cuvox.de,Hatsue,System User,1,H,Kashiwagi,0,,,,testpass,,,,,,,,, -,,NuranVerkleij@einrot.com,Nuran,System User,1,T,Verkleij,0,,,,testpass,,,,,,,,, -,,aromn@armyspy.com,Дмитрий,System User,1,З,Пирогов,0,,,,testpass,,,,,,,,, -,,TildeLindqvist@cuvox.de,Tilde,System User,1,T,Lindqvist,0,,,,testpass,,,,,,,,, -,,MichalSobczak@teleworm.us,Michał,System User,1,S,Sobczak,0,,,,testpass,,,,,,,,, -,,GabrielleLoftus@superrito.com,Gabrielle,System User,1,J,Loftus,0,,,,testpass,,,,,,,,, -,,VakhitaRyzaev@teleworm.us,Vakhita,System User,1,A,Ryzaev,0,,,,testpass,,,,,,,,, -,,CharmaineGaudreau@cuvox.de,Charmaine,System User,1,D,Gaudreau,0,,,,testpass,,,,,,,,, -,,RafaelaMaartens@cuvox.de,Rafaëla,System User,1,Z,Maartens,0,,,,testpass,,,,,,,,, -,,NuguseYohannes@dayrep.com,Nuguse,System User,0,S,Yohannes,0,,,,testpass,,,,,,,,, -,,panca@armyspy.com,Раиса,System User,0,В,Белякова,0,,,,testpass,,,,,,,,, -,,CaYinLong@gustr.com,胤隆,System User,1,婷,蔡,0,,,,testpass,,,,,,,,, -,,FreddieScott@armyspy.com,Freddie,System User,1,A,Scott,0,,,,testpass,,,,,,,,, -,,BergoraVigfusdottir@superrito.com,Bergþóra,System User,1,Ö,Vigfúsdóttir,0,,,,testpass,,,,,,,,, -,,WardNajmalDinKalb@cuvox.de,Ward,System User,1,N,Kalb,0,,,,testpass,,,,,,,,, -,,WanMai@teleworm.us,Wan,System User,1,A,Mai,0,,,,testpass,,,,,,,,, -,,LeonAbdulov@superrito.com,Leon,System User,1,A,Abdulov,0,,,,testpass,,,,,,,,, -,,SabinaNovotna@superrito.com,Sabina,System User,1,J,Novotná,0,,,,testpass,,,,,,,,, \ No newline at end of file +Data Import Template,,,,,,,,,,,,,,,,,,,, +Table:,Profile,,,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,,,,, +Notes:,,,,,,,,,,,,,,,,,,,, +Please do not change the template headings.,,,,,,,,,,,,,,,,,,,, +First data column must be blank.,,,,,,,,,,,,,,,,,,,, +"If you are uploading new records, leave the ""name"" (ID) column blank.",,,,,,,,,,,,,,,,,,,, +"If you are uploading new records, ""Naming Series"" becomes mandatory, if present.",,,,,,,,,,,,,,,,,,,, +Only mandatory fields are necessary for new records. You can delete non-mandatory columns if you wish.,,,,,,,,,,,,,,,,,,,, +"For updating, you can update only selective columns.",,,,,,,,,,,,,,,,,,,, +You can only upload upto 5000 records in one go. (may be less in some cases),,,,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,,,,, +DocType:,Profile,,,,,,,,,,,,,,,,,,, +Column Labels:,ID,Email,First Name,User Type,Enabled,Middle Name (Optional),Last Name,Language,Birth Date,Gender,New Password,User Image,Background Image,Bio,Email Signature,Login After,Login Before,Restrict IP,Last Login,Last IP +Column Name:,name,email,first_name,user_type,enabled,middle_name,last_name,language,birth_date,gender,new_password,user_image,background_image,bio,email_signature,login_after,login_before,restrict_ip,last_login,last_ip +Mandatory:,Yes,Yes,Yes,Yes,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No +Type:,Data (text),Data,Data,Select,Check,Data,Data,Select,Date,Select,Password,Select,Select,Small Text,Small Text,Int,Int,Data,Read Only,Read Only +Info:,,,,"One of: System User, Website User",0 or 1,,,"One of: العربية, Deutsch, english, español, français, हिंदी, Hrvatski, nederlands, português, português brasileiro, српски, தமிழ், ไทย",,"One of: Male, Female, Other",,One of: attach_files:,One of: attach_files:,,,Integer,Integer,,, +Start entering data below this line,,,,,,,,,,,,,,,,,,,, +,,DikmanShervashidze@armyspy.com,Dikman,System User,1,V,Shervashidze,,,,testpass,,,,,,,,, +,,Zukutakitoteka@teleworm.us,Zukutakitoteka,System User,1,,,,,,testpass,,,,,,,,, +,,HatsueKashiwagi@cuvox.de,Hatsue,System User,1,H,Kashiwagi,,,,testpass,,,,,,,,, +,,NuranVerkleij@einrot.com,Nuran,System User,1,T,Verkleij,,,,testpass,,,,,,,,, +,,aromn@armyspy.com,Дмитрий,System User,1,З,Пирогов,,,,testpass,,,,,,,,, +,,TildeLindqvist@cuvox.de,Tilde,System User,1,T,Lindqvist,,,,testpass,,,,,,,,, +,,MichalSobczak@teleworm.us,Michał,System User,1,S,Sobczak,,,,testpass,,,,,,,,, +,,GabrielleLoftus@superrito.com,Gabrielle,System User,1,J,Loftus,,,,testpass,,,,,,,,, +,,VakhitaRyzaev@teleworm.us,Vakhita,System User,1,A,Ryzaev,,,,testpass,,,,,,,,, +,,CharmaineGaudreau@cuvox.de,Charmaine,System User,1,D,Gaudreau,,,,testpass,,,,,,,,, +,,RafaelaMaartens@cuvox.de,Rafaëla,System User,1,Z,Maartens,,,,testpass,,,,,,,,, +,,NuguseYohannes@dayrep.com,Nuguse,System User,0,S,Yohannes,,,,testpass,,,,,,,,, +,,panca@armyspy.com,Раиса,System User,0,В,Белякова,,,,testpass,,,,,,,,, +,,CaYinLong@gustr.com,胤隆,System User,1,婷,蔡,,,,testpass,,,,,,,,, +,,FreddieScott@armyspy.com,Freddie,System User,1,A,Scott,,,,testpass,,,,,,,,, +,,BergoraVigfusdottir@superrito.com,Bergþóra,System User,1,Ö,Vigfúsdóttir,,,,testpass,,,,,,,,, +,,WardNajmalDinKalb@cuvox.de,Ward,System User,1,N,Kalb,,,,testpass,,,,,,,,, +,,WanMai@teleworm.us,Wan,System User,1,A,Mai,,,,testpass,,,,,,,,, +,,LeonAbdulov@superrito.com,Leon,System User,1,A,Abdulov,,,,testpass,,,,,,,,, +,,SabinaNovotna@superrito.com,Sabina,System User,1,J,Novotná,,,,testpass,,,,,,,,, diff --git a/utilities/demo/make_demo.py b/utilities/demo/make_demo.py index 046e81a421d..21da30b9787 100644 --- a/utilities/demo/make_demo.py +++ b/utilities/demo/make_demo.py @@ -30,17 +30,27 @@ prob = { } def make(reset=False, simulate=True): - #webnotes.print_messages = True - webnotes.mute_emails = True - webnotes.rollback_on_exception = True + #webnotes.flags.print_messages = True + webnotes.flags.mute_emails = True + webnotes.flags.rollback_on_exception = True + + if not webnotes.conf.demo_db_name: + raise Exception("conf.py does not have demo_db_name") if reset: setup() + else: + if webnotes.conn: + webnotes.conn.close() + + webnotes.connect(db_name=webnotes.conf.demo_db_name) + if simulate: _simulate() - + def setup(): install() + webnotes.connect(db_name=webnotes.conf.demo_db_name) complete_setup() make_customers_suppliers_contacts() make_items() @@ -65,7 +75,7 @@ def _simulate(): for i in xrange(runs_for): print current_date.strftime("%Y-%m-%d") - webnotes.utils.current_date = current_date + webnotes.local.current_date = current_date if current_date.weekday() in (5, 6): current_date = webnotes.utils.add_days(current_date, 1) @@ -138,20 +148,23 @@ def run_stock(current_date): # make purchase requests if can_make("Purchase Receipt"): from buying.doctype.purchase_order.purchase_order import make_purchase_receipt + from stock.stock_ledger import NegativeStockError report = "Purchase Order Items To Be Received" for po in list(set([r[0] for r in query_report.run(report)["result"] if r[0]!="Total"]))[:how_many("Purchase Receipt")]: pr = webnotes.bean(make_purchase_receipt(po)) pr.doc.posting_date = current_date pr.doc.fiscal_year = "2013" pr.insert() - pr.submit() - webnotes.conn.commit() + try: + pr.submit() + webnotes.conn.commit() + except NegativeStockError: pass # make delivery notes (if possible) if can_make("Delivery Note"): from selling.doctype.sales_order.sales_order import make_delivery_note from stock.stock_ledger import NegativeStockError - from stock.doctype.stock_ledger_entry.stock_ledger_entry import SerialNoRequiredError, SerialNoQtyError + from stock.doctype.serial_no.serial_no import SerialNoRequiredError, SerialNoQtyError report = "Ordered Items To Be Delivered" for so in list(set([r[0] for r in query_report.run(report)["result"] if r[0]!="Total"]))[:how_many("Delivery Note")]: dn = webnotes.bean(make_delivery_note(so)) @@ -357,13 +370,14 @@ def how_many(doctype): def install(): print "Creating Fresh Database..." from webnotes.install_lib.install import Installer - import conf + from webnotes import conf inst = Installer('root') - inst.import_from_db(conf.demo_db_name, verbose = 1) + inst.install(conf.demo_db_name, verbose=1, force=1) def complete_setup(): print "Complete Setup..." - webnotes.get_obj("Setup Control").setup_account({ + from setup.page.setup_wizard.setup_wizard import setup_account + setup_account({ "first_name": "Test", "last_name": "User", "fy_start": "1st Jan", @@ -412,7 +426,7 @@ def import_data(dt, submit=False, overwrite=False): for doctype in dt: print "Importing", doctype.replace("_", " "), "..." - webnotes.form_dict = webnotes._dict() + webnotes.local.form_dict = webnotes._dict() if submit: webnotes.form_dict["params"] = json.dumps({"_submit": 1}) webnotes.uploaded_file = os.path.join(os.path.dirname(__file__), "demo_docs", doctype+".csv") diff --git a/utilities/demo/make_erpnext_demo.py b/utilities/demo/make_erpnext_demo.py index 766da2612f2..cda38d690dc 100644 --- a/utilities/demo/make_erpnext_demo.py +++ b/utilities/demo/make_erpnext_demo.py @@ -5,17 +5,21 @@ if __name__=="__main__": import webnotes, os import utilities.demo.make_demo -def make_demo_app(): - webnotes.mute_emails = 1 - webnotes.connect() +def make_demo_app(site=None): + webnotes.init(site=site) + webnotes.flags.mute_emails = 1 + utilities.demo.make_demo.make(reset=True, simulate=False) # setup demo user etc so that the site it up faster, while the data loads make_demo_user() make_demo_login_page() make_demo_on_login_script() utilities.demo.make_demo.make(reset=False, simulate=True) + webnotes.destroy() def make_demo_user(): + from webnotes.auth import _update_password + roles = ["Accounts Manager", "Analytics", "Expense Approver", "Accounts User", "Leave Approver", "Blogger", "Customer", "Sales Manager", "Employee", "Support Manager", "HR Manager", "HR User", "Maintenance Manager", "Maintenance User", "Material Manager", @@ -42,11 +46,10 @@ def make_demo_user(): p.doc.last_name = "User" p.doc.enabled = 1 p.doc.user_type = "ERPNext Demo" - p.doc.send_invite_email = 0 - p.doc.new_password = "demo" p.insert() add_roles(p) p.save() + _update_password("demo@erpnext.com", "demo") # make system manager user if webnotes.conn.exists("Profile", "admin@erpnext.com"): @@ -58,12 +61,11 @@ def make_demo_user(): p.doc.last_name = "User" p.doc.enabled = 1 p.doc.user_type = "System User" - p.doc.send_invite_email = 0 - p.doc.new_password = "admin010123" p.insert() roles.append("System Manager") add_roles(p) p.save() + _update_password("admin@erpnext.com", "admin010123") # only read for newsletter webnotes.conn.sql("""update `tabDocPerm` set `write`=0, `create`=0, `cancel`=0 @@ -103,13 +105,12 @@ def make_demo_login_page(): webnotes.conn.commit() def make_demo_on_login_script(): - webnotes.conn.sql("""delete from `tabCustom Script` where dt='Control Panel'""") - s = webnotes.new_bean("Custom Script") - s.doc.dt = "Control Panel" - s.doc.script_type = "Server" - with open(os.path.join(os.path.dirname(__file__), "demo_control_panel.py"), "r") as dfile: - s.doc.script = dfile.read() - s.insert() + import shutil + from core.doctype.custom_script.custom_script import get_custom_server_script_path + custom_script_path = get_custom_server_script_path("Control Panel") + webnotes.create_folder(os.path.dirname(custom_script_path)) + + shutil.copyfile(os.path.join(os.path.dirname(__file__), "demo_control_panel.py"), custom_script_path) cp = webnotes.bean("Control Panel") cp.doc.custom_startup_code = """wn.ui.toolbar.show_banner('You are using ERPNext Demo. To start your own ERPNext Trial, click here')""" @@ -118,4 +119,6 @@ def make_demo_on_login_script(): webnotes.conn.commit() if __name__=="__main__": - make_demo_app() \ No newline at end of file + import sys + site = sys.argv[1:] + make_demo_app(site=site and site[0] or None) diff --git a/utilities/doctype/contact/contact.py b/utilities/doctype/contact/contact.py index 84c8a59de85..db233fb68de 100644 --- a/utilities/doctype/contact/contact.py +++ b/utilities/doctype/contact/contact.py @@ -12,14 +12,6 @@ class DocType(TransactionBase): self.doc = doc self.doclist = doclist - def on_communication(self, comm): - if webnotes.conn.get_value("Profile", extract_email_id(comm.sender), "user_type")=="System User": - status = "Replied" - else: - status = "Open" - - webnotes.conn.set(self.doc, 'status', status) - def autoname(self): # concat first and last name self.doc.name = " ".join(filter(None, @@ -32,28 +24,28 @@ class DocType(TransactionBase): break def validate(self): + self.set_status() self.validate_primary_contact() def validate_primary_contact(self): - sql = webnotes.conn.sql if self.doc.is_primary_contact == 1: if self.doc.customer: - sql("update tabContact set is_primary_contact=0 where customer = '%s'" % (self.doc.customer)) + webnotes.conn.sql("update tabContact set is_primary_contact=0 where customer = '%s'" % (self.doc.customer)) elif self.doc.supplier: - sql("update tabContact set is_primary_contact=0 where supplier = '%s'" % (self.doc.supplier)) + webnotes.conn.sql("update tabContact set is_primary_contact=0 where supplier = '%s'" % (self.doc.supplier)) elif self.doc.sales_partner: - sql("update tabContact set is_primary_contact=0 where sales_partner = '%s'" % (self.doc.sales_partner)) + webnotes.conn.sql("update tabContact set is_primary_contact=0 where sales_partner = '%s'" % (self.doc.sales_partner)) else: if self.doc.customer: - if not sql("select name from tabContact where is_primary_contact=1 and customer = '%s'" % (self.doc.customer)): + if not webnotes.conn.sql("select name from tabContact where is_primary_contact=1 and customer = '%s'" % (self.doc.customer)): self.doc.is_primary_contact = 1 elif self.doc.supplier: - if not sql("select name from tabContact where is_primary_contact=1 and supplier = '%s'" % (self.doc.supplier)): + if not webnotes.conn.sql("select name from tabContact where is_primary_contact=1 and supplier = '%s'" % (self.doc.supplier)): self.doc.is_primary_contact = 1 elif self.doc.sales_partner: - if not sql("select name from tabContact where is_primary_contact=1 and sales_partner = '%s'" % (self.doc.sales_partner)): + if not webnotes.conn.sql("select name from tabContact where is_primary_contact=1 and sales_partner = '%s'" % (self.doc.sales_partner)): self.doc.is_primary_contact = 1 def on_trash(self): webnotes.conn.sql("""update `tabSupport Ticket` set contact='' where contact=%s""", - self.doc.name) \ No newline at end of file + self.doc.name) diff --git a/utilities/doctype/contact/contact.txt b/utilities/doctype/contact/contact.txt index 92dcf2ef023..199aaea82ef 100644 --- a/utilities/doctype/contact/contact.txt +++ b/utilities/doctype/contact/contact.txt @@ -2,7 +2,7 @@ { "creation": "2013-01-10 16:34:32", "docstatus": 0, - "modified": "2013-09-10 10:50:27", + "modified": "2013-10-08 16:48:50", "modified_by": "Administrator", "owner": "Administrator" }, @@ -70,11 +70,12 @@ "fieldtype": "Column Break" }, { + "default": "Passive", "doctype": "DocField", "fieldname": "status", "fieldtype": "Select", "label": "Status", - "options": "\nOpen\nReplied" + "options": "Passive\nOpen\nReplied" }, { "doctype": "DocField", @@ -84,7 +85,7 @@ "label": "Email Id", "oldfieldname": "email_id", "oldfieldtype": "Data", - "reqd": 1, + "reqd": 0, "search_index": 1 }, { @@ -94,7 +95,7 @@ "label": "Phone", "oldfieldname": "contact_no", "oldfieldtype": "Data", - "reqd": 1 + "reqd": 0 }, { "doctype": "DocField", diff --git a/utilities/doctype/sms_control/sms_control.py b/utilities/doctype/sms_control/sms_control.py index 9c2319fcfb9..f183920afc4 100644 --- a/utilities/doctype/sms_control/sms_control.py +++ b/utilities/doctype/sms_control/sms_control.py @@ -10,8 +10,6 @@ from webnotes.model.doc import Document from webnotes import msgprint from webnotes.model.bean import getlist, copy_doclist -sql = webnotes.conn.sql - class DocType: def __init__(self, doc, doclist=[]): self.doc = doc @@ -50,7 +48,7 @@ class DocType: def get_contact_number(self, arg): "returns mobile number of the contact" args = load_json(arg) - number = sql("""select mobile_no, phone from tabContact where name=%s and %s=%s""" % + number = webnotes.conn.sql("""select mobile_no, phone from tabContact where name=%s and %s=%s""" % ('%s', args['key'], '%s'), (args['contact_name'], args['value'])) return number and (number[0][0] or number[0][1]) or '' @@ -119,4 +117,4 @@ class DocType: sl.message = arg['message'] sl.no_of_requested_sms = len(arg['receiver_list']) sl.no_of_sent_sms = sent_sms - sl.save(new=1) \ No newline at end of file + sl.save(new=1) diff --git a/utilities/repost_stock.py b/utilities/repost_stock.py index 536df81e8ba..8b6967548be 100644 --- a/utilities/repost_stock.py +++ b/utilities/repost_stock.py @@ -59,7 +59,7 @@ def get_reserved_qty(item_code, warehouse): from ( select qty, parent_detail_docname, parent, name - from `tabDelivery Note Packing Item` dnpi_in + from `tabPacked Item` dnpi_in where item_code = %s and warehouse = %s and parenttype="Sales Order" and item_code != parent_item