Merge branch 'responsive' of git://github.com/webnotes/erpnext into responsive

This commit is contained in:
Nabin Hait
2013-07-01 12:20:19 +05:30
41 changed files with 1031 additions and 706 deletions

View File

@@ -2,7 +2,7 @@
{
"creation": "2013-05-24 19:29:09",
"docstatus": 0,
"modified": "2013-06-05 19:22:52",
"modified": "2013-06-27 11:33:53",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -449,7 +449,7 @@
"doctype": "DocField",
"fieldname": "charge",
"fieldtype": "Link",
"label": "Taxes and Charges",
"label": "Apply Taxes and Charges Master",
"oldfieldname": "charge",
"oldfieldtype": "Link",
"options": "Sales Taxes and Charges Master",
@@ -463,10 +463,11 @@
},
{
"doctype": "DocField",
"fieldname": "get_charges",
"fieldtype": "Button",
"label": "Get Taxes and Charges",
"fieldname": "shipping_rule",
"fieldtype": "Link",
"label": "Apply Shipping Rule",
"oldfieldtype": "Button",
"options": "Shipping Rule",
"print_hide": 1,
"read_only": 0
},

View File

@@ -32,7 +32,7 @@ class DocType(DocListController):
from webnotes.model.doc import make_autoname
self.doc.item_code = make_autoname(self.doc.naming_series+'.#####')
elif not self.doc.item_code:
msgprint(_("Item Code is mandatory"), raise_exception=1)
msgprint(_("Item Code (item_code) is mandatory because Item naming is not sequential."), raise_exception=1)
self.doc.name = self.doc.item_code
@@ -290,4 +290,4 @@ class DocType(DocListController):
from stock.stock_ledger import update_entries_after
for wh in webnotes.conn.sql("""select warehouse from `tabBin`
where item_code=%s""", newdn):
update_entries_after({"item_code": newdn, "warehouse": wh})
update_entries_after({"item_code": newdn, "warehouse": wh})

View File

@@ -2,7 +2,7 @@
{
"creation": "2013-05-03 10:45:46",
"docstatus": 0,
"modified": "2013-06-13 16:17:42",
"modified": "2013-06-26 21:39:46",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -838,6 +838,7 @@
"read_only": 0
},
{
"depends_on": "show_in_website",
"doctype": "DocField",
"fieldname": "copy_from_item_group",
"fieldtype": "Button",

View File

@@ -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()

View File

@@ -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"
},

View File

@@ -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

View File

@@ -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