diff --git a/__init__.py b/__init__.py index 1c98c7ae68..06b209fe2b 100644 --- a/__init__.py +++ b/__init__.py @@ -8,5 +8,6 @@ from .move import * def register(): Pool.register( Template, + Product, Move, module='product_cost_fifo', type_='model') diff --git a/product.py b/product.py index 5d6b68093e..b2f15ad852 100644 --- a/product.py +++ b/product.py @@ -4,7 +4,7 @@ import datetime from trytond.transaction import Transaction from trytond.pool import Pool, PoolMeta -__all__ = ['Template'] +__all__ = ['Template', 'Product'] __metaclass__ = PoolMeta @@ -72,3 +72,10 @@ class Template: fifo_moves.reverse() return fifo_moves + + +class Product: + __name__ = 'product.product' + + def recompute_cost_price_fifo(self): + return self.recompute_cost_price_average()