[cost center] [default value] default cost center for each company, auto set default cost center for various transactions during creation

This commit is contained in:
Anand Doshi
2013-04-17 18:02:52 +05:30
parent 58b8d6fdf3
commit 5717fe3aba
9 changed files with 32 additions and 13 deletions

View File

@@ -36,7 +36,8 @@ def boot_session(bootinfo):
for key in ['max_users', 'expires_on', 'max_space', 'status', 'developer_mode']:
if hasattr(conf, key): bootinfo[key] = getattr(conf, key)
bootinfo['docs'] += webnotes.conn.sql("select name, default_currency from `tabCompany`",
bootinfo['docs'] += webnotes.conn.sql("""select name, default_currency, cost_center,
cost_center as 'cost_center_other_charges' from `tabCompany`""",
as_dict=1, update={"doctype":":Company"})
def get_letter_heads():