account-analytic
account-analytic copied to clipboard
[14.0][ADD] purchase_analytic_required
Replaces #449
@sanrav @OCA/accounting-maintainers
@sbidoul As discussed, it's maybe better to do a constrains() and an ir.config.parameter to activate the behaviour.
I generally think that modules that change a standard behaviour should have a config settings to activate the change. Otherwise we have all sorts of issues in tests with incompatible modules, etc.
Adding a required field without default value is such a change. Making the change in the view keeps compatibility - now we may not need an OCA module just to make a field required in a view.
Related thought: we may want to make the analytic account required only when confirming the PO? (I don't know your use cases though, so let's not overengineer things).
I generally think that modules that change a standard behaviour should have a config settings to activate the change. Otherwise we have all sorts of issues in tests with incompatible modules, etc.
I agree with you but in this case, it's the name of the module and it does nothing else. IMO doing all this adaptation only because we could have issue in tests is not a good idea. We can execute it in a specific job. Adding a module to enable his only feature via a configuration seems very strange.
There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.