This commit is contained in:
Adrian Bernardi 2017-08-01 16:58:49 -03:00
parent 6a3d5bea4a
commit a82e026be4
4 changed files with 6 additions and 3 deletions

View file

@ -4,8 +4,8 @@
from trytond.pool import Pool
from .move import *
def register():
Pool.register(
Move,
module='stock_move_warehouse', type_='model')

View file

@ -15,5 +15,6 @@ class Move:
def get_warehouse(self, name):
if self.shipment and hasattr(self.shipment, 'warehouse'):
return self.shipment.warehouse.id if self.shipment.warehouse else None
return (self.shipment.warehouse.id if self.shipment.warehouse
else None)
return None

View file

@ -20,6 +20,7 @@ def read(fname):
os.path.join(os.path.dirname(__file__), fname),
'r', encoding='utf-8').read()
def get_require_version(name):
if minor_version % 2:
require = '%s >= %s.%s.dev0, < %s.%s'
@ -29,6 +30,7 @@ def get_require_version(name):
major_version, minor_version + 1)
return require
config = ConfigParser()
config.readfp(open('tryton.cfg'))
info = dict(config.items('tryton'))

View file

@ -15,4 +15,4 @@ def suite():
suite = trytond.tests.test_tryton.suite()
suite.addTests(unittest.TestLoader().loadTestsFromTestCase(
StockMoveWarehouseTestCase))
return suite
return suite