2015-01-27 12:56:33 +01: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.
|
2014-10-14 12:20:29 +02:00
|
|
|
|
|
|
|
from trytond.pool import PoolMeta
|
|
|
|
|
2014-11-18 13:30:14 +01:00
|
|
|
__all__ = ['CostDistribution', 'DistributionRule']
|
2014-10-14 12:20:29 +02:00
|
|
|
|
|
|
|
__metaclass__ = PoolMeta
|
|
|
|
|
|
|
|
|
2014-11-18 13:30:14 +01:00
|
|
|
class DistributionRule:
|
|
|
|
|
|
|
|
__name__ = 'cost.manage.distribution.rule'
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def _get_cost_source(cls):
|
|
|
|
"""Return list of Model names for Cost source Reference"""
|
|
|
|
sources = super(DistributionRule, cls)._get_cost_source()
|
|
|
|
sources.append('production')
|
|
|
|
return sources
|
|
|
|
|
|
|
|
|
2014-10-14 12:20:29 +02:00
|
|
|
class CostDistribution:
|
|
|
|
|
|
|
|
__name__ = 'cost.manage.cost.distribution'
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def _get_cost_center(cls):
|
2014-11-18 13:30:14 +01:00
|
|
|
"""Return list of Model names for Cost center Reference"""
|
2014-11-07 23:03:29 +01:00
|
|
|
cost_centers = super(CostDistribution, cls)._get_cost_center()
|
|
|
|
cost_centers.append('production')
|
|
|
|
return cost_centers
|