frappe / books

Free Accounting Software
https://frappe.io/books
GNU Affero General Public License v3.0
2.68k stars 614 forks source link

add the option to turn off item account filtering #778

Open jkroso opened 7 months ago

jkroso commented 7 months ago

I'm not sure this is good accounting practice but I prefer to be able to record asset purchases the same way I record expenses.

mildred commented 7 months ago

Basically, you're adding a toggle to allow selecting any kind of account for an item. Would it be possible to have a behavior that would work for you without introducing a new toggle? What kind of account are you using that is today filtered out?

@18alantom what do you think?

jkroso commented 7 months ago

Well I'm trying to assign an item to my "tools" account which is a fixed asset account. So yeah I could just change the default filtering instead if you think that would work for everyone.

mildred commented 7 months ago

Perhaps a better option would be to keep the account filtering but let the user enter accounts outside of the filter if he really wants to.

jkroso commented 7 months ago

So add a button in the drop down to turn off filtering in a specific case rather than globally?

18alantom commented 7 months ago

@mildred I think since this is a change that can lead to undefined behavior (causing issues by confused users later on) it should be restricted in someway. Perhaps behind a feature flag.

The feature itself could be an option in the drop down that allows turning of filtering (such as what @jkroso suggested).

If not feature flag, the option could be made visible if the list is empty for a given query.

mildred commented 7 months ago

@18alantom so, do you think the global option introduced in this PR is the good way to do it or should it specifically be in the feature flag section of the options?

18alantom commented 7 months ago

@mildred I think, ideally the feature flag should be to enable optionally removing filters when entering Link field values (i.e. across all Link fields).

The feature flag in this PR completely switches it off for two fields. Disabling filters for a Link field seems like an infrequent requirement.

Also, there have been instances wherein users have needed filters across other fields to be removed. Introducing individual feature flags for each would unnecessarily populate the feature flag section.