The new woob repository is here: https://gitlab.com/woob/woob. This gitlab will be removed soon.

Commit 1d109303 authored by Christophe François's avatar Christophe François Committed by Vincent A

[lcl] Fix unitvalue currency

All values are in the account's currency except for unitvalue which can
be in its original currency.
parent e594d05b
......@@ -1003,11 +1003,25 @@ def obj_code_type(self):
return Investment.CODE_TYPE_ISIN
return NotAvailable
def obj_original_currency(self):
# Only the unitvalue is in its original currency
currency = Currency('.//td[4]')(self)
if currency != Currency('.//td[5]')(self):
return currency
return NotAvailable
def obj_unitvalue(self):
if "%" in CleanText('.//td[4]')(self) and "%" in CleanText('.//td[6]')(self):
return NotAvailable
if Field('original_currency')(self):
return NotAvailable
return MyDecimal('.//td[4]/text()')(self)
def obj_original_unitvalue(self):
if Field('original_currency')(self):
return MyDecimal('.//td[4]/text()')(self)
return NotAvailable
def obj_unitprice(self):
if "%" in CleanText('.//td[4]')(self) and "%" in CleanText('.//td[6]')(self):
return NotAvailable
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment