Skip to content

Commit c5f8737

Browse files
committed
Merge PR #961 into 15.0
Signed-off-by pedrobaeza
2 parents d3191d5 + f4fbe18 commit c5f8737

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

edi_voxel_sale_order_import_oca/models/sale_order.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,12 @@ def _parse_voxel_order(self, order_file, order_filename, error_msgs, company):
8181
else:
8282
raise UserError(_("'%s' is not recognised as an XML file") % order_filename)
8383
_logger.debug("Starting to import:%s" % (order_filename))
84-
return self._parse_xml_order(xml_root, error_msgs, company)
84+
try:
85+
return self._parse_xml_order(xml_root, error_msgs, company)
86+
except Exception as exc:
87+
raise UserError(
88+
_("Error creating the order") + f"\n\nFile contents:\n{order_file}"
89+
) from exc
8590

8691
def _parse_xml_order(self, xml_root, error_msgs, company):
8792
vals = {"company_id": company.id}

0 commit comments

Comments
 (0)