Merge branch 'master' into stable

This commit is contained in:
Nabin Hait 2011-09-07 17:07:54 +05:30
commit be2e839f4c

View File

@ -443,8 +443,8 @@ class DocType(TransactionBase):
# ==========================================
def update_pack_nett_weight(self):
for d in getlist(self.doclist, 'delivery_note_details'):
if d.item_name:
item_wt = sql("select nett_weight from `tabItem` where item_name = %s", (d.item_name))
if d.item_code:
item_wt = sql("select nett_weight from `tabItem` where name = %s", (d.item_code))
d.pack_nett_wt = item_wt and flt(item_wt[0][0])*flt(d.qty) or 0
# ==========================================