account-analytic icon indicating copy to clipboard operation
account-analytic copied to clipboard

[14.0][ADD] purchase_analytic_required

Open rousseldenis opened this issue 3 years ago • 4 comments

Replaces #449

rousseldenis avatar Sep 28 '22 13:09 rousseldenis

@sanrav @OCA/accounting-maintainers

rousseldenis avatar Sep 28 '22 13:09 rousseldenis

@sbidoul As discussed, it's maybe better to do a constrains() and an ir.config.parameter to activate the behaviour.

rousseldenis avatar Sep 29 '22 06:09 rousseldenis

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).

sbidoul avatar Sep 29 '22 08:09 sbidoul

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.

acsonefho avatar Sep 29 '22 08:09 acsonefho

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.

github-actions[bot] avatar Jan 29 '23 12:01 github-actions[bot]