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

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

Commit e5a5940f authored by Guillaume Risbourg's avatar Guillaume Risbourg Committed by Vincent A

transatplan: Change "compte titres" account ids

We were using the value of those accounts as id, but we can have
multiple accounts with the same value. This cause crash because of
having multiple accounts with the same id
parent 00c520b1
Pipeline #3728 passed with stages
in 64 minutes and 7 seconds
......@@ -31,7 +31,7 @@
CleanText, Regexp, CleanDecimal, Format, Currency, Date, Field,
Base,
)
from woob.browser.filters.html import TableCell, Link
from woob.browser.filters.html import TableCell, Link, Attr
from woob.exceptions import BrowserUnavailable, ActionNeeded
from woob.tools.capabilities.bank.investments import is_isin_valid
......@@ -140,12 +140,12 @@ class item(ItemElement):
def condition(self):
return not CleanText('.')(self).startswith('Total')
obj_id = Attr('./following-sibling::tr/td[1]/span', 'title')
obj_type = Account.TYPE_MARKET
obj_balance = CleanDecimal.French(TableCell('valuation'))
obj_currency = Currency(TableCell('valuation'))
obj_label = Format('%s %s', CleanText(TableCell('cat')), CleanText(TableCell('label')))
obj_valuation_diff = CleanDecimal.French(TableCell('diff'), default=NotAvailable)
obj_id = Regexp(CleanText(TableCell('label')), r'\((\w+)\)')
obj_number = obj_id
obj_label = Format('%s %s', CleanText(TableCell('cat')), CleanText(TableCell('label')))
......
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