[tryton-debian-vcs] tryton-modules-account-stock-anglo-saxon branch upstream updated. upstream/3.8.0-2-gac598c5
Mathias Behrle
tryton-debian-vcs at alioth.debian.org
Thu Jun 2 16:08:26 UTC 2016
The following commit has been merged in the upstream branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-modules-account-stock-anglo-saxon.git;a=commitdiff;h=upstream/3.8.0-2-gac598c5
commit ac598c5355f4f842494ff1ab4a44654cbe598d85
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Fri May 27 18:35:10 2016 +0200
Adding upstream version 4.0.1.
Signed-off-by: Mathias Behrle <mathiasb at m9s.biz>
diff --git a/CHANGELOG b/CHANGELOG
index b79ee57..d3716b7 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 4.0.1 - 2016-05-11
+* Bug fixes (see mercurial logs for details)
+
Version 4.0.0 - 2016-05-02
* Bug fixes (see mercurial logs for details)
* Add Python3 support
diff --git a/PKG-INFO b/PKG-INFO
index 44e0a3e..4bc9357 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: trytond_account_stock_anglo_saxon
-Version: 4.0.0
+Version: 4.0.1
Summary: Tryton module for anglo-saxon real-time stock valuation
Home-page: http://www.tryton.org/
Author: Tryton
diff --git a/locale/ca_ES.po b/locale/ca_ES.po
index 7fc3d2f..d593b3c 100644
--- a/locale/ca_ES.po
+++ b/locale/ca_ES.po
@@ -14,15 +14,13 @@ msgctxt "field:product.category,account_cogs_used:"
msgid "Account Cost of Goods Sold Used"
msgstr "Compte cost béns venuts usada"
-#, fuzzy
msgctxt "field:product.product,account_cogs:"
msgid "Account Cost of Goods Sold"
-msgstr "Compte cost béns venuts"
+msgstr "Compte cost de béns venuts"
-#, fuzzy
msgctxt "field:product.product,account_cogs_used:"
msgid "Account Cost of Goods Sold Used"
-msgstr "Compte cost béns venuts usada"
+msgstr "Compte cost de béns venuts usada"
msgctxt "field:product.template,account_cogs:"
msgid "Account Cost of Goods Sold"
@@ -40,10 +38,9 @@ msgctxt "field:stock.move,out_anglo_saxon_quantity:"
msgid "Output Anglo-Saxon Quantity"
msgstr "Quantitat anglosaxona de sortida"
-#, fuzzy
msgctxt "help:product.product,account_cogs:"
msgid "This account will be used instead of the one defined on the category."
-msgstr "Aquest compte s'usarà en lloc del definit a la categoria."
+msgstr "S'utilitzarà aquest compte en lloc del definit a la categoria."
msgctxt "help:product.template,account_cogs:"
msgid "This account will be used instead of the one defined on the category."
diff --git a/locale/de_DE.po b/locale/de_DE.po
index 32074e3..c35f6b5 100644
--- a/locale/de_DE.po
+++ b/locale/de_DE.po
@@ -14,12 +14,10 @@ msgctxt "field:product.category,account_cogs_used:"
msgid "Account Cost of Goods Sold Used"
msgstr "Verwendetes Konto Kosten verkaufte Waren"
-#, fuzzy
msgctxt "field:product.product,account_cogs:"
msgid "Account Cost of Goods Sold"
msgstr "Konto Kosten der verkauften Waren"
-#, fuzzy
msgctxt "field:product.product,account_cogs_used:"
msgid "Account Cost of Goods Sold Used"
msgstr "Verwendetes Konto Kosten verkaufte Waren"
@@ -40,7 +38,6 @@ msgctxt "field:stock.move,out_anglo_saxon_quantity:"
msgid "Output Anglo-Saxon Quantity"
msgstr "Ausgang (Angelsächsische Bewertung)"
-#, fuzzy
msgctxt "help:product.product,account_cogs:"
msgid "This account will be used instead of the one defined on the category."
msgstr ""
diff --git a/locale/es_AR.po b/locale/es_AR.po
index aa1958c..0f8d2ef 100644
--- a/locale/es_AR.po
+++ b/locale/es_AR.po
@@ -14,12 +14,10 @@ msgctxt "field:product.category,account_cogs_used:"
msgid "Account Cost of Goods Sold Used"
msgstr "Cuenta de Costo de Mercaderías Vendidas utilizada"
-#, fuzzy
msgctxt "field:product.product,account_cogs:"
msgid "Account Cost of Goods Sold"
msgstr "Cuenta de Costo de Mercaderías Vendidas"
-#, fuzzy
msgctxt "field:product.product,account_cogs_used:"
msgid "Account Cost of Goods Sold Used"
msgstr "Cuenta de Costo de Mercaderías Vendidas utilizada"
@@ -40,7 +38,6 @@ msgctxt "field:stock.move,out_anglo_saxon_quantity:"
msgid "Output Anglo-Saxon Quantity"
msgstr "Entrada de cantidad anglo-sajona"
-#, fuzzy
msgctxt "help:product.product,account_cogs:"
msgid "This account will be used instead of the one defined on the category."
msgstr "Se usará esta cuenta en lugar de la definida en la categoría."
diff --git a/locale/es_CO.po b/locale/es_CO.po
index 659598b..0fc0c73 100644
--- a/locale/es_CO.po
+++ b/locale/es_CO.po
@@ -15,12 +15,10 @@ msgctxt "field:product.category,account_cogs_used:"
msgid "Account Cost of Goods Sold Used"
msgstr "Cuenta de Costos de Ventas Usada"
-#, fuzzy
msgctxt "field:product.product,account_cogs:"
msgid "Account Cost of Goods Sold"
msgstr "Cuenta de Costos de Ventas"
-#, fuzzy
msgctxt "field:product.product,account_cogs_used:"
msgid "Account Cost of Goods Sold Used"
msgstr "Cuenta de Costos de Ventas Usada"
@@ -41,7 +39,6 @@ msgctxt "field:stock.move,out_anglo_saxon_quantity:"
msgid "Output Anglo-Saxon Quantity"
msgstr "Cantidad Anglosajona de Salida"
-#, fuzzy
msgctxt "help:product.product,account_cogs:"
msgid "This account will be used instead of the one defined on the category."
msgstr "Esta cuenta se usará en lugar de la definida en la categoría."
diff --git a/locale/es_EC.po b/locale/es_EC.po
index 7b82f45..cc5cbb7 100644
--- a/locale/es_EC.po
+++ b/locale/es_EC.po
@@ -14,12 +14,10 @@ msgctxt "field:product.category,account_cogs_used:"
msgid "Account Cost of Goods Sold Used"
msgstr "Cuenta de costo de mercaderías vendidas utilizada"
-#, fuzzy
msgctxt "field:product.product,account_cogs:"
msgid "Account Cost of Goods Sold"
msgstr "Cuenta de costo de mercaderías vendidas"
-#, fuzzy
msgctxt "field:product.product,account_cogs_used:"
msgid "Account Cost of Goods Sold Used"
msgstr "Cuenta de costo de mercaderías vendidas utilizada"
@@ -40,7 +38,6 @@ msgctxt "field:stock.move,out_anglo_saxon_quantity:"
msgid "Output Anglo-Saxon Quantity"
msgstr "Cantidad anglosajona de salida"
-#, fuzzy
msgctxt "help:product.product,account_cogs:"
msgid "This account will be used instead of the one defined on the category."
msgstr "Se utilizará esta cuenta en lugar de la definida en la categoría."
diff --git a/locale/es_ES.po b/locale/es_ES.po
index d8c1670..599f7b6 100644
--- a/locale/es_ES.po
+++ b/locale/es_ES.po
@@ -14,12 +14,10 @@ msgctxt "field:product.category,account_cogs_used:"
msgid "Account Cost of Goods Sold Used"
msgstr "Cuenta coste de bienes vendidos usada"
-#, fuzzy
msgctxt "field:product.product,account_cogs:"
msgid "Account Cost of Goods Sold"
msgstr "Cuenta coste de bienes vendidos"
-#, fuzzy
msgctxt "field:product.product,account_cogs_used:"
msgid "Account Cost of Goods Sold Used"
msgstr "Cuenta coste de bienes vendidos usada"
@@ -40,7 +38,6 @@ msgctxt "field:stock.move,out_anglo_saxon_quantity:"
msgid "Output Anglo-Saxon Quantity"
msgstr "Cantidad anglosajona de salida"
-#, fuzzy
msgctxt "help:product.product,account_cogs:"
msgid "This account will be used instead of the one defined on the category."
msgstr "Se usará esta cuenta en lugar de la definida en la categoría."
diff --git a/locale/fr_FR.po b/locale/fr_FR.po
index 646053b..e4935de 100644
--- a/locale/fr_FR.po
+++ b/locale/fr_FR.po
@@ -14,12 +14,10 @@ msgctxt "field:product.category,account_cogs_used:"
msgid "Account Cost of Goods Sold Used"
msgstr "Compte « coût des marchandises vendues » utilisé"
-#, fuzzy
msgctxt "field:product.product,account_cogs:"
msgid "Account Cost of Goods Sold"
msgstr "Compte « coût des marchandises vendues »"
-#, fuzzy
msgctxt "field:product.product,account_cogs_used:"
msgid "Account Cost of Goods Sold Used"
msgstr "Compte « coût des marchandises vendues » utilisé"
@@ -40,7 +38,6 @@ msgctxt "field:stock.move,out_anglo_saxon_quantity:"
msgid "Output Anglo-Saxon Quantity"
msgstr "Quantité anglo-saxonne sortie"
-#, fuzzy
msgctxt "help:product.product,account_cogs:"
msgid "This account will be used instead of the one defined on the category."
msgstr "Ce compte sera utilisé au lieu de celui défini sur la catégorie."
diff --git a/locale/sl_SI.po b/locale/sl_SI.po
index 013f07d..1f35e65 100644
--- a/locale/sl_SI.po
+++ b/locale/sl_SI.po
@@ -14,12 +14,10 @@ msgctxt "field:product.category,account_cogs_used:"
msgid "Account Cost of Goods Sold Used"
msgstr "Uporabljen konto stroškov prodanega blaga"
-#, fuzzy
msgctxt "field:product.product,account_cogs:"
msgid "Account Cost of Goods Sold"
msgstr "Konto stroškov prodanega blaga"
-#, fuzzy
msgctxt "field:product.product,account_cogs_used:"
msgid "Account Cost of Goods Sold Used"
msgstr "Uporabljen konto stroškov prodanega blaga"
@@ -40,10 +38,9 @@ msgctxt "field:stock.move,out_anglo_saxon_quantity:"
msgid "Output Anglo-Saxon Quantity"
msgstr "Izhodna anglosaška količina"
-#, fuzzy
msgctxt "help:product.product,account_cogs:"
msgid "This account will be used instead of the one defined on the category."
-msgstr "Namesto konta v kategoriji se bo uporabil ta konto prihodkov."
+msgstr "Namesto konta v kategoriji se bo uporabil ta konto."
msgctxt "help:product.template,account_cogs:"
msgid "This account will be used instead of the one defined on the category."
diff --git a/tryton.cfg b/tryton.cfg
index 56eca1e..b772cb1 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
[tryton]
-version=4.0.0
+version=4.0.1
depends:
account
account_invoice
diff --git a/trytond_account_stock_anglo_saxon.egg-info/PKG-INFO b/trytond_account_stock_anglo_saxon.egg-info/PKG-INFO
index 91099c9..23dd033 100644
--- a/trytond_account_stock_anglo_saxon.egg-info/PKG-INFO
+++ b/trytond_account_stock_anglo_saxon.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: trytond-account-stock-anglo-saxon
-Version: 4.0.0
+Version: 4.0.1
Summary: Tryton module for anglo-saxon real-time stock valuation
Home-page: http://www.tryton.org/
Author: Tryton
diff --git a/trytond_account_stock_anglo_saxon.egg-info/SOURCES.txt b/trytond_account_stock_anglo_saxon.egg-info/SOURCES.txt
index 1254755..3762fce 100644
--- a/trytond_account_stock_anglo_saxon.egg-info/SOURCES.txt
+++ b/trytond_account_stock_anglo_saxon.egg-info/SOURCES.txt
@@ -30,6 +30,7 @@ tryton.cfg
./minimal_chart_es.xml
./minimal_chart_fr.xml
./minimal_chart_nl.xml
+./minimal_chart_pt.xml
./minimal_chart_ru.xml
./minimal_chart_sl.xml
./product.py
@@ -49,11 +50,13 @@ tryton.cfg
./locale/hu_HU.po
./locale/it_IT.po
./locale/ja_JP.po
+./locale/lo_LA.po
./locale/lt_LT.po
./locale/nl_NL.po
./locale/pt_BR.po
./locale/ru_RU.po
./locale/sl_SI.po
+./locale/zh_CN.po
./tests/__init__.py
./tests/scenario_account_stock_anglo_saxon.rst
./tests/scenario_account_stock_anglo_saxon_with_drop_shipment.rst
diff --git a/trytond_account_stock_anglo_saxon.egg-info/requires.txt b/trytond_account_stock_anglo_saxon.egg-info/requires.txt
index 649750b..0e3ea9e 100644
--- a/trytond_account_stock_anglo_saxon.egg-info/requires.txt
+++ b/trytond_account_stock_anglo_saxon.egg-info/requires.txt
@@ -4,4 +4,4 @@ trytond_account_product >= 4.0, < 4.1
trytond_account_stock_continental >= 4.0, < 4.1
trytond_purchase >= 4.0, < 4.1
trytond_sale >= 4.0, < 4.1
-trytond >= 4.0, < 4.1
\ No newline at end of file
+trytond >= 4.0, < 4.1
commit a629b28c14e4134ac7a75c6a70984d1f26479cd5
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Fri May 27 18:25:52 2016 +0200
Adding upstream version 4.0.0.
Signed-off-by: Mathias Behrle <mathiasb at m9s.biz>
diff --git a/CHANGELOG b/CHANGELOG
index 5aabf50..b79ee57 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,7 @@
+Version 4.0.0 - 2016-05-02
+* Bug fixes (see mercurial logs for details)
+* Add Python3 support
+
Version 3.8.0 - 2015-11-02
* Bug fixes (see mercurial logs for details)
diff --git a/COPYRIGHT b/COPYRIGHT
index ff16b62..29a4a55 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -1,5 +1,5 @@
-Copyright (C) 2010-2015 Cédric Krier.
-Copyright (C) 2010-2015 B2CK SPRL.
+Copyright (C) 2010-2016 Cédric Krier.
+Copyright (C) 2010-2016 B2CK SPRL.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/PKG-INFO b/PKG-INFO
index 6232dd5..44e0a3e 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,12 +1,12 @@
Metadata-Version: 1.1
Name: trytond_account_stock_anglo_saxon
-Version: 3.8.0
+Version: 4.0.0
Summary: Tryton module for anglo-saxon real-time stock valuation
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.8/
+Download-URL: http://downloads.tryton.org/4.0/
Description: trytond_account_stock_anglo_saxon
=================================
@@ -53,6 +53,8 @@ Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: Intended Audience :: Legal Industry
Classifier: License :: OSI Approved :: GNU General Public License (GPL)
Classifier: Natural Language :: Bulgarian
+Classifier: Natural Language :: Catalan
+Classifier: Natural Language :: Chinese (Simplified)
Classifier: Natural Language :: Czech
Classifier: Natural Language :: Dutch
Classifier: Natural Language :: English
@@ -66,6 +68,9 @@ Classifier: Natural Language :: Slovenian
Classifier: Natural Language :: Spanish
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 2.7
+Classifier: Programming Language :: Python :: 3.3
+Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Office/Business
diff --git a/__init__.py b/__init__.py
index b13dc61..fe0cc4e 100644
--- a/__init__.py
+++ b/__init__.py
@@ -12,6 +12,7 @@ def register():
Pool.register(
Category,
Template,
+ Product,
Move,
InvoiceLine,
FiscalYear,
diff --git a/account.py b/account.py
index 089549d..89e9ae4 100644
--- a/account.py
+++ b/account.py
@@ -3,10 +3,10 @@
from trytond.pool import PoolMeta
__all__ = ['FiscalYear']
-__metaclass__ = PoolMeta
class FiscalYear:
+ __metaclass__ = PoolMeta
__name__ = 'account.fiscalyear'
@classmethod
diff --git a/invoice.py b/invoice.py
index 424f825..7a5855a 100644
--- a/invoice.py
+++ b/invoice.py
@@ -5,10 +5,10 @@ import operator
from trytond.pool import Pool, PoolMeta
__all__ = ['InvoiceLine']
-__metaclass__ = PoolMeta
class InvoiceLine:
+ __metaclass__ = PoolMeta
__name__ = 'account.invoice.line'
def _get_anglo_saxon_move_lines(self, amount, type_):
@@ -79,14 +79,10 @@ class InvoiceLine:
# an empty list means we'll use the current cost price
moves = [move for move in self._anglo_saxon_stock_moves
if move.state == 'done']
- if self.invoice.type == 'in_invoice':
+ if self.invoice.type == 'in':
type_ = 'in_supplier'
- elif self.invoice.type == 'out_invoice':
+ elif self.invoice.type == 'out':
type_ = 'out_customer'
- elif self.invoice.type == 'in_credit_note':
- type_ = 'out_supplier'
- elif self.invoice.type == 'out_credit_note':
- type_ = 'in_customer'
if self.quantity < 0:
direction, target = type_.split('_')
if direction == 'in':
diff --git a/locale/bg_BG.po b/locale/bg_BG.po
index ae46f30..7ecdb5a 100644
--- a/locale/bg_BG.po
+++ b/locale/bg_BG.po
@@ -14,6 +14,14 @@ msgctxt "field:product.category,account_cogs_used:"
msgid "Account Cost of Goods Sold Used"
msgstr ""
+msgctxt "field:product.product,account_cogs:"
+msgid "Account Cost of Goods Sold"
+msgstr ""
+
+msgctxt "field:product.product,account_cogs_used:"
+msgid "Account Cost of Goods Sold Used"
+msgstr ""
+
msgctxt "field:product.template,account_cogs:"
msgid "Account Cost of Goods Sold"
msgstr ""
@@ -31,6 +39,11 @@ msgid "Output Anglo-Saxon Quantity"
msgstr ""
#, fuzzy
+msgctxt "help:product.product,account_cogs:"
+msgid "This account will be used instead of the one defined on the category."
+msgstr "Ще се използва тази сметка вместо тази зададена за категорията"
+
+#, fuzzy
msgctxt "help:product.template,account_cogs:"
msgid "This account will be used instead of the one defined on the category."
msgstr "Ще се използва тази сметка вместо тази зададена за категорията"
diff --git a/locale/ca_ES.po b/locale/ca_ES.po
index 3f641fb..7fc3d2f 100644
--- a/locale/ca_ES.po
+++ b/locale/ca_ES.po
@@ -14,6 +14,16 @@ msgctxt "field:product.category,account_cogs_used:"
msgid "Account Cost of Goods Sold Used"
msgstr "Compte cost béns venuts usada"
+#, fuzzy
+msgctxt "field:product.product,account_cogs:"
+msgid "Account Cost of Goods Sold"
+msgstr "Compte cost béns venuts"
+
+#, fuzzy
+msgctxt "field:product.product,account_cogs_used:"
+msgid "Account Cost of Goods Sold Used"
+msgstr "Compte cost béns venuts usada"
+
msgctxt "field:product.template,account_cogs:"
msgid "Account Cost of Goods Sold"
msgstr "Compte cost béns venuts"
@@ -30,6 +40,11 @@ msgctxt "field:stock.move,out_anglo_saxon_quantity:"
msgid "Output Anglo-Saxon Quantity"
msgstr "Quantitat anglosaxona de sortida"
+#, fuzzy
+msgctxt "help:product.product,account_cogs:"
+msgid "This account will be used instead of the one defined on the category."
+msgstr "Aquest compte s'usarà en lloc del definit a la categoria."
+
msgctxt "help:product.template,account_cogs:"
msgid "This account will be used instead of the one defined on the category."
msgstr "Aquest compte s'usarà en lloc del definit a la categoria."
diff --git a/locale/cs_CZ.po b/locale/cs_CZ.po
index 2b3b167..92f0e1a 100644
--- a/locale/cs_CZ.po
+++ b/locale/cs_CZ.po
@@ -14,6 +14,14 @@ msgctxt "field:product.category,account_cogs_used:"
msgid "Account Cost of Goods Sold Used"
msgstr ""
+msgctxt "field:product.product,account_cogs:"
+msgid "Account Cost of Goods Sold"
+msgstr ""
+
+msgctxt "field:product.product,account_cogs_used:"
+msgid "Account Cost of Goods Sold Used"
+msgstr ""
+
msgctxt "field:product.template,account_cogs:"
msgid "Account Cost of Goods Sold"
msgstr ""
@@ -30,6 +38,10 @@ msgctxt "field:stock.move,out_anglo_saxon_quantity:"
msgid "Output Anglo-Saxon Quantity"
msgstr ""
+msgctxt "help:product.product,account_cogs:"
+msgid "This account will be used instead of the one defined on the category."
+msgstr ""
+
msgctxt "help:product.template,account_cogs:"
msgid "This account will be used instead of the one defined on the category."
msgstr ""
diff --git a/locale/de_DE.po b/locale/de_DE.po
index adac61d..32074e3 100644
--- a/locale/de_DE.po
+++ b/locale/de_DE.po
@@ -14,6 +14,16 @@ msgctxt "field:product.category,account_cogs_used:"
msgid "Account Cost of Goods Sold Used"
msgstr "Verwendetes Konto Kosten verkaufte Waren"
+#, fuzzy
+msgctxt "field:product.product,account_cogs:"
+msgid "Account Cost of Goods Sold"
+msgstr "Konto Kosten der verkauften Waren"
+
+#, fuzzy
+msgctxt "field:product.product,account_cogs_used:"
+msgid "Account Cost of Goods Sold Used"
+msgstr "Verwendetes Konto Kosten verkaufte Waren"
+
msgctxt "field:product.template,account_cogs:"
msgid "Account Cost of Goods Sold"
msgstr "Konto Kosten der verkauften Waren"
@@ -30,15 +40,18 @@ msgctxt "field:stock.move,out_anglo_saxon_quantity:"
msgid "Output Anglo-Saxon Quantity"
msgstr "Ausgang (Angelsächsische Bewertung)"
-msgctxt "help:product.template,account_cogs:"
+#, fuzzy
+msgctxt "help:product.product,account_cogs:"
msgid "This account will be used instead of the one defined on the category."
msgstr ""
"Dieses Konto wird benutzt anstelle des Kontos, welches in der Kategorie "
"eingestellt ist."
-msgctxt "model:account.account.template,name:"
-msgid "COGS"
-msgstr "Kosten der verkauften Waren (COGS)"
+msgctxt "help:product.template,account_cogs:"
+msgid "This account will be used instead of the one defined on the category."
+msgstr ""
+"Dieses Konto wird benutzt anstelle des Kontos, welches in der Kategorie "
+"eingestellt ist."
msgctxt "selection:account.fiscalyear,account_stock_method:"
msgid "Anglo-Saxon"
diff --git a/locale/es_AR.po b/locale/es_AR.po
index 7b33d78..aa1958c 100644
--- a/locale/es_AR.po
+++ b/locale/es_AR.po
@@ -14,6 +14,16 @@ msgctxt "field:product.category,account_cogs_used:"
msgid "Account Cost of Goods Sold Used"
msgstr "Cuenta de Costo de Mercaderías Vendidas utilizada"
+#, fuzzy
+msgctxt "field:product.product,account_cogs:"
+msgid "Account Cost of Goods Sold"
+msgstr "Cuenta de Costo de Mercaderías Vendidas"
+
+#, fuzzy
+msgctxt "field:product.product,account_cogs_used:"
+msgid "Account Cost of Goods Sold Used"
+msgstr "Cuenta de Costo de Mercaderías Vendidas utilizada"
+
msgctxt "field:product.template,account_cogs:"
msgid "Account Cost of Goods Sold"
msgstr "Cuenta de Costo de Mercaderías Vendidas"
@@ -30,6 +40,11 @@ msgctxt "field:stock.move,out_anglo_saxon_quantity:"
msgid "Output Anglo-Saxon Quantity"
msgstr "Entrada de cantidad anglo-sajona"
+#, fuzzy
+msgctxt "help:product.product,account_cogs:"
+msgid "This account will be used instead of the one defined on the category."
+msgstr "Se usará esta cuenta en lugar de la definida en la categoría."
+
msgctxt "help:product.template,account_cogs:"
msgid "This account will be used instead of the one defined on the category."
msgstr "Se usará esta cuenta en lugar de la definida en la categoría."
diff --git a/locale/es_CO.po b/locale/es_CO.po
index 6bea97c..659598b 100644
--- a/locale/es_CO.po
+++ b/locale/es_CO.po
@@ -15,6 +15,16 @@ msgctxt "field:product.category,account_cogs_used:"
msgid "Account Cost of Goods Sold Used"
msgstr "Cuenta de Costos de Ventas Usada"
+#, fuzzy
+msgctxt "field:product.product,account_cogs:"
+msgid "Account Cost of Goods Sold"
+msgstr "Cuenta de Costos de Ventas"
+
+#, fuzzy
+msgctxt "field:product.product,account_cogs_used:"
+msgid "Account Cost of Goods Sold Used"
+msgstr "Cuenta de Costos de Ventas Usada"
+
msgctxt "field:product.template,account_cogs:"
msgid "Account Cost of Goods Sold"
msgstr "Cuenta de Costos de Ventas"
@@ -31,6 +41,11 @@ msgctxt "field:stock.move,out_anglo_saxon_quantity:"
msgid "Output Anglo-Saxon Quantity"
msgstr "Cantidad Anglosajona de Salida"
+#, fuzzy
+msgctxt "help:product.product,account_cogs:"
+msgid "This account will be used instead of the one defined on the category."
+msgstr "Esta cuenta se usará en lugar de la definida en la categoría."
+
msgctxt "help:product.template,account_cogs:"
msgid "This account will be used instead of the one defined on the category."
msgstr "Esta cuenta se usará en lugar de la definida en la categoría."
diff --git a/locale/es_EC.po b/locale/es_EC.po
index ff3b31d..7b82f45 100644
--- a/locale/es_EC.po
+++ b/locale/es_EC.po
@@ -14,6 +14,16 @@ msgctxt "field:product.category,account_cogs_used:"
msgid "Account Cost of Goods Sold Used"
msgstr "Cuenta de costo de mercaderías vendidas utilizada"
+#, fuzzy
+msgctxt "field:product.product,account_cogs:"
+msgid "Account Cost of Goods Sold"
+msgstr "Cuenta de costo de mercaderías vendidas"
+
+#, fuzzy
+msgctxt "field:product.product,account_cogs_used:"
+msgid "Account Cost of Goods Sold Used"
+msgstr "Cuenta de costo de mercaderías vendidas utilizada"
+
msgctxt "field:product.template,account_cogs:"
msgid "Account Cost of Goods Sold"
msgstr "Cuenta de costo de mercaderías vendidas"
@@ -30,6 +40,11 @@ msgctxt "field:stock.move,out_anglo_saxon_quantity:"
msgid "Output Anglo-Saxon Quantity"
msgstr "Cantidad anglosajona de salida"
+#, fuzzy
+msgctxt "help:product.product,account_cogs:"
+msgid "This account will be used instead of the one defined on the category."
+msgstr "Se utilizará esta cuenta en lugar de la definida en la categoría."
+
msgctxt "help:product.template,account_cogs:"
msgid "This account will be used instead of the one defined on the category."
msgstr "Se utilizará esta cuenta en lugar de la definida en la categoría."
diff --git a/locale/es_ES.po b/locale/es_ES.po
index a913209..d8c1670 100644
--- a/locale/es_ES.po
+++ b/locale/es_ES.po
@@ -14,6 +14,16 @@ msgctxt "field:product.category,account_cogs_used:"
msgid "Account Cost of Goods Sold Used"
msgstr "Cuenta coste de bienes vendidos usada"
+#, fuzzy
+msgctxt "field:product.product,account_cogs:"
+msgid "Account Cost of Goods Sold"
+msgstr "Cuenta coste de bienes vendidos"
+
+#, fuzzy
+msgctxt "field:product.product,account_cogs_used:"
+msgid "Account Cost of Goods Sold Used"
+msgstr "Cuenta coste de bienes vendidos usada"
+
msgctxt "field:product.template,account_cogs:"
msgid "Account Cost of Goods Sold"
msgstr "Cuenta coste de bienes vendidos"
@@ -30,6 +40,11 @@ msgctxt "field:stock.move,out_anglo_saxon_quantity:"
msgid "Output Anglo-Saxon Quantity"
msgstr "Cantidad anglosajona de salida"
+#, fuzzy
+msgctxt "help:product.product,account_cogs:"
+msgid "This account will be used instead of the one defined on the category."
+msgstr "Se usará esta cuenta en lugar de la definida en la categoría."
+
msgctxt "help:product.template,account_cogs:"
msgid "This account will be used instead of the one defined on the category."
msgstr "Se usará esta cuenta en lugar de la definida en la categoría."
diff --git a/locale/es_MX.po b/locale/es_MX.po
index f8beb4d..6845362 100644
--- a/locale/es_MX.po
+++ b/locale/es_MX.po
@@ -14,6 +14,16 @@ msgctxt "field:product.category,account_cogs_used:"
msgid "Account Cost of Goods Sold Used"
msgstr "Cuenta de costos de mercancías vendidas (CMV) usada"
+#, fuzzy
+msgctxt "field:product.product,account_cogs:"
+msgid "Account Cost of Goods Sold"
+msgstr "Cuenta de costos de mercancías vendidas (CMV)"
+
+#, fuzzy
+msgctxt "field:product.product,account_cogs_used:"
+msgid "Account Cost of Goods Sold Used"
+msgstr "Cuenta de costos de mercancías vendidas (CMV) usada"
+
msgctxt "field:product.template,account_cogs:"
msgid "Account Cost of Goods Sold"
msgstr "Cuenta de costos de mercancías vendidas (CMV)"
@@ -30,6 +40,11 @@ msgctxt "field:stock.move,out_anglo_saxon_quantity:"
msgid "Output Anglo-Saxon Quantity"
msgstr "Cantidad anglosajona de salida"
+#, fuzzy
+msgctxt "help:product.product,account_cogs:"
+msgid "This account will be used instead of the one defined on the category."
+msgstr "Se usará esta cuenta en lugar de la definida en la categoría."
+
msgctxt "help:product.template,account_cogs:"
msgid "This account will be used instead of the one defined on the category."
msgstr "Se usará esta cuenta en lugar de la definida en la categoría."
diff --git a/locale/fr_FR.po b/locale/fr_FR.po
index c3bcae6..646053b 100644
--- a/locale/fr_FR.po
+++ b/locale/fr_FR.po
@@ -14,6 +14,16 @@ msgctxt "field:product.category,account_cogs_used:"
msgid "Account Cost of Goods Sold Used"
msgstr "Compte « coût des marchandises vendues » utilisé"
+#, fuzzy
+msgctxt "field:product.product,account_cogs:"
+msgid "Account Cost of Goods Sold"
+msgstr "Compte « coût des marchandises vendues »"
+
+#, fuzzy
+msgctxt "field:product.product,account_cogs_used:"
+msgid "Account Cost of Goods Sold Used"
+msgstr "Compte « coût des marchandises vendues » utilisé"
+
msgctxt "field:product.template,account_cogs:"
msgid "Account Cost of Goods Sold"
msgstr "Compte « coût des marchandises vendues »"
@@ -30,6 +40,11 @@ msgctxt "field:stock.move,out_anglo_saxon_quantity:"
msgid "Output Anglo-Saxon Quantity"
msgstr "Quantité anglo-saxonne sortie"
+#, fuzzy
+msgctxt "help:product.product,account_cogs:"
+msgid "This account will be used instead of the one defined on the category."
+msgstr "Ce compte sera utilisé au lieu de celui défini sur la catégorie."
+
msgctxt "help:product.template,account_cogs:"
msgid "This account will be used instead of the one defined on the category."
msgstr "Ce compte sera utilisé au lieu de celui défini sur la catégorie."
diff --git a/locale/hu_HU.po b/locale/hu_HU.po
index 2b3b167..92f0e1a 100644
--- a/locale/hu_HU.po
+++ b/locale/hu_HU.po
@@ -14,6 +14,14 @@ msgctxt "field:product.category,account_cogs_used:"
msgid "Account Cost of Goods Sold Used"
msgstr ""
+msgctxt "field:product.product,account_cogs:"
+msgid "Account Cost of Goods Sold"
+msgstr ""
+
+msgctxt "field:product.product,account_cogs_used:"
+msgid "Account Cost of Goods Sold Used"
+msgstr ""
+
msgctxt "field:product.template,account_cogs:"
msgid "Account Cost of Goods Sold"
msgstr ""
@@ -30,6 +38,10 @@ msgctxt "field:stock.move,out_anglo_saxon_quantity:"
msgid "Output Anglo-Saxon Quantity"
msgstr ""
+msgctxt "help:product.product,account_cogs:"
+msgid "This account will be used instead of the one defined on the category."
+msgstr ""
+
msgctxt "help:product.template,account_cogs:"
msgid "This account will be used instead of the one defined on the category."
msgstr ""
diff --git a/locale/it_IT.po b/locale/it_IT.po
index 2b3b167..92f0e1a 100644
--- a/locale/it_IT.po
+++ b/locale/it_IT.po
@@ -14,6 +14,14 @@ msgctxt "field:product.category,account_cogs_used:"
msgid "Account Cost of Goods Sold Used"
msgstr ""
+msgctxt "field:product.product,account_cogs:"
+msgid "Account Cost of Goods Sold"
+msgstr ""
+
+msgctxt "field:product.product,account_cogs_used:"
+msgid "Account Cost of Goods Sold Used"
+msgstr ""
+
msgctxt "field:product.template,account_cogs:"
msgid "Account Cost of Goods Sold"
msgstr ""
@@ -30,6 +38,10 @@ msgctxt "field:stock.move,out_anglo_saxon_quantity:"
msgid "Output Anglo-Saxon Quantity"
msgstr ""
+msgctxt "help:product.product,account_cogs:"
+msgid "This account will be used instead of the one defined on the category."
+msgstr ""
+
msgctxt "help:product.template,account_cogs:"
msgid "This account will be used instead of the one defined on the category."
msgstr ""
diff --git a/locale/ja_JP.po b/locale/ja_JP.po
index 2b3b167..92f0e1a 100644
--- a/locale/ja_JP.po
+++ b/locale/ja_JP.po
@@ -14,6 +14,14 @@ msgctxt "field:product.category,account_cogs_used:"
msgid "Account Cost of Goods Sold Used"
msgstr ""
+msgctxt "field:product.product,account_cogs:"
+msgid "Account Cost of Goods Sold"
+msgstr ""
+
+msgctxt "field:product.product,account_cogs_used:"
+msgid "Account Cost of Goods Sold Used"
+msgstr ""
+
msgctxt "field:product.template,account_cogs:"
msgid "Account Cost of Goods Sold"
msgstr ""
@@ -30,6 +38,10 @@ msgctxt "field:stock.move,out_anglo_saxon_quantity:"
msgid "Output Anglo-Saxon Quantity"
msgstr ""
+msgctxt "help:product.product,account_cogs:"
+msgid "This account will be used instead of the one defined on the category."
+msgstr ""
+
msgctxt "help:product.template,account_cogs:"
msgid "This account will be used instead of the one defined on the category."
msgstr ""
diff --git a/locale/it_IT.po b/locale/lo_LA.po
similarity index 74%
copy from locale/it_IT.po
copy to locale/lo_LA.po
index 2b3b167..92f0e1a 100644
--- a/locale/it_IT.po
+++ b/locale/lo_LA.po
@@ -14,6 +14,14 @@ msgctxt "field:product.category,account_cogs_used:"
msgid "Account Cost of Goods Sold Used"
msgstr ""
+msgctxt "field:product.product,account_cogs:"
+msgid "Account Cost of Goods Sold"
+msgstr ""
+
+msgctxt "field:product.product,account_cogs_used:"
+msgid "Account Cost of Goods Sold Used"
+msgstr ""
+
msgctxt "field:product.template,account_cogs:"
msgid "Account Cost of Goods Sold"
msgstr ""
@@ -30,6 +38,10 @@ msgctxt "field:stock.move,out_anglo_saxon_quantity:"
msgid "Output Anglo-Saxon Quantity"
msgstr ""
+msgctxt "help:product.product,account_cogs:"
+msgid "This account will be used instead of the one defined on the category."
+msgstr ""
+
msgctxt "help:product.template,account_cogs:"
msgid "This account will be used instead of the one defined on the category."
msgstr ""
diff --git a/locale/lt_LT.po b/locale/lt_LT.po
index 2b3b167..92f0e1a 100644
--- a/locale/lt_LT.po
+++ b/locale/lt_LT.po
@@ -14,6 +14,14 @@ msgctxt "field:product.category,account_cogs_used:"
msgid "Account Cost of Goods Sold Used"
msgstr ""
+msgctxt "field:product.product,account_cogs:"
+msgid "Account Cost of Goods Sold"
+msgstr ""
+
+msgctxt "field:product.product,account_cogs_used:"
+msgid "Account Cost of Goods Sold Used"
+msgstr ""
+
msgctxt "field:product.template,account_cogs:"
msgid "Account Cost of Goods Sold"
msgstr ""
@@ -30,6 +38,10 @@ msgctxt "field:stock.move,out_anglo_saxon_quantity:"
msgid "Output Anglo-Saxon Quantity"
msgstr ""
+msgctxt "help:product.product,account_cogs:"
+msgid "This account will be used instead of the one defined on the category."
+msgstr ""
+
msgctxt "help:product.template,account_cogs:"
msgid "This account will be used instead of the one defined on the category."
msgstr ""
diff --git a/locale/nl_NL.po b/locale/nl_NL.po
index c9e0dad..194174f 100644
--- a/locale/nl_NL.po
+++ b/locale/nl_NL.po
@@ -14,6 +14,14 @@ msgctxt "field:product.category,account_cogs_used:"
msgid "Account Cost of Goods Sold Used"
msgstr ""
+msgctxt "field:product.product,account_cogs:"
+msgid "Account Cost of Goods Sold"
+msgstr ""
+
+msgctxt "field:product.product,account_cogs_used:"
+msgid "Account Cost of Goods Sold Used"
+msgstr ""
+
msgctxt "field:product.template,account_cogs:"
msgid "Account Cost of Goods Sold"
msgstr ""
@@ -31,6 +39,12 @@ msgid "Output Anglo-Saxon Quantity"
msgstr ""
#, fuzzy
+msgctxt "help:product.product,account_cogs:"
+msgid "This account will be used instead of the one defined on the category."
+msgstr ""
+"Deze rekening zal gebruikt worden in de plaats van die van de categorie."
+
+#, fuzzy
msgctxt "help:product.template,account_cogs:"
msgid "This account will be used instead of the one defined on the category."
msgstr ""
diff --git a/locale/pt_BR.po b/locale/pt_BR.po
index 29160aa..e67c9b1 100644
--- a/locale/pt_BR.po
+++ b/locale/pt_BR.po
@@ -14,6 +14,16 @@ msgctxt "field:product.category,account_cogs_used:"
msgid "Account Cost of Goods Sold Used"
msgstr "Conta de Custo de Mercadorias Vendidas Utilizada"
+#, fuzzy
+msgctxt "field:product.product,account_cogs:"
+msgid "Account Cost of Goods Sold"
+msgstr "Conta de Custo de Mercadorias Vendidas"
+
+#, fuzzy
+msgctxt "field:product.product,account_cogs_used:"
+msgid "Account Cost of Goods Sold Used"
+msgstr "Conta de Custo de Mercadorias Vendidas Utilizada"
+
msgctxt "field:product.template,account_cogs:"
msgid "Account Cost of Goods Sold"
msgstr "Conta de Custo de Mercadorias Vendidas"
@@ -30,6 +40,11 @@ msgctxt "field:stock.move,out_anglo_saxon_quantity:"
msgid "Output Anglo-Saxon Quantity"
msgstr "Quantidade Anglo-Saxã de Saída"
+#, fuzzy
+msgctxt "help:product.product,account_cogs:"
+msgid "This account will be used instead of the one defined on the category."
+msgstr "Esta conta será utilizada no lugar daquela definida na categoria."
+
msgctxt "help:product.template,account_cogs:"
msgid "This account will be used instead of the one defined on the category."
msgstr "Esta conta será utilizada no lugar daquela definida na categoria."
diff --git a/locale/ru_RU.po b/locale/ru_RU.po
index 53972f5..07cd431 100644
--- a/locale/ru_RU.po
+++ b/locale/ru_RU.po
@@ -14,6 +14,14 @@ msgctxt "field:product.category,account_cogs_used:"
msgid "Account Cost of Goods Sold Used"
msgstr ""
+msgctxt "field:product.product,account_cogs:"
+msgid "Account Cost of Goods Sold"
+msgstr ""
+
+msgctxt "field:product.product,account_cogs_used:"
+msgid "Account Cost of Goods Sold Used"
+msgstr ""
+
msgctxt "field:product.template,account_cogs:"
msgid "Account Cost of Goods Sold"
msgstr ""
@@ -31,6 +39,11 @@ msgid "Output Anglo-Saxon Quantity"
msgstr ""
#, fuzzy
+msgctxt "help:product.product,account_cogs:"
+msgid "This account will be used instead of the one defined on the category."
+msgstr "Этот счет будет использован вместо указанного в категории."
+
+#, fuzzy
msgctxt "help:product.template,account_cogs:"
msgid "This account will be used instead of the one defined on the category."
msgstr "Этот счет будет использован вместо указанного в категории."
diff --git a/locale/sl_SI.po b/locale/sl_SI.po
index 648305a..013f07d 100644
--- a/locale/sl_SI.po
+++ b/locale/sl_SI.po
@@ -14,6 +14,16 @@ msgctxt "field:product.category,account_cogs_used:"
msgid "Account Cost of Goods Sold Used"
msgstr "Uporabljen konto stroškov prodanega blaga"
+#, fuzzy
+msgctxt "field:product.product,account_cogs:"
+msgid "Account Cost of Goods Sold"
+msgstr "Konto stroškov prodanega blaga"
+
+#, fuzzy
+msgctxt "field:product.product,account_cogs_used:"
+msgid "Account Cost of Goods Sold Used"
+msgstr "Uporabljen konto stroškov prodanega blaga"
+
msgctxt "field:product.template,account_cogs:"
msgid "Account Cost of Goods Sold"
msgstr "Konto stroškov prodanega blaga"
@@ -30,13 +40,14 @@ msgctxt "field:stock.move,out_anglo_saxon_quantity:"
msgid "Output Anglo-Saxon Quantity"
msgstr "Izhodna anglosaška količina"
-msgctxt "help:product.template,account_cogs:"
+#, fuzzy
+msgctxt "help:product.product,account_cogs:"
msgid "This account will be used instead of the one defined on the category."
msgstr "Namesto konta v kategoriji se bo uporabil ta konto prihodkov."
-msgctxt "model:account.account.template,name:"
-msgid "COGS"
-msgstr "COGS"
+msgctxt "help:product.template,account_cogs:"
+msgid "This account will be used instead of the one defined on the category."
+msgstr "Namesto konta v kategoriji se bo uporabil ta konto prihodkov."
msgctxt "selection:account.fiscalyear,account_stock_method:"
msgid "Anglo-Saxon"
diff --git a/locale/it_IT.po b/locale/zh_CN.po
similarity index 74%
copy from locale/it_IT.po
copy to locale/zh_CN.po
index 2b3b167..92f0e1a 100644
--- a/locale/it_IT.po
+++ b/locale/zh_CN.po
@@ -14,6 +14,14 @@ msgctxt "field:product.category,account_cogs_used:"
msgid "Account Cost of Goods Sold Used"
msgstr ""
+msgctxt "field:product.product,account_cogs:"
+msgid "Account Cost of Goods Sold"
+msgstr ""
+
+msgctxt "field:product.product,account_cogs_used:"
+msgid "Account Cost of Goods Sold Used"
+msgstr ""
+
msgctxt "field:product.template,account_cogs:"
msgid "Account Cost of Goods Sold"
msgstr ""
@@ -30,6 +38,10 @@ msgctxt "field:stock.move,out_anglo_saxon_quantity:"
msgid "Output Anglo-Saxon Quantity"
msgstr ""
+msgctxt "help:product.product,account_cogs:"
+msgid "This account will be used instead of the one defined on the category."
+msgstr ""
+
msgctxt "help:product.template,account_cogs:"
msgid "This account will be used instead of the one defined on the category."
msgstr ""
diff --git a/minimal_chart.xml b/minimal_chart.xml
index 0445d46..3f39fde 100644
--- a/minimal_chart.xml
+++ b/minimal_chart.xml
@@ -12,6 +12,7 @@ this repository contains the full copyright notices and license terms. -->
<field name="name" lang="es">CMV</field>
<field name="name" lang="fr">Prix du bien vendu</field>
<field name="name" lang="nl">COGS</field>
+ <field name="name" lang="pt">Custo das Mercadorias Vendidas (CMV)</field>
<field name="name" lang="ru">COGS</field>
<field name="name" lang="sl">COGS</field>
<field name="type" ref="account.account_type_template_expense"/>
diff --git a/minimal_chart_pt.xml b/minimal_chart_pt.xml
new file mode 100644
index 0000000..b89dafb
--- /dev/null
+++ b/minimal_chart_pt.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
+this repository contains the full copyright notices and license terms. -->
+<tryton>
+ <data>
+
+ <record id="account_template_cogs_pt" model="account.account.template">
+
+
+
+
+
+
+
+ <field name="name">Custo das Mercadorias Vendidas (CMV)</field>
+
+
+ <field name="type" ref="account.account_type_template_expense_pt"/>
+ <field name="reconcile" eval="True"/>
+ <field name="deferral" eval="True"/>
+ <field name="parent" ref="account.account_template_root_pt"/>
+ <field name="kind">other</field>
+ </record>
+
+ </data>
+</tryton>
diff --git a/product.py b/product.py
index 29809e3..aaa952b 100644
--- a/product.py
+++ b/product.py
@@ -6,11 +6,11 @@ from trytond.pool import PoolMeta
from trytond.modules.account_product import MissingFunction
-__all__ = ['Category', 'Template']
-__metaclass__ = PoolMeta
+__all__ = ['Category', 'Template', 'Product']
class Category:
+ __metaclass__ = PoolMeta
__name__ = 'product.category'
account_cogs = fields.Property(fields.Many2One('account.account',
'Account Cost of Goods Sold', domain=[
@@ -19,15 +19,17 @@ class Category:
],
states={
'invisible': (~Eval('context', {}, ).get('company')
- | Eval('account_parent')),
+ | Eval('account_parent')
+ | ~Eval('accounting', False)),
},
- depends=['account_parent']))
+ depends=['account_parent', 'accounting']))
account_cogs_used = MissingFunction(fields.Many2One('account.account',
'Account Cost of Goods Sold Used'), 'missing_account',
'get_account')
class Template:
+ __metaclass__ = PoolMeta
__name__ = 'product.template'
account_cogs = fields.Property(fields.Many2One('account.account',
'Account Cost of Goods Sold', domain=[
@@ -45,3 +47,12 @@ class Template:
account_cogs_used = MissingFunction(fields.Many2One('account.account',
'Account Cost of Goods Sold Used'), 'missing_account',
'get_account')
+
+
+class Product:
+ __metaclass__ = PoolMeta
+ __name__ = 'product.product'
+ # Avoid raise of UserError from MissingFunction
+ account_cogs_used = fields.Function(
+ fields.Many2One('account.account', 'Account Cost of Goods Sold Used'),
+ 'get_template')
diff --git a/setup.py b/setup.py
index 2b1bb5d..5fa3835 100644
--- a/setup.py
+++ b/setup.py
@@ -5,11 +5,17 @@
from setuptools import setup
import re
import os
-import ConfigParser
+import io
+try:
+ from configparser import ConfigParser
+except ImportError:
+ from ConfigParser import ConfigParser
def read(fname):
- return open(os.path.join(os.path.dirname(__file__), fname)).read()
+ return io.open(
+ os.path.join(os.path.dirname(__file__), fname),
+ 'r', encoding='utf-8').read()
def get_require_version(name):
@@ -21,7 +27,7 @@ def get_require_version(name):
major_version, minor_version + 1)
return require
-config = ConfigParser.ConfigParser()
+config = ConfigParser()
config.readfp(open('tryton.cfg'))
info = dict(config.items('tryton'))
for key in ('depends', 'extras_depend', 'xml'):
@@ -43,7 +49,7 @@ if minor_version % 2:
requires = []
for dep in info.get('depends', []):
- if not re.match(r'(ir|res|webdav)(\W|$)', dep):
+ if not re.match(r'(ir|res)(\W|$)', dep):
requires.append(get_require_version('trytond_%s' % dep))
requires.append(get_require_version('trytond'))
@@ -83,6 +89,8 @@ setup(name=name,
'Intended Audience :: Legal Industry',
'License :: OSI Approved :: GNU General Public License (GPL)',
'Natural Language :: Bulgarian',
+ 'Natural Language :: Catalan',
+ 'Natural Language :: Chinese (Simplified)',
'Natural Language :: Czech',
'Natural Language :: Dutch',
'Natural Language :: English',
@@ -96,6 +104,9 @@ setup(name=name,
'Natural Language :: Spanish',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2.7',
+ 'Programming Language :: Python :: 3.3',
+ 'Programming Language :: Python :: 3.4',
+ 'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Topic :: Office/Business',
@@ -112,4 +123,9 @@ setup(name=name,
test_suite='tests',
test_loader='trytond.test_loader:Loader',
tests_require=tests_require,
+ use_2to3=True,
+ convert_2to3_doctests=[
+ 'tests/scenario_account_stock_anglo_saxon.rst',
+ 'tests/scenario_account_stock_anglo_saxon_with_drop_shipment.rst',
+ ],
)
diff --git a/stock.py b/stock.py
index 97c7542..7f883a8 100644
--- a/stock.py
+++ b/stock.py
@@ -7,7 +7,6 @@ from trytond.transaction import Transaction
from trytond import backend
__all__ = ['Move']
-__metaclass__ = PoolMeta
def _get_field(type_):
@@ -18,6 +17,7 @@ def _get_field(type_):
class Move:
+ __metaclass__ = PoolMeta
__name__ = 'stock.move'
in_anglo_saxon_quantity = fields.Float('Input Anglo-Saxon Quantity',
required=True)
@@ -42,11 +42,11 @@ class Move:
@classmethod
def __register__(cls, module_name):
- cursor = Transaction().cursor
+ cursor = Transaction().connection.cursor()
TableHandler = backend.get('TableHandler')
super(Move, cls).__register__(module_name)
- table = TableHandler(cursor, cls, module_name)
+ table = TableHandler(cls, module_name)
# Migration from 2.8: split anglo_saxon_quantity
if table.column_exist('anglo_saxon_quantity'):
diff --git a/tests/__init__.py b/tests/__init__.py
index 27aab14..97177fd 100644
--- a/tests/__init__.py
+++ b/tests/__init__.py
@@ -1,6 +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 .test_account_stock_anglo_saxon import suite
+try:
+ from trytond.modules.account_stock_anglo_saxon.tests.test_account_stock_anglo_saxon import suite
+except ImportError:
+ from .test_account_stock_anglo_saxon import suite
__all__ = ['suite']
diff --git a/tests/scenario_account_stock_anglo_saxon.rst b/tests/scenario_account_stock_anglo_saxon.rst
index 74d99ba..7834c99 100644
--- a/tests/scenario_account_stock_anglo_saxon.rst
+++ b/tests/scenario_account_stock_anglo_saxon.rst
@@ -12,7 +12,7 @@ Imports::
... get_company
>>> from trytond.modules.account.tests.tools import create_fiscalyear, \
... create_chart, get_accounts
- >>> from.trytond.modules.account_invoice.tests.tools import \
+ >>> from trytond.modules.account_invoice.tests.tools import \
... set_fiscalyear_invoice_sequences, create_payment_term
>>> from trytond.modules.account_stock_continental.tests.tools import \
... add_stock_accounts
@@ -115,12 +115,6 @@ Create parties::
>>> customer = Party(name='Customer')
>>> customer.save()
-Create category::
-
- >>> ProductCategory = Model.get('product.category')
- >>> category = ProductCategory(name='Category')
- >>> category.save()
-
Create product::
>>> ProductUom = Model.get('product.uom')
@@ -130,7 +124,6 @@ Create product::
>>> product = Product()
>>> template = ProductTemplate()
>>> template.name = 'product'
- >>> template.category = category
>>> template.default_uom = unit
>>> template.type = 'goods'
>>> template.purchasable = True
@@ -138,7 +131,7 @@ Create product::
>>> template.list_price = Decimal('10')
>>> template.cost_price = Decimal('5')
>>> template.cost_price_method = 'fixed'
- >>> template.delivery_time = 0
+ >>> template.lead_time = datetime.timedelta(0)
>>> template.account_expense = expense
>>> template.account_revenue = revenue
>>> template.account_stock = stock
@@ -376,7 +369,6 @@ Now we will use a product with different unit of measure::
>>> product_by5 = Product()
>>> template_by5 = ProductTemplate()
>>> template_by5.name = 'product'
- >>> template_by5.category = category
>>> template_by5.default_uom = unit
>>> template_by5.type = 'goods'
>>> template_by5.purchasable = True
@@ -386,7 +378,7 @@ Now we will use a product with different unit of measure::
>>> template_by5.list_price = Decimal('10')
>>> template_by5.cost_price = Decimal('5')
>>> template_by5.cost_price_method = 'fixed'
- >>> template_by5.delivery_time = 0
+ >>> template_by5.lead_time = datetime.timedelta(0)
>>> template_by5.account_expense = expense
>>> template_by5.account_revenue = revenue
>>> template_by5.account_stock = stock
diff --git a/tests/scenario_account_stock_anglo_saxon_with_drop_shipment.rst b/tests/scenario_account_stock_anglo_saxon_with_drop_shipment.rst
index 7486136..bbb87aa 100644
--- a/tests/scenario_account_stock_anglo_saxon_with_drop_shipment.rst
+++ b/tests/scenario_account_stock_anglo_saxon_with_drop_shipment.rst
@@ -12,7 +12,7 @@ Imports::
... get_company
>>> from trytond.modules.account.tests.tools import create_fiscalyear, \
... create_chart, get_accounts
- >>> from.trytond.modules.account_invoice.tests.tools import \
+ >>> from trytond.modules.account_invoice.tests.tools import \
... set_fiscalyear_invoice_sequences, create_payment_term
>>> from trytond.modules.account_stock_continental.tests.tools import \
... add_stock_accounts
@@ -141,7 +141,7 @@ Create product::
>>> template.list_price = Decimal('10')
>>> template.cost_price = Decimal('5')
>>> template.cost_price_method = 'fixed'
- >>> template.delivery_time = 0
+ >>> template.lead_time = datetime.timedelta(0)
>>> template.account_expense = expense
>>> template.account_revenue = revenue
>>> template.account_stock = stock
@@ -161,7 +161,7 @@ Create product::
>>> product_supplier.product = template
>>> product_supplier.party = supplier
>>> product_supplier.drop_shipment = True
- >>> product_supplier.delivery_time = 0
+ >>> product_supplier.lead_time = datetime.timedelta(0)
>>> product_supplier.save()
Create payment term::
diff --git a/tests/test_account_stock_anglo_saxon.py b/tests/test_account_stock_anglo_saxon.py
index 7fb2a76..b807afc 100644
--- a/tests/test_account_stock_anglo_saxon.py
+++ b/tests/test_account_stock_anglo_saxon.py
@@ -6,51 +6,50 @@ import doctest
from mock import Mock, patch
import trytond.tests.test_tryton
-from trytond.tests.test_tryton import ModuleTestCase
-from trytond.tests.test_tryton import DB_NAME, USER, CONTEXT
+from trytond.tests.test_tryton import ModuleTestCase, with_transaction
from trytond.tests.test_tryton import doctest_setup, doctest_teardown
+from trytond.tests.test_tryton import doctest_checker
from trytond.pool import Pool
-from trytond.transaction import Transaction
class AccountStockAngloSaxonTestCase(ModuleTestCase):
'Test Account Stock Anglo Saxon module'
module = 'account_stock_anglo_saxon'
+ @with_transaction()
def test_get_anglo_saxon_move(self):
'Test _get_anglo_saxon_move'
- with Transaction().start(DB_NAME, USER, context=CONTEXT):
- pool = Pool()
- Move = pool.get('stock.move')
- Uom = pool.get('product.uom')
- Currency = pool.get('currency.currency')
+ pool = Pool()
+ Move = pool.get('stock.move')
+ Uom = pool.get('product.uom')
+ Currency = pool.get('currency.currency')
- def move(quantity, price):
- move = Mock()
- move.quantity = quantity
- move.unit_price = price
- move.cost_price = price
- move.in_anglo_saxon_quantity = 0
- move.out_anglo_saxon_quantity = 0
- return move
+ def move(quantity, price):
+ move = Mock()
+ move.quantity = quantity
+ move.unit_price = price
+ move.cost_price = price
+ move.in_anglo_saxon_quantity = 0
+ move.out_anglo_saxon_quantity = 0
+ return move
- with patch.object(Uom, 'compute_qty') as compute_qty, \
- patch.object(Uom, 'compute_price') as compute_price, \
- patch.object(Currency, 'compute') as compute:
- compute_qty.side_effect = lambda *args, **kwargs: args[1]
- compute_price.side_effect = lambda *args, **kwargs: args[1]
- compute.side_effect = lambda *args, **kwargs: args[1]
+ with patch.object(Uom, 'compute_qty') as compute_qty, \
+ patch.object(Uom, 'compute_price') as compute_price, \
+ patch.object(Currency, 'compute') as compute:
+ compute_qty.side_effect = lambda *args, **kwargs: args[1]
+ compute_price.side_effect = lambda *args, **kwargs: args[1]
+ compute.side_effect = lambda *args, **kwargs: args[1]
- moves = [move(1, 3), move(2, 2)]
- result = list(Move._get_anglo_saxon_move(
- moves, 1, 'in_supplier'))
- self.assertEqual(result, [(moves[0], 1, 3)])
+ moves = [move(1, 3), move(2, 2)]
+ result = list(Move._get_anglo_saxon_move(
+ moves, 1, 'in_supplier'))
+ self.assertEqual(result, [(moves[0], 1, 3)])
- moves = [move(1, 3), move(2, 2)]
- result = list(Move._get_anglo_saxon_move(
- moves, 2, 'in_supplier'))
- self.assertEqual(result,
- [(moves[0], 1, 3), (moves[1], 1, 2)])
+ moves = [move(1, 3), move(2, 2)]
+ result = list(Move._get_anglo_saxon_move(
+ moves, 2, 'in_supplier'))
+ self.assertEqual(result,
+ [(moves[0], 1, 3), (moves[1], 1, 2)])
def suite():
@@ -60,9 +59,11 @@ def suite():
suite.addTests(doctest.DocFileSuite(
'scenario_account_stock_anglo_saxon.rst',
setUp=doctest_setup, tearDown=doctest_teardown, encoding='utf-8',
+ checker=doctest_checker,
optionflags=doctest.REPORT_ONLY_FIRST_FAILURE))
suite.addTests(doctest.DocFileSuite(
'scenario_account_stock_anglo_saxon_with_drop_shipment.rst',
setUp=doctest_setup, tearDown=doctest_teardown, encoding='utf-8',
+ checker=doctest_checker,
optionflags=doctest.REPORT_ONLY_FIRST_FAILURE))
return suite
diff --git a/tryton.cfg b/tryton.cfg
index 3da6cc9..56eca1e 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
[tryton]
-version=3.8.0
+version=4.0.0
depends:
account
account_invoice
@@ -19,5 +19,6 @@ xml:
minimal_chart_es.xml
minimal_chart_fr.xml
minimal_chart_nl.xml
+ minimal_chart_pt.xml
minimal_chart_ru.xml
minimal_chart_sl.xml
diff --git a/trytond_account_stock_anglo_saxon.egg-info/PKG-INFO b/trytond_account_stock_anglo_saxon.egg-info/PKG-INFO
index 8417020..91099c9 100644
--- a/trytond_account_stock_anglo_saxon.egg-info/PKG-INFO
+++ b/trytond_account_stock_anglo_saxon.egg-info/PKG-INFO
@@ -1,12 +1,12 @@
Metadata-Version: 1.1
Name: trytond-account-stock-anglo-saxon
-Version: 3.8.0
+Version: 4.0.0
Summary: Tryton module for anglo-saxon real-time stock valuation
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.8/
+Download-URL: http://downloads.tryton.org/4.0/
Description: trytond_account_stock_anglo_saxon
=================================
@@ -53,6 +53,8 @@ Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: Intended Audience :: Legal Industry
Classifier: License :: OSI Approved :: GNU General Public License (GPL)
Classifier: Natural Language :: Bulgarian
+Classifier: Natural Language :: Catalan
+Classifier: Natural Language :: Chinese (Simplified)
Classifier: Natural Language :: Czech
Classifier: Natural Language :: Dutch
Classifier: Natural Language :: English
@@ -66,6 +68,9 @@ Classifier: Natural Language :: Slovenian
Classifier: Natural Language :: Spanish
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 2.7
+Classifier: Programming Language :: Python :: 3.3
+Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Office/Business
diff --git a/trytond_account_stock_anglo_saxon.egg-info/SOURCES.txt b/trytond_account_stock_anglo_saxon.egg-info/SOURCES.txt
index 83bc51d..1254755 100644
--- a/trytond_account_stock_anglo_saxon.egg-info/SOURCES.txt
+++ b/trytond_account_stock_anglo_saxon.egg-info/SOURCES.txt
@@ -13,6 +13,7 @@ minimal_chart_en.xml
minimal_chart_es.xml
minimal_chart_fr.xml
minimal_chart_nl.xml
+minimal_chart_pt.xml
minimal_chart_ru.xml
minimal_chart_sl.xml
product.xml
@@ -74,11 +75,13 @@ locale/fr_FR.po
locale/hu_HU.po
locale/it_IT.po
locale/ja_JP.po
+locale/lo_LA.po
locale/lt_LT.po
locale/nl_NL.po
locale/pt_BR.po
locale/ru_RU.po
locale/sl_SI.po
+locale/zh_CN.po
tests/scenario_account_stock_anglo_saxon.rst
tests/scenario_account_stock_anglo_saxon_with_drop_shipment.rst
trytond_account_stock_anglo_saxon.egg-info/PKG-INFO
diff --git a/trytond_account_stock_anglo_saxon.egg-info/requires.txt b/trytond_account_stock_anglo_saxon.egg-info/requires.txt
index 6be4a23..649750b 100644
--- a/trytond_account_stock_anglo_saxon.egg-info/requires.txt
+++ b/trytond_account_stock_anglo_saxon.egg-info/requires.txt
@@ -1,7 +1,7 @@
-trytond_account >= 3.8, < 3.9
-trytond_account_invoice >= 3.8, < 3.9
-trytond_account_product >= 3.8, < 3.9
-trytond_account_stock_continental >= 3.8, < 3.9
-trytond_purchase >= 3.8, < 3.9
-trytond_sale >= 3.8, < 3.9
-trytond >= 3.8, < 3.9
\ No newline at end of file
+trytond_account >= 4.0, < 4.1
+trytond_account_invoice >= 4.0, < 4.1
+trytond_account_product >= 4.0, < 4.1
+trytond_account_stock_continental >= 4.0, < 4.1
+trytond_purchase >= 4.0, < 4.1
+trytond_sale >= 4.0, < 4.1
+trytond >= 4.0, < 4.1
\ No newline at end of file
--
tryton-modules-account-stock-anglo-saxon
More information about the tryton-debian-vcs
mailing list