Community: Inventory and MRP mailing list archives
Re: Disabling location + Inactive location in stock analysisby
They are called business rules, and I think that they're very important to an ERP and it must be deployed with the core. Also, this constraint is not going to produce too much performance issues, as it's only evaluated on active=False.
On 08/05/2015 05:37 PM, Maxime Chambreuil wrote: > We will just fix them then and create a pull request. It is usually best to avoid hardcoding such constraints, they can make it very tedious to deactivate records when you have a good reason to do it. And they cannot be temporarily disabled. In most cases, users who deactivate master data records (Customers/Suppliers, Products, Locations, ...) know what they are doing. They also know that this action is not meant to hide all related documents/transactions. Only the record itself gets hidden from lists and auto-completions. And it is trivial to undo. This case is no exception to the rule, and follows the usual Odoo semantics. If one of your customer makes regular mistakes with this, why not write a 2-line automated action (base_action_rule module) that raises an error whenever the conditions are not meant. Then post that recipe here or on the forum? Olivier
Post to: mailto:firstname.lastname@example.org
Savoir-Faire Linux, Maxime Chambreuil