Skip to content

Commit

Permalink
fix:pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
sonali8848 committed May 12, 2023
1 parent 19e8fb5 commit b54393e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
3 changes: 0 additions & 3 deletions ecommerce_integrations/unicommerce/invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -606,8 +606,6 @@ def on_submit(self, method=None):
)
else:
frappe.db.set_value("Pick List Sales Order Details", pl.name, {"sales_invoice": self.name})




def on_cancel(self, method=None):
Expand All @@ -616,4 +614,3 @@ def on_cancel(self, method=None):
)
if results:
self.flags.ignore_links = True

10 changes: 6 additions & 4 deletions ecommerce_integrations/unicommerce/pick_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import frappe
from frappe import _


def validate(self, method=None):
if self.get("locations"):
for pl in self.get("locations"):
Expand All @@ -12,7 +13,11 @@ def validate(self, method=None):

frappe.throw(_("Row {0} Picked Qty cannot be more than Sales Order Qty").format(pl.idx))
if pl.picked_qty == 0 and pl.docstatus == 1:
frappe.throw(_("You have not picked {0} in row {1} . Pick the item to proceed!").format(pl.item_code,pl.idx))
frappe.throw(
_("You have not picked {0} in row {1} . Pick the item to proceed!").format(
pl.item_code, pl.idx
)
)
item_so_list = [d.sales_order for d in self.get("locations")]
unique_so_list = []
for i in item_so_list:
Expand Down Expand Up @@ -45,6 +50,3 @@ def validate(self, method=None):
for x in self.get("order_details"):
if x.sales_order == so:
x.pick_status = "Partially Picked"



0 comments on commit b54393e

Please sign in to comment.