Upgrade to 3.2 version and increase version number

This commit is contained in:
Sergi Almacellas Abellana 2014-06-04 13:20:14 +02:00
parent 68797ab25f
commit 5f8c05b246
3 changed files with 8 additions and 22 deletions

View File

@ -10,8 +10,9 @@ class Location(ModelSQL, ModelView):
__name__ = 'stock.location'
warehouse = fields.Function(fields.Many2One('stock.location', 'Warehouse',
on_change_with=['parent'],
states={'invisible': Not(In(Eval('type'), ['storage', 'view']))},
states={
'invisible': Not(In(Eval('type'), ['storage', 'view']))
},
depends=['type']),
'get_warehouse', searcher='search_warehouse')
@ -23,6 +24,7 @@ class Location(ModelSQL, ModelView):
'The Storage location must be unique.'),
]
@fields.depends('parent')
def on_change_with_warehouse(self, name=None):
if (not self.id or self.type not in ('storage', 'view') or
not self.parent):

View File

@ -1,35 +1,22 @@
#The COPYRIGHT file at the top level of this repository contains the full
#copyright notices and license terms.
import sys
import os
DIR = os.path.abspath(os.path.normpath(os.path.join(__file__,
'..', '..', '..', '..', '..', 'trytond')))
if os.path.isdir(DIR):
sys.path.insert(0, os.path.dirname(DIR))
import unittest
import trytond.tests.test_tryton
from trytond.tests.test_tryton import test_view, test_depends
class StockLocationWarehouseTestCase(unittest.TestCase):
'''
Test stock_location_warehouse module.
'''
'Test stock_location_warehouse module'
def setUp(self):
trytond.tests.test_tryton.install_module('stock_location_warehouse')
def test0005views(self):
'''
Test views.
'''
'Test views'
test_view('stock_location_warehouse')
def test0006depends(self):
'''
Test depends.
'''
'Test depends'
test_depends()
@ -38,6 +25,3 @@ def suite():
suite.addTests(unittest.TestLoader().loadTestsFromTestCase(
StockLocationWarehouseTestCase))
return suite
if __name__ == '__main__':
unittest.TextTestRunner(verbosity=2).run(suite())

View File

@ -1,5 +1,5 @@
[tryton]
version=3.0.0
version=3.2.0
depends:
ir
stock