[tryton-debian-vcs] tryton-modules-stock-forecast branch upstream updated. upstream/3.0.0-1-g1c18f6f
Mathias Behrle
tryton-debian-vcs at alioth.debian.org
Tue Apr 22 13:10:45 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-stock-forecast.git;a=commitdiff;h=upstream/3.0.0-1-g1c18f6f
commit 1c18f6fc9d313c74359839f37d6759bb2209e2ff
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Tue Apr 22 14:23:40 2014 +0200
Adding upstream version 3.2.0.
diff --git a/CHANGELOG b/CHANGELOG
index 0b32092..d9c27fe 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 3.2.0 - 2014-04-21
+* Bug fixes (see mercurial logs for details)
+
Version 3.0.0 - 2013-10-21
* Bug fixes (see mercurial logs for details)
diff --git a/COPYRIGHT b/COPYRIGHT
index 9192c97..5134c09 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -1,6 +1,6 @@
-Copyright (C) 2008-2013 Cédric Krier.
+Copyright (C) 2008-2014 Cédric Krier.
Copyright (C) 2008-2013 Bertrand Chenal.
-Copyright (C) 2008-2013 B2CK SPRL.
+Copyright (C) 2008-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 b354d0a..443b78a 100644
--- a/INSTALL
+++ b/INSTALL
@@ -4,7 +4,7 @@ Installing trytond_stock_forecast
Prerequisites
-------------
- * Python 2.6 or later (http://www.python.org/)
+ * Python 2.7 or later (http://www.python.org/)
* python-dateutil (http://labix.org/python-dateutil)
* python-sql (http://code.google.com/p/python-sql/)
* trytond (http://www.tryton.org/)
diff --git a/MANIFEST.in b/MANIFEST.in
index 2569955..e013c00 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,12 +1,10 @@
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/*
diff --git a/PKG-INFO b/PKG-INFO
index 7b3817c..04c20c1 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,14 +1,14 @@
Metadata-Version: 1.1
Name: trytond_stock_forecast
-Version: 3.0.0
+Version: 3.2.0
Summary: Tryton module with stock forecasts
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_stock_forecast
- =====================
+ ======================
The stock_forecast module of the Tryton application platform.
@@ -43,6 +43,7 @@ Description: trytond_stock_forecast
http://www.tryton.org/
+Keywords: tryton stock forecast
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Plugins
@@ -63,6 +64,5 @@ 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
diff --git a/README b/README
index 09525d9..703cca3 100644
--- a/README
+++ b/README
@@ -1,5 +1,5 @@
trytond_stock_forecast
-=====================
+======================
The stock_forecast module of the Tryton application platform.
diff --git a/forecast.py b/forecast.py
index d0d4d0a..6682ffa 100644
--- a/forecast.py
+++ b/forecast.py
@@ -31,9 +31,9 @@ class Forecast(Workflow, ModelSQL, ModelView):
'stock.location', 'Location', required=True,
domain=[('type', '=', 'warehouse')], states={
'readonly': Or(Not(Equal(Eval('state'), 'draft')),
- Bool(Eval('lines'))),
+ Bool(Eval('lines', [0]))),
},
- depends=['state', 'lines'])
+ depends=['state'])
destination = fields.Many2One(
'stock.location', 'Destination', required=True,
domain=[('type', 'in', ['customer', 'production'])], states=STATES,
@@ -48,9 +48,9 @@ class Forecast(Workflow, ModelSQL, ModelView):
company = fields.Many2One(
'company.company', 'Company', required=True, states={
'readonly': Or(Not(Equal(Eval('state'), 'draft')),
- Bool(Eval('lines'))),
+ Bool(Eval('lines', [0]))),
},
- depends=['state', 'lines'])
+ depends=['state'])
state = fields.Selection([
('draft', 'Draft'),
('done', 'Done'),
@@ -260,18 +260,16 @@ class ForecastLine(ModelSQL, ModelView):
domain=[
('type', '=', 'goods'),
('consumable', '=', False),
- ],
- on_change=['product'])
+ ])
product_uom_category = fields.Function(
- fields.Many2One('product.uom.category', 'Product Uom Category',
- on_change_with=['product']),
+ fields.Many2One('product.uom.category', 'Product Uom Category'),
'on_change_with_product_uom_category')
uom = fields.Many2One('product.uom', 'UOM', required=True,
domain=[
If(Bool(Eval('product_uom_category')),
('category', '=', Eval('product_uom_category')),
('category', '!=', -1)),
- ], on_change=['uom'], depends=['product', 'product_uom_category'])
+ ], depends=['product', 'product_uom_category'])
unit_digits = fields.Function(fields.Integer('Unit Digits'),
'get_unit_digits')
quantity = fields.Float('Quantity', digits=(16, Eval('unit_digits', 2)),
@@ -308,6 +306,7 @@ class ForecastLine(ModelSQL, ModelView):
def default_minimal_quantity():
return 1.0
+ @fields.depends('product')
def on_change_product(self):
res = {}
res['unit_digits'] = 2
@@ -317,10 +316,12 @@ class ForecastLine(ModelSQL, ModelView):
res['unit_digits'] = self.product.default_uom.digits
return res
+ @fields.depends('product')
def on_change_with_product_uom_category(self, name=None):
if self.product:
return self.product.default_uom_category.id
+ @fields.depends('uom')
def on_change_uom(self):
res = {}
res['unit_digits'] = 2
@@ -437,7 +438,7 @@ class ForecastLine(ModelSQL, ModelView):
moves = []
if to_create:
moves = Move.create(to_create)
- self.write([self], {'moves': [('set', [m.id for m in moves])]})
+ self.write([self], {'moves': [('add', [m.id for m in moves])]})
@classmethod
def delete_moves(cls, lines):
diff --git a/locale/ca_ES.po b/locale/ca_ES.po
index 02a8de7..efc0ed1 100644
--- a/locale/ca_ES.po
+++ b/locale/ca_ES.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 de la data\" ha de ser més petit que \"Fins a la data\"."
+msgstr "\"Des de de la data\" ha de ser més petit que \"Fins a la data\"."
msgctxt "error:stock.forecast.line:"
msgid "Line quantity must be greater than the minimal quantity"
@@ -16,18 +16,18 @@ msgstr "La quantitat de la línia ha de ser positiva."
msgctxt "error:stock.forecast.line:"
msgid "Product must be unique by forecast"
-msgstr "El producte ha de ser únic en la previssió d'estocs."
+msgstr "El producte ha de ser únic en la previsió d'estocs."
msgctxt "error:stock.forecast:"
msgid "\"To Date\" must be greater than \"From Date\""
-msgstr "\"Fins a la data\" ha de ser més gran que \"Desde de la data\"."
+msgstr "\"Fins a la data\" ha de ser més gran que \"Des de de la data\"."
msgctxt "error:stock.forecast:"
msgid ""
"Forecast \"%(first)s\" overlaps with dates of forecast \"%(second)s\" in the"
" same location."
msgstr ""
-"La previsó \"%(first)s\" es solapa amb les dates de la pervisió "
+"La previsió \"%(first)s\" es solapa amb les dates de la previsió "
"\"%(second)s\" a la mateixa ubicació."
msgctxt "error:stock.forecast:"
@@ -221,11 +221,11 @@ msgstr "Previsions"
msgctxt "model:res.group,name:group_stock_forecast"
msgid "Stock Forecast"
-msgstr "Previsió d'existències"
+msgstr "Previsió d'estoc"
msgctxt "model:stock.forecast,name:"
msgid "Stock Forecast"
-msgstr "Previsió d'existències"
+msgstr "Previsió d'estoc"
msgctxt "model:stock.forecast.complete.ask,name:"
msgid "Complete Forecast"
@@ -237,15 +237,15 @@ msgstr "Triar previsió completa"
msgctxt "model:stock.forecast.line,name:"
msgid "Stock Forecast Line"
-msgstr "Línia de previsió d'existències"
+msgstr "Línia de previsió d'estoc"
msgctxt "model:stock.forecast.line-stock.move,name:"
msgid "ForecastLine - Move"
-msgstr "Línea de previsió - Moviment"
+msgstr "Línia de previsió - Moviment"
msgctxt "selection:stock.forecast,state:"
msgid "Cancel"
-msgstr "Cancel·la"
+msgstr "Cancel·lada"
msgctxt "selection:stock.forecast,state:"
msgid "Done"
diff --git a/locale/de_DE.po b/locale/de_DE.po
index 1e6bae3..b778f60 100644
--- a/locale/de_DE.po
+++ b/locale/de_DE.po
@@ -154,7 +154,7 @@ msgstr "Name"
msgctxt "field:stock.forecast.line,unit_digits:"
msgid "Unit Digits"
-msgstr "Anzahl Stellen"
+msgstr "Nachkommastellen"
msgctxt "field:stock.forecast.line,uom:"
msgid "UOM"
@@ -206,7 +206,7 @@ msgstr "Bedarfsermittlung"
msgctxt "model:ir.action,name:wizard_forecast_complete"
msgid "Complete Forecast"
-msgstr "Bedarfsermittlung Durchführen Nachfrage"
+msgstr "Nachfrage Bedarfsermittlung durchführen"
msgctxt "model:ir.action.act_window.domain,name:act_forecast_form_domain_all"
msgid "All"
@@ -231,7 +231,7 @@ msgstr "Bedarfsermittlung Lagerhaltung"
msgctxt "model:stock.forecast.complete.ask,name:"
msgid "Complete Forecast"
-msgstr "Bedarfsermittlung Durchführen Nachfrage"
+msgstr "Nachfrage Bedarfsermittlung durchführen"
msgctxt "model:stock.forecast.complete.choose,name:"
msgid "Complete Forecast"
@@ -239,7 +239,7 @@ msgstr "Bedarfsermittlung Durchführen Auswahl"
msgctxt "model:stock.forecast.line,name:"
msgid "Stock Forecast Line"
-msgstr "Position Bedarfsermittlung Lagerhaltung"
+msgstr "Bedarfsermittlungsposition"
msgctxt "model:stock.forecast.line-stock.move,name:"
msgid "ForecastLine - Move"
diff --git a/locale/es_AR.po b/locale/es_AR.po
index a8295a9..15d5983 100644
--- a/locale/es_AR.po
+++ b/locale/es_AR.po
@@ -245,7 +245,7 @@ msgstr "Linea de previsión - Movimiento"
msgctxt "selection:stock.forecast,state:"
msgid "Cancel"
-msgstr "Cancelar"
+msgstr "Cancelado"
msgctxt "selection:stock.forecast,state:"
msgid "Done"
diff --git a/locale/es_CO.po b/locale/es_CO.po
index eabdadd..bdf3cba 100644
--- a/locale/es_CO.po
+++ b/locale/es_CO.po
@@ -60,7 +60,7 @@ msgstr "ID"
msgctxt "field:stock.forecast,lines:"
msgid "Lines"
-msgstr "Líneas de Inventario"
+msgstr "Líneas"
msgctxt "field:stock.forecast,rec_name:"
msgid "Name"
@@ -132,7 +132,7 @@ msgstr "Movimientos"
msgctxt "field:stock.forecast.line,product:"
msgid "Product"
-msgstr "Productos"
+msgstr "Producto"
msgctxt "field:stock.forecast.line,product_uom_category:"
msgid "Product Uom Category"
@@ -152,7 +152,7 @@ msgstr "Nombre"
msgctxt "field:stock.forecast.line,unit_digits:"
msgid "Unit Digits"
-msgstr "Decimales de la Unidad"
+msgstr "Decimales de Unidad"
msgctxt "field:stock.forecast.line,uom:"
msgid "UOM"
@@ -192,7 +192,7 @@ msgstr "Nombre"
msgctxt "field:stock.forecast.line-stock.move,write_date:"
msgid "Write Date"
-msgstr "Fecha de Creación"
+msgstr "Fecha de Modificación"
msgctxt "field:stock.forecast.line-stock.move,write_uid:"
msgid "Write User"
@@ -313,7 +313,7 @@ msgstr "Cancelar"
msgctxt "wizard_button:stock.forecast.complete,choose,ask:"
msgid "Choose Dates"
-msgstr "Escoja las Fechas"
+msgstr "Escoger Fechas"
msgctxt "wizard_button:stock.forecast.complete,choose,complete:"
msgid "Complete"
diff --git a/locale/es_ES.po b/locale/es_ES.po
index 3c21e70..b6b325d 100644
--- a/locale/es_ES.po
+++ b/locale/es_ES.po
@@ -27,7 +27,7 @@ msgid ""
"Forecast \"%(first)s\" overlaps with dates of forecast \"%(second)s\" in the"
" same location."
msgstr ""
-"La previsión \"%(first)s\" se solapa con las fechas de la previsón "
+"La previsión \"%(first)s\" se solapa con las fechas de la previsión "
"%(second)s\" en la misma ubicación."
msgctxt "error:stock.forecast:"
@@ -245,7 +245,7 @@ msgstr "Línea de previsión - Movimiento"
msgctxt "selection:stock.forecast,state:"
msgid "Cancel"
-msgstr "Cancelar"
+msgstr "Cancelada"
msgctxt "selection:stock.forecast,state:"
msgid "Done"
diff --git a/locale/fr_FR.po b/locale/fr_FR.po
index 79240d5..171b038 100644
--- a/locale/fr_FR.po
+++ b/locale/fr_FR.po
@@ -33,7 +33,7 @@ msgstr ""
msgctxt "error:stock.forecast:"
msgid "Forecast \"%s\" must be cancelled before deletion."
-msgstr "La prévision \"%s\" doit être anullée pour pouvoir être supprimée."
+msgstr "La prévision \"%s\" doit être anullée avant suppression."
msgctxt "field:stock.forecast,company:"
msgid "Company"
diff --git a/locale/sl_SI.po b/locale/sl_SI.po
index 4f7e6a1..dcc9669 100644
--- a/locale/sl_SI.po
+++ b/locale/sl_SI.po
@@ -36,7 +36,7 @@ msgstr "Napoved \"%s\" mora biti pred brisanjem preklicana."
msgctxt "field:stock.forecast,company:"
msgid "Company"
-msgstr "Podjetje"
+msgstr "Družba"
msgctxt "field:stock.forecast,create_date:"
msgid "Create Date"
@@ -213,7 +213,7 @@ msgstr "Vse"
msgctxt ""
"model:ir.action.act_window.domain,name:act_forecast_form_domain_draft"
msgid "Draft"
-msgstr "Osnutki"
+msgstr "Priprava"
msgctxt "model:ir.ui.menu,name:menu_forecast_form"
msgid "Forecasts"
@@ -253,7 +253,7 @@ msgstr "Zaključeno"
msgctxt "selection:stock.forecast,state:"
msgid "Draft"
-msgstr "Osnutek"
+msgstr "V pripravi"
msgctxt "view:stock.forecast.complete.ask:"
msgid "Choose dates"
diff --git a/setup.py b/setup.py
index 22bc159..6cf9def 100644
--- a/setup.py
+++ b/setup.py
@@ -11,33 +11,51 @@ 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_stock_forecast'
+
+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 = ['python-dateutil', 'python-sql']
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'))
-setup(name='trytond_stock_forecast',
- version=info.get('version', '0.0.1'),
+setup(name=name,
+ version=version,
description='Tryton module with stock forecasts',
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 stock forecast',
package_dir={'trytond.modules.stock_forecast': '.'},
packages=[
'trytond.modules.stock_forecast',
@@ -67,7 +85,6 @@ setup(name='trytond_stock_forecast',
'Natural Language :: Slovenian',
'Natural Language :: Spanish',
'Operating System :: OS Independent',
- 'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Topic :: Office/Business',
],
diff --git a/tests/test_stock_forecast.py b/tests/test_stock_forecast.py
index 173c55f..90a3172 100644
--- a/tests/test_stock_forecast.py
+++ b/tests/test_stock_forecast.py
@@ -1,14 +1,5 @@
-#!/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
from decimal import Decimal
import datetime
@@ -20,9 +11,7 @@ from trytond.transaction import Transaction
class StockForecastTestCase(unittest.TestCase):
- '''
- Test StockForecast module.
- '''
+ 'Test StockForecast module'
def setUp(self):
trytond.tests.test_tryton.install_module('stock_forecast')
@@ -38,21 +27,15 @@ class StockForecastTestCase(unittest.TestCase):
self.move = POOL.get('stock.move')
def test0005views(self):
- '''
- Test views.
- '''
+ 'Test views'
test_view('stock_forecast')
def test0006depends(self):
- '''
- Test depends.
- '''
+ 'Test depends'
test_depends()
def test0020distribute(self):
- '''
- Test distribute.
- '''
+ 'Test distribute'
for values, result in (
((1, 5), {0: 5}),
((4, 8), {0: 2, 1: 2, 2: 2, 3: 2}),
@@ -63,9 +46,7 @@ class StockForecastTestCase(unittest.TestCase):
self.assertEqual(self.line.distribute(*values), result)
def test0030create_moves(self):
- '''
- Test create_moves.
- '''
+ 'Test create_moves'
with Transaction().start(DB_NAME, USER, context=CONTEXT):
category, = self.category.create([{
'name': 'Test create_moves',
@@ -86,7 +67,9 @@ class StockForecastTestCase(unittest.TestCase):
customer, = self.location.search([('code', '=', 'CUS')])
warehouse, = self.location.search([('code', '=', 'WH')])
storage, = self.location.search([('code', '=', 'STO')])
- company, = self.company.search([('rec_name', '=', 'B2CK')])
+ company, = self.company.search([
+ ('rec_name', '=', 'Dunder Mifflin'),
+ ])
self.user.write([self.user(USER)], {
'main_company': company.id,
'company': company.id,
@@ -152,6 +135,3 @@ def suite():
suite.addTests(unittest.TestLoader().loadTestsFromTestCase(
StockForecastTestCase))
return suite
-
-if __name__ == '__main__':
- unittest.TextTestRunner(verbosity=2).run(suite())
diff --git a/tryton.cfg b/tryton.cfg
index 441c882..c3bc54f 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
[tryton]
-version=3.0.0
+version=3.2.0
depends:
company
ir
diff --git a/trytond_stock_forecast.egg-info/PKG-INFO b/trytond_stock_forecast.egg-info/PKG-INFO
index 293719d..b6e9b99 100644
--- a/trytond_stock_forecast.egg-info/PKG-INFO
+++ b/trytond_stock_forecast.egg-info/PKG-INFO
@@ -1,14 +1,14 @@
Metadata-Version: 1.1
Name: trytond-stock-forecast
-Version: 3.0.0
+Version: 3.2.0
Summary: Tryton module with stock forecasts
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_stock_forecast
- =====================
+ ======================
The stock_forecast module of the Tryton application platform.
@@ -43,6 +43,7 @@ Description: trytond_stock_forecast
http://www.tryton.org/
+Keywords: tryton stock forecast
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Plugins
@@ -63,6 +64,5 @@ 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
diff --git a/trytond_stock_forecast.egg-info/requires.txt b/trytond_stock_forecast.egg-info/requires.txt
index a950d22..88b58ce 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.0, < 3.1
-trytond_product >= 3.0, < 3.1
-trytond_stock >= 3.0, < 3.1
-trytond >= 3.0, < 3.1
\ No newline at end of file
+trytond_company >= 3.2, < 3.3
+trytond_product >= 3.2, < 3.3
+trytond_stock >= 3.2, < 3.3
+trytond >= 3.2, < 3.3
\ No newline at end of file
--
tryton-modules-stock-forecast
More information about the tryton-debian-vcs
mailing list