mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-03 04:09:11 +00:00
Merge branch 'responsive' of github.com:webnotes/erpnext into responsive
This commit is contained in:
@@ -119,4 +119,13 @@ class DocType(DocListController):
|
||||
def scrub_posting_time(self):
|
||||
if not self.doc.posting_time or self.doc.posting_time == '00:0':
|
||||
self.doc.posting_time = '00:00'
|
||||
|
||||
|
||||
def on_doctype_update(self):
|
||||
webnotes.msgprint(webnotes.conn.sql("""show index from `tabStock Ledger Entry`
|
||||
where Key_name="posting_sort_index" """))
|
||||
if not webnotes.conn.sql("""show index from `tabStock Ledger Entry`
|
||||
where Key_name="posting_sort_index" """):
|
||||
webnotes.conn.commit()
|
||||
webnotes.conn.sql("""alter table `tabStock Ledger Entry`
|
||||
add index posting_sort_index(posting_date, posting_time, name)""")
|
||||
webnotes.conn.begin()
|
||||
@@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-01-29 19:25:42",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-03-25 16:04:59",
|
||||
"modified": "2013-06-28 12:39:07",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
|
||||
@@ -45,9 +45,12 @@ class DocType(StockController):
|
||||
return
|
||||
|
||||
data = json.loads(self.doc.reconciliation_json)
|
||||
|
||||
# strip out extra columns (if any)
|
||||
data = [row[:4] for row in data]
|
||||
|
||||
if self.head_row not in data:
|
||||
msgprint(_("""Hey! You seem to be using the wrong template. \
|
||||
Click on 'Download Template' button to get the correct template."""),
|
||||
msgprint(_("""Wrong Template: Unable to find head row."""),
|
||||
raise_exception=1)
|
||||
|
||||
# remove the help part and save the json
|
||||
|
||||
@@ -42,7 +42,7 @@ class DocType:
|
||||
bin_wrapper.ignore_permissions = 1
|
||||
bin_wrapper.insert()
|
||||
|
||||
bin_obj = bin_wrapper.make_obj()
|
||||
bin_obj = bin_wrapper.make_controller()
|
||||
else:
|
||||
bin_obj = get_obj('Bin', bin)
|
||||
return bin_obj
|
||||
|
||||
Reference in New Issue
Block a user