[tryton-debian-vcs] tryton-modules-timesheet branch debian-stretch-4.2 updated. debian/4.2.0-1-5-gd665319

Mathias Behrle tryton-debian-vcs at alioth.debian.org
Sun Jun 11 22:38:58 UTC 2017


The following commit has been merged in the debian-stretch-4.2 branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-modules-timesheet.git;a=commitdiff;h=debian/4.2.0-1-5-gd665319

commit d66531966a9bcc5c1df170ef172d0bf5b099c7f6
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Sun Jun 11 23:00:57 2017 +0200

    Releasing debian version 4.2.1-1.
    
    Signed-off-by: Mathias Behrle <mathiasb at m9s.biz>

diff --git a/debian/changelog b/debian/changelog
index 2a4b0d4..43cfb9f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+tryton-modules-timesheet (4.2.1-1) unstable; urgency=medium
+
+  * Add the actual upstream maintainer key to signing-key.asc.
+  * Setting the branch in the watch file to the fixed version 4.2.
+  * Merging upstream version 4.2.1.
+  * Updating copyright file.
+
+ -- Mathias Behrle <mathiasb at m9s.biz>  Sun, 11 Jun 2017 23:00:57 +0200
+
 tryton-modules-timesheet (4.2.0-1) unstable; urgency=medium
 
   * Updating to Standards-Version: 3.9.8, no changes needed.
commit 6420b031a13c1d465be05cac7205461ca395217d
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Sun Jun 11 23:00:56 2017 +0200

    Updating copyright file.

diff --git a/debian/copyright b/debian/copyright
index e58742c..c93f8a0 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,9 +1,9 @@
 Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
 
 Files: *
-Copyright: 2008-2016 Cédric Krier
+Copyright: 2008-2017 Cédric Krier
            2008-2013 Bertrand Chenal
-           2008-2016 B2CK SPRL
+           2008-2017 B2CK SPRL
 License: GPL-3+
 
 Files: debian/*
commit bf93b2a80f2d7743f032fcc5b979373ed4f67e4a
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Sun Jun 11 23:00:56 2017 +0200

    Merging upstream version 4.2.1.

diff --git a/CHANGELOG b/CHANGELOG
index ca28fdd..94876fc 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 4.2.1 - 2017-06-06
+* Bug fixes (see mercurial logs for details)
+
 Version 4.2.0 - 2016-11-28
 * Bug fixes (see mercurial logs for details)
 * Add read access to any line for all
diff --git a/COPYRIGHT b/COPYRIGHT
index fcc5eeb..5af5413 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -1,6 +1,6 @@
-Copyright (C) 2008-2016 Cédric Krier.
+Copyright (C) 2008-2017 Cédric Krier.
 Copyright (C) 2008-2013 Bertrand Chenal.
-Copyright (C) 2008-2016 B2CK SPRL.
+Copyright (C) 2008-2017 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/PKG-INFO b/PKG-INFO
index 52f4d23..2d80c21 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond_timesheet
-Version: 4.2.0
+Version: 4.2.1
 Summary: Tryton module with timesheets
 Home-page: http://www.tryton.org/
 Author: Tryton
diff --git a/routes.py b/routes.py
index 98179ff..88e4530 100644
--- a/routes.py
+++ b/routes.py
@@ -33,7 +33,9 @@ def timesheet_works(request, pool, employee):
     employee = Employee(employee)
     with Transaction().set_context(
             company=employee.company.id, employee=employee.id):
-        works = Work.search([])
+        works = Work.search([
+                ('company', '=', employee.company.id),
+                ])
     return [{
             'id': w.id,
             'name': w.rec_name,
@@ -103,8 +105,11 @@ def timesheet(request, pool, line=None):
             if not line:
                 line, = Line.create([request.parsed_data])
             else:
-                line = Line(line)
-                Line.write([line], request.parsed_data)
+                lines = Line.search([('id', '=', line)])
+                if not lines:
+                    return Response(None, 204)
+                line, = lines
+                Line.write(lines, request.parsed_data)
         return {
             'id': line.id,
             'work': line.work.id,
@@ -113,7 +118,12 @@ def timesheet(request, pool, line=None):
             'description': line.description,
             }
     else:
-        with Transaction().set_context(
-                company=line.company.id, employee=line.employee.id):
-            Line.delete([line])
+        with Transaction().set_user(0):
+            lines = Line.search([('id', '=', line)])
+        if lines:
+            line, = lines
+            with Transaction().set_context(
+                    company=line.company.id, employee=line.employee.id):
+                lines = Line.search([('id', '=', line.id)])
+                Line.delete(lines)
         return Response(None, 204)
diff --git a/setup.cfg b/setup.cfg
index 861a9f5..8bfd5a1 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,5 +1,4 @@
 [egg_info]
 tag_build = 
 tag_date = 0
-tag_svn_revision = 0
 
diff --git a/tryton.cfg b/tryton.cfg
index ccada47..69a3ac3 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
 [tryton]
-version=4.2.0
+version=4.2.1
 depends:
     company
     company_work_time
diff --git a/trytond_timesheet.egg-info/PKG-INFO b/trytond_timesheet.egg-info/PKG-INFO
index cfd687c..3348291 100644
--- a/trytond_timesheet.egg-info/PKG-INFO
+++ b/trytond_timesheet.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond-timesheet
-Version: 4.2.0
+Version: 4.2.1
 Summary: Tryton module with timesheets
 Home-page: http://www.tryton.org/
 Author: Tryton
-- 
tryton-modules-timesheet



More information about the tryton-debian-vcs mailing list