Merge lp:~unifield-team/unifield-server/uf_1075_usability_requirements into lp:unifield-server

Proposed by jftempo
Status: Merged
Merged at revision: 3406
Proposed branch: lp:~unifield-team/unifield-server/uf_1075_usability_requirements
Merge into: lp:unifield-server
Diff against target: 93 lines (+13/-6)
4 files modified
bin/addons/__init__.py (+4/-1)
bin/addons/base/ir/ir_values.py (+5/-3)
bin/osv/orm.py (+0/-1)
bin/tools/config.py (+4/-1)
To merge this branch: bzr merge lp:~unifield-team/unifield-server/uf_1075_usability_requirements
Reviewer Review Type Date Requested Status
UniField Dev Team Pending
Review via email: mp+114847@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 'bin/addons/__init__.py'
2--- bin/addons/__init__.py 2011-01-27 09:56:54 +0000
3+++ bin/addons/__init__.py 2012-07-13 12:06:07 +0000
4@@ -665,7 +665,7 @@
5
6 def load_test(cr, module_name, id_map, mode):
7 cr.commit()
8- if not tools.config.options['test_disable']:
9+ if not tools.config.options['test_disable'] and (not tools.config.options['test_module'] or module_name in tools.config.options['test_module'].split(',')):
10 try:
11 _load_data(cr, module_name, id_map, mode, 'test')
12 except Exception, e:
13@@ -776,6 +776,9 @@
14 for kind in ('init', 'demo', 'update'):
15 if hasattr(package, kind):
16 delattr(package, kind)
17+
18+ elif (hasattr(package, 'demo') or package.dbdemo) and tools.config.options['test_module'] and m in tools.config.options['test_module'].split(','):
19+ load_test(cr, m, idref, mode)
20
21 statusi += 1
22
23
24=== modified file 'bin/addons/base/ir/ir_values.py'
25--- bin/addons/base/ir/ir_values.py 2010-12-06 13:19:28 +0000
26+++ bin/addons/base/ir/ir_values.py 2012-07-13 12:06:07 +0000
27@@ -85,12 +85,14 @@
28 method=True, type='text', string='Metadata'),
29 'res_id': fields.integer('Object ID', help="Keep 0 if the action must appear on all resources.", select=True),
30 'user_id': fields.many2one('res.users', 'User', ondelete='cascade', select=True),
31- 'company_id': fields.many2one('res.company', 'Company', select=True)
32+ 'company_id': fields.many2one('res.company', 'Company', select=True),
33+ 'sequence': fields.integer('Sequence'),
34 }
35 _defaults = {
36 'key': lambda *a: 'action',
37 'key2': lambda *a: 'tree_but_open',
38- 'company_id': lambda *a: False
39+ 'company_id': lambda *a: False,
40+ 'sequence': lambda *a: 100,
41 }
42
43 def _auto_init(self, cr, context=None):
44@@ -173,7 +175,7 @@
45 where.append('res_id=%s')
46 params.append(res_id)
47
48- where.append('(user_id=%s or (user_id IS NULL)) order by id')
49+ where.append('(user_id=%s or (user_id IS NULL)) order by sequence,id')
50 params.append(uid)
51 clause = ' and '.join(where)
52 cr.execute('select id,name,value,object,meta, key from ir_values where ' + clause, params)
53
54=== modified file 'bin/osv/orm.py'
55--- bin/osv/orm.py 2012-07-13 06:02:27 +0000
56+++ bin/osv/orm.py 2012-07-13 12:06:07 +0000
57@@ -1703,7 +1703,6 @@
58 resaction = ir_values_obj.get(cr, user, 'action',
59 'client_action_multi', [(self._name, False)], False,
60 context)
61-
62 resrelate = ir_values_obj.get(cr, user, 'action',
63 'client_action_relate', [(self._name, False)], False,
64 context)
65
66=== modified file 'bin/tools/config.py'
67--- bin/tools/config.py 2012-06-20 08:49:14 +0000
68+++ bin/tools/config.py 2012-07-13 12:06:07 +0000
69@@ -88,6 +88,7 @@
70 'test_file' : False,
71 'test_report_directory' : False,
72 'test_disable' : False,
73+ 'test_module' : False,
74 'test_commit' : False,
75 'static_http_enable': False,
76 'static_http_document_root': None,
77@@ -171,6 +172,8 @@
78 group.add_option("--test-report-directory", dest="test_report_directory", help="If set, will save sample of all reports in this directory.")
79 group.add_option("--test-disable", action="store_true", dest="test_disable",
80 default=False, help="Disable loading test files.")
81+ group.add_option("--test-module", dest="test_module",
82+ default=False, help="module to test")
83 group.add_option("--test-commit", action="store_true", dest="test_commit",
84 default=False, help="Commit database changes performed by tests.")
85 parser.add_option_group(group)
86@@ -315,7 +318,7 @@
87 'debug_mode', 'smtp_ssl', 'load_language',
88 'stop_after_init', 'logrotate', 'without_demo', 'netrpc', 'xmlrpc', 'syslog',
89 'list_db', 'xmlrpcs',
90- 'test_file', 'test_disable', 'test_commit', 'test_report_directory',
91+ 'test_file', 'test_disable', 'test_commit', 'test_module', 'test_report_directory',
92 'osv_memory_count_limit', 'osv_memory_age_limit',
93 ]
94

Subscribers

People subscribed via source and target branches

to all changes: