Merge lp:~unifield-team/unifield-web/utp-509 into lp:unifield-web

Proposed by jftempo
Status: Merged
Merged at revision: 4743
Proposed branch: lp:~unifield-team/unifield-web/utp-509
Merge into: lp:unifield-web
Diff against target: 80 lines (+47/-0)
3 files modified
addons/openerp/controllers/__init__.py (+1/-0)
addons/openerp/controllers/templates/header.mako (+8/-0)
addons/openerp/controllers/unifield_version.py (+38/-0)
To merge this branch: bzr merge lp:~unifield-team/unifield-web/utp-509
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+232554@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'addons/openerp/controllers/__init__.py'
2--- addons/openerp/controllers/__init__.py 2014-01-10 17:12:18 +0000
3+++ addons/openerp/controllers/__init__.py 2014-08-28 12:38:05 +0000
4@@ -16,6 +16,7 @@
5 import selection
6 import shortcuts
7 import requests
8+import unifield_version
9 import openm2o
10 import openo2m
11 import openm2m
12
13=== modified file 'addons/openerp/controllers/templates/header.mako'
14--- addons/openerp/controllers/templates/header.mako 2013-11-04 13:05:28 +0000
15+++ addons/openerp/controllers/templates/header.mako 2014-08-28 12:38:05 +0000
16@@ -4,6 +4,7 @@
17 ROOT = cp.request.pool.get_controller("/openerp")
18 SHORTCUTS = cp.request.pool.get_controller("/openerp/shortcuts")
19 REQUESTS = cp.request.pool.get_controller("/openerp/requests")
20+ UF_VERSION = cp.request.pool.get_controller("/openerp/unifield_version")
21
22 shortcuts = SHORTCUTS.my()
23 requests, total_request = REQUESTS.my()
24@@ -57,6 +58,13 @@
25 </ul>
26 </li>
27
28+ <li>
29+ <a href="${py.url('/openerp/unifield_version')}" class="info"></a>
30+ <ul>
31+ <li class="first last"><a href="${py.url('/openerp')}" target="_blank">${_("Version")}</a></li>
32+ </ul>
33+ </li>
34+
35 % if cp.config('server.environment') == 'production':
36 <li id="clear_cache"><a href="${py.url('/openerp/pref/clear_cache')}"
37 class="clear_cache" target="_top">${_("Clear Cache")}</a>
38
39=== added file 'addons/openerp/controllers/unifield_version.py'
40--- addons/openerp/controllers/unifield_version.py 1970-01-01 00:00:00 +0000
41+++ addons/openerp/controllers/unifield_version.py 2014-08-28 12:38:05 +0000
42@@ -0,0 +1,38 @@
43+###############################################################################
44+#
45+# Copyright (C) 2007-TODAY OpenERP SA. All Rights Reserved.
46+#
47+# $Id$
48+#
49+# Developed by OpenERP (http://openerp.com) and Axelor (http://axelor.com).
50+#
51+# The OpenERP web client is distributed under the "OpenERP Public License".
52+# It's based on Mozilla Public License Version (MPL) 1.1 with following
53+# restrictions:
54+#
55+# - All names, links and logos of OpenERP must be kept as in original
56+# distribution without any changes in all software screens, especially
57+# in start-up page and the software header, even if the application
58+# source code has been changed or updated or code has been added.
59+#
60+# You can see the MPL licence at: http://www.mozilla.org/MPL/MPL-1.1.html
61+#
62+###############################################################################
63+
64+from openerp.controllers import SecuredController, actions
65+from openerp.utils import rpc
66+
67+from openobject.tools import expose
68+
69+
70+class UnifieldVersion(SecuredController):
71+
72+ _cp_path = "/openerp/unifield_version"
73+
74+ @expose()
75+ def default(self):
76+ vid = rpc.RPCProxy('unifield.version').create({})
77+ return actions.execute(
78+ rpc.RPCProxy('ir.actions.act_window')\
79+ .for_xml_id('msf_profile', 'action_unifield_version_form_view'), domain=('id', '=', vid)
80+ )

Subscribers

People subscribed via source and target branches

to all changes: