Community: Inventory and MRP mailing list archives


Re: Disabling location + Inactive location in stock analysis

Savoir-Faire Linux, Maxime Chambreuil
- 08/05/2015 13:25:10

Please confirm that any PR to answer this scenario will be rejected and that I should create a module for that.

Maxime Chambreuil
+1 (514) 276-5468 #126

----- Le 5 Aoû 15, à 13:18, Pedro Manuel Baeza Romero <> a écrit :

Yeah, it's undoable, but it provokes side effects that are not desirable, because they are not easily traced: system inform incorrectly the stock because it ignores the stock placed on this deactivated location or one of its children, so I should consider this as dangerous, don't you think?


2015-08-05 19:12 GMT+02:00 Olivier Dony <>:
On 08/05/2015 06:57 PM, Pedro Manuel Baeza Romero wrote:
> Olivier, I tend to agree with you, but in this case, such constraint is a must
> for ensuring integrity.

How so? Deactivating a record never compromises the integrity and is very 
simple to undo.

> You already do this kind of things on core when you
> don't allow to remove a confirmed sale order or to change stock level on a
> template instead of a product variant, or a more importante one: do not allow
> to change the UoM on a product if it has any stock (although this one is still
> pending, because now it locks always, but not introducing this constraint has
> produced me a lot of headaches on 6.0 DBs).

Your examples are operations that cannot be easily undone like deleting stuff, 
or that have dangerous side-effects. It's not the case here.

In fact I don't remember any constraint anywhere in the core that prevents 
deactivation a record. Deleting is dangerous, deactivating is safe, that's the 

The only deactivation that cannot be easily undone is when the admin user 
deactivates itself, because the user is instantly blocked and cannot login 
again to undo it. And we don't even forbid it yet (It will be blocked in v9)


Post to:

Post to: