[tryton-debian-vcs] tryton-modules-product-cost-fifo branch upstream updated. upstream/3.6.0-1-gc2d34e5
Mathias Behrle
tryton-debian-vcs at alioth.debian.org
Wed Nov 11 11:25:30 UTC 2015
The following commit has been merged in the upstream branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-modules-product-cost-fifo.git;a=commitdiff;h=upstream/3.6.0-1-gc2d34e5
commit c2d34e55b69015cd64bddc6e6120c533c4f722ff
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Wed Nov 11 12:11:13 2015 +0100
Adding upstream version 3.8.0.
Signed-off-by: Mathias Behrle <mathiasb at m9s.biz>
diff --git a/CHANGELOG b/CHANGELOG
index 7458b7e..ebd31c1 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 3.8.0 - 2015-11-02
+* Bug fixes (see mercurial logs for details)
+
Version 3.6.0 - 2015-04-20
* Bug fixes (see mercurial logs for details)
* Add support for PyPy
diff --git a/PKG-INFO b/PKG-INFO
index 8998fe5..aae21a3 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,12 +1,12 @@
Metadata-Version: 1.1
Name: trytond_product_cost_fifo
-Version: 3.6.0
+Version: 3.8.0
Summary: Tryton module to add FIFO cost method
Home-page: http://www.tryton.org/
Author: Tryton
Author-email: issue_tracker at tryton.org
License: GPL-3
-Download-URL: http://downloads.tryton.org/3.6/
+Download-URL: http://downloads.tryton.org/3.8/
Description: trytond_product_cost_fifo
=========================
@@ -60,6 +60,9 @@ Classifier: Natural Language :: Dutch
Classifier: Natural Language :: English
Classifier: Natural Language :: French
Classifier: Natural Language :: German
+Classifier: Natural Language :: Hungarian
+Classifier: Natural Language :: Italian
+Classifier: Natural Language :: Portuguese (Brazilian)
Classifier: Natural Language :: Russian
Classifier: Natural Language :: Slovenian
Classifier: Natural Language :: Spanish
diff --git a/__init__.py b/__init__.py
index 1c98c7a..06b209f 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/locale/es_MX.po b/locale/es_MX.po
new file mode 100644
index 0000000..d3d0bb1
--- /dev/null
+++ b/locale/es_MX.po
@@ -0,0 +1,21 @@
+#
+msgid ""
+msgstr "Content-Type: text/plain; charset=utf-8\n"
+
+msgctxt "error:stock.move:"
+msgid "FIFO quantity can not be greater than quantity."
+msgstr "Cantidad PEPS (FIFO) no puede ser mayor que cantidad."
+
+msgctxt "error:stock.move:"
+msgid "You can not delete move \"%s\" that is used for FIFO cost price."
+msgstr ""
+"No puede eliminar el movimiento \"%s\" que está siendo usado por el precio "
+"de costo PEPS (FIFO)."
+
+msgctxt "field:stock.move,fifo_quantity:"
+msgid "FIFO Quantity"
+msgstr "Cantidad PEPS (FIFO)"
+
+msgctxt "selection:product.template,cost_price_method:"
+msgid "FIFO"
+msgstr "PEPS (FIFO)"
diff --git a/locale/hu_HU.po b/locale/hu_HU.po
new file mode 100644
index 0000000..6215134
--- /dev/null
+++ b/locale/hu_HU.po
@@ -0,0 +1,21 @@
+#
+msgid ""
+msgstr "Content-Type: text/plain; charset=utf-8\n"
+
+msgctxt "error:stock.move:"
+msgid "FIFO quantity can not be greater than quantity."
+msgstr "FIFO mennyiség nem lehet nagyobb a mennyiségnél."
+
+msgctxt "error:stock.move:"
+msgid "You can not delete move \"%s\" that is used for FIFO cost price."
+msgstr ""
+"\"%s\" könyvelési rész nem törölhető, mivel a FIFO ár kalkulációjához "
+"használandó."
+
+msgctxt "field:stock.move,fifo_quantity:"
+msgid "FIFO Quantity"
+msgstr "FIFO mennyiség"
+
+msgctxt "selection:product.template,cost_price_method:"
+msgid "FIFO"
+msgstr "FIFO"
diff --git a/locale/it_IT.po b/locale/it_IT.po
new file mode 100644
index 0000000..d9d8199
--- /dev/null
+++ b/locale/it_IT.po
@@ -0,0 +1,19 @@
+#
+msgid ""
+msgstr "Content-Type: text/plain; charset=utf-8\n"
+
+msgctxt "error:stock.move:"
+msgid "FIFO quantity can not be greater than quantity."
+msgstr ""
+
+msgctxt "error:stock.move:"
+msgid "You can not delete move \"%s\" that is used for FIFO cost price."
+msgstr ""
+
+msgctxt "field:stock.move,fifo_quantity:"
+msgid "FIFO Quantity"
+msgstr ""
+
+msgctxt "selection:product.template,cost_price_method:"
+msgid "FIFO"
+msgstr ""
diff --git a/locale/ja_JP.po b/locale/ja_JP.po
new file mode 100644
index 0000000..d9d8199
--- /dev/null
+++ b/locale/ja_JP.po
@@ -0,0 +1,19 @@
+#
+msgid ""
+msgstr "Content-Type: text/plain; charset=utf-8\n"
+
+msgctxt "error:stock.move:"
+msgid "FIFO quantity can not be greater than quantity."
+msgstr ""
+
+msgctxt "error:stock.move:"
+msgid "You can not delete move \"%s\" that is used for FIFO cost price."
+msgstr ""
+
+msgctxt "field:stock.move,fifo_quantity:"
+msgid "FIFO Quantity"
+msgstr ""
+
+msgctxt "selection:product.template,cost_price_method:"
+msgid "FIFO"
+msgstr ""
diff --git a/locale/lt_LT.po b/locale/lt_LT.po
new file mode 100644
index 0000000..d9d8199
--- /dev/null
+++ b/locale/lt_LT.po
@@ -0,0 +1,19 @@
+#
+msgid ""
+msgstr "Content-Type: text/plain; charset=utf-8\n"
+
+msgctxt "error:stock.move:"
+msgid "FIFO quantity can not be greater than quantity."
+msgstr ""
+
+msgctxt "error:stock.move:"
+msgid "You can not delete move \"%s\" that is used for FIFO cost price."
+msgstr ""
+
+msgctxt "field:stock.move,fifo_quantity:"
+msgid "FIFO Quantity"
+msgstr ""
+
+msgctxt "selection:product.template,cost_price_method:"
+msgid "FIFO"
+msgstr ""
diff --git a/locale/pt_BR.po b/locale/pt_BR.po
new file mode 100644
index 0000000..37f4d1e
--- /dev/null
+++ b/locale/pt_BR.po
@@ -0,0 +1,21 @@
+#
+msgid ""
+msgstr "Content-Type: text/plain; charset=utf-8\n"
+
+msgctxt "error:stock.move:"
+msgid "FIFO quantity can not be greater than quantity."
+msgstr "A quantidade PEPS não pode ser maior do que a quantidade."
+
+msgctxt "error:stock.move:"
+msgid "You can not delete move \"%s\" that is used for FIFO cost price."
+msgstr ""
+"Você não pode apagar a movimentação \"%s\" que é usada para o preço de custo"
+" PEPS."
+
+msgctxt "field:stock.move,fifo_quantity:"
+msgid "FIFO Quantity"
+msgstr "Quantidade PEPS"
+
+msgctxt "selection:product.template,cost_price_method:"
+msgid "FIFO"
+msgstr "PEPS"
diff --git a/move.py b/move.py
index 861f4e2..8ae7918 100644
--- a/move.py
+++ b/move.py
@@ -1,9 +1,9 @@
# 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 decimal import Decimal
-from trytond.model import Workflow, ModelView, fields
-from trytond.pyson import Eval
+from trytond.model import Workflow, ModelView, fields, Check
from trytond.pool import Pool, PoolMeta
+from trytond.transaction import Transaction
__all__ = ['Move']
__metaclass__ = PoolMeta
@@ -11,18 +11,17 @@ __metaclass__ = PoolMeta
class Move:
__name__ = 'stock.move'
- fifo_quantity = fields.Float('FIFO Quantity',
- digits=(16, Eval('unit_digits', 2)),
- depends=['unit_digits'])
+ fifo_quantity = fields.Float('FIFO Quantity')
@classmethod
def __setup__(cls):
super(Move, cls).__setup__()
+ t = cls.__table__()
cls._sql_constraints += [
- ('check_fifo_quantity_out',
- 'CHECK(quantity >= fifo_quantity)',
- 'FIFO quantity can not be greater than quantity.'),
- ]
+ ('check_fifo_quantity_out',
+ Check(t, t.quantity >= t.fifo_quantity),
+ 'FIFO quantity can not be greater than quantity.'),
+ ]
cls._error_messages.update({
'del_move_fifo': ('You can not delete move "%s" that is used '
'for FIFO cost price.'),
@@ -38,8 +37,9 @@ class Move:
fifo_quantity on the concerned incomming moves. Return the
cost price for outputing the given product and quantity.
'''
-
- Uom = Pool().get('product.uom')
+ pool = Pool()
+ Uom = pool.get('product.uom')
+ Currency = pool.get('currency.currency')
total_qty = Uom.compute_qty(self.uom, self.quantity,
self.product.default_uom, round=False)
@@ -51,7 +51,11 @@ class Move:
for move, move_qty in fifo_moves:
consumed_qty += move_qty
- move_unit_price = Uom.compute_price(move.uom, move.unit_price,
+ with Transaction().set_context(date=move.effective_date):
+ move_unit_price = Currency.compute(
+ move.currency, move.unit_price,
+ self.company.currency, round=False)
+ move_unit_price = Uom.compute_price(move.uom, move_unit_price,
move.product.default_uom)
cost_price += move_unit_price * Decimal(str(move_qty))
@@ -89,7 +93,7 @@ class Move:
and self.to_location.type != 'storage'
and self.product.cost_price_method == 'fifo'):
cost_price = self._update_fifo_out_product_cost_price()
- if not self.cost_price:
+ if self.cost_price is None:
self.cost_price = cost_price
super(Move, self)._do()
diff --git a/product.py b/product.py
index 5d6b680..b2f15ad 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()
diff --git a/setup.py b/setup.py
index 5374b5e..ae597f5 100644
--- a/setup.py
+++ b/setup.py
@@ -86,6 +86,9 @@ setup(name=name,
'Natural Language :: English',
'Natural Language :: French',
'Natural Language :: German',
+ 'Natural Language :: Hungarian',
+ 'Natural Language :: Italian',
+ 'Natural Language :: Portuguese (Brazilian)',
'Natural Language :: Russian',
'Natural Language :: Slovenian',
'Natural Language :: Spanish',
diff --git a/tryton.cfg b/tryton.cfg
index 986a5f0..b152f5e 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
[tryton]
-version=3.6.0
+version=3.8.0
depends:
ir
product
diff --git a/trytond_product_cost_fifo.egg-info/PKG-INFO b/trytond_product_cost_fifo.egg-info/PKG-INFO
index ea92497..a4e1971 100644
--- a/trytond_product_cost_fifo.egg-info/PKG-INFO
+++ b/trytond_product_cost_fifo.egg-info/PKG-INFO
@@ -1,12 +1,12 @@
Metadata-Version: 1.1
Name: trytond-product-cost-fifo
-Version: 3.6.0
+Version: 3.8.0
Summary: Tryton module to add FIFO cost method
Home-page: http://www.tryton.org/
Author: Tryton
Author-email: issue_tracker at tryton.org
License: GPL-3
-Download-URL: http://downloads.tryton.org/3.6/
+Download-URL: http://downloads.tryton.org/3.8/
Description: trytond_product_cost_fifo
=========================
@@ -60,6 +60,9 @@ Classifier: Natural Language :: Dutch
Classifier: Natural Language :: English
Classifier: Natural Language :: French
Classifier: Natural Language :: German
+Classifier: Natural Language :: Hungarian
+Classifier: Natural Language :: Italian
+Classifier: Natural Language :: Portuguese (Brazilian)
Classifier: Natural Language :: Russian
Classifier: Natural Language :: Slovenian
Classifier: Natural Language :: Spanish
diff --git a/trytond_product_cost_fifo.egg-info/SOURCES.txt b/trytond_product_cost_fifo.egg-info/SOURCES.txt
index 38bd2db..d7f40e9 100644
--- a/trytond_product_cost_fifo.egg-info/SOURCES.txt
+++ b/trytond_product_cost_fifo.egg-info/SOURCES.txt
@@ -18,8 +18,14 @@ tryton.cfg
./locale/es_CO.po
./locale/es_EC.po
./locale/es_ES.po
+./locale/es_MX.po
./locale/fr_FR.po
+./locale/hu_HU.po
+./locale/it_IT.po
+./locale/ja_JP.po
+./locale/lt_LT.po
./locale/nl_NL.po
+./locale/pt_BR.po
./locale/ru_RU.po
./locale/sl_SI.po
doc/index.rst
@@ -31,8 +37,14 @@ locale/es_AR.po
locale/es_CO.po
locale/es_EC.po
locale/es_ES.po
+locale/es_MX.po
locale/fr_FR.po
+locale/hu_HU.po
+locale/it_IT.po
+locale/ja_JP.po
+locale/lt_LT.po
locale/nl_NL.po
+locale/pt_BR.po
locale/ru_RU.po
locale/sl_SI.po
trytond_product_cost_fifo.egg-info/PKG-INFO
diff --git a/trytond_product_cost_fifo.egg-info/requires.txt b/trytond_product_cost_fifo.egg-info/requires.txt
index 97f70d9..193d062 100644
--- a/trytond_product_cost_fifo.egg-info/requires.txt
+++ b/trytond_product_cost_fifo.egg-info/requires.txt
@@ -1,3 +1,3 @@
-trytond_product >= 3.6, < 3.7
-trytond_stock >= 3.6, < 3.7
-trytond >= 3.6, < 3.7
\ No newline at end of file
+trytond_product >= 3.8, < 3.9
+trytond_stock >= 3.8, < 3.9
+trytond >= 3.8, < 3.9
\ No newline at end of file
--
tryton-modules-product-cost-fifo
More information about the tryton-debian-vcs
mailing list