Merge lp:~elbati/server-env-tools/adding_super_calendar into lp:~server-env-tools-core-editors/server-env-tools/6.1
- adding_super_calendar
- Merge into 6.1
Status: | Merged |
---|---|
Merged at revision: | 25 |
Proposed branch: | lp:~elbati/server-env-tools/adding_super_calendar |
Merge into: | lp:~server-env-tools-core-editors/server-env-tools/6.1 |
Diff against target: |
432 lines (+395/-0) 7 files modified
super_calendar/AUTHORS.txt (+1/-0) super_calendar/__init__.py (+21/-0) super_calendar/__openerp__.py (+76/-0) super_calendar/cron_data.xml (+15/-0) super_calendar/security/ir.model.access.csv (+4/-0) super_calendar/super_calendar.py (+132/-0) super_calendar/super_calendar_view.xml (+146/-0) |
To merge this branch: | bzr merge lp:~elbati/server-env-tools/adding_super_calendar |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Nicolas Bessi - Camptocamp (community) | no test | Approve | |
Guewen Baconnier @ Camptocamp | Approve | ||
Joël Grand-Guillaume @ camptocamp | Needs Information | ||
Review via email: mp+138798@code.launchpad.net |
Commit message
Description of the change
Is this project the right place for this module?
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote : | # |
Joël Grand-Guillaume @ camptocamp (jgrandguillaume-c2c) wrote : | # |
Hi Lorenzo,
First, thank you for your contribution ! This project aim to group all server "low level" tools, like handling translation or security.
There is 2 point of view here:
- We consider your module as a server improvement to display in a super calendar all define object => in that case, I can understand it lands here !
- We consider your module is more a project or time management, and in this case, he'd better go to a project or timesheet LP project
What's your opinion here ? Anybody else ?
Regards,
Joël
Nicolas Bessi - Camptocamp (nbessi-c2c-deactivatedaccount) wrote : | # |
Hello,
I think it is more a generic addon than project related addon. I have no objection to merge it here.
Regards
Nicolas
Niels Huylebroeck (red15) wrote : | # |
On a little side note: you can now specify authors as a list of strings. This way you don't have an infinite amount of combination of partners on the apps site.
I've seen this implemented for some time but the change was quite silent. I would have to go and search to see where exactly they changed it.
So I would suggest you put
'author': ['Agile Business Group', 'Domsense'],
in your __openerp__.py
(Be sure to check it locally because YMMV)
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote : | # |
So it seems that's the good place.
Here are my remarks:
102 + 'author': 'Agile Business Group & Domsense',
You may want to change as author list as proposed by Niels. (thanks for the remark by the way I wasn't aware of that, good to know)
17,44,157: what means this All Rights Reserved notice?
174 +from osv import fields, osv
175 +from tools.translate import _
176 +import netsvc
Better to write:
from openerp.osv import fields, osv, orm
from openerp.
from openerp import netsvc
187,246,283
class super_calendar_
Better to write:
class super_calendar_
181 +def _models_get(self, cr, uid, context={}):
No mutable in default value for a keyword argument:
def _models_get(self, cr, uid, context=None):
188 + _logger = netsvc.Logger()
should be replaced by the logging module, netsvc logging output annoying deprecation warnings
203 + for configurator_id in configurator_ids:
204 + configurator = self.browse(cr, uid, configurator_id)
You better have to write:
for configurator_id in self.browse(cr, uid, configurator_ids, context=context):
Otherwise it have to browse the ids one per one.
207: eval should be replaced by OpenERP's safe_eval, you can do it easily by importing on top of your module:
from tools.safe_eval import safe_eval as eval
215: the trailing \ is not necessary (and not recommended) within parenthesis
216: one more level of indentation should be used because it mingles with the line below
244,271,288: the models instantiation is not needed anymore
279: to remove?
Globally: the context is never passed in method calls, is it intended?
Niels Huylebroeck (red15) wrote : | # |
174 : Do we really still need osv ? (See my mail about osv.except_osv vs
orm.except_orm on the community list)
188 : netsvc logging outputs ONLY the annoying message (not the actual
error anymore afaik)
207 : from openerp.tools import safe_eval as eval
- 27. By Lorenzo Battistini
-
[FIX] copyright header
- 28. By Lorenzo Battistini
-
[FIX] minor fixes
- 29. By Lorenzo Battistini
-
[FIX] using right logger
- 30. By Lorenzo Battistini
-
[FIX] orm methods
- 31. By Lorenzo Battistini
-
[FIX] eval
- 32. By Lorenzo Battistini
-
[IMP] cleaning
- 33. By Lorenzo Battistini
-
[FIX] eval
- 34. By Lorenzo Battistini
-
[FIX] import logging
- 35. By Lorenzo Battistini
-
[FIX] author name
Lorenzo Battistini (elbati) wrote : | # |
Hello, just did the changes.
Please review.
Thanks
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote : | # |
Great, looks good to me.
Nicolas Bessi - Camptocamp (nbessi-c2c-deactivatedaccount) wrote : | # |
LGTM, merged.
Thanks for the work.
Regards
Nicolas
Preview Diff
1 | === added directory 'super_calendar' |
2 | === added file 'super_calendar/AUTHORS.txt' |
3 | --- super_calendar/AUTHORS.txt 1970-01-01 00:00:00 +0000 |
4 | +++ super_calendar/AUTHORS.txt 2013-01-15 19:29:21 +0000 |
5 | @@ -0,0 +1,1 @@ |
6 | +Lorenzo Battistini <lorenzo.battistini@agilebg.com> |
7 | |
8 | === added file 'super_calendar/__init__.py' |
9 | --- super_calendar/__init__.py 1970-01-01 00:00:00 +0000 |
10 | +++ super_calendar/__init__.py 2013-01-15 19:29:21 +0000 |
11 | @@ -0,0 +1,21 @@ |
12 | +# -*- coding: utf-8 -*- |
13 | +############################################################################## |
14 | +# |
15 | +# Copyright (C) 2012 Agile Business Group sagl (<http://www.agilebg.com>) |
16 | +# Copyright (C) 2012 Domsense srl (<http://www.domsense.com>) |
17 | +# |
18 | +# This program is free software: you can redistribute it and/or modify |
19 | +# it under the terms of the GNU Affero General Public License as published |
20 | +# by the Free Software Foundation, either version 3 of the License, or |
21 | +# (at your option) any later version. |
22 | +# |
23 | +# This program is distributed in the hope that it will be useful, |
24 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
25 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
26 | +# GNU General Public License for more details. |
27 | +# |
28 | +# You should have received a copy of the GNU Affero General Public License |
29 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
30 | +# |
31 | +############################################################################## |
32 | +import super_calendar |
33 | |
34 | === added file 'super_calendar/__openerp__.py' |
35 | --- super_calendar/__openerp__.py 1970-01-01 00:00:00 +0000 |
36 | +++ super_calendar/__openerp__.py 2013-01-15 19:29:21 +0000 |
37 | @@ -0,0 +1,76 @@ |
38 | +# -*- coding: utf-8 -*- |
39 | +############################################################################## |
40 | +# |
41 | +# Copyright (C) 2012 Agile Business Group sagl (<http://www.agilebg.com>) |
42 | +# Copyright (C) 2012 Domsense srl (<http://www.domsense.com>) |
43 | +# |
44 | +# This program is free software: you can redistribute it and/or modify |
45 | +# it under the terms of the GNU Affero General Public License as published |
46 | +# by the Free Software Foundation, either version 3 of the License, or |
47 | +# (at your option) any later version. |
48 | +# |
49 | +# This program is distributed in the hope that it will be useful, |
50 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
51 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
52 | +# GNU General Public License for more details. |
53 | +# |
54 | +# You should have received a copy of the GNU Affero General Public License |
55 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
56 | +# |
57 | +############################################################################## |
58 | +{ |
59 | + 'name': "Super Calendar", |
60 | + 'version': '0.1', |
61 | + 'category': 'Generic Modules/Others', |
62 | + 'description': """ |
63 | +This module allows to create configurable calendars. |
64 | + |
65 | +Through the 'calendar configurator' object, you can specify which models have to be merged in the super calendar. For each model, you have to define the 'description' and 'date_start' fields at least. Then you can define 'duration' and the 'user_id' fields. |
66 | + |
67 | +The 'super.calendar' object contains the the merged calendars. The 'super.calendar' can be updated by 'ir.cron' or manually. |
68 | + |
69 | +Configuration |
70 | +============= |
71 | + |
72 | +After installing the module you can go to |
73 | + |
74 | +Super calendar → Configuration → Configurators |
75 | + |
76 | +and create a new configurator. For instance, if you want to see meetings and phone calls, you can create the following lines |
77 | + |
78 | +.. image:: http://planet.domsense.com/wp-content/uploads/2012/04/meetings.png |
79 | + :width: 400 px |
80 | + |
81 | +.. image:: http://planet.domsense.com/wp-content/uploads/2012/04/phone_calls.png |
82 | + :width: 400 px |
83 | + |
84 | +Then, you can use the ‘Generate Calendar’ button or wait for the scheduled action (‘Generate Calendar Records’) to be run. |
85 | + |
86 | +When the calendar is generated, you can visualize it by the ‘super calendar’ main menu. |
87 | + |
88 | +Here is a sample monthly calendar: |
89 | + |
90 | +.. image:: http://planet.domsense.com/wp-content/uploads/2012/04/month_calendar.png |
91 | + :width: 400 px |
92 | + |
93 | +And here is the weekly one: |
94 | + |
95 | +.. image:: http://planet.domsense.com/wp-content/uploads/2012/04/week_calendar.png |
96 | + :width: 400 px |
97 | + |
98 | +As you can see, several filters are available. A typical usage consists in filtering by ‘Configurator’ (if you have several configurators, ‘Scheduled calls and meetings’ can be one of them) and by your user. Once you filtered, you can save the filter as ‘Advanced filter’ or even add it to a dashboard. |
99 | +""", |
100 | + 'author': 'Agile Business Group', |
101 | + 'website': 'http://www.agilebg.com', |
102 | + 'license': 'AGPL-3', |
103 | + "depends" : ['base'], |
104 | + "init_xml" : [], |
105 | + "update_xml" : [ |
106 | + 'super_calendar_view.xml', |
107 | + 'cron_data.xml', |
108 | + 'security/ir.model.access.csv', |
109 | + ], |
110 | + "demo_xml" : [], |
111 | + "active": False, |
112 | + "installable": True |
113 | +} |
114 | |
115 | === added file 'super_calendar/cron_data.xml' |
116 | --- super_calendar/cron_data.xml 1970-01-01 00:00:00 +0000 |
117 | +++ super_calendar/cron_data.xml 2013-01-15 19:29:21 +0000 |
118 | @@ -0,0 +1,15 @@ |
119 | +<?xml version="1.0"?> |
120 | +<openerp> |
121 | + <data noupdate="1"> |
122 | + <record model="ir.cron" id="generate_calendar_records_cron"> |
123 | + <field name="name">Generate Calendar Records</field> |
124 | + <field name="interval_number">10</field> |
125 | + <field name="interval_type">minutes</field> |
126 | + <field name="numbercall">-1</field> |
127 | + <field name="doall" eval="False"></field> |
128 | + <field eval="'super.calendar.configurator'" name="model"/> |
129 | + <field eval="'generate_calendar_records'" name="function"/> |
130 | + <field eval="'[[],{}]'" name="args"/> |
131 | + </record> |
132 | + </data> |
133 | +</openerp> |
134 | |
135 | === added directory 'super_calendar/i18n' |
136 | === added directory 'super_calendar/security' |
137 | === added file 'super_calendar/security/ir.model.access.csv' |
138 | --- super_calendar/security/ir.model.access.csv 1970-01-01 00:00:00 +0000 |
139 | +++ super_calendar/security/ir.model.access.csv 2013-01-15 19:29:21 +0000 |
140 | @@ -0,0 +1,4 @@ |
141 | +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink |
142 | +access_model_super_calendar_configurator,access_model_super_calendar_configurator,model_super_calendar_configurator,base.group_system,1,1,1,1 |
143 | +access_model_super_calendar_configurator_line,access_model_super_calendar_configurator_line,model_super_calendar_configurator_line,base.group_system,1,1,1,1 |
144 | +access_model_super_calendar,access_model_super_calendar,model_super_calendar,base.group_user,1,0,0,0 |
145 | |
146 | === added file 'super_calendar/super_calendar.py' |
147 | --- super_calendar/super_calendar.py 1970-01-01 00:00:00 +0000 |
148 | +++ super_calendar/super_calendar.py 2013-01-15 19:29:21 +0000 |
149 | @@ -0,0 +1,132 @@ |
150 | +# -*- coding: utf-8 -*- |
151 | +############################################################################## |
152 | +# |
153 | +# Copyright (C) 2012 Agile Business Group sagl (<http://www.agilebg.com>) |
154 | +# Copyright (C) 2012 Domsense srl (<http://www.domsense.com>) |
155 | +# |
156 | +# This program is free software: you can redistribute it and/or modify |
157 | +# it under the terms of the GNU Affero General Public License as published |
158 | +# by the Free Software Foundation, either version 3 of the License, or |
159 | +# (at your option) any later version. |
160 | +# |
161 | +# This program is distributed in the hope that it will be useful, |
162 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
163 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
164 | +# GNU General Public License for more details. |
165 | +# |
166 | +# You should have received a copy of the GNU Affero General Public License |
167 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
168 | +# |
169 | +############################################################################## |
170 | + |
171 | +from openerp.osv import fields, osv, orm |
172 | +from openerp.tools.translate import _ |
173 | +import logging |
174 | +from mako.template import Template |
175 | +from datetime import datetime |
176 | +from openerp import tools |
177 | +from openerp.tools import safe_eval as eval |
178 | + |
179 | +def _models_get(self, cr, uid, context=None): |
180 | + obj = self.pool.get('ir.model') |
181 | + ids = obj.search(cr, uid, []) |
182 | + res = obj.read(cr, uid, ids, ['model', 'name'], context) |
183 | + return [(r['model'], r['name']) for r in res] |
184 | + |
185 | +class super_calendar_configurator(orm.Model): |
186 | + _logger = logging.getLogger('super.calendar') |
187 | + _name = 'super.calendar.configurator' |
188 | + _columns = { |
189 | + 'name': fields.char('Name', size=64, required=True), |
190 | + 'line_ids': fields.one2many('super.calendar.configurator.line', 'configurator_id', 'Lines'), |
191 | + } |
192 | + |
193 | + def generate_calendar_records(self, cr, uid, ids, context=None): |
194 | + configurator_ids = self.search(cr, uid, []) |
195 | + super_calendar_pool = self.pool.get('super.calendar') |
196 | + |
197 | + # removing old records |
198 | + super_calendar_ids = super_calendar_pool.search(cr, uid, [], context=context) |
199 | + super_calendar_pool.unlink(cr, uid, super_calendar_ids, context=context) |
200 | + |
201 | + for configurator in self.browse(cr, uid, configurator_ids, context): |
202 | + for line in configurator.line_ids: |
203 | + current_pool = self.pool.get(line.name.model) |
204 | + current_record_ids = current_pool.search(cr, uid, line.domain and eval(line.domain) or [], context=context) |
205 | + for current_record_id in current_record_ids: |
206 | + current_record = current_pool.browse(cr, uid, current_record_id, context=context) |
207 | + if line.user_field_id and \ |
208 | + current_record[line.user_field_id.name] and current_record[line.user_field_id.name]._table_name != 'res.users': |
209 | + raise osv.except_osv(_('Error'), |
210 | + _("The 'User' field of record %s (%s) does not refer to res.users") |
211 | + % (current_record[line.description_field_id.name], line.name.model)) |
212 | + if (((line.description_field_id |
213 | + and current_record[line.description_field_id.name]) |
214 | + or line.description_code) |
215 | + and current_record[line.date_start_field_id.name]): |
216 | + duration = False |
217 | + if not line.duration_field_id and line.date_stop_field_id and current_record[line.date_start_field_id.name] and current_record[line.date_stop_field_id.name]: |
218 | + date_start= datetime.strptime(current_record[line.date_start_field_id.name], tools.DEFAULT_SERVER_DATETIME_FORMAT) |
219 | + date_stop= datetime.strptime(current_record[line.date_stop_field_id.name], tools.DEFAULT_SERVER_DATETIME_FORMAT) |
220 | + duration = (date_stop - date_start).total_seconds() / 3600 |
221 | + elif line.duration_field_id: |
222 | + duration = current_record[line.duration_field_id.name] |
223 | + if line.description_type != 'code': |
224 | + name = current_record[line.description_field_id.name] |
225 | + else: |
226 | + parse_dict = {'o': current_record} |
227 | + mytemplate = Template(line.description_code) |
228 | + name= mytemplate.render(**parse_dict) |
229 | + super_calendar_values = { |
230 | + 'name': name, |
231 | + 'model_description': line.description, |
232 | + 'date_start': current_record[line.date_start_field_id.name], |
233 | + 'duration': duration, |
234 | + 'user_id': line.user_field_id and current_record[line.user_field_id.name] and current_record[line.user_field_id.name].id or False, |
235 | + 'configurator_id': configurator.id, |
236 | + 'res_id': line.name.model+','+str(current_record['id']), |
237 | + 'model_id': line.name.id, |
238 | + } |
239 | + super_calendar_pool.create(cr, uid, super_calendar_values, context=context) |
240 | + self._logger.info('Calendar generated') |
241 | + return True |
242 | + |
243 | + |
244 | +class super_calendar_configurator_line(orm.Model): |
245 | + _name = 'super.calendar.configurator.line' |
246 | + _columns = { |
247 | + 'name': fields.many2one('ir.model', 'Model', required=True), |
248 | + 'description': fields.char('Description', size=128, required=True), |
249 | + 'domain': fields.char('Domain', size=512), |
250 | + 'configurator_id': fields.many2one('super.calendar.configurator', 'Configurator'), |
251 | + 'description_type': fields.selection([ |
252 | + ('field', 'Field'), |
253 | + ('code', 'Code'), |
254 | + ], string="Description Type"), |
255 | + 'description_field_id': fields.many2one('ir.model.fields', 'Description field', |
256 | + domain="[('model_id', '=', name),('ttype', '=', 'char')]"), |
257 | + 'description_code': fields.text('Description field', help="Use '${o}' to refer to the involved object. E.g.: '${o.project_id.name}'"), |
258 | + 'date_start_field_id': fields.many2one('ir.model.fields', 'Start date field', |
259 | + domain="['&','|',('ttype', '=', 'datetime'),('ttype', '=', 'date'),('model_id', '=', name)]", |
260 | + required=True), |
261 | + 'date_stop_field_id': fields.many2one('ir.model.fields', 'End date field', |
262 | + domain="['&',('ttype', '=', 'datetime'),('model_id', '=', name)]"), |
263 | + 'duration_field_id': fields.many2one('ir.model.fields', 'Duration field', |
264 | + domain="['&',('ttype', '=', 'float'),('model_id', '=', name)]"), |
265 | + 'user_field_id': fields.many2one('ir.model.fields', 'User field', |
266 | + domain="['&',('ttype', '=', 'many2one'),('model_id', '=', name)]"), |
267 | + } |
268 | + |
269 | + |
270 | +class super_calendar(orm.Model): |
271 | + _name = 'super.calendar' |
272 | + _columns = { |
273 | + 'name': fields.char('Description', size=512, required=True), |
274 | + 'model_description': fields.char('Model Description', size=128, required=True), |
275 | + 'date_start':fields.datetime('Start date', required=True), |
276 | + 'duration':fields.float('Duration'), |
277 | + 'user_id': fields.many2one('res.users', 'User'), |
278 | + 'configurator_id': fields.many2one('super.calendar.configurator', 'Configurator'), |
279 | + 'res_id': fields.reference('Resource', selection=_models_get, size=128), |
280 | + 'model_id': fields.many2one('ir.model', 'Model'), |
281 | + } |
282 | |
283 | === added file 'super_calendar/super_calendar_view.xml' |
284 | --- super_calendar/super_calendar_view.xml 1970-01-01 00:00:00 +0000 |
285 | +++ super_calendar/super_calendar_view.xml 2013-01-15 19:29:21 +0000 |
286 | @@ -0,0 +1,146 @@ |
287 | +<?xml version="1.0"?> |
288 | +<openerp> |
289 | + <data> |
290 | + |
291 | + <!-- configurator --> |
292 | + |
293 | + <record model="ir.ui.view" id="super_calendar_configurator_tree"> |
294 | + <field name="name">super_calendar_configurator_tree</field> |
295 | + <field name="model">super.calendar.configurator</field> |
296 | + <field name="type">tree</field> |
297 | + <field name="arch" type="xml"> |
298 | + <tree string="Configurators"> |
299 | + <field name="name"/> |
300 | + </tree> |
301 | + </field> |
302 | + </record> |
303 | + <record model="ir.ui.view" id="super_calendar_configurator_form"> |
304 | + <field name="name">super_calendar_configurator_form</field> |
305 | + <field name="model">super.calendar.configurator</field> |
306 | + <field name="type">form</field> |
307 | + <field name="arch" type="xml"> |
308 | + <form string="Configurator"> |
309 | + <field name="name" select="1" colspan="2"/> |
310 | + <newline/> |
311 | + <field name="line_ids" nolabel="1" colspan="4"> |
312 | + <tree string="Lines"> |
313 | + <field name="name"/> |
314 | + <field name="domain"/> |
315 | + </tree> |
316 | + <form string="Line"> |
317 | + <field name="name"/> |
318 | + <field name="description"/> |
319 | + <field name="domain"/> |
320 | + <field name="date_start_field_id"/> |
321 | + <field name="duration_field_id"/> |
322 | + <field name="date_stop_field_id" attrs="{'readonly':[('duration_field_id','!=',False)]}"/> |
323 | + <field name="user_field_id"/> |
324 | + <separator string="Description" colspan="4" /> |
325 | + <field name="description_type"/> |
326 | + <newline/> |
327 | + <field name="description_field_id" attrs="{'required':[('description_type','!=','code')], 'invisible':[('description_type','==','code')]}"/> |
328 | + <group colspan="4" col="1" attrs="{'invisible':[('description_type','!=','code')]}"> |
329 | + <label string="Use '${o}' to refer to the involved object. E.g.: '${o.project_id.name}'" /> |
330 | + <field name="description_code" nolabel="1" attrs="{'required':[('description_type','==','code')]}"/> |
331 | + </group> |
332 | + </form> |
333 | + </field> |
334 | + <newline/> |
335 | + <button name="generate_calendar_records" string="Generate Calendar" type="object" icon="gtk-go-forward" colspan="2"/> |
336 | + </form> |
337 | + </field> |
338 | + </record> |
339 | + |
340 | + <record model="ir.actions.act_window" id="super_calendar_configurator"> |
341 | + <field name="name">Calendar Configurators</field> |
342 | + <field name="res_model">super.calendar.configurator</field> |
343 | + <field name="view_type">form</field> |
344 | + <field name="view_mode">tree,form</field> |
345 | + <field name="view_id" ref="super_calendar_configurator_tree"/> |
346 | + </record> |
347 | + |
348 | + <!-- calendar --> |
349 | + |
350 | + <record model="ir.ui.view" id="super_calendar_tree"> |
351 | + <field name="name">super_calendar_tree</field> |
352 | + <field name="model">super.calendar</field> |
353 | + <field name="type">tree</field> |
354 | + <field name="arch" type="xml"> |
355 | + <tree string="Calendar"> |
356 | + <field name="name"/> |
357 | + <field name="date_start"/> |
358 | + <!--<field name="date_stop"/>--> |
359 | + <field name="duration"/> |
360 | + <field name="user_id"/> |
361 | + <field name="configurator_id"/> |
362 | + <field name="model_id"/> |
363 | + <field name="model_description"/> |
364 | + </tree> |
365 | + </field> |
366 | + </record> |
367 | + <record model="ir.ui.view" id="super_calendar_form"> |
368 | + <field name="name">super_calendar_form</field> |
369 | + <field name="model">super.calendar</field> |
370 | + <field name="type">form</field> |
371 | + <field name="arch" type="xml"> |
372 | + <form string="Configurator"> |
373 | + <field name="name" readonly="1"/> |
374 | + <field name="date_start" readonly="1"/> |
375 | + <!--<field name="date_stop" readonly="1"/>--> |
376 | + <field name="duration" readonly="1"/> |
377 | + <field name="user_id" readonly="1"/> |
378 | + <field name="configurator_id" readonly="1"/> |
379 | + <field name="model_id" readonly="1"/> |
380 | + <field name="model_description" readonly="1"/> |
381 | + <field name="res_id"/> |
382 | + </form> |
383 | + </field> |
384 | + </record> |
385 | + <record model="ir.ui.view" id="super_calendar"> |
386 | + <field name="name">super_calendar</field> |
387 | + <field name="model">super.calendar</field> |
388 | + <field name="type">calendar</field> |
389 | + <field name="arch" type="xml"> |
390 | + <calendar string="Calendar" color="model_description" date_start="date_start" date_delay="duration"> |
391 | + <field name="name"/> |
392 | + </calendar> |
393 | + </field> |
394 | + </record> |
395 | + <record model="ir.ui.view" id="super_calendar_search"> |
396 | + <field name="name">super_calendar_search</field> |
397 | + <field name="model">super.calendar</field> |
398 | + <field name="type">search</field> |
399 | + <field name="arch" type="xml"> |
400 | + <search string="Search Calendar" > |
401 | + <field name="name"/> |
402 | + <field name="configurator_id" select="1"/> |
403 | + <field name="model_id" select="1"/> |
404 | + <field name="model_description" select="1"/> |
405 | + <field name="user_id" widget="selection" > |
406 | + <filter domain="[('user_id','=',uid)]" help="My Items" icon="terp-personal"/> |
407 | + </field> |
408 | + <newline/> |
409 | + <group expand="0" string="Extended Filters..." colspan="4" col="8"> |
410 | + <field name="date_start" /> |
411 | + <!--<field name="date_stop" />--> |
412 | + <field name="duration" /> |
413 | + </group> |
414 | + </search> |
415 | + </field> |
416 | + </record> |
417 | + |
418 | + <record model="ir.actions.act_window" id="super_calendar_action"> |
419 | + <field name="name">Super Calendar</field> |
420 | + <field name="res_model">super.calendar</field> |
421 | + <field name="view_type">form</field> |
422 | + <field name="view_mode">calendar,tree,form</field> |
423 | + <field name="view_id" ref="super_calendar"/> |
424 | + </record> |
425 | + |
426 | + <menuitem id="super_calendar_menu" name="Super Calendar" action="super_calendar_action"/> |
427 | + <menuitem id="super_calendar_calendar" name="Calendar" parent="super_calendar_menu" /> |
428 | + <menuitem id="super_calendar_calendar_calendar" name="Calendar" parent="super_calendar_calendar" action="super_calendar_action"/> |
429 | + <menuitem id="super_calendar_configuration" name="Configuration" parent="super_calendar_menu" /> |
430 | + <menuitem id="super_calendar_configurators" name="Configurators" parent="super_calendar_configuration" action="super_calendar_configurator"/> |
431 | + </data> |
432 | +</openerp> |
Hi,
I think that this project "Server Environment And Tools" is supposed to harbor modules which change the OpenERP behavior according to the environment, for example:
- if the environment is 'dev' send the e-mails to a fake smtp, if it is 'test' do not send them and if it is 'prod' use the production smtp server.
But the 'And Tools' suggest that it can also contain 'tools', but I don't know if they are supposed to be related to the environment or not.
The description of the project deserves to be reworded a little to be more explicative.