[fix] status in purchase_receipt.py (#10534)

This commit is contained in:
Rushabh Mehta 2017-08-24 15:47:49 +05:30 committed by Makarand Bauskar
parent 7e506af0b9
commit 6b651d734e
3 changed files with 14 additions and 6 deletions

View File

@ -432,4 +432,5 @@ erpnext.patches.v8_5.update_customer_group_in_POS_profile
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.add_more_gst_fields
erpnext.patches.v8_7.fix_purchase_receipt_status

View 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'""")

View File

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