[webshop] shopping cart settings, update price list, taxes and shipping rule on change of address, apply defaults on creation of fresh quotation

This commit is contained in:
Anand Doshi
2013-07-04 17:13:53 +05:30
parent 259e0b978c
commit 99100a4135
40 changed files with 1225 additions and 474 deletions

View File

@@ -39,8 +39,8 @@ def get_ancestors_of(doctype, name):
"""Get ancestor elements of a DocType with a tree structure"""
lft, rgt = webnotes.conn.get_value(doctype, name, ["lft", "rgt"])
result = webnotes.conn.sql_list("""select name from `tab%s`
where lft<%s and rgt>%s""" % (doctype, "%s", "%s"), (lft, rgt))
return result or None
where lft<%s and rgt>%s order by lft desc""" % (doctype, "%s", "%s"), (lft, rgt))
return result or []
@webnotes.whitelist()
def get_price_list_currency(args):