[tryton-debian-vcs] tryton-modules-stock-forecast branch debian updated. debian/3.4.1-1-2-gb614638
Mathias Behrle
tryton-debian-vcs at alioth.debian.org
Thu Apr 23 16:06:52 UTC 2015
The following commit has been merged in the debian branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-modules-stock-forecast.git;a=commitdiff;h=debian/3.4.1-1-2-gb614638
commit b61463883ef9f4e07556ecfbea5b11deabd5597b
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Thu Apr 23 17:00:07 2015 +0200
Merging upstream version 3.6.0.
diff --git a/CHANGELOG b/CHANGELOG
index 487be12..baf1680 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,5 +1,7 @@
-Version 3.4.1 - 2015-02-19
+Version 3.6.0 - 2015-04-20
* Bug fixes (see mercurial logs for details)
+* Add support for PyPy
+* Deactivate forecast with passed period
Version 3.4.0 - 2014-10-20
* Bug fixes (see mercurial logs for details)
diff --git a/PKG-INFO b/PKG-INFO
index 895a5e4..aabe66d 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,12 +1,12 @@
Metadata-Version: 1.1
Name: trytond_stock_forecast
-Version: 3.4.1
+Version: 3.6.0
Summary: Tryton module with stock forecasts
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.4/
+Download-URL: http://downloads.tryton.org/3.6/
Description: trytond_stock_forecast
======================
@@ -65,4 +65,6 @@ Classifier: Natural Language :: Slovenian
Classifier: Natural Language :: Spanish
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 2.7
+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 545bad1..59f23c7 100644
--- a/__init__.py
+++ b/__init__.py
@@ -1,5 +1,5 @@
-#This file is part of Tryton. The COPYRIGHT file at the top level of this
-#repository contains the full copyright notices and license terms.
+# 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 trytond.pool import Pool
from .forecast import *
diff --git a/doc/index.rst b/doc/index.rst
index df1bb5a..725e3ad 100644
--- a/doc/index.rst
+++ b/doc/index.rst
@@ -25,6 +25,8 @@ The forecast form contains:
The "Complete Forecast" button allow to auto-complete forecast lines
based on previous stock output for dates in the past.
+The forecasts are deactivated automatically when their period has passed.
+
Forecast States
^^^^^^^^^^^^^^^
@@ -47,4 +49,4 @@ Done
Cancel
On a cancelled forecast all existing moves are cancelled and the form
- is readonly.
\ No newline at end of file
+ is readonly.
diff --git a/forecast.py b/forecast.py
index 2d718c1..81208b9 100644
--- a/forecast.py
+++ b/forecast.py
@@ -1,8 +1,10 @@
-#This file is part of Tryton. The COPYRIGHT file at the top level of
-#this repository contains the full copyright notices and license terms.
+# 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 datetime
from dateutil.relativedelta import relativedelta
import itertools
+
+from sql import Null
from sql.aggregate import Sum
from sql.conditionals import Coalesce
@@ -56,6 +58,8 @@ class Forecast(Workflow, ModelSQL, ModelView):
('done', 'Done'),
('cancel', 'Cancel'),
], 'State', readonly=True, select=True)
+ active = fields.Function(fields.Boolean('Active'),
+ 'get_active', searcher='search_active')
@classmethod
def __setup__(cls):
@@ -155,6 +159,33 @@ class Forecast(Workflow, ModelSQL, ModelView):
def default_company():
return Transaction().context.get('company')
+ def get_active(self, name):
+ pool = Pool()
+ Date = pool.get('ir.date')
+ return self.to_date >= Date.today()
+
+ @classmethod
+ def search_active(cls, name, clause):
+ pool = Pool()
+ Date = pool.get('ir.date')
+
+ today = Date.today()
+ operators = {
+ '=': '>=',
+ '!=': '<',
+ }
+ reverse = {
+ '=': '!=',
+ '!=': '=',
+ }
+ if clause[1] in operators:
+ if clause[2]:
+ return [('to_date', operators[clause[1]], today)]
+ else:
+ return [('to_date', operators[reverse[clause[1]]], today)]
+ else:
+ return []
+
@classmethod
def validate(cls, forecasts):
super(Forecast, cls).validate(forecasts)
@@ -308,13 +339,10 @@ class ForecastLine(ModelSQL, ModelView):
@fields.depends('product')
def on_change_product(self):
- res = {}
- res['unit_digits'] = 2
+ self.unit_digits = 2
if self.product:
- res['uom'] = self.product.default_uom.id
- res['uom.rec_name'] = self.product.default_uom.rec_name
- res['unit_digits'] = self.product.default_uom.digits
- return res
+ self.uom = self.product.default_uom
+ self.unit_digits = self.product.default_uom.digits
@fields.depends('product')
def on_change_with_product_uom_category(self, name=None):
@@ -323,11 +351,9 @@ class ForecastLine(ModelSQL, ModelView):
@fields.depends('uom')
def on_change_uom(self):
- res = {}
- res['unit_digits'] = 2
+ self.unit_digits = 2
if self.uom:
- res['unit_digits'] = self.uom.digits
- return res
+ self.unit_digits = self.uom.digits
def get_unit_digits(self, name):
return self.product.default_uom.digits
@@ -373,7 +399,7 @@ class ForecastLine(ModelSQL, ModelView):
>= forecast.from_date)
& (Coalesce(move.effective_date, move.planned_date)
<= forecast.to_date)
- & (line_move.id == None),
+ & (line_move.id == Null),
group_by=move.product))
for product_id, quantity in cursor.fetchall():
line = product2line[product_id]
@@ -532,7 +558,7 @@ class ForecastComplete(Wizard):
res = {}
for field in ("to_date", "from_date"):
- res[field] = forecast[field] - relativedelta(years=1)
+ res[field] = getattr(forecast, field) - relativedelta(years=1)
return res
def _get_product_quantity(self):
diff --git a/forecast.xml b/forecast.xml
index 18546ff..38279a0 100644
--- a/forecast.xml
+++ b/forecast.xml
@@ -36,7 +36,7 @@ this repository contains the full copyright notices and license terms. -->
<record model="ir.action.act_window" id="act_forecast_form">
<field name="name">Forecasts</field>
<field name="res_model">stock.forecast</field>
- <field name="search_value">[('create_date', '>=', DateTime(hour=0, minute=0, second=0, microsecond=0, delta_years=-2))]</field>
+ <field name="search_value"></field>
</record>
<record model="ir.action.act_window.view"
id="act_forecast_form_view1">
@@ -50,16 +50,22 @@ this repository contains the full copyright notices and license terms. -->
<field name="view" ref="forecast_view_form"/>
<field name="act_window" ref="act_forecast_form"/>
</record>
- <record model="ir.action.act_window.domain" id="act_forecast_form_domain_all">
- <field name="name">All</field>
+ <record model="ir.action.act_window.domain" id="act_forecast_form_domain_draft">
+ <field name="name">Draft</field>
<field name="sequence" eval="10"/>
- <field name="domain"></field>
+ <field name="domain" eval="[('state', '=', 'draft')]" pyson="1"/>
<field name="act_window" ref="act_forecast_form"/>
</record>
- <record model="ir.action.act_window.domain" id="act_forecast_form_domain_draft">
- <field name="name">Draft</field>
+ <record model="ir.action.act_window.domain" id="act_forecast_form_domain_done">
+ <field name="name">Done</field>
<field name="sequence" eval="20"/>
- <field name="domain">[('state', '=', 'draft')]</field>
+ <field name="domain" eval="[('state', '=', 'done')]" pyson="1"/>
+ <field name="act_window" ref="act_forecast_form"/>
+ </record>
+ <record model="ir.action.act_window.domain" id="act_forecast_form_domain_all">
+ <field name="name">All</field>
+ <field name="sequence" eval="9999"/>
+ <field name="domain"></field>
<field name="act_window" ref="act_forecast_form"/>
</record>
<menuitem parent="stock.menu_stock" sequence="50"
diff --git a/locale/bg_BG.po b/locale/bg_BG.po
index a765728..68ddfd6 100644
--- a/locale/bg_BG.po
+++ b/locale/bg_BG.po
@@ -32,6 +32,11 @@ msgctxt "error:stock.forecast:"
msgid "Forecast \"%s\" must be cancelled before deletion."
msgstr ""
+#, fuzzy
+msgctxt "field:stock.forecast,active:"
+msgid "Active"
+msgstr "Активен"
+
msgctxt "field:stock.forecast,company:"
msgid "Company"
msgstr "Фирма"
@@ -209,6 +214,11 @@ msgid "All"
msgstr ""
#, fuzzy
+msgctxt "model:ir.action.act_window.domain,name:act_forecast_form_domain_done"
+msgid "Done"
+msgstr "Приключено"
+
+#, fuzzy
msgctxt ""
"model:ir.action.act_window.domain,name:act_forecast_form_domain_draft"
msgid "Draft"
diff --git a/locale/ca_ES.po b/locale/ca_ES.po
index efc0ed1..eb656a8 100644
--- a/locale/ca_ES.po
+++ b/locale/ca_ES.po
@@ -34,6 +34,10 @@ msgctxt "error:stock.forecast:"
msgid "Forecast \"%s\" must be cancelled before deletion."
msgstr "Heu de cancel·lar la previsió \"%s\" abans de ser eliminat."
+msgctxt "field:stock.forecast,active:"
+msgid "Active"
+msgstr "Actiu"
+
msgctxt "field:stock.forecast,company:"
msgid "Company"
msgstr "Empresa"
@@ -208,7 +212,11 @@ msgstr "Previsió completa"
msgctxt "model:ir.action.act_window.domain,name:act_forecast_form_domain_all"
msgid "All"
-msgstr "Tots"
+msgstr "Totes"
+
+msgctxt "model:ir.action.act_window.domain,name:act_forecast_form_domain_done"
+msgid "Done"
+msgstr "Finalitzada"
msgctxt ""
"model:ir.action.act_window.domain,name:act_forecast_form_domain_draft"
@@ -249,7 +257,7 @@ msgstr "Cancel·lada"
msgctxt "selection:stock.forecast,state:"
msgid "Done"
-msgstr "Acabada"
+msgstr "Finalitzada"
msgctxt "selection:stock.forecast,state:"
msgid "Draft"
@@ -257,11 +265,11 @@ msgstr "Esborrany"
msgctxt "view:stock.forecast.complete.ask:"
msgid "Choose dates"
-msgstr "Triar dates"
+msgstr "Seleccioneu dates"
msgctxt "view:stock.forecast.complete.choose:"
msgid "Choose products"
-msgstr "Triar productes"
+msgstr "Seleccioneu productes"
msgctxt "view:stock.forecast.line:"
msgid "Forecast Line"
@@ -301,7 +309,7 @@ msgstr "Restaura a esborrany"
msgctxt "wizard_button:stock.forecast.complete,ask,choose:"
msgid "Choose Products"
-msgstr "Seleccioni productes"
+msgstr "Selecciona productes"
msgctxt "wizard_button:stock.forecast.complete,ask,complete:"
msgid "Complete"
@@ -313,7 +321,7 @@ msgstr "Cancel·la"
msgctxt "wizard_button:stock.forecast.complete,choose,ask:"
msgid "Choose Dates"
-msgstr "Seleccioni dates"
+msgstr "Selecciona dates"
msgctxt "wizard_button:stock.forecast.complete,choose,complete:"
msgid "Complete"
diff --git a/locale/cs_CZ.po b/locale/cs_CZ.po
index fa3243a..a144685 100644
--- a/locale/cs_CZ.po
+++ b/locale/cs_CZ.po
@@ -32,6 +32,10 @@ msgctxt "error:stock.forecast:"
msgid "Forecast \"%s\" must be cancelled before deletion."
msgstr ""
+msgctxt "field:stock.forecast,active:"
+msgid "Active"
+msgstr ""
+
msgctxt "field:stock.forecast,company:"
msgid "Company"
msgstr ""
@@ -208,6 +212,10 @@ msgctxt "model:ir.action.act_window.domain,name:act_forecast_form_domain_all"
msgid "All"
msgstr ""
+msgctxt "model:ir.action.act_window.domain,name:act_forecast_form_domain_done"
+msgid "Done"
+msgstr ""
+
msgctxt ""
"model:ir.action.act_window.domain,name:act_forecast_form_domain_draft"
msgid "Draft"
diff --git a/locale/de_DE.po b/locale/de_DE.po
index b778f60..46b3ea0 100644
--- a/locale/de_DE.po
+++ b/locale/de_DE.po
@@ -36,6 +36,10 @@ msgstr ""
"Bedarfsermittlung \"%s\" muss annulliert werden, bevor sie gelöscht werden "
"kann."
+msgctxt "field:stock.forecast,active:"
+msgid "Active"
+msgstr "Aktiv"
+
msgctxt "field:stock.forecast,company:"
msgid "Company"
msgstr "Unternehmen"
@@ -212,6 +216,10 @@ msgctxt "model:ir.action.act_window.domain,name:act_forecast_form_domain_all"
msgid "All"
msgstr "Alle"
+msgctxt "model:ir.action.act_window.domain,name:act_forecast_form_domain_done"
+msgid "Done"
+msgstr "Erledigt"
+
msgctxt ""
"model:ir.action.act_window.domain,name:act_forecast_form_domain_draft"
msgid "Draft"
diff --git a/locale/es_AR.po b/locale/es_AR.po
index 15d5983..78979fa 100644
--- a/locale/es_AR.po
+++ b/locale/es_AR.po
@@ -34,6 +34,10 @@ msgctxt "error:stock.forecast:"
msgid "Forecast \"%s\" must be cancelled before deletion."
msgstr "Debe cancelar la previsión «%s» antes de eliminar."
+msgctxt "field:stock.forecast,active:"
+msgid "Active"
+msgstr "Activo"
+
msgctxt "field:stock.forecast,company:"
msgid "Company"
msgstr "Empresa"
@@ -152,7 +156,7 @@ msgstr "Nombre"
msgctxt "field:stock.forecast.line,unit_digits:"
msgid "Unit Digits"
-msgstr "Dígitos de unidad"
+msgstr "Decimales de unidad"
msgctxt "field:stock.forecast.line,uom:"
msgid "UOM"
@@ -210,6 +214,10 @@ msgctxt "model:ir.action.act_window.domain,name:act_forecast_form_domain_all"
msgid "All"
msgstr "Todo"
+msgctxt "model:ir.action.act_window.domain,name:act_forecast_form_domain_done"
+msgid "Done"
+msgstr "Realizado"
+
msgctxt ""
"model:ir.action.act_window.domain,name:act_forecast_form_domain_draft"
msgid "Draft"
diff --git a/locale/es_CO.po b/locale/es_CO.po
index bdf3cba..439498a 100644
--- a/locale/es_CO.po
+++ b/locale/es_CO.po
@@ -34,6 +34,10 @@ msgctxt "error:stock.forecast:"
msgid "Forecast \"%s\" must be cancelled before deletion."
msgstr "La proyección \"%s\" debe ser cancelada antes de su eliminación."
+msgctxt "field:stock.forecast,active:"
+msgid "Active"
+msgstr "Activo"
+
msgctxt "field:stock.forecast,company:"
msgid "Company"
msgstr "Compañía"
@@ -210,6 +214,10 @@ msgctxt "model:ir.action.act_window.domain,name:act_forecast_form_domain_all"
msgid "All"
msgstr "Todo"
+msgctxt "model:ir.action.act_window.domain,name:act_forecast_form_domain_done"
+msgid "Done"
+msgstr "Hecho"
+
msgctxt ""
"model:ir.action.act_window.domain,name:act_forecast_form_domain_draft"
msgid "Draft"
diff --git a/locale/es_EC.po b/locale/es_EC.po
index 227155b..6fff5de 100644
--- a/locale/es_EC.po
+++ b/locale/es_EC.po
@@ -4,7 +4,7 @@ msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "error:stock.forecast.complete:"
msgid "\"From Date\" should be smaller than \"To Date\"."
-msgstr "\"Desde la Fecha\" debe ser menor que \"Hasta la Fecha\"."
+msgstr "\"Desde la Fecha\" debe ser anterior que \"Hasta la Fecha\"."
msgctxt "error:stock.forecast.line:"
msgid "Line quantity must be greater than the minimal quantity"
@@ -12,15 +12,15 @@ msgstr "La cantidad por línea debe ser mayor que la cantidad mínima"
msgctxt "error:stock.forecast.line:"
msgid "Line quantity must be positive"
-msgstr "La cantidad en la línea debe ser positiva"
+msgstr "La cantidad de la línea debe ser positiva"
msgctxt "error:stock.forecast.line:"
msgid "Product must be unique by forecast"
-msgstr "El producto debe ser único en la previsión de existencias"
+msgstr "El producto debe ser único en la previsión de stocks"
msgctxt "error:stock.forecast:"
msgid "\"To Date\" must be greater than \"From Date\""
-msgstr "\"Hasta la Fecha\" debe ser mayor que \"Desde la Fecha\""
+msgstr "\"Hasta la Fecha\" debe ser posterior que \"Desde la Fecha\""
msgctxt "error:stock.forecast:"
msgid ""
@@ -34,6 +34,10 @@ msgctxt "error:stock.forecast:"
msgid "Forecast \"%s\" must be cancelled before deletion."
msgstr "Debe cancelar la previsión \"%s\" antes de eliminarla."
+msgctxt "field:stock.forecast,active:"
+msgid "Active"
+msgstr "Activo"
+
msgctxt "field:stock.forecast,company:"
msgid "Company"
msgstr "Empresa"
@@ -210,6 +214,10 @@ msgctxt "model:ir.action.act_window.domain,name:act_forecast_form_domain_all"
msgid "All"
msgstr "Todo"
+msgctxt "model:ir.action.act_window.domain,name:act_forecast_form_domain_done"
+msgid "Done"
+msgstr "Realizado"
+
msgctxt ""
"model:ir.action.act_window.domain,name:act_forecast_form_domain_draft"
msgid "Draft"
@@ -221,11 +229,11 @@ msgstr "Previsiones"
msgctxt "model:res.group,name:group_stock_forecast"
msgid "Stock Forecast"
-msgstr "Previsión de Existencias"
+msgstr "Previsión de Stock"
msgctxt "model:stock.forecast,name:"
msgid "Stock Forecast"
-msgstr "Previsión de Existencias"
+msgstr "Previsión de Stock"
msgctxt "model:stock.forecast.complete.ask,name:"
msgid "Complete Forecast"
@@ -237,7 +245,7 @@ msgstr "Elegir Previsión Completa"
msgctxt "model:stock.forecast.line,name:"
msgid "Stock Forecast Line"
-msgstr "Línea de Previsión de Existencias"
+msgstr "Línea de Previsión de Stock"
msgctxt "model:stock.forecast.line-stock.move,name:"
msgid "ForecastLine - Move"
@@ -273,7 +281,7 @@ msgstr "Líneas de Previsión"
msgctxt "view:stock.forecast:"
msgid "Add forecast line based on past data."
-msgstr "Adicione líneas de proyecciones basadas en fechas pasadas."
+msgstr "Añadir líneas de proyecciones basadas en fechas pasadas."
msgctxt "view:stock.forecast:"
msgid "Cancel"
@@ -297,7 +305,7 @@ msgstr "Previsiones"
msgctxt "view:stock.forecast:"
msgid "Reset to Draft"
-msgstr "Restaurar a Borrador"
+msgstr "Restablecer a Borrador"
msgctxt "wizard_button:stock.forecast.complete,ask,choose:"
msgid "Choose Products"
@@ -317,7 +325,7 @@ msgstr "Seleccionar Fechas"
msgctxt "wizard_button:stock.forecast.complete,choose,complete:"
msgid "Complete"
-msgstr "Completa"
+msgstr "Completar"
msgctxt "wizard_button:stock.forecast.complete,choose,end:"
msgid "Cancel"
diff --git a/locale/es_ES.po b/locale/es_ES.po
index b6b325d..f1511e2 100644
--- a/locale/es_ES.po
+++ b/locale/es_ES.po
@@ -34,6 +34,10 @@ msgctxt "error:stock.forecast:"
msgid "Forecast \"%s\" must be cancelled before deletion."
msgstr "Debe cancelar la previsión \"%s\" antes de borrarla."
+msgctxt "field:stock.forecast,active:"
+msgid "Active"
+msgstr "Activo"
+
msgctxt "field:stock.forecast,company:"
msgid "Company"
msgstr "Empresa"
@@ -208,7 +212,11 @@ msgstr "Previsión completa"
msgctxt "model:ir.action.act_window.domain,name:act_forecast_form_domain_all"
msgid "All"
-msgstr "Todos"
+msgstr "Todas"
+
+msgctxt "model:ir.action.act_window.domain,name:act_forecast_form_domain_done"
+msgid "Done"
+msgstr "Finalizada"
msgctxt ""
"model:ir.action.act_window.domain,name:act_forecast_form_domain_draft"
@@ -249,7 +257,7 @@ msgstr "Cancelada"
msgctxt "selection:stock.forecast,state:"
msgid "Done"
-msgstr "Realizada"
+msgstr "Finalizada"
msgctxt "selection:stock.forecast,state:"
msgid "Draft"
diff --git a/locale/fr_FR.po b/locale/fr_FR.po
index 605fa5d..92db4ee 100644
--- a/locale/fr_FR.po
+++ b/locale/fr_FR.po
@@ -35,6 +35,10 @@ msgctxt "error:stock.forecast:"
msgid "Forecast \"%s\" must be cancelled before deletion."
msgstr "La prévision « %s » doit être anullée avant suppression."
+msgctxt "field:stock.forecast,active:"
+msgid "Active"
+msgstr "Actif"
+
msgctxt "field:stock.forecast,company:"
msgid "Company"
msgstr "Société"
@@ -211,6 +215,10 @@ msgctxt "model:ir.action.act_window.domain,name:act_forecast_form_domain_all"
msgid "All"
msgstr "Toutes"
+msgctxt "model:ir.action.act_window.domain,name:act_forecast_form_domain_done"
+msgid "Done"
+msgstr "Fait"
+
msgctxt ""
"model:ir.action.act_window.domain,name:act_forecast_form_domain_draft"
msgid "Draft"
diff --git a/locale/nl_NL.po b/locale/nl_NL.po
index 5490c28..f8cbd19 100644
--- a/locale/nl_NL.po
+++ b/locale/nl_NL.po
@@ -33,6 +33,11 @@ msgid "Forecast \"%s\" must be cancelled before deletion."
msgstr ""
#, fuzzy
+msgctxt "field:stock.forecast,active:"
+msgid "Active"
+msgstr "Actief"
+
+#, fuzzy
msgctxt "field:stock.forecast,company:"
msgid "Company"
msgstr "Bedrijf"
@@ -225,6 +230,11 @@ msgid "All"
msgstr ""
#, fuzzy
+msgctxt "model:ir.action.act_window.domain,name:act_forecast_form_domain_done"
+msgid "Done"
+msgstr "Klaar"
+
+#, fuzzy
msgctxt ""
"model:ir.action.act_window.domain,name:act_forecast_form_domain_draft"
msgid "Draft"
diff --git a/locale/ru_RU.po b/locale/ru_RU.po
index 72d0750..8258479 100644
--- a/locale/ru_RU.po
+++ b/locale/ru_RU.po
@@ -34,6 +34,11 @@ msgctxt "error:stock.forecast:"
msgid "Forecast \"%s\" must be cancelled before deletion."
msgstr "Прогноз \"%s\" должен быть отменен перед удалением."
+#, fuzzy
+msgctxt "field:stock.forecast,active:"
+msgid "Active"
+msgstr "Действующий"
+
msgctxt "field:stock.forecast,company:"
msgid "Company"
msgstr "Организация"
@@ -210,6 +215,11 @@ msgctxt "model:ir.action.act_window.domain,name:act_forecast_form_domain_all"
msgid "All"
msgstr "Все"
+#, fuzzy
+msgctxt "model:ir.action.act_window.domain,name:act_forecast_form_domain_done"
+msgid "Done"
+msgstr "Выполнено"
+
msgctxt ""
"model:ir.action.act_window.domain,name:act_forecast_form_domain_draft"
msgid "Draft"
diff --git a/locale/sl_SI.po b/locale/sl_SI.po
index 57efbd0..3e09c0f 100644
--- a/locale/sl_SI.po
+++ b/locale/sl_SI.po
@@ -34,6 +34,10 @@ msgctxt "error:stock.forecast:"
msgid "Forecast \"%s\" must be cancelled before deletion."
msgstr "Napoved \"%s\" mora biti pred brisanjem preklicana."
+msgctxt "field:stock.forecast,active:"
+msgid "Active"
+msgstr "Aktivno"
+
msgctxt "field:stock.forecast,company:"
msgid "Company"
msgstr "Družba"
@@ -210,6 +214,10 @@ msgctxt "model:ir.action.act_window.domain,name:act_forecast_form_domain_all"
msgid "All"
msgstr "Vse"
+msgctxt "model:ir.action.act_window.domain,name:act_forecast_form_domain_done"
+msgid "Done"
+msgstr "Zaključeno"
+
msgctxt ""
"model:ir.action.act_window.domain,name:act_forecast_form_domain_draft"
msgid "Draft"
diff --git a/setup.py b/setup.py
index 6cf9def..3d9a3a2 100644
--- a/setup.py
+++ b/setup.py
@@ -1,6 +1,6 @@
#!/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.
+# 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 setuptools import setup
import re
@@ -41,7 +41,7 @@ if minor_version % 2:
'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % (
name[8:], name, version))
-requires = ['python-dateutil', 'python-sql']
+requires = ['python-dateutil', 'python-sql >= 0.4']
for dep in info.get('depends', []):
if not re.match(r'(ir|res|webdav)(\W|$)', dep):
requires.append(get_require_version('trytond_%s' % dep))
@@ -86,6 +86,8 @@ setup(name=name,
'Natural Language :: Spanish',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2.7',
+ 'Programming Language :: Python :: Implementation :: CPython',
+ 'Programming Language :: Python :: Implementation :: PyPy',
'Topic :: Office/Business',
],
license='GPL-3',
diff --git a/tests/__init__.py b/tests/__init__.py
index fe5fd50..6988ffb 100644
--- a/tests/__init__.py
+++ b/tests/__init__.py
@@ -1,5 +1,5 @@
-#This file is part of Tryton. The COPYRIGHT file at the top level of
-#this repository contains the full copyright notices and license terms.
+# 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_stock_forecast import suite
diff --git a/tests/test_stock_forecast.py b/tests/test_stock_forecast.py
index bf9975b..7257b3c 100644
--- a/tests/test_stock_forecast.py
+++ b/tests/test_stock_forecast.py
@@ -1,21 +1,22 @@
-#This file is part of Tryton. The COPYRIGHT file at the top level of
-#this repository contains the full copyright notices and license terms.
+# 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 unittest
import doctest
from decimal import Decimal
import datetime
from dateutil.relativedelta import relativedelta
import trytond.tests.test_tryton
-from trytond.tests.test_tryton import POOL, DB_NAME, USER, CONTEXT, test_view,\
- test_depends
+from trytond.tests.test_tryton import ModuleTestCase
+from trytond.tests.test_tryton import POOL, DB_NAME, USER, CONTEXT
from trytond.transaction import Transaction
-class StockForecastTestCase(unittest.TestCase):
+class StockForecastTestCase(ModuleTestCase):
'Test StockForecast module'
+ module = 'stock_forecast'
def setUp(self):
- trytond.tests.test_tryton.install_module('stock_forecast')
+ super(StockForecastTestCase, self).setUp()
self.category = POOL.get('product.category')
self.uom = POOL.get('product.uom')
self.template = POOL.get('product.template')
@@ -29,14 +30,6 @@ class StockForecastTestCase(unittest.TestCase):
self.forecast_complete = POOL.get('stock.forecast.complete',
type='wizard')
- def test0005views(self):
- 'Test views'
- test_view('stock_forecast')
-
- def test0006depends(self):
- 'Test depends'
- test_depends()
-
def test0020distribute(self):
'Test distribute'
for values, result in (
diff --git a/tryton.cfg b/tryton.cfg
index 30e91c8..d3fea2a 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
[tryton]
-version=3.4.1
+version=3.6.0
depends:
company
ir
diff --git a/trytond_stock_forecast.egg-info/PKG-INFO b/trytond_stock_forecast.egg-info/PKG-INFO
index 7782cd8..582383c 100644
--- a/trytond_stock_forecast.egg-info/PKG-INFO
+++ b/trytond_stock_forecast.egg-info/PKG-INFO
@@ -1,12 +1,12 @@
Metadata-Version: 1.1
Name: trytond-stock-forecast
-Version: 3.4.1
+Version: 3.6.0
Summary: Tryton module with stock forecasts
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.4/
+Download-URL: http://downloads.tryton.org/3.6/
Description: trytond_stock_forecast
======================
@@ -65,4 +65,6 @@ Classifier: Natural Language :: Slovenian
Classifier: Natural Language :: Spanish
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 2.7
+Classifier: Programming Language :: Python :: Implementation :: CPython
+Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Office/Business
diff --git a/trytond_stock_forecast.egg-info/requires.txt b/trytond_stock_forecast.egg-info/requires.txt
index d1687bb..11943b9 100644
--- a/trytond_stock_forecast.egg-info/requires.txt
+++ b/trytond_stock_forecast.egg-info/requires.txt
@@ -1,6 +1,6 @@
python-dateutil
-python-sql
-trytond_company >= 3.4, < 3.5
-trytond_product >= 3.4, < 3.5
-trytond_stock >= 3.4, < 3.5
-trytond >= 3.4, < 3.5
\ No newline at end of file
+python-sql >= 0.4
+trytond_company >= 3.6, < 3.7
+trytond_product >= 3.6, < 3.7
+trytond_stock >= 3.6, < 3.7
+trytond >= 3.6, < 3.7
\ No newline at end of file
diff --git a/view/forecast_tree.xml b/view/forecast_tree.xml
index c367b9d..1b6511c 100644
--- a/view/forecast_tree.xml
+++ b/view/forecast_tree.xml
@@ -7,4 +7,5 @@ this repository contains the full copyright notices and license terms. -->
<field name="from_date"/>
<field name="to_date"/>
<field name="company"/>
+ <field name="active" tree_invisible="1"/>
</tree>
--
tryton-modules-stock-forecast
More information about the tryton-debian-vcs
mailing list