Bulk transaction move
Sébastien de Menten
sdementen at gmail.com
Wed Dec 24 06:49:26 EST 2014
Hello Thomas,
With the recently released piecash (python interface to gnucash), if your
gnucash file is in the sqlite format, you could do this with the following
script:
from piecash import open_book
with open_book("sample1.gnucash",readonly=False) as s:
misc_acc = s.accounts.get(name="Miscellaneous")
new_acc = s.accounts.get(name="Other account")
for spl in misc_acc.splits:
if spl.transaction.description = "some descrption":
spl.account = new_acc
s.save()
kr
Sebastien
On Tue, Dec 23, 2014 at 3:07 AM, Thomas Young <thomas at polywatt.com> wrote:
>
> Hello
>
> I have an account named Miscellaneous with about 1400 transactions and I
> would like to move about 600 of them to a different account. Is there any
> way of doing this in a bulk move instead of one by one? I have tried saving
> my Gnucash file as Sqlite3 and editing account name records with openoffice
> but the results have been essentially gibberish back in Gnucash. My
> attempts with exporting and importing CSV have not been much better since
> it seems CSV exporting does not include all data like memos for instance.
>
> Many thanks
> Thomas
> _______________________________________________
> gnucash-user mailing list
> gnucash-user at gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> -----
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.
>
More information about the gnucash-user
mailing list