diff --git a/location.py b/location.py
index ecc232e2f9..443031b900 100644
--- a/location.py
+++ b/location.py
@@ -4,7 +4,8 @@ import datetime
import operator
from decimal import Decimal
-from trytond.model import (ModelView, ModelSQL, MatchMixin, ValueMixin, fields,
+from trytond.model import (
+ ModelView, ModelSQL, MatchMixin, ValueMixin, DeactivableMixin, fields,
sequence_ordered)
from trytond import backend
from trytond.pyson import Eval, If
@@ -22,14 +23,13 @@ STATES = {
DEPENDS = ['active']
-class Location(ModelSQL, ModelView):
+class Location(DeactivableMixin, ModelSQL, ModelView):
"Stock Location"
__name__ = 'stock.location'
name = fields.Char("Name", size=None, required=True, states=STATES,
depends=DEPENDS, translate=True)
code = fields.Char("Code", size=None, states=STATES, depends=DEPENDS,
select=True)
- active = fields.Boolean('Active', select=True)
address = fields.Many2One("party.address", "Address",
states={
'invisible': Eval('type') != 'warehouse',
@@ -259,10 +259,6 @@ class Location(ModelSQL, ModelView):
empty.discard(location.id)
return cls.browse(empty)
- @staticmethod
- def default_active():
- return True
-
@staticmethod
def default_left():
return 0
diff --git a/view/location_list.xml b/view/location_list.xml
index 47cb4168bd..881d3eff3d 100644
--- a/view/location_list.xml
+++ b/view/location_list.xml
@@ -5,5 +5,4 @@ this repository contains the full copyright notices and license terms. -->
-
diff --git a/view/product_tree_qty.xml b/view/product_tree_qty.xml
index fad3b54247..59e0822d33 100644
--- a/view/product_tree_qty.xml
+++ b/view/product_tree_qty.xml
@@ -8,5 +8,4 @@ this repository contains the full copyright notices and license terms. -->
-