[tryton-debian-vcs] tryton-modules-account-stock-continental branch upstream updated. upstream/3.0.0-1-g28d1f4f
Mathias Behrle
tryton-debian-vcs at alioth.debian.org
Tue Apr 22 13:05:54 UTC 2014
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-continental.git;a=commitdiff;h=upstream/3.0.0-1-g28d1f4f
commit 28d1f4f8c9621e30ee8948f948bf36a391425b9d
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Tue Apr 22 14:20:51 2014 +0200
Adding upstream version 3.2.0.
diff --git a/CHANGELOG b/CHANGELOG
index ec13836..f6a670d 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,7 @@
+Version 3.2.0 - 2014-04-21
+* Bug fixes (see mercurial logs for details)
+* Remove account_move
+
Version 3.0.0 - 2013-10-21
* Bug fixes (see mercurial logs for details)
diff --git a/COPYRIGHT b/COPYRIGHT
index 7e8c156..c655746 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -1,5 +1,5 @@
-Copyright (C) 2010-2013 Cédric Krier.
-Copyright (C) 2010-2013 B2CK SPRL.
+Copyright (C) 2010-2014 Cédric Krier.
+Copyright (C) 2010-2014 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/INSTALL b/INSTALL
index 4da44ec..da815e8 100644
--- a/INSTALL
+++ b/INSTALL
@@ -4,7 +4,7 @@ Installing trytond_account_stock_continental
Prerequisites
-------------
- * Python 2.6 or later (http://www.python.org/)
+ * Python 2.7 or later (http://www.python.org/)
* trytond (http://www.tryton.org/)
* trytond_account (http://www.tryton.org/)
* trytond_account_product (http://www.tryton.org/)
diff --git a/MANIFEST.in b/MANIFEST.in
index fc0b03e..f2f691a 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,13 +1,11 @@
include INSTALL
include README
-include TODO
include COPYRIGHT
include CHANGELOG
include LICENSE
include tryton.cfg
include *.xml
include view/*.xml
-include *.odt
include locale/*.po
include doc/*
include tests/*.rst
diff --git a/PKG-INFO b/PKG-INFO
index d26251b..debbe73 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,12 +1,12 @@
Metadata-Version: 1.1
Name: trytond_account_stock_continental
-Version: 3.0.0
+Version: 3.2.0
Summary: Tryton module for continental real-time stock valuation
Home-page: http://www.tryton.org/
Author: Tryton
-Author-email: UNKNOWN
+Author-email: issue_tracker at tryton.org
License: GPL-3
-Download-URL: http://downloads.tryton.org/3.0/
+Download-URL: http://downloads.tryton.org/3.2/
Description: trytond_account_stock_continental
=================================
@@ -43,6 +43,7 @@ Description: trytond_account_stock_continental
http://www.tryton.org/
+Keywords: tryton account stock valuation continental
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Plugins
@@ -62,7 +63,6 @@ Classifier: Natural Language :: Russian
Classifier: Natural Language :: Slovenian
Classifier: Natural Language :: Spanish
Classifier: Operating System :: OS Independent
-Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Topic :: Office/Business
Classifier: Topic :: Office/Business :: Financial :: Accounting
diff --git a/account.py b/account.py
index eeef5b1..44d6724 100644
--- a/account.py
+++ b/account.py
@@ -27,4 +27,4 @@ class AccountMove:
@classmethod
def _get_origin(cls):
return super(AccountMove, cls)._get_origin() + ['stock.move',
- 'product.product']
+ 'product.product', 'product.template']
diff --git a/locale/bg_BG.po b/locale/bg_BG.po
index eeaf659..4aa74be 100644
--- a/locale/bg_BG.po
+++ b/locale/bg_BG.po
@@ -2,6 +2,12 @@
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
+msgctxt "error:product.template:"
+msgid ""
+"You cannot change the cost price for a product which is associated to stock moves.\n"
+"You must use the \"Update Cost Price\" wizard."
+msgstr ""
+
msgctxt "error:product.update_cost_price:"
msgid "The stock account and the counterpart can not be the same account"
msgstr ""
@@ -106,6 +112,11 @@ msgstr "ID"
#, fuzzy
msgctxt "field:product.update_cost_price.ask,product:"
+msgid "Variant"
+msgstr "Продукт"
+
+#, fuzzy
+msgctxt "field:product.update_cost_price.ask,template:"
msgid "Product"
msgstr "Продукт"
@@ -147,11 +158,6 @@ msgid "Stock Account"
msgstr ""
#, fuzzy
-msgctxt "field:stock.move,account_move:"
-msgid "Account Move"
-msgstr "Движение по сметка"
-
-#, fuzzy
msgctxt "help:product.template,account_stock:"
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 d85f42f..f65faa6 100644
--- a/locale/ca_ES.po
+++ b/locale/ca_ES.po
@@ -2,6 +2,14 @@
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
+msgctxt "error:product.template:"
+msgid ""
+"You cannot change the cost price for a product which is associated to stock moves.\n"
+"You must use the \"Update Cost Price\" wizard."
+msgstr ""
+"No podeu canviar el preu de cost d'un producte que està associat amb moviments d'estoc.\n"
+"Per actualitzar el cost heu d'utilitzar l'assistent \"Actualitza preu de cost\"."
+
msgctxt "error:product.update_cost_price:"
msgid "The stock account and the counterpart can not be the same account"
msgstr "El compte d'estoc i la contrapartida no poden ser el mateix compte."
@@ -103,6 +111,10 @@ msgid "ID"
msgstr "ID"
msgctxt "field:product.update_cost_price.ask,product:"
+msgid "Variant"
+msgstr "Variant"
+
+msgctxt "field:product.update_cost_price.ask,template:"
msgid "Product"
msgstr "Producte"
@@ -138,10 +150,6 @@ msgctxt "field:product.update_cost_price.show_move,stock_account:"
msgid "Stock Account"
msgstr "Compte d'estoc"
-msgctxt "field:stock.move,account_move:"
-msgid "Account Move"
-msgstr "Assentament comptable"
-
msgctxt "help:product.template,account_stock:"
msgid "This account will be used instead of the one defined on the category."
msgstr "S'utilitzarà aquest compte en lloc del definit a la categoria."
diff --git a/locale/cs_CZ.po b/locale/cs_CZ.po
index c060c7c..33c01bc 100644
--- a/locale/cs_CZ.po
+++ b/locale/cs_CZ.po
@@ -2,6 +2,12 @@
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
+msgctxt "error:product.template:"
+msgid ""
+"You cannot change the cost price for a product which is associated to stock moves.\n"
+"You must use the \"Update Cost Price\" wizard."
+msgstr ""
+
msgctxt "error:product.update_cost_price:"
msgid "The stock account and the counterpart can not be the same account"
msgstr ""
@@ -103,6 +109,10 @@ msgid "ID"
msgstr ""
msgctxt "field:product.update_cost_price.ask,product:"
+msgid "Variant"
+msgstr ""
+
+msgctxt "field:product.update_cost_price.ask,template:"
msgid "Product"
msgstr ""
@@ -138,10 +148,6 @@ msgctxt "field:product.update_cost_price.show_move,stock_account:"
msgid "Stock Account"
msgstr ""
-msgctxt "field:stock.move,account_move:"
-msgid "Account Move"
-msgstr ""
-
msgctxt "help:product.template,account_stock:"
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 de697d0..e375e43 100644
--- a/locale/de_DE.po
+++ b/locale/de_DE.po
@@ -2,6 +2,14 @@
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
+msgctxt "error:product.template:"
+msgid ""
+"You cannot change the cost price for a product which is associated to stock moves.\n"
+"You must use the \"Update Cost Price\" wizard."
+msgstr ""
+"Der Kostenpreis kann nicht direkt aktualisiert werden für Artikel, die Lagerbewegungen zugeordnet sind.\n"
+"Es muss die Aktion 'Kostenpreis aktualisieren' gewählt werden."
+
msgctxt "error:product.update_cost_price:"
msgid "The stock account and the counterpart can not be the same account"
msgstr "Lagerkonto und Gegenkonto können nicht dasselbe Konto sein"
@@ -103,6 +111,10 @@ msgid "ID"
msgstr "ID"
msgctxt "field:product.update_cost_price.ask,product:"
+msgid "Variant"
+msgstr "Artikel"
+
+msgctxt "field:product.update_cost_price.ask,template:"
msgid "Product"
msgstr "Artikel"
@@ -116,7 +128,7 @@ msgstr "Gegenkonto"
msgctxt "field:product.update_cost_price.show_move,currency_digits:"
msgid "Currency Digits"
-msgstr "Währung (signifikante Stellen)"
+msgstr "Nachkommastellen Währung"
msgctxt "field:product.update_cost_price.show_move,description:"
msgid "Description"
@@ -138,10 +150,6 @@ msgctxt "field:product.update_cost_price.show_move,stock_account:"
msgid "Stock Account"
msgstr "Lagerkonto"
-msgctxt "field:stock.move,account_move:"
-msgid "Account Move"
-msgstr "Buchungssatz"
-
msgctxt "help:product.template,account_stock:"
msgid "This account will be used instead of the one defined on the category."
msgstr ""
@@ -209,7 +217,7 @@ msgstr "Kostenpreis aktualisieren"
msgctxt "model:product.update_cost_price.ask,name:"
msgid "Update Cost Price Ask"
-msgstr "Kostenpreis Aktualisierung Nachfrage"
+msgstr "Nachfrage Kostenpreisaktualisierung"
msgctxt "model:product.update_cost_price.show_move,name:"
msgid "Update Cost Price Show Move"
diff --git a/locale/es_AR.po b/locale/es_AR.po
index 22427ee..9373e1e 100644
--- a/locale/es_AR.po
+++ b/locale/es_AR.po
@@ -2,6 +2,14 @@
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
+msgctxt "error:product.template:"
+msgid ""
+"You cannot change the cost price for a product which is associated to stock moves.\n"
+"You must use the \"Update Cost Price\" wizard."
+msgstr ""
+"No puede cambiar el costo de un producto que está asociado a movimientos de existencias.\n"
+"Debe usar el asistente «Actualizar precio de costo»."
+
msgctxt "error:product.update_cost_price:"
msgid "The stock account and the counterpart can not be the same account"
msgstr ""
@@ -104,6 +112,10 @@ msgid "ID"
msgstr "ID"
msgctxt "field:product.update_cost_price.ask,product:"
+msgid "Variant"
+msgstr "Variante"
+
+msgctxt "field:product.update_cost_price.ask,template:"
msgid "Product"
msgstr "Producto"
@@ -139,10 +151,6 @@ msgctxt "field:product.update_cost_price.show_move,stock_account:"
msgid "Stock Account"
msgstr "Cuenta de existencias"
-msgctxt "field:stock.move,account_move:"
-msgid "Account Move"
-msgstr "Asiento contable"
-
msgctxt "help:product.template,account_stock:"
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 5bb533b..06e8c16 100644
--- a/locale/es_CO.po
+++ b/locale/es_CO.po
@@ -2,14 +2,22 @@
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
+msgctxt "error:product.template:"
+msgid ""
+"You cannot change the cost price for a product which is associated to stock moves.\n"
+"You must use the \"Update Cost Price\" wizard."
+msgstr ""
+"No puede cambiar el costo de un producto el cual esta asociado a movimientos de inventarios.\n"
+"Usted debe usar el asistente de \"Actualización de Costo\"."
+
msgctxt "error:product.update_cost_price:"
msgid "The stock account and the counterpart can not be the same account"
msgstr ""
-"La cuenta de existencias y su contraparte no pued ser la misma cuenta."
+"La cuenta de inventarios y su contraparte no puede ser la misma cuenta."
msgctxt "field:account.configuration,cost_price_counterpart_account:"
msgid "Cost Price Counterpart Account"
-msgstr "Cuenta Equivalente de Precio de Costo"
+msgstr "Cuenta Equivalente del Costo"
msgctxt "field:account.configuration,stock_journal:"
msgid "Stock Journal"
@@ -17,99 +25,103 @@ msgstr "Inventario Diario "
msgctxt "field:product.category,account_stock:"
msgid "Account Stock"
-msgstr "Cuenta Existencias"
+msgstr "Cuenta de Inventarios"
msgctxt "field:product.category,account_stock_customer:"
msgid "Account Stock Customer"
-msgstr "Cuenta Existencias Cliente"
+msgstr "Cuenta de Inventarios Cliente"
msgctxt "field:product.category,account_stock_customer_used:"
msgid "Account Stock Customer Used"
-msgstr "Cuenta Existencias Cliente Usada"
+msgstr "Cuenta de Inventarios Cliente Utilizada"
msgctxt "field:product.category,account_stock_lost_found:"
msgid "Account Stock Lost and Found"
-msgstr "Cuenta Existencias Perdidos y Encontrados"
+msgstr "Cuenta Inventarios Perdidos y Encontrados"
msgctxt "field:product.category,account_stock_lost_found_used:"
msgid "Account Stock Lost and Found"
-msgstr "Cuenta Existencias Perdidos y Encontrados"
+msgstr "Cuenta Inventarios Perdidos y Encontrados"
msgctxt "field:product.category,account_stock_production:"
msgid "Account Stock Production"
-msgstr "Cuenta Existencias en Producción"
+msgstr "Cuenta Inventarios en Producción"
msgctxt "field:product.category,account_stock_production_used:"
msgid "Account Stock Production Used"
-msgstr "Cuenta Existencias en Producción Usada"
+msgstr "Cuenta Inventarios en Producción Utilizada"
msgctxt "field:product.category,account_stock_supplier:"
msgid "Account Stock Supplier"
-msgstr "Cuenta Existencias Proveedor"
+msgstr "Cuenta Inventarios Proveedor"
msgctxt "field:product.category,account_stock_supplier_used:"
msgid "Account Stock Supplier Used"
-msgstr "Cuenta Existencias Proveedor Usada"
+msgstr "Cuenta Inventarios Proveedor Utilizada"
msgctxt "field:product.category,account_stock_used:"
msgid "Account Stock Used"
-msgstr "Cuenta Existencias Usada"
+msgstr "Cuenta Inventarios Utilizada"
msgctxt "field:product.template,account_stock:"
msgid "Account Stock"
-msgstr "Cuenta Existencias"
+msgstr "Cuenta Inventarios"
msgctxt "field:product.template,account_stock_customer:"
msgid "Account Stock Customer"
-msgstr "Cuenta Existencias Cliente"
+msgstr "Cuenta Inventarios Cliente"
msgctxt "field:product.template,account_stock_customer_used:"
msgid "Account Stock Customer Used"
-msgstr "Cuenta Existencias Cliente Usada"
+msgstr "Cuenta Inventarios Cliente Utilizada"
msgctxt "field:product.template,account_stock_lost_found:"
msgid "Account Stock Lost and Found"
-msgstr "Cuenta Existencias Perdidos y Encontrados"
+msgstr "Cuenta Inventarios Perdidos y Encontrados"
msgctxt "field:product.template,account_stock_lost_found_used:"
msgid "Account Stock Lost and Found"
-msgstr "Cuenta Existencias Perdidos y Encontrados"
+msgstr "Cuenta Inventarios Perdidos y Encontrados"
msgctxt "field:product.template,account_stock_production:"
msgid "Account Stock Production"
-msgstr "Cuenta Existencias en Producción"
+msgstr "Cuenta Inventarios en Producción"
msgctxt "field:product.template,account_stock_production_used:"
msgid "Account Stock Production Used"
-msgstr "Cuenta Existencias en Producción Usada"
+msgstr "Cuenta Inventarios en Producción Utilizada"
msgctxt "field:product.template,account_stock_supplier:"
msgid "Account Stock Supplier"
-msgstr "Cuenta Existencias Proveedor"
+msgstr "Cuenta Inventarios Proveedor"
msgctxt "field:product.template,account_stock_supplier_used:"
msgid "Account Stock Supplier Used"
-msgstr "Cuenta Existencias Proveedor Usada"
+msgstr "Cuenta Inventarios Proveedor Utilizada"
msgctxt "field:product.template,account_stock_used:"
msgid "Account Stock Used"
-msgstr "Cuenta Existencias Usada"
+msgstr "Cuenta Inventarios Utilizada"
msgctxt "field:product.update_cost_price.ask,cost_price:"
msgid "Cost Price"
-msgstr "Precio de Costo"
+msgstr "Costo"
msgctxt "field:product.update_cost_price.ask,id:"
msgid "ID"
msgstr "ID"
msgctxt "field:product.update_cost_price.ask,product:"
-msgid "Product"
+msgid "Variant"
msgstr "Productos"
+msgctxt "field:product.update_cost_price.ask,template:"
+msgid "Product"
+msgstr "Producto"
+
msgctxt "field:product.update_cost_price.show_move,amount:"
msgid "Amount"
-msgstr "Cantidad"
+msgstr "Valor"
msgctxt "field:product.update_cost_price.show_move,counterpart:"
msgid "Counterpart"
@@ -129,7 +141,7 @@ msgstr "ID"
msgctxt "field:product.update_cost_price.show_move,journal:"
msgid "Journal"
-msgstr "Libro Diario"
+msgstr "Libro Contable"
msgctxt "field:product.update_cost_price.show_move,price_difference:"
msgid "Price Difference"
@@ -137,11 +149,7 @@ msgstr "Diferencia en Precio"
msgctxt "field:product.update_cost_price.show_move,stock_account:"
msgid "Stock Account"
-msgstr "Cuenta de Existencias"
-
-msgctxt "field:stock.move,account_move:"
-msgid "Account Move"
-msgstr "Asiento Contable"
+msgstr "Cuenta de Inventarios"
msgctxt "help:product.template,account_stock:"
msgid "This account will be used instead of the one defined on the category."
@@ -165,25 +173,25 @@ msgstr "Esta cuenta se usará en lugar de la definida en la categoría."
msgctxt "model:account.account.template,name:account_template_stock"
msgid "Stock"
-msgstr "Existencias"
+msgstr "Inventarios"
msgctxt "model:account.account.template,name:account_template_stock_customer"
msgid "Stock Customer"
-msgstr "Existencias de Cliente"
+msgstr "Inventarios de Cliente"
msgctxt ""
"model:account.account.template,name:account_template_stock_lost_found"
msgid "Stock Lost and Found"
-msgstr "Existencias de Perdido y Encontrado"
+msgstr "Inventarios Perdidos y Encontrados"
msgctxt ""
"model:account.account.template,name:account_template_stock_production"
msgid "Stock Production"
-msgstr "Existencias en Producción"
+msgstr "Inventarios en Producción"
msgctxt "model:account.account.template,name:account_template_stock_supplier"
msgid "Stock Supplier"
-msgstr "Existencias de Proveedor"
+msgstr "Inventarios de Proveedor"
msgctxt ""
"model:account.account.type.template,name:account_type_template_asset_current_inventories"
diff --git a/locale/es_ES.po b/locale/es_ES.po
index 7b0555c..3244ecb 100644
--- a/locale/es_ES.po
+++ b/locale/es_ES.po
@@ -2,6 +2,14 @@
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
+msgctxt "error:product.template:"
+msgid ""
+"You cannot change the cost price for a product which is associated to stock moves.\n"
+"You must use the \"Update Cost Price\" wizard."
+msgstr ""
+"No se puede cambiar el precio de coste de un producto que está asociado a movimientos de stock.\n"
+"Para actualizar el coste debe utilizar el asistente \"Actualizar precio de coste\"."
+
msgctxt "error:product.update_cost_price:"
msgid "The stock account and the counterpart can not be the same account"
msgstr "La cuenta de stock y la contrapartida no pueden ser la misma cuenta."
@@ -103,6 +111,10 @@ msgid "ID"
msgstr "ID"
msgctxt "field:product.update_cost_price.ask,product:"
+msgid "Variant"
+msgstr "Variante"
+
+msgctxt "field:product.update_cost_price.ask,template:"
msgid "Product"
msgstr "Producto"
@@ -138,10 +150,6 @@ msgctxt "field:product.update_cost_price.show_move,stock_account:"
msgid "Stock Account"
msgstr "Cuenta de stock"
-msgctxt "field:stock.move,account_move:"
-msgid "Account Move"
-msgstr "Asiento contable"
-
msgctxt "help:product.template,account_stock:"
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."
@@ -164,7 +172,7 @@ msgstr "Se usará esta cuenta en lugar de la definida en la categoría."
msgctxt "model:account.account.template,name:account_template_stock"
msgid "Stock"
-msgstr "Stock"
+msgstr "Existencias"
msgctxt "model:account.account.template,name:account_template_stock_customer"
msgid "Stock Customer"
diff --git a/locale/fr_FR.po b/locale/fr_FR.po
index 78c7b65..0843b45 100644
--- a/locale/fr_FR.po
+++ b/locale/fr_FR.po
@@ -2,6 +2,14 @@
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
+msgctxt "error:product.template:"
+msgid ""
+"You cannot change the cost price for a product which is associated to stock moves.\n"
+"You must use the \"Update Cost Price\" wizard."
+msgstr ""
+"Vous ne pouvez pas changer le prix de revient pour un produit qui a déjà fait l'objet de mouvements de stock.\n"
+"Vous devez utiliser l'assistant \"Mise à jour du prix de revient\"."
+
msgctxt "error:product.update_cost_price:"
msgid "The stock account and the counterpart can not be the same account"
msgstr "Le compte de stock doit être différent du compte de contrepartie"
@@ -103,6 +111,10 @@ msgid "ID"
msgstr "ID"
msgctxt "field:product.update_cost_price.ask,product:"
+msgid "Variant"
+msgstr "Variante"
+
+msgctxt "field:product.update_cost_price.ask,template:"
msgid "Product"
msgstr "Produit"
@@ -138,10 +150,6 @@ msgctxt "field:product.update_cost_price.show_move,stock_account:"
msgid "Stock Account"
msgstr "Compte de stock"
-msgctxt "field:stock.move,account_move:"
-msgid "Account Move"
-msgstr "Mouvement comptable"
-
msgctxt "help:product.template,account_stock:"
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/nl_NL.po b/locale/nl_NL.po
index 7932e58..a4af13c 100644
--- a/locale/nl_NL.po
+++ b/locale/nl_NL.po
@@ -2,6 +2,12 @@
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
+msgctxt "error:product.template:"
+msgid ""
+"You cannot change the cost price for a product which is associated to stock moves.\n"
+"You must use the \"Update Cost Price\" wizard."
+msgstr ""
+
msgctxt "error:product.update_cost_price:"
msgid "The stock account and the counterpart can not be the same account"
msgstr ""
@@ -105,6 +111,11 @@ msgstr ""
#, fuzzy
msgctxt "field:product.update_cost_price.ask,product:"
+msgid "Variant"
+msgstr "Producten"
+
+#, fuzzy
+msgctxt "field:product.update_cost_price.ask,template:"
msgid "Product"
msgstr "Producten"
@@ -145,11 +156,6 @@ msgid "Stock Account"
msgstr ""
#, fuzzy
-msgctxt "field:stock.move,account_move:"
-msgid "Account Move"
-msgstr "Boeking"
-
-#, fuzzy
msgctxt "help:product.template,account_stock:"
msgid "This account will be used instead of the one defined on the category."
msgstr ""
diff --git a/locale/ru_RU.po b/locale/ru_RU.po
index d2ea565..265233f 100644
--- a/locale/ru_RU.po
+++ b/locale/ru_RU.po
@@ -2,6 +2,12 @@
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
+msgctxt "error:product.template:"
+msgid ""
+"You cannot change the cost price for a product which is associated to stock moves.\n"
+"You must use the \"Update Cost Price\" wizard."
+msgstr ""
+
msgctxt "error:product.update_cost_price:"
msgid "The stock account and the counterpart can not be the same account"
msgstr ""
@@ -106,6 +112,11 @@ msgstr "ID"
#, fuzzy
msgctxt "field:product.update_cost_price.ask,product:"
+msgid "Variant"
+msgstr "Товарно материальные ценности (ТМЦ)"
+
+#, fuzzy
+msgctxt "field:product.update_cost_price.ask,template:"
msgid "Product"
msgstr "Товарно материальные ценности (ТМЦ)"
@@ -147,11 +158,6 @@ msgid "Stock Account"
msgstr ""
#, fuzzy
-msgctxt "field:stock.move,account_move:"
-msgid "Account Move"
-msgstr "Проводка"
-
-#, fuzzy
msgctxt "help:product.template,account_stock:"
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 79bbd52..d64b726 100644
--- a/locale/sl_SI.po
+++ b/locale/sl_SI.po
@@ -2,6 +2,14 @@
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
+msgctxt "error:product.template:"
+msgid ""
+"You cannot change the cost price for a product which is associated to stock moves.\n"
+"You must use the \"Update Cost Price\" wizard."
+msgstr ""
+"Nabavne cene izdelka, povezanega s prometom zaloge, ni možno popravljati.\n"
+"Uporabiti morate čarovnika za posodobitev nabavnih cen."
+
msgctxt "error:product.update_cost_price:"
msgid "The stock account and the counterpart can not be the same account"
msgstr "Konto in protikonto zaloge ne moreta biti isti konto"
@@ -103,6 +111,10 @@ msgid "ID"
msgstr "ID"
msgctxt "field:product.update_cost_price.ask,product:"
+msgid "Variant"
+msgstr "Različica"
+
+msgctxt "field:product.update_cost_price.ask,template:"
msgid "Product"
msgstr "Izdelek"
@@ -138,10 +150,6 @@ msgctxt "field:product.update_cost_price.show_move,stock_account:"
msgid "Stock Account"
msgstr "Konto zaloge"
-msgctxt "field:stock.move,account_move:"
-msgid "Account Move"
-msgstr "Knjižba"
-
msgctxt "help:product.template,account_stock:"
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."
diff --git a/product.py b/product.py
index 98fe1a0..84cb8ab 100644
--- a/product.py
+++ b/product.py
@@ -1,6 +1,8 @@
#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 functools import partial
+
from trytond.model import ModelView, fields
from trytond.wizard import Wizard, StateView, StateTransition, Button
from trytond.pyson import Eval, Get
@@ -174,17 +176,25 @@ class Template:
@classmethod
def __setup__(cls):
super(Template, cls).__setup__()
- cls.cost_price.states['readonly'] = (
- cls.cost_price.states.get('readonly', False)
- | ((Eval('type', 'goods') == 'goods') & (Eval('id', -1) >= 0)))
- if 'type' not in cls.cost_price.depends:
- cls.cost_price.depends.append('type')
+ cls._modify_no_move.append(('cost_price', 'change_cost_price'))
+ cls._error_messages.update({
+ 'change_cost_price': ('You cannot change the cost price for '
+ 'a product which is associated to stock moves.\n'
+ 'You must use the "Update Cost Price" wizard.'),
+ })
class UpdateCostPriceAsk(ModelView):
'Update Cost Price Ask'
__name__ = 'product.update_cost_price.ask'
- product = fields.Many2One('product.product', 'Product', readonly=True)
+ template = fields.Many2One('product.template', 'Product', readonly=True,
+ states={
+ 'invisible': ~Eval('template'),
+ })
+ product = fields.Many2One('product.product', 'Variant', readonly=True,
+ states={
+ 'invisible': ~Eval('product'),
+ })
cost_price = fields.Numeric('Cost Price', required=True, digits=(16, 4))
@@ -236,24 +246,44 @@ class UpdateCostPrice(Wizard):
})
def default_ask_price(self, fields):
- if 'product' in fields:
+ context = Transaction().context
+ if ('product' in fields
+ and context['active_model'] == 'product.product'):
+ return {
+ 'product': context['active_id'],
+ }
+ elif ('template' in fields
+ and context['active_model'] == 'product.template'):
return {
- 'product': Transaction().context['active_id'],
+ 'template': context['active_id'],
}
+ else:
+ return {}
@staticmethod
- def get_quantity():
+ def get_product():
+ 'Return the product or template instance'
pool = Pool()
- Date = pool.get('ir.date')
Product = pool.get('product.product')
+ ProductTemplate = pool.get('product.template')
+ context = Transaction().context
+ if context['active_model'] == 'product.product':
+ return Product(context['active_id'])
+ else:
+ return ProductTemplate(context['active_id'])
+
+ @classmethod
+ def get_quantity(cls):
+ pool = Pool()
+ Date = pool.get('ir.date')
Stock = pool.get('stock.location')
locations = Stock.search([('type', '=', 'storage')])
stock_date_end = Date.today()
with Transaction().set_context(locations=[l.id for l in locations],
stock_date_end=stock_date_end):
- product = Product(Transaction().context['active_id'])
- if hasattr(Product, 'cost_price'):
+ product = cls.get_product()
+ if hasattr(product.__class__, 'cost_price'):
return product.quantity
else:
return product.template.quantity
@@ -267,9 +297,8 @@ class UpdateCostPrice(Wizard):
pool = Pool()
User = pool.get('res.user')
AccountConfiguration = pool.get('account.configuration')
- Product = pool.get('product.product')
- product = Product(Transaction().context['active_id'])
+ product = self.get_product()
price_diff = (self.ask_price.cost_price
- product.cost_price)
user = User(Transaction().user)
@@ -319,7 +348,7 @@ class UpdateCostPrice(Wizard):
period=period_id,
journal=self.show_move.journal,
date=Date.today(),
- origin=self.ask_price.product,
+ origin=self.get_product(),
lines=self.get_move_lines(),
)
@@ -335,6 +364,19 @@ class UpdateCostPrice(Wizard):
return 'update_price'
def transition_update_price(self):
- self.ask_price.product.cost_price = self.ask_price.cost_price
- self.ask_price.product.save()
+ pool = Pool()
+ Product = pool.get('product.product')
+ ProductTemplate = pool.get('product.template')
+
+ if hasattr(Product, 'cost_price'):
+ write = partial(Product.write, [self.ask_price.product])
+ else:
+ if self.ask_price.template:
+ template = self.ask_price.template
+ else:
+ template = self.ask_price.product.template
+ write = partial(ProductTemplate.write, [template])
+
+ with Transaction().set_user(0, set_context=True):
+ write({'cost_price': self.ask_price.cost_price})
return 'end'
diff --git a/product.xml b/product.xml
index a9fa732..bf2d3a9 100644
--- a/product.xml
+++ b/product.xml
@@ -17,11 +17,16 @@ this repository contains the full copyright notices and license terms. -->
<field name="name">Update Cost Price</field>
<field name="wiz_name">product.update_cost_price</field>
</record>
- <record model="ir.action.keyword" id="update_cost_price_keyword">
+ <record model="ir.action.keyword" id="update_cost_price_product_keyword">
<field name="keyword">form_action</field>
<field name="model">product.product,-1</field>
<field name="action" ref="wizard_update_cost_price"/>
</record>
+ <record model="ir.action.keyword" id="update_cost_price_template_keyword">
+ <field name="keyword">form_action</field>
+ <field name="model">product.template,-1</field>
+ <field name="action" ref="wizard_update_cost_price"/>
+ </record>
<record model="ir.action-res.group"
id="wizard_update_cost_price-group_account">
<field name="action" ref="wizard_update_cost_price"/>
diff --git a/setup.py b/setup.py
index a5f4047..49bcbe3 100644
--- a/setup.py
+++ b/setup.py
@@ -11,40 +11,56 @@ import ConfigParser
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
+
+def get_require_version(name):
+ if minor_version % 2:
+ require = '%s >= %s.%s.dev0, < %s.%s'
+ else:
+ require = '%s >= %s.%s, < %s.%s'
+ require %= (name, major_version, minor_version,
+ major_version, minor_version + 1)
+ return require
+
config = ConfigParser.ConfigParser()
config.readfp(open('tryton.cfg'))
info = dict(config.items('tryton'))
for key in ('depends', 'extras_depend', 'xml'):
if key in info:
info[key] = info[key].strip().splitlines()
-major_version, minor_version, _ = info.get('version', '0.0.1').split('.', 2)
+version = info.get('version', '0.0.1')
+major_version, minor_version, _ = version.split('.', 2)
major_version = int(major_version)
minor_version = int(minor_version)
+name = 'trytond_account_stock_continental'
+
+download_url = 'http://downloads.tryton.org/%s.%s/' % (
+ major_version, minor_version)
+if minor_version % 2:
+ version = '%s.%s.dev0' % (major_version, minor_version)
+ download_url = (
+ 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % (
+ name[8:], name, version))
requires = []
for dep in info.get('depends', []):
if not re.match(r'(ir|res|webdav)(\W|$)', dep):
- requires.append('trytond_%s >= %s.%s, < %s.%s' %
- (dep, major_version, minor_version, major_version,
- minor_version + 1))
-requires.append('trytond >= %s.%s, < %s.%s' %
- (major_version, minor_version, major_version, minor_version + 1))
+ requires.append(get_require_version('trytond_%s' % dep))
+requires.append(get_require_version('trytond'))
-tests_require = ['proteus >= %s.%s, < %s.%s' %
- (major_version, minor_version, major_version, minor_version + 1)]
-for dep in ['sale', 'purchase', 'account_invoice']:
- tests_require.append('trytond_%s >= %s.%s, < %s.%s' %
- (dep, major_version, minor_version, major_version,
- minor_version + 1))
+tests_require = [get_require_version('proteus')]
+for dep in ['sale', 'purchase', 'account_invoice',
+ 'sale_supply_drop_shipment']:
+ tests_require.append(get_require_version('trytond_%s' % dep))
-setup(name='trytond_account_stock_continental',
- version=info.get('version', '0.0.1'),
+setup(name=name,
+ version=version,
description='Tryton module for continental real-time stock valuation',
long_description=read('README'),
author='Tryton',
+ author_email='issue_tracker at tryton.org',
url='http://www.tryton.org/',
- download_url=("http://downloads.tryton.org/" +
- info.get('version', '0.0.1').rsplit('.', 1)[0] + '/'),
+ download_url=download_url,
+ keywords='tryton account stock valuation continental',
package_dir={'trytond.modules.account_stock_continental': '.'},
packages=[
'trytond.modules.account_stock_continental',
@@ -73,7 +89,6 @@ setup(name='trytond_account_stock_continental',
'Natural Language :: Slovenian',
'Natural Language :: Spanish',
'Operating System :: OS Independent',
- 'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Topic :: Office/Business',
'Topic :: Office/Business :: Financial :: Accounting',
diff --git a/stock.py b/stock.py
index abfb0d0..d077bf9 100644
--- a/stock.py
+++ b/stock.py
@@ -2,7 +2,7 @@
#this repository contains the full copyright notices and license terms.
from decimal import Decimal
-from trytond.model import Workflow, ModelView, fields
+from trytond.model import Workflow, ModelView
from trytond.pool import Pool, PoolMeta
from trytond.transaction import Transaction
@@ -12,8 +12,6 @@ __metaclass__ = PoolMeta
class Move:
__name__ = 'stock.move'
- account_move = fields.Many2One('account.move', 'Account Move',
- readonly=True)
def _get_account_stock_move_lines(self, type_):
'''
@@ -74,28 +72,6 @@ class Move:
move_line.credit = Decimal('0.0')
return move_line
- def _get_account_stock_move(self, move_lines):
- '''
- Return account move value for stock move
- '''
- pool = Pool()
- Date = pool.get('ir.date')
- Period = pool.get('account.period')
- AccountConfiguration = pool.get('account.configuration')
- AccountMove = pool.get('account.move')
-
- date = self.effective_date or Date.today()
- period_id = Period.find(self.company.id, date=date)
- account_configuration = AccountConfiguration(1)
- with Transaction().set_user(0, set_context=True):
- return AccountMove(
- journal=account_configuration.stock_journal,
- period=period_id,
- date=date,
- origin=self,
- lines=move_lines,
- )
-
def _get_account_stock_move_type(self):
'''
Get account move type
@@ -122,17 +98,21 @@ class Move:
elif type_ == ('production', 'storage'):
return 'in_production'
- def _create_account_stock_move(self):
+ def _get_account_stock_move(self):
'''
- Create account move for stock move
+ Return account move for stock move
'''
- AccountMove = Pool().get('account.move')
+ pool = Pool()
+ AccountMove = pool.get('account.move')
+ Date = pool.get('ir.date')
+ Period = pool.get('account.period')
+ AccountConfiguration = pool.get('account.configuration')
+
if self.product.type != 'goods':
return
type_ = self._get_account_stock_move_type()
if not type_:
return
- assert not self.account_move, 'account move field not empty'
if type_ == 'supplier_customer':
account_move_lines = self._get_account_stock_move_lines(
'in_supplier')
@@ -153,14 +133,17 @@ class Move:
if move_line:
account_move_lines.append(move_line)
- account_move = self._get_account_stock_move(account_move_lines)
- account_move.save()
+ date = self.effective_date or Date.today()
+ period_id = Period.find(self.company.id, date=date)
+ account_configuration = AccountConfiguration(1)
with Transaction().set_user(0, set_context=True):
- AccountMove.post([account_move])
- self.write([self], {
- 'account_move': account_move.id,
- })
- return account_move
+ return AccountMove(
+ journal=account_configuration.stock_journal,
+ period=period_id,
+ date=date,
+ origin=self,
+ lines=account_move_lines,
+ )
@classmethod
def copy(cls, moves, default=None):
@@ -174,6 +157,13 @@ class Move:
@ModelView.button
@Workflow.transition('done')
def do(cls, moves):
+ pool = Pool()
+ AccountMove = pool.get('account.move')
super(Move, cls).do(moves)
+ account_moves = []
for move in moves:
- move._create_account_stock_move()
+ account_moves.append(move._get_account_stock_move())
+ with Transaction().set_user(0, set_context=True):
+ account_moves = AccountMove.create(
+ [m._save_values for m in account_moves if m])
+ AccountMove.post(account_moves)
diff --git a/tests/scenario_account_stock_continental.rst b/tests/scenario_account_stock_continental.rst
index f4b8cba..0436942 100644
--- a/tests/scenario_account_stock_continental.rst
+++ b/tests/scenario_account_stock_continental.rst
@@ -24,7 +24,7 @@ Install account_stock_continental, sale and purchase::
>>> Module = Model.get('ir.module.module')
>>> modules = Module.find([
... ('name', 'in', ('account_stock_continental',
- ... 'sale', 'purchase')),
+ ... 'sale', 'purchase', 'sale_supply_drop_shipment')),
... ])
>>> Module.install([x.id for x in modules], config.context)
>>> Wizard('ir.module.module.install_upgrade').execute('upgrade')
@@ -38,14 +38,14 @@ Create company::
>>> company_config = Wizard('company.company.config')
>>> company_config.execute('company')
>>> company = company_config.form
- >>> party = Party(name='B2CK')
+ >>> party = Party(name='Dunder Mifflin')
>>> party.save()
>>> company.party = party
- >>> currencies = Currency.find([('code', '=', 'EUR')])
+ >>> currencies = Currency.find([('code', '=', 'USD')])
>>> if not currencies:
- ... currency = Currency(name='Euro', symbol=u'€', code='EUR',
+ ... currency = Currency(name='U.S. Dollar', symbol='$', code='USD',
... rounding=Decimal('0.01'), mon_grouping='[3, 3, 0]',
- ... mon_decimal_point=',')
+ ... mon_decimal_point='.', mon_thousands_sep=',')
... currency.save()
... CurrencyRate(date=today + relativedelta(month=1, day=1),
... rate=Decimal('1.0'), currency=currency).save()
@@ -220,13 +220,15 @@ Receive 9 products::
>>> shipment.state
u'done'
>>> stock_supplier.reload()
- >>> (stock_supplier.debit, stock_supplier.credit) == \
- ... (Decimal('0.00'), Decimal('50.00'))
- True
+ >>> stock_supplier.debit
+ Decimal('0.00')
+ >>> stock_supplier.credit
+ Decimal('50.00')
>>> stock.reload()
- >>> (stock.debit, stock.credit) == \
- ... (Decimal('50.00'), Decimal('0.00'))
- True
+ >>> stock.debit
+ Decimal('50.00')
+ >>> stock.credit
+ Decimal('0.00')
Open supplier invoice::
@@ -243,13 +245,15 @@ Open supplier invoice::
>>> invoice.state
u'posted'
>>> payable.reload()
- >>> (payable.debit, payable.credit) == \
- ... (Decimal('0.00'), Decimal('44.00'))
- True
+ >>> payable.debit
+ Decimal('0.00')
+ >>> payable.credit
+ Decimal('44.00')
>>> expense.reload()
- >>> (expense.debit, expense.credit) == \
- ... (Decimal('44.00'), Decimal('0.00'))
- True
+ >>> expense.debit
+ Decimal('44.00')
+ >>> expense.credit
+ Decimal('0.00')
Sale 5 products::
@@ -291,13 +295,15 @@ Send 5 products::
>>> shipment.state
u'done'
>>> stock_customer.reload()
- >>> (stock_customer.debit, stock_customer.credit) == \
- ... (Decimal('28.00'), Decimal('0.00'))
- True
+ >>> stock_customer.debit
+ Decimal('28.00')
+ >>> stock_customer.credit
+ Decimal('0.00')
>>> stock.reload()
- >>> (stock.debit, stock.credit) == \
- ... (Decimal('50.00'), Decimal('28.00'))
- True
+ >>> stock.debit
+ Decimal('50.00')
+ >>> stock.credit
+ Decimal('28.00')
Open customer invoice::
@@ -307,13 +313,15 @@ Open customer invoice::
>>> invoice.state
u'posted'
>>> receivable.reload()
- >>> (receivable.debit, receivable.credit) == \
- ... (Decimal('50.00'), Decimal('0.00'))
- True
+ >>> receivable.debit
+ Decimal('50.00')
+ >>> receivable.credit
+ Decimal('0.00')
>>> revenue.reload()
- >>> (revenue.debit, revenue.credit) == \
- ... (Decimal('0.00'), Decimal('50.00'))
- True
+ >>> revenue.debit
+ Decimal('0.00')
+ >>> revenue.credit
+ Decimal('50.00')
Create an Inventory::
@@ -335,51 +343,115 @@ Create an Inventory::
>>> inventory.state
u'done'
>>> stock_lost_found.reload()
- >>> (stock_lost_found.debit, stock_lost_found.credit) == \
- ... (Decimal('11.00'), Decimal('0.00'))
- True
+ >>> stock_lost_found.debit
+ Decimal('11.00')
+ >>> stock_lost_found.credit
+ Decimal('0.00')
>>> stock.reload()
- >>> (stock.debit, stock.credit) == \
- ... (Decimal('50.00'), Decimal('39.00'))
- True
+ >>> stock.debit
+ Decimal('50.00')
+ >>> stock.credit
+ Decimal('39.00')
+
+Create Drop Shipment Move::
+
+ >>> ProductSupplier = Model.get('purchase.product_supplier')
+ >>> product_supplier = ProductSupplier()
+ >>> product_supplier.product = product.template
+ >>> product_supplier.party = supplier
+ >>> product_supplier.drop_shipment = True
+ >>> product_supplier.delivery_time = 0
+ >>> product_supplier.save()
+ >>> product.template.supply_on_sale = True
+ >>> product.template.save()
+
+ >>> sale = Sale()
+ >>> sale.party = customer
+ >>> sale.payment_term = payment_term
+ >>> sale_line = sale.lines.new()
+ >>> sale_line.product = product
+ >>> sale_line.quantity = 3
+ >>> sale.click('quote')
+ >>> sale.click('confirm')
+ >>> sale.click('process')
+ >>> sale.state
+ u'processing'
+
+ >>> PurchaseRequest = Model.get('purchase.request')
+ >>> purchase_request, = PurchaseRequest.find()
+ >>> create_purchase = Wizard('purchase.request.create_purchase',
+ ... [purchase_request])
+ >>> create_purchase.form.payment_term = payment_term
+ >>> create_purchase.execute('start')
+ >>> purchase = purchase_request.purchase
+ >>> purchase_line, = purchase.lines
+ >>> purchase_line.unit_price = Decimal(6)
+ >>> purchase.click('quote')
+ >>> purchase.click('confirm')
+ >>> purchase.state
+ u'confirmed'
+
+ >>> shipment, = sale.drop_shipments
+ >>> shipment.click('done')
+ >>> shipment.state
+ u'done'
-Create Move from Supplier to Customer::
-
- >>> supplier_location, = Location.find([('code', '=', 'SUP')])
- >>> customer_location, = Location.find([('code', '=', 'CUS')])
- >>> move = Move()
- >>> move.product = product
- >>> move.quantity = 3
- >>> move.from_location = supplier_location
- >>> move.to_location = customer_location
- >>> move.unit_price = Decimal(6)
- >>> move.cost_price = move.unit_price
- >>> move.currency = currency
- >>> move.save()
- >>> Move.do([move.id], config.context)
>>> stock_supplier.reload()
- >>> (stock_supplier.debit, stock_supplier.credit) == \
- ... (Decimal(0), Decimal(68))
- True
+ >>> stock_supplier.debit
+ Decimal('0.00')
+ >>> stock_supplier.credit
+ Decimal('68.00')
>>> stock_customer.reload()
- >>> (stock_customer.debit, stock_customer.credit) == \
- ... (Decimal(46), Decimal(0))
- True
- >>> move = Move()
- >>> move.product = product_average
- >>> move.quantity = 4
- >>> move.from_location = supplier_location
- >>> move.to_location = customer_location
- >>> move.unit_price = Decimal(5)
- >>> move.cost_price = move.unit_price
- >>> move.currency = currency
- >>> move.save()
- >>> Move.do([move.id], config.context)
+ >>> stock_customer.debit
+ Decimal('46.00')
+ >>> stock_customer.credit
+ Decimal('0.00')
+
+ >>> product_supplier = ProductSupplier()
+ >>> product_supplier.product = product_average.template
+ >>> product_supplier.party = supplier
+ >>> product_supplier.drop_shipment = True
+ >>> product_supplier.delivery_time = 0
+ >>> product_supplier.save()
+ >>> product_average.template.supply_on_sale = True
+ >>> product_average.template.save()
+
+ >>> sale = Sale()
+ >>> sale.party = customer
+ >>> sale.payment_term = payment_term
+ >>> sale_line = sale.lines.new()
+ >>> sale_line.product = product_average
+ >>> sale_line.quantity = 4
+ >>> sale.click('quote')
+ >>> sale.click('confirm')
+ >>> sale.click('process')
+ >>> sale.state
+ u'processing'
+
+ >>> purchase_request, = [p for p in PurchaseRequest.find()
+ ... if p.state == 'draft']
+ >>> create_purchase = Wizard('purchase.request.create_purchase',
+ ... [purchase_request])
+ >>> purchase = purchase_request.purchase
+ >>> purchase_line, = purchase.lines
+ >>> purchase_line.unit_price = Decimal(5)
+ >>> purchase.click('quote')
+ >>> purchase.click('confirm')
+ >>> purchase.state
+ u'confirmed'
+
+ >>> shipment, = sale.drop_shipments
+ >>> shipment.click('done')
+ >>> shipment.state
+ u'done'
+
>>> stock_supplier.reload()
- >>> (stock_supplier.debit, stock_supplier.credit) == \
- ... (Decimal(0), Decimal(88))
- True
+ >>> stock_supplier.debit
+ Decimal('0.00')
+ >>> stock_supplier.credit
+ Decimal('88.00')
>>> stock_customer.reload()
- >>> (stock_customer.debit, stock_customer.credit) == \
- ... (Decimal('66'), Decimal(0))
- True
+ >>> stock_customer.debit
+ Decimal('66.00')
+ >>> stock_customer.credit
+ Decimal('0.00')
diff --git a/tests/test_account_stock_continental.py b/tests/test_account_stock_continental.py
index 1a466ac..2a5a423 100644
--- a/tests/test_account_stock_continental.py
+++ b/tests/test_account_stock_continental.py
@@ -1,55 +1,26 @@
-#!/usr/bin/env 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.
-
-import sys
-import os
-DIR = os.path.abspath(os.path.normpath(os.path.join(__file__,
- '..', '..', '..', '..', '..', 'trytond')))
-if os.path.isdir(DIR):
- sys.path.insert(0, os.path.dirname(DIR))
-
import unittest
import doctest
import trytond.tests.test_tryton
-from trytond.tests.test_tryton import test_view, test_depends
-from trytond.backend.sqlite.database import Database as SQLiteDatabase
+from trytond.tests.test_tryton import test_view, test_depends, doctest_dropdb
class AccountStockContinentalTestCase(unittest.TestCase):
- '''
- Test Account Stock Continental module.
- '''
+ 'Test Account Stock Continental module'
def setUp(self):
trytond.tests.test_tryton.install_module('account_stock_continental')
def test0005views(self):
- '''
- Test views.
- '''
+ 'Test views'
test_view('account_stock_continental')
def test0006depends(self):
- '''
- Test depends.
- '''
+ 'Test depends'
test_depends()
-def doctest_dropdb(test):
- '''
- Remove sqlite memory database
- '''
- database = SQLiteDatabase().connect()
- cursor = database.cursor(autocommit=True)
- try:
- database.drop(cursor, ':memory:')
- cursor.commit()
- finally:
- cursor.close()
-
-
def suite():
suite = trytond.tests.test_tryton.suite()
suite.addTests(unittest.TestLoader().loadTestsFromTestCase(
@@ -59,6 +30,3 @@ def suite():
setUp=doctest_dropdb, tearDown=doctest_dropdb, encoding='utf-8',
optionflags=doctest.REPORT_ONLY_FIRST_FAILURE))
return suite
-
-if __name__ == '__main__':
- unittest.TextTestRunner(verbosity=2).run(suite())
diff --git a/tryton.cfg b/tryton.cfg
index 4cbc310..5f372f3 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
[tryton]
-version=3.0.0
+version=3.2.0
depends:
account
account_product
diff --git a/trytond_account_stock_continental.egg-info/PKG-INFO b/trytond_account_stock_continental.egg-info/PKG-INFO
index e00c89c..d4649e7 100644
--- a/trytond_account_stock_continental.egg-info/PKG-INFO
+++ b/trytond_account_stock_continental.egg-info/PKG-INFO
@@ -1,12 +1,12 @@
Metadata-Version: 1.1
Name: trytond-account-stock-continental
-Version: 3.0.0
+Version: 3.2.0
Summary: Tryton module for continental real-time stock valuation
Home-page: http://www.tryton.org/
Author: Tryton
-Author-email: UNKNOWN
+Author-email: issue_tracker at tryton.org
License: GPL-3
-Download-URL: http://downloads.tryton.org/3.0/
+Download-URL: http://downloads.tryton.org/3.2/
Description: trytond_account_stock_continental
=================================
@@ -43,6 +43,7 @@ Description: trytond_account_stock_continental
http://www.tryton.org/
+Keywords: tryton account stock valuation continental
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Plugins
@@ -62,7 +63,6 @@ Classifier: Natural Language :: Russian
Classifier: Natural Language :: Slovenian
Classifier: Natural Language :: Spanish
Classifier: Operating System :: OS Independent
-Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Topic :: Office/Business
Classifier: Topic :: Office/Business :: Financial :: Accounting
diff --git a/trytond_account_stock_continental.egg-info/requires.txt b/trytond_account_stock_continental.egg-info/requires.txt
index 8652fa9..fac8bed 100644
--- a/trytond_account_stock_continental.egg-info/requires.txt
+++ b/trytond_account_stock_continental.egg-info/requires.txt
@@ -1,4 +1,4 @@
-trytond_account >= 3.0, < 3.1
-trytond_account_product >= 3.0, < 3.1
-trytond_stock >= 3.0, < 3.1
-trytond >= 3.0, < 3.1
\ No newline at end of file
+trytond_account >= 3.2, < 3.3
+trytond_account_product >= 3.2, < 3.3
+trytond_stock >= 3.2, < 3.3
+trytond >= 3.2, < 3.3
\ No newline at end of file
diff --git a/view/update_cost_price_ask_form.xml b/view/update_cost_price_ask_form.xml
index 744bc88..bfd6430 100644
--- a/view/update_cost_price_ask_form.xml
+++ b/view/update_cost_price_ask_form.xml
@@ -2,8 +2,14 @@
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<form string="Update Cost Price" cursor="cost_price">
- <label name="product"/>
- <field name="product"/>
+ <group id="label_product_template" col="1" xexpand="0">
+ <label name="template"/>
+ <label name="product"/>
+ </group>
+ <group id="product_template" col="1">
+ <field name="template"/>
+ <field name="product"/>
+ </group>
<label name="cost_price"/>
<field name="cost_price"/>
</form>
--
tryton-modules-account-stock-continental
More information about the tryton-debian-vcs
mailing list