Skip to content

Commit

Permalink
feat(E Invoice Import): suppress any errors from convenience feature
Browse files Browse the repository at this point in the history
  • Loading branch information
barredterra committed Oct 1, 2024
1 parent 6108afc commit 9391e3c
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,16 @@ def guess_uom(self):

def add_seller_product_ids_to_items(self):
for row in self.items:
row.add_seller_product_id_to_item(self.supplier)
try:
# This is a convenience feature. Failure to update the Item data
# should not prevent submission of the E Invoice Import.
row.add_seller_product_id_to_item(self.supplier)
except frappe.ValidationError:
frappe.log_error(
title="Failed to store Seller Product ID",
reference_doctype=self.doctype,
reference_name=self.name,
)


def get_xml_bytes(file: Path) -> bytes:
Expand Down

0 comments on commit 9391e3c

Please sign in to comment.