[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

@@ -245,6 +245,9 @@ class DocType:
for cc in cc_list:
add_cc(cc)
webnotes.conn.set_value("Company", self.doc.name, "cost_center",
"Default CC Ledger - " + self.doc.abbr)
def on_update(self):
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,
"modified": "2013-03-28 16:04:27",
"modified": "2013-04-17 14:07:46",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -141,6 +141,15 @@
"options": "Account",
"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",
"fieldname": "column_break0",