[fix] status in purchase_receipt.py (#10534)
This commit is contained in:
parent
7e506af0b9
commit
6b651d734e
@ -433,3 +433,4 @@ erpnext.patches.v8_6.update_timesheet_company_from_PO
|
||||
erpnext.patches.v8_6.set_write_permission_for_quotation_for_sales_manager
|
||||
erpnext.patches.v8_5.remove_project_type_property_setter
|
||||
erpnext.patches.v8_7.add_more_gst_fields
|
||||
erpnext.patches.v8_7.fix_purchase_receipt_status
|
12
erpnext/patches/v8_7/fix_purchase_receipt_status.py
Normal file
12
erpnext/patches/v8_7/fix_purchase_receipt_status.py
Normal file
@ -0,0 +1,12 @@
|
||||
import frappe
|
||||
|
||||
def execute():
|
||||
# there is no more status called "Submitted", there was an old issue that used
|
||||
# to set it as Submitted, fixed in this commit
|
||||
frappe.db.sql("""
|
||||
update
|
||||
`tabPurchase Receipt`
|
||||
set
|
||||
status = 'To Bill'
|
||||
where
|
||||
status = 'Submitted'""")
|
@ -115,9 +115,6 @@ class PurchaseReceipt(BuyingController):
|
||||
frappe.get_doc('Authorization Control').validate_approving_authority(self.doctype,
|
||||
self.company, self.base_grand_total)
|
||||
|
||||
# Set status as Submitted
|
||||
frappe.db.set(self, 'status', 'Submitted')
|
||||
|
||||
self.update_prevdoc_status()
|
||||
if self.per_billed < 100:
|
||||
self.update_billing_status()
|
||||
@ -152,8 +149,6 @@ class PurchaseReceipt(BuyingController):
|
||||
if submitted:
|
||||
frappe.throw(_("Purchase Invoice {0} is already submitted").format(submitted[0][0]))
|
||||
|
||||
frappe.db.set(self,'status','Cancelled')
|
||||
|
||||
self.update_prevdoc_status()
|
||||
self.update_billing_status()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user