[minor] fixes for pos_profile in make-demo (#10289)
This commit is contained in:
parent
1065679720
commit
b985ad2a8e
@ -2,6 +2,7 @@ from __future__ import unicode_literals
|
|||||||
|
|
||||||
import random, json
|
import random, json
|
||||||
import frappe, erpnext
|
import frappe, erpnext
|
||||||
|
from frappe.utils.nestedset import get_root_of
|
||||||
from frappe.utils import flt, now_datetime, cstr, random_string
|
from frappe.utils import flt, now_datetime, cstr, random_string
|
||||||
from frappe.utils.make_random import add_random_children, get_random
|
from frappe.utils.make_random import add_random_children, get_random
|
||||||
from erpnext.demo.domains import data
|
from erpnext.demo.domains import data
|
||||||
@ -361,10 +362,13 @@ def setup_pos_profile():
|
|||||||
pos.update_stock = 0
|
pos.update_stock = 0
|
||||||
pos.write_off_account = 'Cost of Goods Sold - '+ company_abbr
|
pos.write_off_account = 'Cost of Goods Sold - '+ company_abbr
|
||||||
pos.write_off_cost_center = 'Main - '+ company_abbr
|
pos.write_off_cost_center = 'Main - '+ company_abbr
|
||||||
|
pos.customer_group = get_root_of('Customer Group')
|
||||||
|
pos.territory = get_root_of('Territory')
|
||||||
|
|
||||||
pos.append('payments', {
|
pos.append('payments', {
|
||||||
'mode_of_payment': frappe.db.get_value('Mode of Payment', {'type': 'Cash'}, 'name'),
|
'mode_of_payment': frappe.db.get_value('Mode of Payment', {'type': 'Cash'}, 'name'),
|
||||||
'amount': 0.0
|
'amount': 0.0,
|
||||||
|
'default': 1
|
||||||
})
|
})
|
||||||
|
|
||||||
pos.insert()
|
pos.insert()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user