Merge branch 'develop' of https://github.com/frappe/erpnext into so-on-hold

This commit is contained in:
Mangesh-Khairnar
2019-04-09 12:13:45 +05:30
140 changed files with 7457 additions and 5521 deletions

View File

@@ -538,6 +538,8 @@ class BuyingController(StockController):
update_last_purchase_rate(self, is_submit = 1)
def on_cancel(self):
super(BuyingController, self).on_cancel()
if self.get('is_return'):
return
@@ -736,7 +738,7 @@ def get_subcontracted_raw_materials_from_se(purchase_orders):
sed.stock_uom, sed.subcontracted_item as main_item_code, sed.serial_no, sed.batch_no
from `tabStock Entry` se,`tabStock Entry Detail` sed
where
se.name = sed.parent and se.docstatus=1 and se.purpose='Subcontract'
se.name = sed.parent and se.docstatus=1 and se.purpose='Send to Subcontractor'
and se.purchase_order in (%s) and ifnull(sed.t_warehouse, '') != ''
group by sed.item_code, sed.t_warehouse
""" % (','.join(['%s'] * len(purchase_orders))), tuple(purchase_orders), as_dict=1)