Merge branch 'master' into slow

This commit is contained in:
Nabin Hait 2013-04-18 15:48:37 +05:30
commit 5b841d9180
9 changed files with 32 additions and 13 deletions

View File

@ -2,7 +2,7 @@
{ {
"creation": "2013-02-22 01:27:39", "creation": "2013-02-22 01:27:39",
"docstatus": 0, "docstatus": 0,
"modified": "2013-03-07 07:03:23", "modified": "2013-04-17 14:05:18",
"modified_by": "Administrator", "modified_by": "Administrator",
"owner": "Administrator" "owner": "Administrator"
}, },
@ -58,6 +58,7 @@
"options": "Company:company:default_currency" "options": "Company:company:default_currency"
}, },
{ {
"default": ":Company",
"doctype": "DocField", "doctype": "DocField",
"fieldname": "cost_center", "fieldname": "cost_center",
"fieldtype": "Link", "fieldtype": "Link",

View File

@ -1,8 +1,8 @@
[ [
{ {
"creation": "2013-03-07 11:42:55", "creation": "2013-04-10 08:35:38",
"docstatus": 0, "docstatus": 0,
"modified": "2013-03-29 13:44:37", "modified": "2013-04-17 14:05:20",
"modified_by": "Administrator", "modified_by": "Administrator",
"owner": "Administrator" "owner": "Administrator"
}, },
@ -170,6 +170,7 @@
"width": "120px" "width": "120px"
}, },
{ {
"default": ":Company",
"doctype": "DocField", "doctype": "DocField",
"fieldname": "cost_center", "fieldname": "cost_center",
"fieldtype": "Link", "fieldtype": "Link",

View File

@ -1,8 +1,8 @@
[ [
{ {
"creation": "2013-03-08 15:36:47", "creation": "2013-03-26 06:51:12",
"docstatus": 0, "docstatus": 0,
"modified": "2013-03-22 16:45:28", "modified": "2013-04-17 14:05:19",
"modified_by": "Administrator", "modified_by": "Administrator",
"owner": "Administrator" "owner": "Administrator"
}, },
@ -58,6 +58,7 @@
"reqd": 1 "reqd": 1
}, },
{ {
"default": ":Company",
"doctype": "DocField", "doctype": "DocField",
"fieldname": "cost_center", "fieldname": "cost_center",
"fieldtype": "Link", "fieldtype": "Link",

View File

@ -1,8 +1,8 @@
[ [
{ {
"creation": "2013-03-29 18:21:58", "creation": "2013-04-10 08:35:44",
"docstatus": 0, "docstatus": 0,
"modified": "2013-03-29 19:32:32", "modified": "2013-04-17 14:05:20",
"modified_by": "Administrator", "modified_by": "Administrator",
"owner": "Administrator" "owner": "Administrator"
}, },
@ -219,6 +219,7 @@
"width": "120px" "width": "120px"
}, },
{ {
"default": ":Company",
"doctype": "DocField", "doctype": "DocField",
"fieldname": "cost_center", "fieldname": "cost_center",
"fieldtype": "Link", "fieldtype": "Link",

View File

@ -2,7 +2,7 @@
{ {
"creation": "2013-02-22 01:27:41", "creation": "2013-02-22 01:27:41",
"docstatus": 0, "docstatus": 0,
"modified": "2013-03-07 07:03:31", "modified": "2013-04-17 14:05:18",
"modified_by": "Administrator", "modified_by": "Administrator",
"owner": "Administrator" "owner": "Administrator"
}, },
@ -48,6 +48,7 @@
"search_index": 1 "search_index": 1
}, },
{ {
"default": ":Company",
"doctype": "DocField", "doctype": "DocField",
"fieldname": "cost_center_other_charges", "fieldname": "cost_center_other_charges",
"fieldtype": "Link", "fieldtype": "Link",

View File

@ -245,6 +245,9 @@ class DocType:
for cc in cc_list: for cc in cc_list:
add_cc(cc) add_cc(cc)
webnotes.conn.set_value("Company", self.doc.name, "cost_center",
"Default CC Ledger - " + self.doc.abbr)
def on_update(self): def on_update(self):
self.set_letter_head() self.set_letter_head()

View File

@ -1,8 +1,8 @@
[ [
{ {
"creation": "2013-03-26 11:03:08", "creation": "2013-04-10 08:35:39",
"docstatus": 0, "docstatus": 0,
"modified": "2013-03-28 16:04:27", "modified": "2013-04-17 14:07:46",
"modified_by": "Administrator", "modified_by": "Administrator",
"owner": "Administrator" "owner": "Administrator"
}, },
@ -141,6 +141,15 @@
"options": "Account", "options": "Account",
"read_only": 0 "read_only": 0
}, },
{
"depends_on": "eval:!doc.__islocal",
"doctype": "DocField",
"fieldname": "cost_center",
"fieldtype": "Link",
"label": "Cost Center",
"no_copy": 1,
"options": "Cost Center"
},
{ {
"doctype": "DocField", "doctype": "DocField",
"fieldname": "column_break0", "fieldname": "column_break0",

View File

@ -36,7 +36,8 @@ def boot_session(bootinfo):
for key in ['max_users', 'expires_on', 'max_space', 'status', 'developer_mode']: for key in ['max_users', 'expires_on', 'max_space', 'status', 'developer_mode']:
if hasattr(conf, key): bootinfo[key] = getattr(conf, key) 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"}) as_dict=1, update={"doctype":":Company"})
def get_letter_heads(): def get_letter_heads():

View File

@ -1,8 +1,8 @@
[ [
{ {
"creation": "2013-03-26 11:03:09", "creation": "2013-04-01 10:49:21",
"docstatus": 0, "docstatus": 0,
"modified": "2013-04-17 17:20:45", "modified": "2013-04-17 17:20:58",
"modified_by": "Administrator", "modified_by": "Administrator",
"owner": "Administrator" "owner": "Administrator"
}, },
@ -257,6 +257,7 @@
"width": "120px" "width": "120px"
}, },
{ {
"default": ":Company",
"doctype": "DocField", "doctype": "DocField",
"fieldname": "cost_center", "fieldname": "cost_center",
"fieldtype": "Link", "fieldtype": "Link",