Files
tryton/product.py
T
Cédric Krier 1434b65663 Change supply_period into Integer
Since version 3.8, Property field can support Integer.

issue5574
review18171002
2016-06-14 17:17:07 +02:00

18 lines
506 B
Python

# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
from trytond.pool import Pool, PoolMeta
__all__ = ['Product']
class Product:
__metaclass__ = PoolMeta
__name__ = 'product.product'
def get_supply_period(self):
'Return the supply period for the product'
pool = Pool()
Configuration = pool.get('production.configuration')
return Configuration(1).supply_period or 0