fix check of invoice, fix read of trade_country
This commit is contained in:
parent
7b0ca66b42
commit
0d31e60772
1 changed files with 4 additions and 2 deletions
|
@ -109,8 +109,9 @@ class Incoming(metaclass=PoolMeta):
|
|||
('taxbase', 'untaxed_amount'),
|
||||
('taxtotal', 'tax_amount'),
|
||||
('grand', 'total_amount')]:
|
||||
xml_val = totals.get('taxbase', Decimal('0.0'))
|
||||
xml_val = totals.get(xfield, Decimal('0.0'))
|
||||
inv_val = getattr(invoice, inv_field)
|
||||
|
||||
if xml_val != inv_val:
|
||||
raise UserError(gettext(
|
||||
'document_incoming_invoice_xml.msg_convert_error',
|
||||
|
@ -853,7 +854,8 @@ class Incoming(metaclass=PoolMeta):
|
|||
(['ram:OriginTradeCountry', 'ram:ID'], 'trade_country')
|
||||
]:
|
||||
result[key] = self._readxml_getvalue(xmldata, xpath_line + [
|
||||
'ram:SpecifiedTradeProduct', xkey])
|
||||
'ram:SpecifiedTradeProduct'] +
|
||||
(xkey if isinstance(xkey, list) else [xkey]))
|
||||
|
||||
# attributes of product
|
||||
result['attributes'] = self._readxml_read_listdata(
|
||||
|
|
Loading…
Reference in a new issue