Commit f5b1eaa2 authored by Quentin Defenouillere's avatar Quentin Defenouillere Committed by Vincent A

[boursorama] Corrected savingmarketpage quantity & valuation

The valuation is obtained by multiplying the quantity with the
unitvalue. Since CleanDecimal was used with replace_dots=True whereas
the quantity is displayed in the SI format, all valuations were
multiplied by 1000.

Closes: 19858@zendesk
parent 47ddcaca
......@@ -48,7 +48,7 @@ from weboob.capabilities.base import NotAvailable, Currency, find_object, empty
from weboob.capabilities.profile import Person
from import FrenchTransaction
from import is_iban_valid
from import IsinCode
from import IsinCode, IsinType
from import Value
from import parse_french_date
from import urljoin, urlencode, urlparse, range
......@@ -891,9 +891,10 @@ class SavingMarketPage(MarketPage):
klass = Investment
obj_label = CleanText(TableCell('label'))
obj_code = CleanText(TableCell('code'))
obj_unitvalue = CleanDecimal(TableCell('unitvalue'), replace_dots=True)
obj_quantity = CleanDecimal(TableCell('quantity'), replace_dots=True)
obj_code = IsinCode(CleanText(TableCell('code')))
obj_code_type = IsinType(CleanText(TableCell('code')))
obj_unitvalue = CleanDecimal.French(TableCell('unitvalue'))
obj_quantity = CleanDecimal.SI(TableCell('quantity'))
obj_valuation = Eval(lambda x, y: x * y, Field('quantity'), Field('unitvalue'))
obj_vdate = Date(CleanText(TableCell('vdate')), dayfirst=True)
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