From 01bb298504c6da536aa1b012cf05c7a97490abbe Mon Sep 17 00:00:00 2001 From: Tomas Schlosser Date: Fri, 16 Mar 2018 14:25:46 +0100 Subject: [PATCH] Allow creation of prices in Python bindings Using the function gnc_price_create and book as a parameter, it is possible to create the new GncPrice object. This will remove the necessity of cloning the prices from existing ones in Python scripts. --- bindings/python/gnucash_core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bindings/python/gnucash_core.py b/bindings/python/gnucash_core.py index fe86958ae5..f69cac5765 100644 --- a/bindings/python/gnucash_core.py +++ b/bindings/python/gnucash_core.py @@ -356,7 +356,7 @@ class GncPrice(GnuCashCoreClass): See also http://code.gnucash.org/docs/head/group__Price.html ''' - pass + _new_instance = 'gnc_price_create' GncPrice.add_methods_with_prefix('gnc_price_')