Merge lp:~openerp-commiter/openobject-addons/trunk-rpa-new into lp:~openerp/openobject-addons/old_trunk
- trunk-rpa-new
- Merge into old_trunk
Proposed by
Rucha (Open ERP)
Status: | Rejected |
---|---|
Rejected by: | Jay Vora (Serpent Consulting Services) |
Proposed branch: | lp:~openerp-commiter/openobject-addons/trunk-rpa-new |
Merge into: | lp:~openerp/openobject-addons/old_trunk |
Diff against target: | None lines |
To merge this branch: | bzr merge lp:~openerp-commiter/openobject-addons/trunk-rpa-new |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jay Vora (Serpent Consulting Services) (community) | Needs Fixing | ||
Review via email: mp+5864@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
Revision history for this message
Rucha (Open ERP) (rpa-openerp) wrote : | # |
Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) : | # |
review:
Needs Fixing
Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote : | # |
Can you please update and request again?
Thanks.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'account/account_bank_statement.py' |
2 | --- account/account_bank_statement.py 2009-01-16 09:44:05 +0000 |
3 | +++ account/account_bank_statement.py 2009-04-23 06:56:53 +0000 |
4 | @@ -124,7 +124,7 @@ |
5 | states={'confirm':[('readonly', True)]}), |
6 | 'move_line_ids': fields.one2many('account.move.line', 'statement_id', |
7 | 'Entry lines', states={'confirm':[('readonly',True)]}), |
8 | - 'state': fields.selection([('draft', 'Draft'),('confirm', 'Confirm')], |
9 | + 'state': fields.selection([('draft', 'Draft'),('confirm', 'Confirmed')], |
10 | 'State', required=True, |
11 | states={'confirm': [('readonly', True)]}, readonly="1"), |
12 | 'currency': fields.function(_currency, method=True, string='Currency', |
13 | |
14 | === modified file 'account/invoice.py' |
15 | --- account/invoice.py 2009-03-19 13:02:14 +0000 |
16 | +++ account/invoice.py 2009-04-24 12:06:40 +0000 |
17 | @@ -209,7 +209,7 @@ |
18 | ('proforma2','Pro-forma'), |
19 | ('open','Open'), |
20 | ('paid','Done'), |
21 | - ('cancel','Cancelled') |
22 | + ('cancel','Canceled') |
23 | ],'State', select=True, readonly=True), |
24 | |
25 | 'date_invoice': fields.date('Date Invoiced', states={'open':[('readonly',True)],'close':[('readonly',True)]}), |
26 | |
27 | === modified file 'account_budget/crossovered_budget.py' |
28 | --- account_budget/crossovered_budget.py 2009-03-06 23:50:10 +0000 |
29 | +++ account_budget/crossovered_budget.py 2009-04-24 12:06:40 +0000 |
30 | @@ -111,7 +111,7 @@ |
31 | 'validating_user_id': fields.many2one('res.users','Validate User', readonly=True), |
32 | 'date_from': fields.date('Start Date',required=True,states={'done':[('readonly',True)]}), |
33 | 'date_to': fields.date('End Date',required=True,states={'done':[('readonly',True)]}), |
34 | - 'state' : fields.selection([('draft','Draft'),('confirm','Confirmed'),('validate','Validated'),('done','Done'),('cancel', 'Cancelled')], 'Status', select=True, required=True, readonly=True), |
35 | + 'state' : fields.selection([('draft','Draft'),('confirm','Confirmed'),('validate','Validated'),('done','Done'),('cancel', 'Canceled')], 'Status', select=True, required=True, readonly=True), |
36 | 'crossovered_budget_line': fields.one2many('crossovered.budget.lines', 'crossovered_budget_id', 'Budget Lines',states={'done':[('readonly',True)]} ), |
37 | } |
38 | |
39 | |
40 | === modified file 'account_payment/payment.py' |
41 | --- account_payment/payment.py 2009-02-26 14:31:43 +0000 |
42 | +++ account_payment/payment.py 2009-04-24 12:06:40 +0000 |
43 | @@ -99,7 +99,7 @@ |
44 | 'state': fields.selection([ |
45 | ('draft', 'Draft'), |
46 | ('open','Confirmed'), |
47 | - ('cancel','Cancelled'), |
48 | + ('cancel','Canceled'), |
49 | ('done','Done')], 'State', select=True), |
50 | 'line_ids': fields.one2many('payment.line','order_id','Payment lines',states={'done':[('readonly',True)]}), |
51 | 'total': fields.function(_total, string="Total", method=True, |
52 | |
53 | === modified file 'board/board_view.xml' |
54 | --- board/board_view.xml 2009-04-17 10:37:08 +0000 |
55 | +++ board/board_view.xml 2009-04-24 12:01:17 +0000 |
56 | @@ -49,15 +49,15 @@ |
57 | </tree> |
58 | </field> |
59 | </record> |
60 | + |
61 | + |
62 | <record id="view_board_form" model="ir.ui.view"> |
63 | <field name="name">board.board.form</field> |
64 | <field name="model">board.board</field> |
65 | <field name="type">form</field> |
66 | - <field eval="1" name="priority"/> |
67 | <field name="arch" type="xml"> |
68 | <form string="Dashboard"> |
69 | <field name="name" select="1"/> |
70 | - <button colspan="2" name="%(wizard_board_create_menu)d" string="Create Menu" type="action" icon="gtk-justify-fill"/> |
71 | <field colspan="4" name="line_ids"> |
72 | <tree string="Dashboard View"> |
73 | <field name="name"/> |
74 | @@ -74,9 +74,11 @@ |
75 | <field name="position"/> |
76 | </form> |
77 | </field> |
78 | + <button colspan="2" name="%(wizard_board_create_menu)d" string="Create Menu" type="action" icon="gtk-justify-fill"/> |
79 | </form> |
80 | </field> |
81 | </record> |
82 | + |
83 | <record id="action_view_board_list_form" model="ir.actions.act_window"> |
84 | <field name="name">Dashboard Definition</field> |
85 | <field name="res_model">board.board</field> |
86 | |
87 | === modified file 'document_ics/__init__.py' |
88 | --- document_ics/__init__.py 2009-03-06 23:50:10 +0000 |
89 | +++ document_ics/__init__.py 2009-04-23 13:46:21 +0000 |
90 | @@ -21,4 +21,6 @@ |
91 | ############################################################################## |
92 | |
93 | import document |
94 | +import document_ics_config_wizard |
95 | + |
96 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
97 | |
98 | === modified file 'document_ics/__terp__.py' |
99 | --- document_ics/__terp__.py 2009-02-03 17:02:20 +0000 |
100 | +++ document_ics/__terp__.py 2009-04-23 13:46:21 +0000 |
101 | @@ -30,7 +30,7 @@ |
102 | 'website': 'http://www.openerp.com', |
103 | 'depends': ['document', 'crm_configuration'], |
104 | 'init_xml': ['document_data.xml'], |
105 | - 'update_xml': ['document_view.xml', 'security/ir.model.access.csv'], |
106 | + 'update_xml': ['document_view.xml', 'security/ir.model.access.csv','document_ics_config_wizard.xml'], |
107 | 'demo_xml': ['document_demo.xml'], |
108 | 'installable': True, |
109 | 'active': False, |
110 | |
111 | === modified file 'document_ics/document.py' |
112 | --- document_ics/document.py 2009-01-05 13:49:37 +0000 |
113 | +++ document_ics/document.py 2009-04-24 14:06:06 +0000 |
114 | @@ -28,20 +28,21 @@ |
115 | import datetime |
116 | import time |
117 | import random |
118 | +import tools |
119 | |
120 | ICS_TAGS = { |
121 | - 'summary':'normal', |
122 | - 'uid':'normal' , |
123 | - 'dtstart':'date' , |
124 | - 'dtend':'date' , |
125 | - 'created':'date' , |
126 | - 'dt-stamp':'date' , |
127 | - 'last-modified':'normal' , |
128 | - 'url':'normal' , |
129 | - 'attendee':'multiple', |
130 | - 'location':'normal', |
131 | - 'categories': 'normal', |
132 | - 'description':'normal', |
133 | + 'summary':'normal', |
134 | + 'uid':'normal' , |
135 | + 'dtstart':'date' , |
136 | + 'dtend':'date' , |
137 | + 'created':'date' , |
138 | + 'dtstamp':'date' , |
139 | + 'last-modified':'normal' , |
140 | + 'url':'normal' , |
141 | + 'attendee':'multiple', |
142 | + 'location':'normal', |
143 | + 'categories': 'normal', |
144 | + 'description':'normal', |
145 | |
146 | # TODO: handle the 'duration' property |
147 | } |
148 | @@ -49,8 +50,8 @@ |
149 | class document_directory_ics_fields(osv.osv): |
150 | _name = 'document.directory.ics.fields' |
151 | _columns = { |
152 | - 'field_id': fields.many2one('ir.model.fields', 'Open ERP Field', required=True), |
153 | - 'name': fields.selection(map(lambda x: (x,x), ICS_TAGS.keys()),'ICS Value', required=True), |
154 | + 'field_id': fields.many2one('ir.model.fields', 'Open ERP Field', required=True), |
155 | + 'name': fields.selection(map(lambda x: (x, x), ICS_TAGS.keys()), 'ICS Value', required=True), |
156 | 'content_id': fields.many2one('document.directory.content', 'Content', required=True, ondelete='cascade') |
157 | } |
158 | document_directory_ics_fields() |
159 | @@ -58,8 +59,8 @@ |
160 | class document_directory_content(osv.osv): |
161 | _inherit = 'document.directory.content' |
162 | _columns = { |
163 | - 'ics_object_id': fields.many2one('ir.model', 'Object'), |
164 | - 'ics_domain': fields.char('Domain', size=64), |
165 | + 'ics_object_id': fields.many2one('ir.model', 'Object'), |
166 | + 'ics_domain': fields.char('Domain', size=64), |
167 | 'ics_field_ids': fields.one2many('document.directory.ics.fields', 'content_id', 'Fields Mapping') |
168 | } |
169 | _defaults = { |
170 | @@ -87,7 +88,7 @@ |
171 | uuid = event.value |
172 | if event.name.lower() in fields: |
173 | if ICS_TAGS[event.name.lower()]=='normal': |
174 | - result[fields[event.name.lower()]] = event.value.encode('utf8') |
175 | + result[fields[event.name.lower()]] = event.value |
176 | elif ICS_TAGS[event.name.lower()]=='date': |
177 | result[fields[event.name.lower()]] = event.value.strftime('%Y-%m-%d %H:%M:%S') |
178 | if not uuid: |
179 | @@ -105,6 +106,12 @@ |
180 | return True |
181 | |
182 | def process_read_ics(self, cr, uid, node, context={}): |
183 | + def ics_datetime(idate, short=False): |
184 | + if short: |
185 | + return datetime.date.fromtimestamp(time.mktime(time.strptime(idate, '%Y-%m-%d'))) |
186 | + else: |
187 | + return datetime.datetime.strptime(idate, '%Y-%m-%d %H:%M:%S') |
188 | + |
189 | import vobject |
190 | obj_class = self.pool.get(node.content.ics_object_id.model) |
191 | # Can be improved to use context and active_id ! |
192 | @@ -113,21 +120,32 @@ |
193 | cal = vobject.iCalendar() |
194 | for obj in obj_class.browse(cr, uid, ids, context): |
195 | event = cal.add('vevent') |
196 | + # Fix dtstamp et last-modified with create and write date on the object line |
197 | + perm = obj_class.perm_read(cr, uid, [obj.id], context) |
198 | + event.add('dtstamp').value = ics_datetime(perm[0]['create_date'][:19]) |
199 | + if perm[0]['write_date']: |
200 | + event.add('last-modified').value = ics_datetime(perm[0]['write_date'][:19]) |
201 | for field in node.content.ics_field_ids: |
202 | value = getattr(obj, field.field_id.name) |
203 | if (not value) and field.name=='uid': |
204 | - value = 'OpenERP-'+str(random.randint(1999999999, 9999999999)) |
205 | + value = 'OpenERP-%s_%s@%s' % (node.content.ics_object_id.model, str(obj.id), cr.dbname,) |
206 | obj_class.write(cr, uid, [obj.id], {field.field_id.name: value}) |
207 | if ICS_TAGS[field.name]=='normal': |
208 | if type(value)==type(obj): |
209 | value=value.name |
210 | value = value or '' |
211 | event.add(field.name).value = value or '' |
212 | - elif ICS_TAGS[field.name]=='date': |
213 | - dt = value or time.strftime('%Y-%m-%d %H:%M:%S') |
214 | - if len(dt)==10: |
215 | - dt = dt+' 09:00:00' |
216 | - value = datetime.datetime.strptime(dt, '%Y-%m-%d %H:%M:%S') |
217 | + elif ICS_TAGS[field.name]=='date' and value: |
218 | + if field.name == 'dtstart': |
219 | + self.date_start = value |
220 | + if field.name == 'dtend' and isinstance(value, float): |
221 | + start_date = datetime.datetime.fromtimestamp(time.mktime(time.strptime(self.date_start, "%Y-%m-%d %H:%M:%S"))) |
222 | + value = (start_date + datetime.timedelta(hours=value)).strftime('%Y-%m-%d %H:%M:%S' ) |
223 | + |
224 | + if len(value)==10: |
225 | + value = ics_datetime(value, True) |
226 | + else: |
227 | + value = ics_datetime(value) |
228 | event.add(field.name).value = value |
229 | s= StringIO.StringIO(cal.serialize().encode('utf8')) |
230 | s.name = node |
231 | @@ -138,8 +156,36 @@ |
232 | class crm_case(osv.osv): |
233 | _inherit = 'crm.case' |
234 | _columns = { |
235 | - 'code': fields.char('Calendar Code', size=64) |
236 | - } |
237 | + 'code': fields.char('Calendar Code', size=64), |
238 | + 'date_deadline': fields.datetime('Deadline', help="Deadline Date is automatically computed from Start Date + Duration"), |
239 | + } |
240 | + |
241 | + _defaults = { |
242 | + 'code': lambda obj, cr, uid, context: obj.pool.get('ir.sequence').get(cr, uid, 'crm.case'), |
243 | + } |
244 | + |
245 | + def copy(self, cr, uid, id, default=None, context=None): |
246 | + """ |
247 | + code field must be unique in ICS file |
248 | + """ |
249 | + if not default: default = {} |
250 | + if not context: context = {} |
251 | + default.update({'code': self.pool.get('ir.sequence').get(cr, uid, 'crm.case'), 'id': False}) |
252 | + return super(crm_case, self).copy(cr, uid, id, default, context) |
253 | + |
254 | + def on_change_duration(self, cr, uid, id, date, duration): |
255 | + if not date: |
256 | + return {} |
257 | + start_date = datetime.datetime.fromtimestamp(time.mktime(time.strptime(date, "%Y-%m-%d %H:%M:%S"))) |
258 | + if duration >= 0 : |
259 | + end = start_date + datetime.timedelta(hours=duration) |
260 | + if duration < 0: |
261 | + raise osv.except_osv(_('Warning !'), |
262 | + _('You can not set negative Duration.')) |
263 | + |
264 | + res = {'value' : {'date_deadline' : end.strftime('%Y-%m-%d %H:%M:%S' )}} |
265 | + return res |
266 | + |
267 | crm_case() |
268 | |
269 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
270 | |
271 | === modified file 'document_ics/document_data.xml' |
272 | --- document_ics/document_data.xml 2008-10-28 08:38:03 +0000 |
273 | +++ document_ics/document_data.xml 2009-04-24 08:40:05 +0000 |
274 | @@ -6,6 +6,21 @@ |
275 | <field name="code">.ics</field> |
276 | <field name="name">ICS Calendar</field> |
277 | </record> |
278 | - |
279 | </data> |
280 | -</openerp> |
281 | + |
282 | + |
283 | + <data noupdate="1"> |
284 | + <!-- Sequences for sale.order --> |
285 | + <record id="seq_type_crm_case_code" model="ir.sequence.type"> |
286 | + <field name="name">CRM Case Code</field> |
287 | + <field name="code">crm.case</field> |
288 | + </record> |
289 | + <record id="seq_sale_order" model="ir.sequence"> |
290 | + <field name="name">CRM Case</field> |
291 | + <field name="code">crm.case</field> |
292 | + <field name="prefix">CASE</field> |
293 | + <field name="padding">3</field> |
294 | + </record> |
295 | + </data> |
296 | + |
297 | +</openerp> |
298 | \ No newline at end of file |
299 | |
300 | === modified file 'document_ics/document_demo.xml' |
301 | --- document_ics/document_demo.xml 2009-04-20 12:04:38 +0000 |
302 | +++ document_ics/document_demo.xml 2009-04-23 13:46:21 +0000 |
303 | @@ -26,6 +26,11 @@ |
304 | <field name="field_id" ref="crm.field_crm_case_date"/> |
305 | <field name="content_id" ref="dir_content_calendar"/> |
306 | </record> |
307 | + <record model="document.directory.ics.fields" id="dir_field6"> |
308 | + <field name="name">dtend</field> |
309 | + <field name="field_id" ref="crm.field_crm_case_date_deadline"/> |
310 | + <field name="content_id" ref="dir_content_calendar"/> |
311 | + </record> |
312 | <record model="document.directory.ics.fields" id="dir_field2"> |
313 | <field name="name">summary</field> |
314 | <field name="field_id" ref="crm.field_crm_case_name"/> |
315 | |
316 | === added file 'document_ics/document_ics_config_wizard.py' |
317 | --- document_ics/document_ics_config_wizard.py 1970-01-01 00:00:00 +0000 |
318 | +++ document_ics/document_ics_config_wizard.py 2009-04-24 14:06:06 +0000 |
319 | @@ -0,0 +1,133 @@ |
320 | + # -*- encoding: utf-8 -*- |
321 | +############################################################################## |
322 | +# |
323 | +# OpenERP, Open Source Management Solution |
324 | +# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved |
325 | +# $Id$ |
326 | +# |
327 | +# This program is free software: you can redistribute it and/or modify |
328 | +# it under the terms of the GNU General Public License as published by |
329 | +# the Free Software Foundation, either version 3 of the License, or |
330 | +# (at your option) any later version. |
331 | +# |
332 | +# This program is distributed in the hope that it will be useful, |
333 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
334 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
335 | +# GNU General Public License for more details. |
336 | +# |
337 | +# You should have received a copy of the GNU General Public License |
338 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
339 | +# |
340 | +############################################################################## |
341 | + |
342 | +import time |
343 | +import tools |
344 | +from osv import fields, osv, orm |
345 | +import os |
346 | +import mx.DateTime |
347 | +import base64 |
348 | +import pooler |
349 | + |
350 | +SECTION_NAME = { |
351 | + 'meeting' : 'Meetings', |
352 | + 'lead':'Prospects', |
353 | + 'opportunity':'Opportunities', |
354 | + 'jobs':'Jobs', |
355 | + 'bugs':'Bug Tracking', |
356 | + 'fund':'Fund Raising', |
357 | + 'helpdesk':'HelpDesk', |
358 | + 'claims':'Claims', |
359 | + 'phonecall':'Phone Calls', |
360 | + } |
361 | + |
362 | +ICS_TAGS = { |
363 | + 'summary':'Description', |
364 | + 'uid':'Calendar Code' , |
365 | + 'dtstart':'Date' , |
366 | + 'dtend':'Deadline' , |
367 | + 'url':'Partner Email' , |
368 | + 'description':'Your action', |
369 | + } |
370 | + |
371 | +class document_ics_crm_wizard(osv.osv_memory): |
372 | + _name='document.ics.crm.wizard' |
373 | + _columns = { |
374 | + 'name':fields.char('Name', size=64), |
375 | + 'meeting' : fields.boolean('Calendar of Meetings', help="Manages the calendar of meetings of the users."), |
376 | + 'lead' : fields.boolean('Prospect', help="Allows you to track and manage prospects which are pre-sales requests or contacts, the very first contact with a customer request."), |
377 | + 'opportunity' : fields.boolean('Business Opportunities', help="Tracks identified business opportunities for your sales pipeline."), |
378 | + 'jobs' : fields.boolean('Jobs Hiring Process', help="Help you to organise the jobs hiring process: evaluation, meetings, email integration..."), |
379 | + 'document_ics':fields.boolean('Shared Calendar', help=" Will allow you to synchronise your Open ERP calendars with your phone, outlook, Sunbird, ical, ..."), |
380 | + 'bugs' : fields.boolean('Bug Tracking', help="Used by companies to track bugs and support requests on softwares"), |
381 | + 'helpdesk': fields.boolean('Helpdesk', help="Manages an Helpdesk service."), |
382 | + 'fund' : fields.boolean('Fund Raising Operations', help="This may help associations in their fund raising process and tracking."), |
383 | + 'claims' : fields.boolean('Claims', help="Manages the supplier and customers claims, including your corrective or preventive actions."), |
384 | + 'phonecall' : fields.boolean('Phone Calls', help="Help you to encode the result of a phone call or to planify a list of phone calls to process."), |
385 | + } |
386 | + _defaults = { |
387 | + 'meeting': lambda *args: True, |
388 | + 'opportunity': lambda *args: True, |
389 | + 'phonecall': lambda *args: True, |
390 | + } |
391 | + |
392 | + def action_create(self, cr, uid, ids, context=None): |
393 | + data=self.read(cr, uid, ids, [])[0] |
394 | + dir_obj = self.pool.get('document.directory') |
395 | + dir_cont_obj = self.pool.get('document.directory.content') |
396 | + parent_dir = dir_obj.search(cr, uid, [('name', '=', 'Calendars')])[0] |
397 | + for section in ['meeting', 'lead', 'opportunity', 'jobs', 'bugs', 'fund', 'helpdesk', 'claims', 'phonecall']: |
398 | + if (not data[section]): |
399 | + continue |
400 | + else: |
401 | + vals = { |
402 | + 'name':SECTION_NAME[section]+' Calendars', |
403 | + 'parent_id': parent_dir, |
404 | + 'type' : 'directory', |
405 | + 'user_id' : uid |
406 | + } |
407 | + dir_id = dir_obj.create(cr, uid, vals) |
408 | + object_id=self.pool.get('ir.model').search(cr, uid, [('name', '=', 'Case')])[0] |
409 | + section_id=self.pool.get('crm.case.section').search(cr, uid, [('name', '=', SECTION_NAME[section])])[0] |
410 | + vals_cont={ |
411 | + 'name': SECTION_NAME[section], |
412 | + 'sequence': 1, |
413 | + 'directory_id': dir_id, |
414 | + 'suffix': section, |
415 | + 'extension': '.ics', |
416 | + 'ics_object_id': object_id, |
417 | + 'ics_domain': [('section_id', '=', section_id)], |
418 | + 'include_name' : False |
419 | + } |
420 | + |
421 | + content_id = dir_cont_obj.create(cr, uid, vals_cont) |
422 | + |
423 | + ics_obj=self.pool.get('document.directory.ics.fields') |
424 | + for tag in ['description', 'url', 'summary', 'dtstart', 'dtend', 'uid']: |
425 | + field_id = self.pool.get('ir.model.fields').search(cr, uid, [('model_id.name', '=', 'Case'), ('field_description', '=', ICS_TAGS[tag])])[0] |
426 | + vals_ics={ |
427 | + 'field_id': field_id , |
428 | + 'name': tag , |
429 | + 'content_id': content_id , |
430 | + } |
431 | + ics_obj.create(cr, uid, vals_ics) |
432 | + |
433 | + return { |
434 | + 'view_type': 'form', |
435 | + "view_mode": 'form', |
436 | + 'res_model': 'ir.actions.configuration.wizard', |
437 | + 'type': 'ir.actions.act_window', |
438 | + 'target':'new', |
439 | + } |
440 | + def action_cancel(self, cr, uid, ids, conect=None): |
441 | + return { |
442 | + 'view_type': 'form', |
443 | + "view_mode": 'form', |
444 | + 'res_model': 'ir.actions.configuration.wizard', |
445 | + 'type': 'ir.actions.act_window', |
446 | + 'target':'new', |
447 | + } |
448 | + |
449 | +document_ics_crm_wizard() |
450 | + |
451 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
452 | + |
453 | |
454 | === added file 'document_ics/document_ics_config_wizard.xml' |
455 | --- document_ics/document_ics_config_wizard.xml 1970-01-01 00:00:00 +0000 |
456 | +++ document_ics/document_ics_config_wizard.xml 2009-04-23 13:46:21 +0000 |
457 | @@ -0,0 +1,50 @@ |
458 | +<?xml version="1.0" encoding="utf-8"?> |
459 | +<openerp> |
460 | + <data> |
461 | + |
462 | + <record id="view_document_ics_config_directories" model="ir.ui.view"> |
463 | + <field name="name">Configure Directory for Sections</field> |
464 | + <field name="model">document.ics.crm.wizard</field> |
465 | + <field name="type">form</field> |
466 | + <field name="arch" type="xml"> |
467 | + <form string="Configure CRM Sections"> |
468 | + <separator colspan="4" string="Create Pre-Configured Directories"/> |
469 | + <newline/> |
470 | + <field name="meeting"/> |
471 | + <field name="opportunity"/> |
472 | + <field name="phonecall"/> |
473 | + <field name="lead"/> |
474 | + <field name="claims"/> |
475 | + <field name="bugs"/> |
476 | + <field name="helpdesk"/> |
477 | + <field name="jobs"/> |
478 | + <field name="fund"/> |
479 | + <newline/> |
480 | + <group col="4" colspan="4"> |
481 | + <button icon="gtk-cancel" name="action_cancel" type="object" special="cancel" string="Cancel"/> |
482 | + <button icon="gtk-go-forward" name="action_create" string="Next" type="object"/> |
483 | + </group> |
484 | + </form> |
485 | + </field> |
486 | + </record> |
487 | + |
488 | + <record id="action_view_document_ics_config_directories" model="ir.actions.act_window"> |
489 | + <field name="name">Configure Directory for Sections </field> |
490 | + <field name="type">ir.actions.act_window</field> |
491 | + <field name="res_model">document.ics.crm.wizard</field> |
492 | + <field name="view_type">form</field> |
493 | + <field name="view_mode">form</field> |
494 | + <field name="target">new</field> |
495 | + </record> |
496 | + |
497 | + <!-- register configuration wizard --> |
498 | + <record id="config_wizard_step_case_section_menu" model="ir.actions.todo"> |
499 | + <field name="name">Create Directories for CRM Case Section</field> |
500 | + <field name="note">This Configuration step use to create Directories in document for all Case Sections</field> |
501 | + <field name="action_id" ref="action_view_document_ics_config_directories"/> |
502 | + </record> |
503 | + |
504 | + |
505 | + </data> |
506 | +</openerp> |
507 | + |
508 | |
509 | === modified file 'document_ics/document_view.xml' |
510 | --- document_ics/document_view.xml 2008-10-28 10:07:10 +0000 |
511 | +++ document_ics/document_view.xml 2009-04-24 09:38:56 +0000 |
512 | @@ -20,6 +20,31 @@ |
513 | </field> |
514 | </field> |
515 | </record> |
516 | - |
517 | + |
518 | + <record model="ir.ui.view" id="view_case_inherit_form"> |
519 | + <field name="name">crm.case.code.form</field> |
520 | + <field name="model">crm.case</field> |
521 | + <field name="type">form</field> |
522 | + <field name="inherit_id" ref="crm.crm_case-view"/> |
523 | + <field name="arch" type="xml"> |
524 | + <field name="priority" position="after"> |
525 | + <field name="code"/> |
526 | + </field> |
527 | + </field> |
528 | + </record> |
529 | + |
530 | + <record model="ir.ui.view" id="view_case_inherit_form1"> |
531 | + <field name="name">crm.case.inherit.form1</field> |
532 | + <field name="model">crm.case</field> |
533 | + <field name="type">form</field> |
534 | + <field name="inherit_id" ref="crm.crm_case-view"/> |
535 | + <field name="arch" type="xml"> |
536 | + <field name="date" position="replace"> |
537 | + <field name="date" on_change="on_change_duration(date, duration)"/> |
538 | + <field name="duration" string="Duration(In Hour)" on_change="on_change_duration(date, duration)" widget="float_time"/> |
539 | + </field> |
540 | + </field> |
541 | + </record> |
542 | + |
543 | </data> |
544 | </openerp> |
545 | |
546 | === modified file 'hr_expense/hr_expense.py' |
547 | --- hr_expense/hr_expense.py 2009-04-02 09:55:23 +0000 |
548 | +++ hr_expense/hr_expense.py 2009-04-24 12:06:40 +0000 |
549 | @@ -77,7 +77,7 @@ |
550 | ('accepted', 'Accepted'), |
551 | ('invoiced', 'Invoiced'), |
552 | ('paid', 'Reimbursed'), |
553 | - ('cancelled', 'Cancelled')], |
554 | + ('cancelled', 'Canceled')], |
555 | 'State', readonly=True), |
556 | } |
557 | _defaults = { |
558 | |
559 | === modified file 'hr_holidays/hr.py' |
560 | --- hr_holidays/hr.py 2009-03-19 15:56:46 +0000 |
561 | +++ hr_holidays/hr.py 2009-04-24 12:06:40 +0000 |
562 | @@ -110,7 +110,7 @@ |
563 | |
564 | _columns = { |
565 | 'name' : fields.char('Description', required=True, readonly=True, size=64, states={'draft':[('readonly',False)]}), |
566 | - 'state': fields.selection([('draft', 'draft'), ('confirm', 'Waiting Validation'), ('refuse', 'Refused'), ('validate', 'Validate'), ('cancel', 'Cancel')], 'Status', readonly=True), |
567 | + 'state': fields.selection([('draft', 'Draft'), ('confirm', 'Waiting Validation'), ('refuse', 'Refused'), ('validate', 'Validated'), ('cancel', 'Canceled')], 'Status', readonly=True), |
568 | 'date_from' : fields.datetime('Vacation start day', required=True, readonly=True, states={'draft':[('readonly',False)]}), |
569 | 'date_to' : fields.datetime('Vacation end day',required=True,readonly=True, states={'draft':[('readonly',False)]}), |
570 | 'holiday_status' : fields.many2one("hr.holidays.status", "Holiday's Status", required=True,readonly=True, states={'draft':[('readonly',False)]}), |
571 | |
572 | === modified file 'mrp_operations/mrp_operations.py' |
573 | --- mrp_operations/mrp_operations.py 2009-03-06 23:50:10 +0000 |
574 | +++ mrp_operations/mrp_operations.py 2009-04-24 12:06:40 +0000 |
575 | @@ -42,7 +42,7 @@ |
576 | class mrp_production_workcenter_line(osv.osv): |
577 | _inherit = 'mrp.production.workcenter.line' |
578 | _columns = { |
579 | - 'state': fields.selection([('draft','Draft'),('startworking', 'In Progress'),('pause','Pause'),('cancel','Canceled'),('done','Finished')],'Status', readonly=True), |
580 | + 'state': fields.selection([('draft','Draft'),('startworking', 'In Progress'),('pause','Paused'),('cancel','Canceled'),('done','Finished')],'Status', readonly=True), |
581 | 'date_planned': fields.related('production_id', 'date_planned', type='datetime', string='Date Planned'), |
582 | 'date_start': fields.datetime('Start Date'), |
583 | 'date_finnished': fields.datetime('End Date'), |
584 | @@ -226,7 +226,7 @@ |
585 | raise osv.except_osv(_('Sorry!'),_('You cannot finish the operation without Starting/Resuming it !')) |
586 | return False |
587 | if 'cancel' in code_lst: |
588 | - raise osv.except_osv(_('Sorry!'),_('Operation is Already Cancelled !')) |
589 | + raise osv.except_osv(_('Sorry!'),_('Operation is Already Canceled !')) |
590 | return False |
591 | if code.start_stop=='cancel': |
592 | if not 'start' in code_lst : |
593 | |
594 | === modified file 'project/project.py' |
595 | --- project/project.py 2009-04-02 12:22:47 +0000 |
596 | +++ project/project.py 2009-04-24 12:06:40 +0000 |
597 | @@ -114,7 +114,7 @@ |
598 | 'warn_footer': fields.text('Mail Footer', help="Footer added at the beginning of the email for the warning message sent to the customer when a task is closed."), |
599 | 'notes': fields.text('Notes', help="Internal description of the project."), |
600 | 'timesheet_id': fields.many2one('hr.timesheet.group', 'Working Time', help="Timetable working hours to adjust the gantt diagram report"), |
601 | - 'state': fields.selection([('template', 'Template'), ('open', 'Running'), ('pending', 'Pending'), ('cancelled', 'Cancelled'), ('done', 'Done')], 'State', required=True, readonly=True), |
602 | + 'state': fields.selection([('template', 'Template'), ('open', 'Running'), ('pending', 'Pending'), ('cancelled', 'Canceled'), ('done', 'Done')], 'State', required=True, readonly=True), |
603 | } |
604 | |
605 | _defaults = { |
606 | @@ -270,7 +270,7 @@ |
607 | 'priority' : fields.selection([('4','Very Low'), ('3','Low'), ('2','Medium'), ('1','Urgent'), ('0','Very urgent')], 'Importance'), |
608 | 'sequence': fields.integer('Sequence'), |
609 | 'type': fields.many2one('project.task.type', 'Type'), |
610 | - 'state': fields.selection([('draft', 'Draft'),('open', 'In Progress'),('pending', 'Pending'), ('cancelled', 'Cancelled'), ('done', 'Done')], 'Status', readonly=True, required=True), |
611 | + 'state': fields.selection([('draft', 'Draft'),('open', 'In Progress'),('pending', 'Pending'), ('cancelled', 'Canceled'), ('done', 'Done')], 'Status', readonly=True, required=True), |
612 | 'date_start': fields.datetime('Starting Date'), |
613 | 'date_deadline': fields.datetime('Deadline'), |
614 | 'date_close': fields.datetime('Date Closed', readonly=True), |
615 | |
616 | === modified file 'project/project_view.xml' |
617 | --- project/project_view.xml 2009-04-17 10:37:08 +0000 |
618 | +++ project/project_view.xml 2009-04-24 12:01:17 +0000 |
619 | @@ -298,7 +298,7 @@ |
620 | <button name="do_open" states="pending,draft" string="Start Task" type="object" icon="gtk-execute"/> |
621 | <button name="do_reopen" states="done,cancelled" string="Reactivate" type="object" icon="gtk-convert"/> |
622 | <button name="do_pending" states="open" string="Pending" type="object" icon="gtk-media-pause"/> |
623 | - <button groups="base.group_extended" name="%(wizard_delegate_task)d" states="pending,open" string="Delegate" type="action" icon="gtk-sort-descending"/> |
624 | + <button groups="base.group_extended" name="%(wizard_delegate_task)d" states="pending,open,draft" string="Delegate" type="action" icon="gtk-sort-descending"/> |
625 | <button name="%(wizard_close_task)d" states="pending,open" string="Done" type="action" icon="gtk-jump-to"/> |
626 | <button name="do_cancel" states="draft,open,pending" string="Cancel" type="object" icon="gtk-cancel"/> |
627 | |
628 | |
629 | === modified file 'purchase/purchase.py' |
630 | --- purchase/purchase.py 2009-03-17 14:02:37 +0000 |
631 | +++ purchase/purchase.py 2009-04-24 12:06:40 +0000 |
632 | @@ -155,7 +155,7 @@ |
633 | |
634 | 'pricelist_id':fields.many2one('product.pricelist', 'Pricelist', required=True, states={'confirmed':[('readonly',True)], 'approved':[('readonly',True)]}, help="The pricelist sets the currency used for this purchase order. It also computes the supplier price for the selected products/quantities."), |
635 | |
636 | - 'state': fields.selection([('draft', 'Request for Quotation'), ('wait', 'Waiting'), ('confirmed', 'Confirmed'), ('approved', 'Approved'),('except_picking', 'Shipping Exception'), ('except_invoice', 'Invoice Exception'), ('done', 'Done'), ('cancel', 'Cancelled')], 'Order Status', readonly=True, help="The state of the purchase order or the quotation request. A quotation is a purchase order in a 'Draft' state. Then the order has to be confirmed by the user, the state switch to 'Confirmed'. Then the supplier must confirm the order to change the state to 'Approved'. When the purchase order is paid and received, the state becomes 'Done'. If a cancel action occurs in the invoice or in the reception of goods, the state becomes in exception.", select=True), |
637 | + 'state': fields.selection([('draft', 'Request for Quotation'), ('wait', 'Waiting'), ('confirmed', 'Confirmed'), ('approved', 'Approved'),('except_picking', 'Shipping Exception'), ('except_invoice', 'Invoice Exception'), ('done', 'Done'), ('cancel', 'Canceled')], 'Order Status', readonly=True, help="The state of the purchase order or the quotation request. A quotation is a purchase order in a 'Draft' state. Then the order has to be confirmed by the user, the state switch to 'Confirmed'. Then the supplier must confirm the order to change the state to 'Approved'. When the purchase order is paid and received, the state becomes 'Done'. If a cancel action occurs in the invoice or in the reception of goods, the state becomes in exception.", select=True), |
638 | 'order_line': fields.one2many('purchase.order.line', 'order_id', 'Order Lines', states={'approved':[('readonly',True)]}), |
639 | 'validator' : fields.many2one('res.users', 'Validated by', readonly=True), |
640 | 'notes': fields.text('Notes'), |
641 | |
642 | === modified file 'report_account/report_receivable.py' |
643 | --- report_account/report_receivable.py 2009-04-14 12:13:09 +0000 |
644 | +++ report_account/report_receivable.py 2009-04-24 12:06:40 +0000 |
645 | @@ -179,7 +179,7 @@ |
646 | ('proforma2','Pro-forma'), |
647 | ('open','Open'), |
648 | ('paid','Done'), |
649 | - ('cancel','Cancelled') |
650 | + ('cancel','Canceled') |
651 | ],'State', readonly=True), |
652 | 'origin': fields.char('Origin', size=64, readonly=True), |
653 | 'create_date' : fields.datetime('Create Date', readonly=True) |
654 | |
655 | === modified file 'report_task/report_task.py' |
656 | --- report_task/report_task.py 2009-03-20 11:28:18 +0000 |
657 | +++ report_task/report_task.py 2009-04-24 12:06:40 +0000 |
658 | @@ -33,7 +33,7 @@ |
659 | 'task_hrs': fields.float('Task Hours', readonly=True), |
660 | 'task_progress': fields.float('Task Progress', readonly=True), |
661 | 'company_id' : fields.many2one('res.company', 'Company'), |
662 | - 'task_state': fields.selection([('draft', 'Draft'),('open', 'Open'),('pending', 'Pending'), ('cancelled', 'Cancelled'), ('done', 'Done'),('no','No Task')], 'Status', readonly=True), |
663 | + 'task_state': fields.selection([('draft', 'Draft'),('open', 'Open'),('pending', 'Pending'), ('cancelled', 'Canceled'), ('done', 'Done'),('no','No Task')], 'Status', readonly=True), |
664 | } |
665 | |
666 | def init(self, cr): |
667 | @@ -73,7 +73,7 @@ |
668 | 'delay_hours': fields.float('Delay Hours', readonly=True), |
669 | 'progress': fields.float('Progress (%)', readonly=True), |
670 | 'priority' : fields.selection([('4','Very Low'), ('3','Low'), ('2','Medium'), ('1','Urgent'), ('0','Very urgent')], 'Importance', readonly=True), |
671 | - 'state': fields.selection([('draft', 'Draft'),('open', 'In Progress'),('pending', 'Pending'), ('cancelled', 'Cancelled'), ('done', 'Done')], 'Status', readonly=True), |
672 | + 'state': fields.selection([('draft', 'Draft'),('open', 'In Progress'),('pending', 'Pending'), ('cancelled', 'Canceled'), ('done', 'Done')], 'Status', readonly=True), |
673 | 'remaining_hours': fields.float('Remaining Hours', readonly=True), |
674 | 'date_close' : fields.datetime('Date Closed', readonly=True) |
675 | } |
Changes in document_ics,
task work for ergonomy states - buttons > changes in state names + Minor modifications