2018-08-10 12:27:38 +02:00
|
|
|
# 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.model import fields
|
2019-08-30 14:41:40 +02:00
|
|
|
from trytond.pool import PoolMeta
|
2018-08-10 12:27:38 +02:00
|
|
|
|
|
|
|
__all__ = ['Configuration']
|
|
|
|
|
|
|
|
|
2018-08-17 23:18:31 +02:00
|
|
|
class Configuration(metaclass=PoolMeta):
|
2018-08-10 12:27:38 +02:00
|
|
|
__name__ = 'stock.configuration'
|
|
|
|
|
2019-08-30 14:41:40 +02:00
|
|
|
valued_origin = fields.Boolean('Use Valued origin',
|
|
|
|
help='If marked valued shipment take amount from origin, not '
|
|
|
|
'from the move')
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def __register__(cls, module_name):
|
|
|
|
table = cls.__table_handler__(module_name)
|
|
|
|
|
|
|
|
# Migration from 5.2: rename reference into valued_sale_line
|
|
|
|
if (table.column_exist('valued_sale_line')):
|
|
|
|
table.column_rename('valued_sale_line', 'valued_origin')
|
|
|
|
|
|
|
|
super(Configuration, cls).__register__(module_name)
|