mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-03 04:09:11 +00:00
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:
@@ -23,10 +23,10 @@ class Shipment(Document):
|
|||||||
frappe.throw(_('Please enter Shipment Parcel information'))
|
frappe.throw(_('Please enter Shipment Parcel information'))
|
||||||
if self.value_of_goods == 0:
|
if self.value_of_goods == 0:
|
||||||
frappe.throw(_('Value of goods cannot be 0'))
|
frappe.throw(_('Value of goods cannot be 0'))
|
||||||
self.status = 'Submitted'
|
self.db_set('status', 'Submitted')
|
||||||
|
|
||||||
def on_cancel(self):
|
def on_cancel(self):
|
||||||
self.status = 'Cancelled'
|
self.db_set('status', 'Cancelled')
|
||||||
|
|
||||||
def validate_weight(self):
|
def validate_weight(self):
|
||||||
for parcel in self.shipment_parcel:
|
for parcel in self.shipment_parcel:
|
||||||
|
|||||||
Reference in New Issue
Block a user