Add recompute cost price method for FIFO

issue4729
review15221002
This commit is contained in:
Cédric Krier
2015-06-15 00:58:43 +02:00
parent a69926956b
commit 98b1880495
2 changed files with 9 additions and 1 deletions
+1
View File
@@ -8,5 +8,6 @@ from .move import *
def register():
Pool.register(
Template,
Product,
Move,
module='product_cost_fifo', type_='model')
+8 -1
View File
@@ -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()