Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
weboob
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
180
Issues
180
List
Boards
Labels
Milestones
Merge Requests
53
Merge Requests
53
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
weboob
weboob
Commits
add5dddb
Commit
add5dddb
authored
Oct 06, 2016
by
Edouard Lambert
Committed by
Romain Bignon
Jan 06, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixing apivie module : account types
parent
80e99e46
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
modules/apivie/pages.py
modules/apivie/pages.py
+7
-2
No files found.
modules/apivie/pages.py
View file @
add5dddb
...
...
@@ -24,6 +24,7 @@ from weboob.capabilities.bank import Account, Investment
from
weboob.deprecated.browser
import
Page
from
weboob.tools.capabilities.bank.transactions
import
FrenchTransaction
from
weboob.browser.filters.standard
import
Date
,
CleanText
from
weboob.browser.filters.html
import
Attr
class
LoginPage
(
Page
):
...
...
@@ -35,6 +36,10 @@ class LoginPage(Page):
class
AccountsPage
(
Page
):
TYPES
=
{
u'APIVIE'
:
Account
.
TYPE_LIFE_INSURANCE
,
u'PERP'
:
Account
.
TYPE_PERP
}
COL_LABEL
=
0
COL_OWNER
=
1
COL_ID
=
2
...
...
@@ -49,8 +54,8 @@ class AccountsPage(Page):
account
=
Account
()
account
.
id
=
self
.
parser
.
tocleanstring
(
tds
[
self
.
COL_ID
])
account
.
label
=
self
.
parser
.
tocleanstring
(
tds
[
self
.
COL_LABEL
])
# It's safe to assume that apivie does only life insurance
account
.
type
=
Account
.
TYPE_LIFE_INSURANCE
account
.
type
=
self
.
TYPES
.
get
(
Attr
(
'//a[contains(@class, "logo")]/img'
,
\
'alt'
)(
self
.
document
)
.
upper
(),
Account
.
TYPE_UNKNOWN
)
balance_str
=
self
.
parser
.
tocleanstring
(
tds
[
self
.
COL_AMOUNT
])
account
.
balance
=
Decimal
(
FrenchTransaction
.
clean_amount
(
balance_str
))
account
.
currency
=
account
.
get_currency
(
balance_str
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment