Bug 329876

Summary: Weboob import from paypal ignores dates and creates account "0"
Product: [Applications] skrooge Reporter: dterrahe
Component: generalAssignee: Stephane MANKOWSKI <stephane>
Status: RESOLVED FIXED    
Severity: normal CC: stephane
Priority: NOR    
Version: 1.8.0   
Target Milestone: ---   
Platform: Debian unstable   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description dterrahe 2014-01-12 14:10:40 UTC
I'm not sure if this is specific to the paypal backend, but that is the only one I have an account for.

The backend is set up in weboob and is working correctly there. When I run "boobank history 0 -f csv" from the command line, I get:

id;date;rdate;vdate;type;raw;category;label;amount
2BD050916Y111831W@paypal;2014-01-05 00:00:00;2014-01-05 00:00:00;Not loaded;2;Payment To Zavvi.com;Not loaded;Zavvi.com;-3.02
39B40256MU139305U@paypal;2014-01-05 00:00:00;2014-01-05 00:00:00;Not loaded;7;Transfer From Credit Card;Not loaded;Credit Card;3.02
O-6AE79487XR542740C@paypal;2014-01-05 00:00:00;2014-01-05 00:00:00;Not loaded;0;Order To Zavvi.com;Not loaded;Zavvi.com;-3.02
3VS15332SB629973B@paypal;2013-12-30 00:00:00;2013-12-30 00:00:00;Not loaded;0;Purchase From WWW.Steampowered.com;Not loaded;WWW.Steampowered.com;-0.39
99572831T2547251G@paypal;2013-12-30 00:00:00;2013-12-30 00:00:00;Not loaded;7;Transfer From Credit Card;Not loaded;Credit Card;0.39

However, in the Skrooge Operations View I see:
Date;;;Account;Number;Mode;Payee;Comment;Category;;Amount;Expenditure;Income;Amount entered;Expenditure entered;Income entered;;Tracker;Balance;Balance entered;To account
Today;;;0;;Direct debit;Zavvi.com;Payment To Zavvi.com;;;GBP -3.02;GBP -3.02;;GBP -3.02;GBP -3.02;;;;GBP 1.00;GBP 1.00;
Today;;;0;;Card;Credit Card;Transfer From Credit Card;;;GBP 3.02;;GBP 3.02;GBP 3.02;;GBP 3.02;;;GBP 4.02;GBP 4.02;
Today;;;0;;;Zavvi.com;Order To Zavvi.com;;;GBP -3.02;GBP -3.02;;GBP -3.02;GBP -3.02;;;;GBP 1.00;GBP 1.00;
Today;;;0;;;WWW.Steampowered.com;Purchase From WWW.Steampowered.com;;;GBP -0.39;GBP -0.39;;GBP -0.39;GBP -0.39;;;;GBP 0.61;GBP 0.61;
Today;;;0;;Card;Credit Card;Transfer From Credit Card;;;GBP 0.39;;GBP 0.39;GBP 0.39;;GBP 0.39;;;GBP 1.00;GBP 1.00;

So the date gets dropped and all transaction are dated as "Today". It seems that Skrooge gets confused by the extra time part of the date field (i.e. 00:00:00). I don't know if this is backend specific and if the problem was only recently introduced, because I'm trying this for the first time now.

The version of weboob I'm using under Debian unstable is marked as 0.9-1 and the paypal module is up to date.

Separately, the account is loaded as "0". I was wondering if it is possible to use the email address as the account id, as that is really what paypal does. I do not understand enough about the interaction between skrooge and weboob/boobank to see if that would be possible at all.
Comment 1 Stephane MANKOWSKI 2014-01-13 21:07:41 UTC
Git commit ec5284be7b95298675129fca313abfbdb594f119 by Stephane Mankowski.
Committed on 13/01/2014 at 21:07.
Pushed by smankowski into branch 'master'.
Weboob import from paypal ignores dates and creates account "0"

M  +1    -0    CHANGELOG
M  +25   -17   skgbasemodeler/skgservices.cpp
A  +16   -0    tests/input/skgtestimportbackend/329876/boobank
M  +8    -2    tests/skgbasemodelertest/skgtestbase.cpp

http://commits.kde.org/skrooge/ec5284be7b95298675129fca313abfbdb594f119
Comment 2 dterrahe 2014-01-20 09:35:54 UTC
Confirmed fixed after compiling from git.

As always, thanks a lot responding so quickly.

I have changed the account number to 0. Which is good enough as long as I only have one paypal account and one account that works with weboob. Of course now I should really try to get some of my other accounts working with weboob too...