[tryton-debian-vcs] tryton-modules-company branch upstream-3.6 updated. upstream/3.6.0-1-g3f16c6d
Mathias Behrle
tryton-debian-vcs at alioth.debian.org
Wed Dec 23 16:52:23 UTC 2015
The following commit has been merged in the upstream-3.6 branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-modules-company.git;a=commitdiff;h=upstream/3.6.0-1-g3f16c6d
commit 3f16c6db2477d01d9f7ed9f7834da54b2b5beec2
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Wed Dec 23 15:38:06 2015 +0100
Adding upstream version 3.6.1.
Signed-off-by: Mathias Behrle <mathiasb at m9s.biz>
diff --git a/CHANGELOG b/CHANGELOG
index ee5e7b0..7f6bf1d 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 3.6.1 - 2015-12-22
+* Bug fixes (see mercurial logs for details)
+
Version 3.6.0 - 2015-04-20
* Bug fixes (see mercurial logs for details)
* Add support for PyPy
diff --git a/PKG-INFO b/PKG-INFO
index e64ec27..38efaf5 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: trytond_company
-Version: 3.6.0
+Version: 3.6.1
Summary: Tryton module with companies and employees
Home-page: http://www.tryton.org/
Author: Tryton
diff --git a/__init__.py b/__init__.py
index b4dfb40..3573464 100644
--- a/__init__.py
+++ b/__init__.py
@@ -21,6 +21,7 @@ def register():
Cron,
CronCompany,
PartyConfiguration,
+ Rule,
module='company', type_='model')
Pool.register(
CompanyConfig,
diff --git a/company.py b/company.py
index 3034e2a..c97b60a 100644
--- a/company.py
+++ b/company.py
@@ -20,7 +20,7 @@ CursorInterface.cache_keys.update({'company', 'employee'})
__all__ = ['Company', 'Employee', 'UserEmployee', 'User', 'Property',
'Sequence', 'SequenceStrict', 'Date', 'CompanyConfigStart',
- 'CompanyConfig', 'CompanyReport', 'LetterReport']
+ 'CompanyConfig', 'CompanyReport', 'LetterReport', 'Rule']
__metaclass__ = PoolMeta
@@ -249,6 +249,14 @@ class User:
values['employee'] = employee_id
return result
+ @classmethod
+ def write(cls, *args):
+ pool = Pool()
+ Rule = pool.get('ir.rule')
+ super(User, cls).write(*args)
+ # Restart the cache on the domain_get method
+ Rule._domain_get_cache.clear()
+
class Property:
__name__ = 'ir.property'
@@ -361,3 +369,14 @@ class CompanyReport(Report):
class LetterReport(CompanyReport):
__name__ = 'party.letter'
+
+
+class Rule:
+ __name__ = 'ir.rule'
+
+ @classmethod
+ def _get_cache_key(cls):
+ key = super(Rule, cls)._get_cache_key()
+ # XXX Use company from context instead of browse to prevent infinite
+ # loop, but the cache is cleared when User is written.
+ return key + (Transaction().context.get('company'),)
diff --git a/tryton.cfg b/tryton.cfg
index 0637139..bb8dbf0 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
[tryton]
-version=3.6.0
+version=3.6.1
depends:
currency
ir
diff --git a/trytond_company.egg-info/PKG-INFO b/trytond_company.egg-info/PKG-INFO
index 7ead3a6..36eab59 100644
--- a/trytond_company.egg-info/PKG-INFO
+++ b/trytond_company.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: trytond-company
-Version: 3.6.0
+Version: 3.6.1
Summary: Tryton module with companies and employees
Home-page: http://www.tryton.org/
Author: Tryton
--
tryton-modules-company
More information about the tryton-debian-vcs
mailing list