From 3b907e11ead6185cd3742fbb3e46881d609214f3 Mon Sep 17 00:00:00 2001 From: resteve Date: Mon, 11 Nov 2013 17:32:00 +0100 Subject: [PATCH 1/9] Test --- tests/__init__.py | 4 ++- tests/test.py | 60 --------------------------------- tests/test_activity_calendar.py | 45 +++++++++++++++++++++++++ 3 files changed, 48 insertions(+), 61 deletions(-) delete mode 100644 tests/test.py create mode 100644 tests/test_activity_calendar.py diff --git a/tests/__init__.py b/tests/__init__.py index 5ef03f2..5f1f4da 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1,4 +1,6 @@ # The COPYRIGHT file at the top level of this repository contains the full # copyright notices and license terms. -from .test import suite +from .test_activity_calendar import suite + +__all__ = ['suite'] diff --git a/tests/test.py b/tests/test.py deleted file mode 100644 index a09526e..0000000 --- a/tests/test.py +++ /dev/null @@ -1,60 +0,0 @@ -#!/usr/bin/env python -# 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 TODO: Remove if no sceneario needed. -import trytond.tests.test_tryton -from trytond.tests.test_tryton import test_view, test_depends -from trytond.backend.sqlite.database import Database as SQLiteDatabase - - -class TestCase(unittest.TestCase): - ''' - Test module. - ''' - - def setUp(self): - trytond.tests.test_tryton.install_module('activity_calendar') - - def test0005views(self): - ''' - Test views. - ''' - test_view('activity_calendar') - - def test0006depends(self): - ''' - 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)) - # TODO: remove if no scenario needed. - #suite.addTests(doctest.DocFileSuite('scenario_invoice.rst', - # 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/tests/test_activity_calendar.py b/tests/test_activity_calendar.py new file mode 100644 index 0000000..f39e060 --- /dev/null +++ b/tests/test_activity_calendar.py @@ -0,0 +1,45 @@ +#!/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 trytond.tests.test_tryton +from trytond.tests.test_tryton import test_view, test_depends + + +class ActivityCalendarTestCase(unittest.TestCase): + ''' + Test Activity Calendar module. + ''' + + def setUp(self): + trytond.tests.test_tryton.install_module('activity_calendar') + + def test0005views(self): + ''' + Test views. + ''' + test_view('activity') + + def test0006depends(self): + ''' + Test depends. + ''' + test_depends() + + +def suite(): + suite = trytond.tests.test_tryton.suite() + suite.addTests(unittest.TestLoader().loadTestsFromTestCase( + ActivityCalendarTestCase)) + return suite + +if __name__ == '__main__': + unittest.TextTestRunner(verbosity=2).run(suite()) From b352d0c6e8548c9e1f70ff2bc98670f03de790eb Mon Sep 17 00:00:00 2001 From: resteve Date: Mon, 11 Nov 2013 17:32:51 +0100 Subject: [PATCH 2/9] README --- README | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/README b/README index 9a16768..545b6f6 100644 --- a/README +++ b/README @@ -1,5 +1,7 @@ +trytond-activity_calendar +========================= -This Module runs with the Tryton application platform. +The activity_calendar module of the Tryton application platform. Installing ---------- @@ -9,12 +11,19 @@ See INSTALL Support ------- -If you encounter any problems with this module, please don't hesitate to ask -questions on the NaN·tic bug tracker, mailing list, -wiki or IRC channel: +For more information or if you encounter any problems with this module, +please contact the programmers at + + Nan-Tic + -------------- + website: http://www.nan-tic.com/ + email: info@nan-tic.com + +If you encounter any problems with Tryton, please don't hesitate to ask +questions on the Tryton bug tracker, mailing list, wiki or IRC channel: http://doc.tryton-erp.es/ - http://bitbucket.org/nantic/tytond-activity_calendar + http://bitbucket.org/nantic/trytond-activity http://groups.tryton.org/ http://wiki.tryton.org/ irc://irc.freenode.net/tryton @@ -30,6 +39,6 @@ Copyright See COPYRIGHT -For more information please visit the NaN·tic web site: +For more information please visit the Tryton web site: - http://www.nan-tic.com/ + http://www.tryton.org/ From 49f0eecfbf3d67b243b40974a9e4fe4b8cc94247 Mon Sep 17 00:00:00 2001 From: resteve Date: Mon, 11 Nov 2013 17:33:26 +0100 Subject: [PATCH 3/9] Setup --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index a09b266..6a97948 100644 --- a/setup.py +++ b/setup.py @@ -37,7 +37,7 @@ tests_require = ['proteus >= %s.%s, < %s.%s' % setup(name='%s_%s' % (PREFIX, MODULE), version=info.get('version', '0.0.1'), - description='', + description='Tryton module to manage Activities in calendars', long_description=read('README'), author='NaN·tic', url='http://www.nan-tic.com/', From 8cb2bf7aaa833feab3506b4c57032f647eaca59b Mon Sep 17 00:00:00 2001 From: resteve Date: Mon, 11 Nov 2013 17:34:36 +0100 Subject: [PATCH 4/9] DOC --- doc/es/index.rst | 5 +++++ doc/index.rst | 4 ++++ 2 files changed, 9 insertions(+) create mode 100644 doc/es/index.rst create mode 100755 doc/index.rst diff --git a/doc/es/index.rst b/doc/es/index.rst new file mode 100644 index 0000000..d45b540 --- /dev/null +++ b/doc/es/index.rst @@ -0,0 +1,5 @@ +========================== +Calendarios en actividades +========================== + +El módulo activity calendar le permite visualizar las actividades en calendarios. diff --git a/doc/index.rst b/doc/index.rst new file mode 100755 index 0000000..3f835c4 --- /dev/null +++ b/doc/index.rst @@ -0,0 +1,4 @@ +Activity Calendar Module +######################## + +The activity calendar module allows to manage activities in calendars. From 0d9f07e7f380b330214c9939d0b122c5eec4521f Mon Sep 17 00:00:00 2001 From: resteve Date: Mon, 11 Nov 2013 17:48:33 +0100 Subject: [PATCH 5/9] Locale ca_ES --- locale/ca_ES.po | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/locale/ca_ES.po b/locale/ca_ES.po index d342f94..e3d7dab 100644 --- a/locale/ca_ES.po +++ b/locale/ca_ES.po @@ -6,26 +6,24 @@ msgctxt "error:activity.activity:" msgid "Activity %s already has an event." msgstr "L'activitat %s ja té un esdeveniment." -msgctxt "error:activity.activity:" -msgid "Activity %s has already and Event" -msgstr "" - -msgctxt "error:activity.activity:" -msgid "Please select calendar for Activity %s before create an event" -msgstr "" - msgctxt "error:activity.activity:" msgid "Please select calendar for activity %s before creating an event." msgstr "" "Si us plau, seleccioneu un calendari per l'activitat %s abans de crear un " "esdeveniment." -#, fuzzy msgctxt "field:activity.activity,calendar:" msgid "Calendar" msgstr "Calendari" -#, fuzzy msgctxt "field:activity.activity,calendar_event:" msgid "Event" msgstr "Esdeveniment" + +msgctxt "view:activity.activity:" +msgid "Create Event" +msgstr "Crea esdeveniment" + +msgctxt "view:activity.activity:" +msgid "Create event for this activity?" +msgstr "Voleu crear un esdeveniment per aquesta activitat?" From 57ced58e4df9cdc798077a74185acf2042750da4 Mon Sep 17 00:00:00 2001 From: resteve Date: Mon, 11 Nov 2013 17:48:50 +0100 Subject: [PATCH 6/9] Locale es_ES --- locale/es_ES.po | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/locale/es_ES.po b/locale/es_ES.po index 6a736ff..6c6d917 100644 --- a/locale/es_ES.po +++ b/locale/es_ES.po @@ -6,26 +6,24 @@ msgctxt "error:activity.activity:" msgid "Activity %s already has an event." msgstr "La actividad %s ya tiene un evento." -msgctxt "error:activity.activity:" -msgid "Activity %s has already and Event" -msgstr "" - -msgctxt "error:activity.activity:" -msgid "Please select calendar for Activity %s before create an event" -msgstr "" - msgctxt "error:activity.activity:" msgid "Please select calendar for activity %s before creating an event." msgstr "" "Por favor, seleccione un calendario para la actividad %s antes de crear un " "evento." -#, fuzzy msgctxt "field:activity.activity,calendar:" msgid "Calendar" -msgstr "Calendarios" +msgstr "Calendario" -#, fuzzy msgctxt "field:activity.activity,calendar_event:" msgid "Event" msgstr "Evento" + +msgctxt "view:activity.activity:" +msgid "Create Event" +msgstr "Crear evento" + +msgctxt "view:activity.activity:" +msgid "Create event for this activity?" +msgstr "Desea crear un evento para esta actividad?" From 779e9757d63063335c8d62f3177c0c5e7e59e968 Mon Sep 17 00:00:00 2001 From: resteve Date: Mon, 11 Nov 2013 17:52:54 +0100 Subject: [PATCH 7/9] README --- README | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README b/README index 545b6f6..d5959a0 100644 --- a/README +++ b/README @@ -23,7 +23,7 @@ If you encounter any problems with Tryton, please don't hesitate to ask questions on the Tryton bug tracker, mailing list, wiki or IRC channel: http://doc.tryton-erp.es/ - http://bitbucket.org/nantic/trytond-activity + http://bitbucket.org/nantic/trytond-activity_calendar http://groups.tryton.org/ http://wiki.tryton.org/ irc://irc.freenode.net/tryton @@ -39,6 +39,6 @@ Copyright See COPYRIGHT -For more information please visit the Tryton web site: +For more information please visit the NaN·tic web site: - http://www.tryton.org/ + http://www.nan-tic.com/ From 8ed804b8cc0c259c684ba4b257de394b6f4c6738 Mon Sep 17 00:00:00 2001 From: resteve Date: Mon, 11 Nov 2013 19:02:14 +0100 Subject: [PATCH 8/9] setup add views package --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 6a97948..48f94eb 100644 --- a/setup.py +++ b/setup.py @@ -49,7 +49,7 @@ setup(name='%s_%s' % (PREFIX, MODULE), ], package_data={ 'trytond.modules.%s' % MODULE: (info.get('xml', []) - + ['tryton.cfg', 'locale/*.po', 'tests/*.rst']), + + ['tryton.cfg', 'locale/*.po', 'view/*.xml', 'tests/*.rst']), }, classifiers=[ 'Development Status :: 5 - Production/Stable', From bc5aec10aa5e1c6ed25b11d124c8777a3f6c9df4 Mon Sep 17 00:00:00 2001 From: resteve Date: Thu, 14 Nov 2013 19:23:15 +0100 Subject: [PATCH 9/9] Increase version number --- tryton.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tryton.cfg b/tryton.cfg index 7073ea4..bd4352c 100644 --- a/tryton.cfg +++ b/tryton.cfg @@ -1,5 +1,5 @@ [tryton] -version=2.9.0 +version=3.0.0 depends: activity calendar