Merge branch 'responsive' of github.com:webnotes/erpnext into responsive

Conflicts:
	utilities/doctype/address/address.txt
This commit is contained in:
Anand Doshi 2013-07-02 11:43:54 +05:30
commit 2023012b0e
32 changed files with 210 additions and 121 deletions

View File

@ -82,7 +82,7 @@ cur_frm.cscript.account_type = function(doc, cdt, cdn) {
// -----------------------------------------
cur_frm.cscript.add_toolbar_buttons = function(doc) {
cur_frm.add_custom_button('Chart of Accounts',
function() { wn.set_route("Accounts Browser", "Account"); }, 'icon-list')
function() { wn.set_route("Accounts Browser", "Account"); }, 'icon-sitemap')
if (cstr(doc.group_or_ledger) == 'Group') {
cur_frm.add_custom_button('Convert to Ledger',
@ -92,7 +92,12 @@ cur_frm.cscript.add_toolbar_buttons = function(doc) {
function() { cur_frm.cscript.convert_to_group(); }, 'icon-retweet')
cur_frm.add_custom_button('View Ledger', function() {
wn.set_route("general-ledger", "account=" + doc.name);
wn.route_options = {
"account": doc.name,
"from_date": sys_defaults.year_start_date,
"to_date": sys_defaults.year_end_date
};
wn.set_route("general-ledger");
});
}
}

View File

@ -28,6 +28,9 @@ 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',
function() { wn.set_route("Accounts Browser", "Cost Center"); }, 'icon-sitemap')
}
//Account filtering for cost center

View File

@ -23,7 +23,14 @@ 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', cur_frm.cscript.view_ledger_entry);
cur_frm.add_custom_button('View Ledger', function() {
wn.route_options = {
"voucher_no": doc.name,
"from_date": doc.posting_date,
"to_date": doc.posting_date,
};
wn.set_route("general-ledger");
});
}
}
@ -49,8 +56,6 @@ cur_frm.cscript.is_opening = function(doc, cdt, cdn) {
if (doc.is_opening == 'Yes') unhide_field('aging_date');
}
//Set debit and credit to zero on adding new row
//----------------------------------------------
cur_frm.fields_dict['entries'].grid.onrowadd = function(doc, cdt, cdn){
var d = locals[cdt][cdn];
if(d.idx == 1){
@ -59,9 +64,6 @@ cur_frm.fields_dict['entries'].grid.onrowadd = function(doc, cdt, cdn){
}
}
// Get Outstanding of Payable & Sales Invoice
// -----------------------------------------------
cur_frm.cscript.against_voucher = function(doc,cdt,cdn) {
var d = locals[cdt][cdn];
if (d.against_voucher && !flt(d.debit)) {
@ -131,18 +133,24 @@ cur_frm.cscript.select_print_heading = function(doc,cdt,cdn){
cur_frm.pformat.print_heading = "Journal Voucher";
}
cur_frm.cscript.view_ledger_entry = function(doc,cdt,cdn){
wn.set_route('Report', 'GL Entry', 'General Ledger', 'Voucher No='+cur_frm.doc.name);
}
cur_frm.cscript.voucher_type = function(doc, cdt, cdn) {
cur_frm.set_df_property("cheque_no", "reqd", doc.voucher_type=="Bank Voucher");
cur_frm.set_df_property("cheque_date", "reqd", doc.voucher_type=="Bank Voucher");
if(wn.model.get("Journal Voucher Detail", {"parent":doc.name}).length!==0 // too late
|| !doc.company) // too early
return;
if(in_list(["Bank Voucher", "Cash Voucher"], doc.voucher_type)
&& doc.company
&& wn.model.get("Journal Voucher Detail", {"parent":doc.name}).length==0) {
var update_jv_details = function(doc, r) {
$.each(r.message, function(i, d) {
var jvdetail = wn.model.add_child(doc, "Journal Voucher Detail", "entries");
jvdetail.account = d.account;
jvdetail.balance = d.balance;
});
refresh_field("entries");
}
if(in_list(["Bank Voucher", "Cash Voucher"], doc.voucher_type)) {
wn.call({
type: "GET",
method: "accounts.doctype.journal_voucher.journal_voucher.get_default_bank_cash_account",
@ -152,14 +160,26 @@ cur_frm.cscript.voucher_type = function(doc, cdt, cdn) {
},
callback: function(r) {
if(r.message) {
var jvdetail = wn.model.add_child(doc, "Journal Voucher Detail", "entries");
jvdetail.account = r.message.account;
// this is a data field????
jvdetail.balance = format_currency(r.message.balance);
refresh_field("entries");
update_jv_details(doc, r);
}
}
})
} else if(doc.voucher_type=="Opening Entry") {
wn.call({
type:"GET",
method: "accounts.doctype.journal_voucher.journal_voucher.get_opening_accounts",
args: {
"company": doc.company
},
callback: function(r) {
wn.model.clear_table("Journal Voucher Detail", "Journal Voucher",
doc.name, "entries");
if(r.message) {
update_jv_details(doc, r);
}
cur_frm.set_value("is_opening", "Yes")
}
})
}
}

View File

@ -352,11 +352,20 @@ def get_default_bank_cash_account(company, voucher_type):
account = webnotes.conn.get_value("Company", company,
voucher_type=="Bank Voucher" and "default_bank_account" or "default_cash_account")
if account:
return {
return [{
"account": account,
"balance": get_balance_on(account)
}
}]
@webnotes.whitelist()
def get_opening_accounts(company):
"""get all balance sheet accounts for opening entry"""
from accounts.utils import get_balance_on
accounts = webnotes.conn.sql_list("""select name from tabAccount
where group_or_ledger='Ledger' and is_pl_account='No' and company=%s""", company)
return [{"account": a, "balance": get_balance_on(a)} for a in accounts]
def get_against_purchase_invoice(doctype, txt, searchfield, start, page_len, filters):
return webnotes.conn.sql("""select name, credit_to, outstanding_amount, bill_no, bill_date
from `tabPurchase Invoice` where credit_to = %s and docstatus = 1

View File

@ -2,7 +2,7 @@
{
"creation": "2013-03-25 10:53:52",
"docstatus": 0,
"modified": "2013-06-11 16:04:20",
"modified": "2013-06-28 14:27:11",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -68,7 +68,7 @@
"label": "Voucher Type",
"oldfieldname": "voucher_type",
"oldfieldtype": "Select",
"options": "\nJournal Entry\nBank Voucher\nCash Voucher\nCredit Card Voucher\nDebit Note\nCredit Note\nContra Voucher\nExcise Voucher\nWrite Off Voucher",
"options": "\nJournal Entry\nBank Voucher\nCash Voucher\nCredit Card Voucher\nDebit Note\nCredit Note\nContra Voucher\nExcise Voucher\nWrite Off Voucher\nOpening Entry",
"print_hide": 0,
"read_only": 0,
"search_index": 1

View File

@ -2,7 +2,7 @@
{
"creation": "2013-02-22 01:27:39",
"docstatus": 0,
"modified": "2013-04-17 14:05:18",
"modified": "2013-07-01 13:53:33",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -74,11 +74,12 @@
{
"doctype": "DocField",
"fieldname": "balance",
"fieldtype": "Data",
"fieldtype": "Currency",
"label": "Account Balance",
"no_copy": 1,
"oldfieldname": "balance",
"oldfieldtype": "Data",
"options": "Company:company:default_currency",
"read_only": 1
},
{

View File

@ -42,7 +42,14 @@ erpnext.accounts.PurchaseInvoiceController = erpnext.buying.BuyingController.ext
this.frm.add_custom_button('Make Payment Entry', this.make_bank_voucher);
if(doc.docstatus==1) {
this.frm.add_custom_button('View Ledger', this.view_ledger_entry);
cur_frm.add_custom_button('View Ledger', function() {
wn.route_options = {
"voucher_no": doc.name,
"from_date": doc.posting_date,
"to_date": doc.posting_date,
};
wn.set_route("general-ledger");
});
}
this.is_opening(doc);
@ -226,8 +233,4 @@ cur_frm.cscript.select_print_heading = function(doc,cdt,cdn){
}
else
cur_frm.pformat.print_heading = "Purchase Invoice";
}
cur_frm.cscript.view_ledger_entry = function(){
wn.set_route('Report', 'GL Entry', 'General Ledger', 'Voucher No='+cur_frm.doc.name);
}
}

View File

@ -45,7 +45,15 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
cur_frm.cscript.is_opening(doc, dt, dn);
if(doc.docstatus==1) {
cur_frm.add_custom_button('View Ledger', cur_frm.cscript.view_ledger_entry);
cur_frm.add_custom_button('View Ledger', function() {
wn.route_options = {
"voucher_no": doc.name,
"from_date": doc.posting_date,
"to_date": doc.posting_date,
};
wn.set_route("general-ledger");
});
cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms);
if(doc.is_pos==1 && doc.update_stock!=1)
@ -381,11 +389,6 @@ cur_frm.cscript.make_jv = function(doc, dt, dn, bank_account) {
}
/****************** Get Accounting Entry *****************/
cur_frm.cscript.view_ledger_entry = function(){
wn.set_route('Report', 'GL Entry', 'General Ledger', 'Voucher No='+cur_frm.doc.name);
}
cur_frm.cscript.on_submit = function(doc, cdt, cdn) {
if(cint(wn.boot.notification_settings.sales_invoice)) {
cur_frm.email_doc(wn.boot.notification_settings.sales_invoice_message);

View File

@ -3,6 +3,7 @@
wn.module_page["Accounts"] = [
{
top: true,
title: wn._("Documents"),
icon: "icon-copy",
items: [

View File

@ -22,10 +22,7 @@ wn.pages['general-ledger'].onload = function(wrapper) {
});
erpnext.general_ledger = new erpnext.GeneralLedger(wrapper);
wrapper.appframe.add_home_breadcrumb()
wrapper.appframe.add_module_icon("Accounts")
wrapper.appframe.add_breadcrumb("icon-bar-chart")
}
@ -110,7 +107,7 @@ erpnext.GeneralLedger = wn.views.GridReport.extend({
// filter accounts options by company
this.filter_inputs.company.change(function() {
me.setup_account_filter(this);
me.set_route()
me.refresh()
});
this.filter_inputs.account.change(function() {
@ -220,13 +217,15 @@ erpnext.GeneralLedger = wn.views.GridReport.extend({
}
}
if(date < from_date || item.is_opening=="Yes") {
if(!me.voucher_no && (date < from_date || item.is_opening=="Yes")) {
opening.debit += item.debit;
opening.credit += item.credit;
grouped_ledgers[item.account].opening.debit += item.debit;
grouped_ledgers[item.account].opening.credit += item.credit;
} else if(date <= to_date) {
totals.debit += item.debit;
totals.credit += item.credit;
@ -242,7 +241,7 @@ erpnext.GeneralLedger = wn.views.GridReport.extend({
+ item.voucher_no][(item.debit > 0 ? "credits" : "debits")].join(", ");
}
if(me.apply_filters(item) && item.is_opening=="No") {
if(me.apply_filters(item) && (me.voucher_no || item.is_opening=="No")) {
out.push(item);
grouped_ledgers[item.account].entries.push(item);

View File

@ -9,11 +9,11 @@ wn.pages['voucher-import-tool'].onload = function(wrapper) {
<p class="help">Import multiple accounting entries via CSV (spreadsheet) file:</p>\
<h3>1. Download Template</h3><br>\
<div style="padding-left: 30px;">\
<button class="btn btn-download-two-accounts">Download</button>\
<button class="btn btn-default btn-download-two-accounts">Download</button>\
<p class="help">Import multiple vouchers with one debit and one credit entry</p>\
</div>\
<div style="padding-left: 30px;">\
<button class="btn btn-download-multiple-accounts">Download</button>\
<button class="btn btn-default btn-download-multiple-accounts">Download</button>\
<p class="help">Import multiple vouchers with multiple accounts</p>\
</div>\
<hr>\

View File

@ -4,6 +4,7 @@
wn.module_page["Buying"] = [
{
title: wn._("Documents"),
top: true,
icon: "icon-copy",
items: [
{

View File

@ -51,6 +51,9 @@ def get_item_details(args):
out.supplier_part_no = _get_supplier_part_no(args, item_bean)
if not out.warehouse:
out.warehouse = item_bean.doc.default_warehouse
if out.warehouse:
out.projected_qty = get_projected_qty(item.name, out.warehouse)

View File

@ -3,9 +3,15 @@
wn.module_page["HR"] = [
{
title: wn._("Documents"),
title: wn._("Top"),
top: true,
icon: "icon-copy",
items: [
{
label: wn._("Employee"),
description: wn._("Employee records."),
doctype:"Employee"
},
{
label: wn._("Leave Application"),
description: wn._("Applications for leave."),
@ -16,6 +22,17 @@ wn.module_page["HR"] = [
description: wn._("Claims for company expense."),
doctype:"Expense Claim"
},
{
label: wn._("Job Applicant"),
description: wn._("Applicant for a Job."),
doctype:"Job Applicant"
},
]
},
{
title: wn._("Documents"),
icon: "icon-copy",
items: [
{
label: wn._("Attendance"),
description: wn._("Attendance record."),
@ -31,22 +48,6 @@ wn.module_page["HR"] = [
description: wn._("Performance appraisal."),
doctype:"Appraisal"
},
{
label: wn._("Job Applicant"),
description: wn._("Applicant for a Job."),
doctype:"Job Applicant"
},
]
},
{
title: wn._("Masters"),
icon: "icon-book",
items: [
{
label: wn._("Employee"),
description: wn._("Employee records."),
doctype:"Employee"
},
]
},
{

View File

@ -4,8 +4,14 @@
wn.module_page["Manufacturing"] = [
{
title: wn._("Documents"),
top: true,
icon: "icon-copy",
items: [
{
label: wn._("Bill of Materials"),
description: wn._("Bill of Materials (BOM)"),
doctype:"BOM"
},
{
label: wn._("Production Order"),
description: wn._("Orders released for production."),
@ -29,11 +35,6 @@ wn.module_page["Manufacturing"] = [
title: wn._("Masters"),
icon: "icon-book",
items: [
{
label: wn._("Bill of Materials"),
description: wn._("Bill of Materials (BOM)"),
doctype:"BOM"
},
{
label: wn._("Item"),
description: wn._("All Products or Services."),

Binary file not shown.

View File

@ -3,8 +3,9 @@
wn.module_page["Projects"] = [
{
title: wn._("Documents"),
title: wn._("Top"),
icon: "icon-copy",
top: true,
items: [
{
label: wn._("Task"),
@ -21,6 +22,12 @@ wn.module_page["Projects"] = [
description: wn._("Time Log for tasks."),
doctype:"Time Log"
},
]
},
{
title: wn._("Documents"),
icon: "icon-copy",
items: [
{
label: wn._("Time Log Batch"),
description: wn._("Batch Time Logs for billing."),

View File

@ -20,13 +20,12 @@ erpnext.stock.StockController = wn.ui.form.Controller.extend({
show_stock_ledger: function() {
var me = this;
this.frm.add_custom_button("Show Stock Ledger", function() {
var args = {
voucher_no: cur_frm.doc.name,
from_date: wn.datetime.str_to_user(cur_frm.doc.posting_date),
to_date: wn.datetime.str_to_user(cur_frm.doc.posting_date)
};
wn.set_route('stock-ledger',
$.map(args, function(val, key) { return key+"="+val; }).join("&&"));
wn.route_options = {
voucher_no: me.frm.doc.name,
from_date: cur_frm.doc.posting_date,
to_date: cur_frm.doc.posting_date
};
wn.set_route('stock-ledger');
}, "icon-bar-chart");
}
});

View File

@ -3,6 +3,7 @@
wn.module_page["Selling"] = [
{
top: true,
title: wn._("Documents"),
icon: "icon-copy",
items: [

View File

@ -201,8 +201,8 @@ class DocType:
for a in accounts:
account_name = accounts[a] + " - " + self.doc.abbr
if not self.doc.fields[a] and webnotes.conn.exists("Account", account_name):
webnotes.conn.set(self.doc, account_name)
if not self.doc.fields.get(a) and webnotes.conn.exists("Account", account_name):
webnotes.conn.set(self.doc, a, account_name)
if not self.doc.stock_adjustment_cost_center:
webnotes.conn.set(self.doc, "stock_adjustment_cost_center", self.doc.cost_center)

View File

@ -61,13 +61,20 @@ class DocType:
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'))
# Fiscal Year
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([{
@ -198,13 +205,15 @@ class DocType:
# Get Fiscal year Details
# ------------------------
def get_fy_details(self, fy_start):
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'}
curr_year = getdate(nowdate()).year
if last_year:
curr_year = curr_year - 1
if cint(getdate(nowdate()).month) < cint((st[fy_start].split('-'))[0]):
curr_year = getdate(nowdate()).year - 1
stdt = cstr(curr_year)+'-'+cstr(st[fy_start])
#eddt = sql("select DATE_FORMAT(DATE_SUB(DATE_ADD('%s', INTERVAL 1 YEAR), INTERVAL 1 DAY),'%%d-%%m-%%Y')" % (stdt.split('-')[2]+ '-' + stdt.split('-')[1] + '-' + stdt.split('-')[0]))
if(fy_start == '1st Jan'):
fy = cstr(getdate(nowdate()).year)
abbr = cstr(fy)[-2:]

View File

@ -91,6 +91,19 @@ items = [
},
{ "doctype": "Sales Taxes and Charges Master" },
{ "doctype": "Purchase Taxes and Charges Master" },
{
"type": "Section",
"title": "Opening Accounts and Stock",
"icon": "icon-eye-open"
},
{ "doctype": "Stock Reconciliation" },
{
"doctype": "Journal Voucher",
"title": "Opening Accounting Entries",
"filter": {
"is_opening": "Yes"
}
},
{
"type": "Section",
"title": "Human Resource",
@ -148,19 +161,6 @@ items = [
{
"doctype": "Email Digest",
},
{
"type": "Section",
"title": "Opening Accounts and Stock",
"icon": "icon-eye-open"
},
{ "doctype": "Stock Reconciliation" },
{
"doctype": "Journal Voucher",
"title": "Opening Accounting Entries",
"filter": {
"is_opening": "Yes"
}
},
{
"type": "Section",
"title": "Customization",
@ -244,8 +244,8 @@ def set_count(item):
elif "filter" in item:
key = item["filter"].keys()[0]
item["count"] = webnotes.conn.sql("""select count(*) from `tab%s` where
%s = %s""" % (item["doctype"], key, "%s"),
%s = %s and docstatus < 2""" % (item["doctype"], key, "%s"),
item["filter"][key])[0][0]
elif "doctype" in item:
item["count"] = webnotes.conn.sql("select count(*) from `tab%s`" \
item["count"] = webnotes.conn.sql("select count(*) from `tab%s` where docstatus<2" \
% item["doctype"])[0][0]

View File

@ -25,6 +25,7 @@ from webnotes import msgprint, _
from webnotes.model.controller import DocListController
class PriceListCurrencyMismatch(Exception): pass
class WarehouseNotSet(Exception): pass
class DocType(DocListController):
def autoname(self):
@ -39,7 +40,8 @@ class DocType(DocListController):
def validate(self):
if not self.doc.stock_uom:
msgprint(_("Please enter Default Unit of Measure"), raise_exception=1)
self.check_warehouse_is_set_for_stock_item()
self.check_stock_uom_with_bin()
self.validate_conversion_factor()
self.add_default_uom_in_conversion_factor_table()
@ -60,6 +62,11 @@ class DocType(DocListController):
self.validate_name_with_item_group()
self.update_website()
def check_warehouse_is_set_for_stock_item(self):
if self.doc.is_stock_item=="Yes" and not self.doc.default_warehouse:
webnotes.msgprint(_("Default Warehouse is mandatory for Stock Item."),
raise_exception=WarehouseNotSet)
def add_default_uom_in_conversion_factor_table(self):
uom_conv_list = [d.uom for d in self.doclist.get({"parentfield": "uom_conversion_details"})]
if self.doc.stock_uom not in uom_conv_list:

View File

@ -2,7 +2,7 @@
{
"creation": "2013-05-03 10:45:46",
"docstatus": 0,
"modified": "2013-06-26 21:39:46",
"modified": "2013-07-01 11:45:59",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -205,11 +205,11 @@
},
{
"depends_on": "eval:doc.is_stock_item==\"Yes\"",
"description": "Mandatory if Stock Item is \"Yes\"",
"description": "Mandatory if Stock Item is \"Yes\". Also the default warehouse where reserved quantity is set from Sales Order.",
"doctype": "DocField",
"fieldname": "default_warehouse",
"fieldtype": "Link",
"label": "Default Reserved Warehouse",
"label": "Default Warehouse",
"oldfieldname": "default_warehouse",
"oldfieldtype": "Link",
"options": "Warehouse",

View File

@ -35,6 +35,13 @@ class TestItem(unittest.TestCase):
item_price = item.doclist.get({"doctype": "Item Price"})[0].ref_currency="USD"
self.assertRaises(PriceListCurrencyMismatch, item.insert)
def test_default_warehouse(self):
from stock.doctype.item.item import WarehouseNotSet
item = webnotes.bean(copy=test_records[0])
item.doc.is_stock_item = "Yes"
item.doc.default_warehouse = None
self.assertRaises(WarehouseNotSet, item.insert)
test_records = [
[{
@ -77,6 +84,7 @@ test_records = [
"item_name": "_Test Item Home Desktop 100",
"description": "_Test Item Home Desktop 100",
"item_group": "_Test Item Group Desktops",
"default_warehouse": "_Test Warehouse",
"is_stock_item": "Yes",
"is_asset_item": "No",
"has_batch_no": "No",
@ -101,6 +109,7 @@ test_records = [
"item_name": "_Test Item Home Desktop 200",
"description": "_Test Item Home Desktop 200",
"item_group": "_Test Item Group Desktops",
"default_warehouse": "_Test Warehouse",
"is_stock_item": "Yes",
"is_asset_item": "No",
"has_batch_no": "No",
@ -140,6 +149,7 @@ test_records = [
"description": "_Test FG Item",
"item_group": "_Test Item Group Desktops",
"is_stock_item": "Yes",
"default_warehouse": "_Test Warehouse",
"is_asset_item": "No",
"has_batch_no": "No",
"has_serial_no": "No",
@ -178,6 +188,7 @@ test_records = [
"description": "_Test Serialized Item",
"item_group": "_Test Item Group Desktops",
"is_stock_item": "Yes",
"default_warehouse": "_Test Warehouse",
"is_asset_item": "No",
"has_batch_no": "No",
"has_serial_no": "Yes",

View File

@ -48,8 +48,6 @@ erpnext.stock.StockReconciliation = erpnext.stock.StockController.extend({
return {
"query": "accounts.utils.get_account_list",
"filters": {
"is_pl_account": "Yes",
"debit_or_credit": "Debit",
"company": me.frm.doc.company
}
}

View File

@ -4,6 +4,7 @@
wn.module_page["Stock"] = [
{
title: wn._("Documents"),
top: true,
icon: "icon-copy",
items: [
{

View File

@ -22,10 +22,7 @@ wn.pages['stock-ledger'].onload = function(wrapper) {
});
new erpnext.StockLedger(wrapper);
wrapper.appframe.add_home_breadcrumb()
wrapper.appframe.add_module_icon("Stock")
wrapper.appframe.add_breadcrumb("icon-bar-chart")
}
wn.require("app/js/stock_grid_report.js");

View File

@ -3,7 +3,8 @@
wn.module_page["Support"] = [
{
title: wn._("Documents"),
title: wn._("Top"),
top: true,
icon: "icon-copy",
items: [
{
@ -16,6 +17,13 @@ wn.module_page["Support"] = [
description: wn._("Customer Issue against Serial No."),
doctype:"Customer Issue"
},
]
},
{
title: wn._("Documents"),
icon: "icon-copy",
items: [
{
label: wn._("Maintenance Schedule"),
description: wn._("Plan for maintenance visits."),

View File

@ -27,13 +27,13 @@ class DocType:
def autoname(self):
if not self.doc.address_title:
self.doc.address_title = self.doc.customer or self.doc.supplier or self.doc.sales_partner or self.doc.lead
self.doc.address_title = self.doc.customer \
or self.doc.supplier or self.doc.sales_partner or self.doc.lead
if self.doc.address_title:
self.doc.name = cstr(self.doc.address_title).strip() + "-" + cstr(self.doc.address_type).strip()
else:
webnotes.msgprint("""Address Title is mandatory.""", raise_exception=True)
webnotes.msgprint("""Address Title is mandatory.""" + self.doc.customer, raise_exception=True)
def validate(self):
self.validate_primary_address()
@ -85,4 +85,4 @@ def get_website_args():
}),
"cint": cint
}

View File

@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:32",
"docstatus": 0,
"modified": "2013-07-01 17:24:17",
"modified": "2013-07-01 17:25:00",
"modified_by": "Administrator",
"owner": "Administrator"
},

View File

@ -5,6 +5,7 @@ wn.module_page["Website"] = [
{
title: wn._("Web Content"),
icon: "icon-copy",
top: true,
items: [
{
label: wn._("Web Page"),
@ -12,20 +13,20 @@ wn.module_page["Website"] = [
doctype:"Web Page"
},
{
label: wn._("Website Slideshow"),
description: wn._("Embed image slideshows in website pages."),
doctype:"Website Slideshow"
label: wn._("Blog Post"),
description: wn._("Single Post (article)."),
doctype:"Blog Post"
},
]
},
{
title: wn._("Blog"),
title: wn._("Documents"),
icon: "icon-edit",
items: [
{
label: wn._("Blog Post"),
description: wn._("Single Post (article)."),
doctype:"Blog Post"
label: wn._("Website Slideshow"),
description: wn._("Embed image slideshows in website pages."),
doctype:"Website Slideshow"
},
{
label: wn._("Blogger"),