diff --git a/CHANGELOG b/CHANGELOG index 909b4eb..0e00fa0 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1 +1,6 @@ +Version 3.4.0 - 2014-11-03 + +Version 3.2.0 - 2014-06-02 + +Version 3.0.0 - 2013-11-11 * Initial release diff --git a/plan.py b/plan.py index 4d62183..cb65c3f 100644 --- a/plan.py +++ b/plan.py @@ -4,8 +4,8 @@ from trytond.pool import Pool from trytond.pyson import Eval, Bool, If from trytond.transaction import Transaction from trytond.wizard import Wizard, StateView, StateAction, Button -from trytond.config import CONFIG -DIGITS = int(CONFIG.get('unit_price_digits', 4)) +from trytond.config import config +DIGITS = int(config.get('digits', 'unit_price_digits', 4)) __all__ = ['PlanCostType', 'Plan', 'PlanBOM', 'PlanProductLine', 'PlanCost', 'CreateBomStart', 'CreateBom'] diff --git a/tests/test_product_cost_plan.py b/tests/test_product_cost_plan.py index a11e834..86eeaf0 100644 --- a/tests/test_product_cost_plan.py +++ b/tests/test_product_cost_plan.py @@ -5,44 +5,28 @@ 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 doctest_setup, doctest_teardown class TestCase(unittest.TestCase): - ''' - Test module. - ''' + 'Test module' def setUp(self): trytond.tests.test_tryton.install_module('product_cost_plan') def test0005views(self): - ''' - Test views. - ''' + 'Test views' test_view('product_cost_plan') def test0006depends(self): - ''' - Test depends. - ''' + 'Test depends' test_depends() -def doctest_dropdb(test): - 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(TestCase)) suite.addTests(doctest.DocFileSuite('scenario_product_cost_plan.rst', - setUp=doctest_dropdb, tearDown=doctest_dropdb, encoding='utf-8', + setUp=doctest_setup, tearDown=doctest_teardown, encoding='utf-8', optionflags=doctest.REPORT_ONLY_FIRST_FAILURE)) return suite diff --git a/tryton.cfg b/tryton.cfg index 8b9a514..494b306 100644 --- a/tryton.cfg +++ b/tryton.cfg @@ -1,5 +1,5 @@ [tryton] -version=3.2.0 +version=3.4.0 depends: production xml: