Community: Inventory and MRP mailing list archives

Re: Disabling location + Inactive location in stock analysis

Olivier Dony (odo)
- 08/05/2015 12:42:46
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?