Fixed following the suggestions by Tony Kerns.
In addition the function names have been made more consistent -
they all end with a ! now as they change data.
Note these functions aren't used anywhere in the gnucash
code, but may affect custom reports by some users.
This is a workaround for MacOS X 10.11's System Integrity Protection,
aka SIP, which among other things prevents system binaries from passing
linker environment variables to children. Anything in /bin or /usr/bin
qualifies as a system binary, and that includes /bin/sh and /bin/bash.
Not being able to pass linker paths breaks all of our guile tests which
need to tell Guile where to look for the libraries being tested.
To apply the workaround one needs to first have a shell outside of /bin
and /usr/bin. Simply copying /bin/sh to your home direcory works, as
does building a suitable shell somewhere. Just pass the path to that
shell in $CONFIG_SHELL to configure and all of the shell scripts and
libtool .la files will be created with it in the shebang line and the
linker environment variables will be passed in.
In order to build GnuCash in the first place you'll also need to edit
guild to use the alternate shell.
Prevent editing the terms from the invoice view. This has to be edited
via the edit invoice button or menu Edit->Edit Invoice. The dropdown
in the invoice view has been replaced with an edit text box set to
non-editable in the glade file.
Improved fix: mark session dirty in qof_commit_edit_part2
instead of delegating this to the backends. This way
a session is also properly marked dirty (and hence the
save button enabled) when no backend is chosen yet
(that is, when in a new file that's never saved yet).
For the xml backend this means there's nothing to do anymore
at commit time, so the xml_commit_edit callback is removed.
Current workaround is to force-use a default backend on new sessions.
This works pretty well as the backend to use is retested when a file
is opened anyway, dropping the default backend. The default backend
should be able to handle the case where no real file/db is specified yet.
I think so far only the xml backend can do this, so I have chosen that one
as default.
For this to work I also had to prevent the python integration from querying
the current root account at startup. This query does create a root account
if it doesn't exist yet in the new session, triggering a dirty state. As
a result gnucash would ask to save the new session right before loading the
real file/db (the one that was open in the previous gnucash session).
This will probably still happen when python is initialized with the 'noisy'
flag (which is when --debug is set).
Due to the changes done for bug 682800 the row balances for the account report
no longer matched the row balances of the original register. This commit
should fix that for a consistent experience.
When the code was refactored in 61973a8 the return value from the new
function gnc_transaction_get_commodity_imbalance was ignored. This had
the effect of using an uninitialized variable to set the value in a new
trading account split that is not for the transaction's currency. That
means that multicommodity transactions created with this bug and trading
accounts on will not be balanced.