trytond-production_cost_manage/cost_manage.py
Nicolás López 930dfd920e 247:
1. Revisión y cambio de reglas de distribución de coste.
2. Creación de columna stored_at para nursery.production
3. Refactorizaciones de de código diversas
2015-01-27 12:56:33 +01:00

32 lines
903 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 PoolMeta
__all__ = ['CostDistribution', 'DistributionRule']
__metaclass__ = PoolMeta
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
class CostDistribution:
__name__ = 'cost.manage.cost.distribution'
@classmethod
def _get_cost_center(cls):
"""Return list of Model names for Cost center Reference"""
cost_centers = super(CostDistribution, cls)._get_cost_center()
cost_centers.append('production')
return cost_centers