Example #1
0
	def create_default_cost_center(self):
		from accounts.utils import add_cc
		cc_list = [
			{
				'cost_center_name':'Root',
				'company_name':self.doc.name,
				'group_or_ledger':'Group',
				'parent_cost_center':''
			}, 
			{
				'cost_center_name':'Default CC Ledger', 
				'company_name':self.doc.name,
				'group_or_ledger':'Ledger',
				'parent_cost_center':'Root - ' + self.doc.abbr
			},
			{
				'cost_center_name': 'Auto Inventory Accounting', 
				'company_name': self.doc.name,
				'group_or_ledger': 'Ledger',
				'parent_cost_center': 'Root - ' + self.doc.abbr
			}
		]
		for cc in cc_list:
			add_cc(cc)
			
		webnotes.conn.set_value("Company", self.doc.name, "cost_center",
			"Default CC Ledger - " + self.doc.abbr)
Example #2
0
    def create_default_cost_center(self):
        from accounts.utils import add_cc

        cc_list = [
            {
                "cost_center_name": "Root",
                "company_name": self.doc.name,
                "group_or_ledger": "Group",
                "parent_cost_center": "",
            },
            {
                "cost_center_name": "Default CC Ledger",
                "company_name": self.doc.name,
                "group_or_ledger": "Ledger",
                "parent_cost_center": "Root - " + self.doc.abbr,
            },
            {
                "cost_center_name": "Auto Inventory Accounting",
                "company_name": self.doc.name,
                "group_or_ledger": "Ledger",
                "parent_cost_center": "Root - " + self.doc.abbr,
            },
        ]
        for cc in cc_list:
            add_cc(cc)

        webnotes.conn.set_value("Company", self.doc.name, "cost_center", "Default CC Ledger - " + self.doc.abbr)
Example #3
0
	def create_default_cost_center(self):
		from accounts.utils import add_cc
		cc_list = [
			{
				'cost_center_name':'Root',
				'company_name':self.doc.name,
				'group_or_ledger':'Group',
				'parent_cost_center':''
			}, 
			{
				'cost_center_name':'Default CC Ledger', 
				'company_name':self.doc.name,
				'group_or_ledger':'Ledger',
				'parent_cost_center':'Root - ' + self.doc.abbr
			}
		]
		for cc in cc_list:
			add_cc(cc)