fix: update shipment status in database

Caught by semgrep rule:
https://github.com/frappe/erpnext/blob/develop/.github/helper/semgrep_rules/frappe_correctness.yml#L4
This commit is contained in:
Ankush Menat
2021-04-17 15:41:10 +05:30
parent 72e3a81878
commit 9229ee1745

View File

@@ -23,10 +23,10 @@ class Shipment(Document):
frappe.throw(_('Please enter Shipment Parcel information'))
if self.value_of_goods == 0:
frappe.throw(_('Value of goods cannot be 0'))
self.status = 'Submitted'
self.db_set('status', 'Submitted')
def on_cancel(self):
self.status = 'Cancelled'
self.db_set('status', 'Cancelled')
def validate_weight(self):
for parcel in self.shipment_parcel: