Migrate to 4.0

This commit refs #1277
This commit is contained in:
Sergio Morillo 2016-08-22 12:13:53 +02:00
parent c0645566bc
commit 45f7ae10c3
2 changed files with 5 additions and 3 deletions

View file

@ -4,14 +4,13 @@ from trytond.model import ModelSQL, ModelView, fields, Model
from trytond.pool import PoolMeta
from trytond.pyson import Eval
__metaclass__ = PoolMeta
__all__ = ['Location', 'LocationDock', 'ShipmentOut',
'ShipmentOutReturn', 'ShipmentIn', 'DockMixin']
class Location:
__name__ = 'stock.location'
__metaclass__ = PoolMeta
docks = fields.One2Many('stock.location.dock', 'location', 'Docks',
states={'invisible': Eval('type') != 'warehouse'})
@ -62,13 +61,16 @@ class DockMixin(Model):
class ShipmentOut(DockMixin):
__name__ = 'stock.shipment.out'
__metaclass__ = PoolMeta
class ShipmentOutReturn(DockMixin):
__name__ = 'stock.shipment.out.return'
__metaclass__ = PoolMeta
class ShipmentIn(DockMixin):
__name__ = 'stock.shipment.in'
__metaclass__ = PoolMeta

View file

@ -56,7 +56,7 @@ Create product::
>>> product = Product()
>>> template = ProductTemplate()
>>> template.name = 'Product'
>>> template.category = category
>>> template.categories.append(category)
>>> template.default_uom = unit
>>> template.type = 'goods'
>>> template.list_price = Decimal('20')