Merge pull request #4401 from nabinhait/pr-for-non-stock-items
[fix] Show 'Make Purchase Receipt' button in PO even if all items are non-stock items
This commit is contained in:
commit
e7bb6544f5
@ -60,7 +60,7 @@ erpnext.buying.PurchaseOrderController = erpnext.buying.BuyingController.extend(
|
||||
}
|
||||
|
||||
if(doc.docstatus == 1 && !in_list(["Stopped", "Closed"], doc.status)) {
|
||||
if(flt(doc.per_received, 2) < 100 && this.frm.doc.__onload.has_stock_item && allow_receipt) {
|
||||
if(flt(doc.per_received, 2) < 100 && allow_receipt) {
|
||||
cur_frm.add_custom_button(__('Receive'), this.make_purchase_receipt).addClass("btn-primary");
|
||||
|
||||
if(doc.is_subcontracted==="Yes") {
|
||||
|
@ -33,9 +33,6 @@ class PurchaseOrder(BuyingController):
|
||||
'overflow_type': 'order'
|
||||
}]
|
||||
|
||||
def onload(self):
|
||||
self.set_onload("has_stock_item", len(self.get_stock_items()) > 0)
|
||||
|
||||
def validate(self):
|
||||
super(PurchaseOrder, self).validate()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user