Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- c = book.CustomerLookupByID(data['invoice']['invoicedata']['customerid'])
- assert( isinstance(c, Customer) )
- CUR = c.GetCurrency()
- assert( isinstance(CUR, GncCommodity) )
- invoice = Invoice(
- book=book,
- id=next_invoice_id(book=book, format=data['invoice']['invoicedata']['format_inv oiceid']),
- currency=CUR,
- owner=c
- )
- """
- PROBLEM:
- this piece of code produces:
- * 19:41:21 CRIT <gnc.backend.sql> gnc_sql_save_commodity: assertion `pCommodity != NULL' failed
- * 19:41:21 WARN <gnc.backend.sql> [add_gvalue_owner_to_slist()] Invalid owner type: 0
- both c and CUR are not None.
- CUR is identical to book.get_table().lookup('CURRENCY', 'EUR').
- c is a valid customer created with the normal gnucash GUI (.GetName() etc. are correct).
- Any ideas?
- """
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement