Use root prefix to retrieve the namespace of UBL document
Closes #14490
This commit is contained in:
1 parent
1623885d46
commit
91c5a087fb
1 file changed
+1
-1
@@ -200,7 +200,7 @@ class Invoice(Model):
|
||||
|
||||
tree = etree.parse(BytesIO(document))
|
||||
root = tree.getroot()
|
||||
namespace = root.nsmap.get(None)
|
||||
namespace = root.nsmap.get(root.prefix)
|
||||
invoice, attachments = cls.parser(namespace)(root)
|
||||
invoice.save()
|
||||
invoice.update_taxes()
|
||||
|
||||
Reference in new issue
Block a user