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: | Merged |
---|---|
Merged at revision: | not available |
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: |
This proposal supersedes a proposal from 2009-04-28.
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 : Posted in a previous version of this proposal | # |
Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote : Posted in a previous version of this proposal | # |
Please make basic checks.
thanks.
review:
Needs Fixing
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/account_invoice_view.xml' |
15 | --- account/account_invoice_view.xml 2009-04-17 10:37:08 +0000 |
16 | +++ account/account_invoice_view.xml 2009-04-28 08:16:35 +0000 |
17 | @@ -179,21 +179,24 @@ |
18 | </field> |
19 | </group> |
20 | <group col="4" colspan="2"> |
21 | - <button colspan="2" name="button_reset_taxes" states="draft" string="Compute Taxes" type="object" icon="gtk-execite"/> |
22 | + <button colspan="2" name="button_reset_taxes" states="draft" string="Compute Taxes" type="object" icon="gtk-execute"/> |
23 | <field name="amount_untaxed"/> |
24 | <label string="" colspan="2"/> |
25 | <field name="amount_tax"/> |
26 | + <label string="" colspan="2"/> |
27 | + <field name="amount_total"/> |
28 | <field name="reconciled"/> |
29 | - <field name="amount_total"/> |
30 | - <field name="state" select="2"/> |
31 | <field name="residual"/> |
32 | - <group col="3" colspan="4"> |
33 | - <button name="invoice_open" states="draft,proforma2" string="Validate" icon="gtk-apply"/> |
34 | - <button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel" icon="gtk-cancel"/> |
35 | - <button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="gtk-convert"/> |
36 | - <button name='%(wizard_paid_open)d' type='action' string='Re-Open' states='paid' icon="gtk-convert"/> |
37 | - </group> |
38 | </group> |
39 | + <separator colspan="4" string="Status"/> |
40 | + <group col="7" colspan="4"> |
41 | + <field name="state" select="2"/> |
42 | + <button name="invoice_proforma2" states="draft" string="PRO-FORMA" icon="gtk-print"/> |
43 | + <button name="invoice_open" states="draft,proforma2" string="Validate" icon="gtk-apply"/> |
44 | + <button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel" icon="gtk-cancel"/> |
45 | + <button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="gtk-convert"/> |
46 | + <button name='%(wizard_paid_open)d' type='action' string='Re-Open' states='paid' icon="gtk-convert"/> |
47 | + </group> |
48 | </page> |
49 | <page string="Other Info"> |
50 | <field name="company_id"/> |
51 | @@ -264,23 +267,25 @@ |
52 | </tree> |
53 | </field> |
54 | </group> |
55 | - <group col="4" colspan="2"> |
56 | - <button colspan="2" name="button_reset_taxes" states="draft" string="Compute Taxes" type="object" icon="gtk-apply"/> |
57 | + <group col="4" colspan="2"> |
58 | + <button colspan="2" name="button_reset_taxes" states="draft" string="Compute Taxes" type="object" icon="gtk-execute"/> |
59 | <field name="amount_untaxed"/> |
60 | <label string="" colspan="2"/> |
61 | <field name="amount_tax"/> |
62 | + <label string="" colspan="2"/> |
63 | + <field name="amount_total"/> |
64 | <field name="reconciled"/> |
65 | - <field name="amount_total"/> |
66 | - <field name="state" select="2"/> |
67 | <field name="residual"/> |
68 | - <group col="3" colspan="4"> |
69 | - <button name="invoice_proforma2" states="draft" string="PRO-FORMA" icon="gtk-print"/> |
70 | - <button name="invoice_open" states="draft,proforma2" string="Create" icon="gtk-execute"/> |
71 | - <button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel" icon="gtk-cancel"/> |
72 | - <button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="gtk-convert"/> |
73 | - <button name='%(wizard_paid_open)d' type='action' string='Re-Open' states='paid' icon="gtk-convert"/> |
74 | - </group> |
75 | </group> |
76 | + <separator colspan="4" string="Status"/> |
77 | + <group col="7" colspan="4"> |
78 | + <field name="state" select="2"/> |
79 | + <button name="invoice_proforma2" states="draft" string="PRO-FORMA" icon="gtk-print"/> |
80 | + <button name="invoice_open" states="draft,proforma2" string="Validate" icon="gtk-apply"/> |
81 | + <button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel" icon="gtk-cancel"/> |
82 | + <button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="gtk-convert"/> |
83 | + <button name='%(wizard_paid_open)d' type='action' string='Re-Open' states='paid' icon="gtk-convert"/> |
84 | + </group> |
85 | </page> |
86 | <page string="Other Info"> |
87 | <field name="company_id"/> |
88 | |
89 | === modified file 'account/account_view.xml' |
90 | --- account/account_view.xml 2009-04-25 13:05:19 +0000 |
91 | +++ account/account_view.xml 2009-04-27 10:55:58 +0000 |
92 | @@ -361,9 +361,13 @@ |
93 | <field colspan="4" name="move_line_ids" nolabel="1"/> |
94 | </page> |
95 | </notebook> |
96 | - <group col="7" colspan="4"> |
97 | + <group col="1" colspan="2"/> |
98 | + <group col="2" colspan="2"> |
99 | + <separator colspan="2" string="Total Balance"/> |
100 | + <field name="balance_end"/> |
101 | + </group> |
102 | + <group col="6" colspan="4"> |
103 | <field name="state" select="2"/> |
104 | - <field name="balance_end"/> |
105 | <button name="button_dummy" states="draft" string="Compute" icon="gtk-execute"/> |
106 | <button name="button_confirm" states="draft" string="Confirm" type="object" icon="gtk-apply"/> |
107 | <button name="button_cancel" states="confirm" string="Cancel" type="object" icon="gtk-cancel"/> |
108 | @@ -723,12 +727,12 @@ |
109 | <newline/> |
110 | <field name="account_tax_id" domain="[('parent_id','=',False)]"/> |
111 | <field name="analytic_account_id"/> |
112 | - |
113 | - <separator colspan="4" string="State"/> |
114 | + <newline/> |
115 | <field name="journal_id" select="2"/> |
116 | <field name="period_id"/> |
117 | <field name="reconcile_id"/> |
118 | <field name="reconcile_partial_id"/> |
119 | + <separator colspan="4" string="State"/> |
120 | <field name="state" select="2"/> |
121 | </page> |
122 | <page string="Analytic Lines"> |
123 | @@ -881,8 +885,8 @@ |
124 | </field> |
125 | |
126 | <separator colspan="4" string="State"/> |
127 | - <field name="state" select="1"/> |
128 | - <group col="2" colspan="2"> |
129 | + <group col="4" colspan="4"> |
130 | + <field name="state" select="1" colspan="1"/> |
131 | <button name="button_validate" states="draft" string="Validate" type="object" icon="gtk-execute"/> |
132 | <button name="button_cancel" states="posted" string="Cancel" type="object" icon="gtk-cancel"/> |
133 | </group> |
134 | @@ -980,9 +984,13 @@ |
135 | </field> |
136 | </page> |
137 | </notebook> |
138 | + <group col="1" colspan="2"/> |
139 | + <group col="2" colspan="2"> |
140 | + <separator colspan="2" string="Total Balance"/> |
141 | + <field name="balance_end"/> |
142 | + </group> |
143 | <group col="7" colspan="4"> |
144 | <field name="state" select="2"/> |
145 | - <field name="balance_end"/> |
146 | <button name="button_dummy" states="draft" string="Compute" icon="gtk-execute"/> |
147 | <button name="button_confirm" states="draft" string="Confirm" type="object" icon="gtk-apply"/> |
148 | <button name="button_cancel" states="confirm" string="Cancel" type="object" icon="gtk-cancel"/> |
149 | @@ -1253,16 +1261,14 @@ |
150 | <field name="period_nbr"/> |
151 | <field name="period_type"/> |
152 | <field name="model_id"/> |
153 | - <group col="2" colspan="2"> |
154 | + <separator colspan="4" string="Subscription Lines"/> |
155 | + <field colspan="4" name="lines_id" widget="one2many_list"/> |
156 | + |
157 | + <separator colspan="4" string="State"/> |
158 | + <group col="5" colspan="4"> |
159 | + <field name="state" select="2"/> |
160 | <button name="compute" states="draft,running" string="Compute" type="object" icon="gtk-execute"/> |
161 | <button name="remove_line" states="running" string="Remove Lines" type="object" icon="gtk-remove"/> |
162 | - </group> |
163 | - <separator colspan="4" string="Subscription Lines"/> |
164 | - <field colspan="4" name="lines_id" widget="one2many_list"/> |
165 | - |
166 | - <separator colspan="4" string="State"/> |
167 | - <field name="state" select="2"/> |
168 | - <group col="1" colspan="2"> |
169 | <button name="state_draft" states="done" string="Set to Draft" type="object" icon="gtk-convert" /> |
170 | </group> |
171 | </form> |
172 | |
173 | === modified file 'board/board_view.xml' |
174 | --- board/board_view.xml 2009-04-17 10:37:08 +0000 |
175 | +++ board/board_view.xml 2009-04-24 12:01:17 +0000 |
176 | @@ -49,15 +49,15 @@ |
177 | </tree> |
178 | </field> |
179 | </record> |
180 | + |
181 | + |
182 | <record id="view_board_form" model="ir.ui.view"> |
183 | <field name="name">board.board.form</field> |
184 | <field name="model">board.board</field> |
185 | <field name="type">form</field> |
186 | - <field eval="1" name="priority"/> |
187 | <field name="arch" type="xml"> |
188 | <form string="Dashboard"> |
189 | <field name="name" select="1"/> |
190 | - <button colspan="2" name="%(wizard_board_create_menu)d" string="Create Menu" type="action" icon="gtk-justify-fill"/> |
191 | <field colspan="4" name="line_ids"> |
192 | <tree string="Dashboard View"> |
193 | <field name="name"/> |
194 | @@ -74,9 +74,11 @@ |
195 | <field name="position"/> |
196 | </form> |
197 | </field> |
198 | + <button colspan="2" name="%(wizard_board_create_menu)d" string="Create Menu" type="action" icon="gtk-justify-fill"/> |
199 | </form> |
200 | </field> |
201 | </record> |
202 | + |
203 | <record id="action_view_board_list_form" model="ir.actions.act_window"> |
204 | <field name="name">Dashboard Definition</field> |
205 | <field name="res_model">board.board</field> |
206 | |
207 | === modified file 'crm_configuration/report/crm_report.py' |
208 | --- crm_configuration/report/crm_report.py 2009-01-04 22:12:50 +0000 |
209 | +++ crm_configuration/report/crm_report.py 2009-04-28 08:37:32 +0000 |
210 | @@ -26,7 +26,7 @@ |
211 | AVAILABLE_STATES = [ |
212 | ('draft','Draft'), |
213 | ('open','Open'), |
214 | - ('cancel', 'Canceled'), |
215 | + ('cancel', 'Cancelled'), |
216 | ('done', 'Closed'), |
217 | ('pending','Pending') |
218 | ] |
219 | |
220 | === modified file 'crm_profiling/crm_profiling_view.xml' |
221 | --- crm_profiling/crm_profiling_view.xml 2009-04-17 10:37:08 +0000 |
222 | +++ crm_profiling/crm_profiling_view.xml 2009-04-27 08:47:41 +0000 |
223 | @@ -65,9 +65,11 @@ |
224 | <form string="Questionnaires"> |
225 | <field name="name" select="1" /> |
226 | <newline/> |
227 | - <field name="description" select="1" /> |
228 | + <separator string="Questions List" colspan="4"/> |
229 | + <field name="questions_ids" colspan="4" nolabel="1"/> |
230 | <newline/> |
231 | - <field name="questions_ids" colspan="4"/> |
232 | + <separator string="Description" colspan="4"/> |
233 | + <field name="description" colspan="4" select="1" nolabel="1"/> |
234 | </form> |
235 | </field> |
236 | </record> |
237 | |
238 | === modified file 'document_ics/__init__.py' |
239 | --- document_ics/__init__.py 2009-03-06 23:50:10 +0000 |
240 | +++ document_ics/__init__.py 2009-04-23 13:46:21 +0000 |
241 | @@ -21,4 +21,6 @@ |
242 | ############################################################################## |
243 | |
244 | import document |
245 | +import document_ics_config_wizard |
246 | + |
247 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
248 | |
249 | === modified file 'document_ics/__terp__.py' |
250 | --- document_ics/__terp__.py 2009-02-03 17:02:20 +0000 |
251 | +++ document_ics/__terp__.py 2009-04-23 13:46:21 +0000 |
252 | @@ -30,7 +30,7 @@ |
253 | 'website': 'http://www.openerp.com', |
254 | 'depends': ['document', 'crm_configuration'], |
255 | 'init_xml': ['document_data.xml'], |
256 | - 'update_xml': ['document_view.xml', 'security/ir.model.access.csv'], |
257 | + 'update_xml': ['document_view.xml', 'security/ir.model.access.csv','document_ics_config_wizard.xml'], |
258 | 'demo_xml': ['document_demo.xml'], |
259 | 'installable': True, |
260 | 'active': False, |
261 | |
262 | === modified file 'document_ics/document.py' |
263 | --- document_ics/document.py 2009-01-05 13:49:37 +0000 |
264 | +++ document_ics/document.py 2009-04-27 12:42:32 +0000 |
265 | @@ -28,6 +28,7 @@ |
266 | import datetime |
267 | import time |
268 | import random |
269 | +import tools |
270 | |
271 | ICS_TAGS = { |
272 | 'summary':'normal', |
273 | @@ -35,7 +36,7 @@ |
274 | 'dtstart':'date' , |
275 | 'dtend':'date' , |
276 | 'created':'date' , |
277 | - 'dt-stamp':'date' , |
278 | + 'dtstamp':'date' , |
279 | 'last-modified':'normal' , |
280 | 'url':'normal' , |
281 | 'attendee':'multiple', |
282 | @@ -50,7 +51,7 @@ |
283 | _name = 'document.directory.ics.fields' |
284 | _columns = { |
285 | 'field_id': fields.many2one('ir.model.fields', 'Open ERP Field', required=True), |
286 | - 'name': fields.selection(map(lambda x: (x,x), ICS_TAGS.keys()),'ICS Value', required=True), |
287 | + 'name': fields.selection(map(lambda x: (x, x), ICS_TAGS.keys()), 'ICS Value', required=True), |
288 | 'content_id': fields.many2one('document.directory.content', 'Content', required=True, ondelete='cascade') |
289 | } |
290 | document_directory_ics_fields() |
291 | @@ -87,7 +88,7 @@ |
292 | uuid = event.value |
293 | if event.name.lower() in fields: |
294 | if ICS_TAGS[event.name.lower()]=='normal': |
295 | - result[fields[event.name.lower()]] = event.value.encode('utf8') |
296 | + result[fields[event.name.lower()]] = event.value |
297 | elif ICS_TAGS[event.name.lower()]=='date': |
298 | result[fields[event.name.lower()]] = event.value.strftime('%Y-%m-%d %H:%M:%S') |
299 | if not uuid: |
300 | @@ -105,6 +106,12 @@ |
301 | return True |
302 | |
303 | def process_read_ics(self, cr, uid, node, context={}): |
304 | + def ics_datetime(idate, short=False): |
305 | + if short: |
306 | + return datetime.date.fromtimestamp(time.mktime(time.strptime(idate, '%Y-%m-%d'))) |
307 | + else: |
308 | + return datetime.datetime.strptime(idate, '%Y-%m-%d %H:%M:%S') |
309 | + |
310 | import vobject |
311 | obj_class = self.pool.get(node.content.ics_object_id.model) |
312 | # Can be improved to use context and active_id ! |
313 | @@ -113,21 +120,30 @@ |
314 | cal = vobject.iCalendar() |
315 | for obj in obj_class.browse(cr, uid, ids, context): |
316 | event = cal.add('vevent') |
317 | + # Fix dtstamp et last-modified with create and write date on the object line |
318 | + perm = obj_class.perm_read(cr, uid, [obj.id], context) |
319 | + event.add('dtstamp').value = ics_datetime(perm[0]['create_date'][:19]) |
320 | + if perm[0]['write_date']: |
321 | + event.add('last-modified').value = ics_datetime(perm[0]['write_date'][:19]) |
322 | for field in node.content.ics_field_ids: |
323 | value = getattr(obj, field.field_id.name) |
324 | if (not value) and field.name=='uid': |
325 | - value = 'OpenERP-'+str(random.randint(1999999999, 9999999999)) |
326 | + value = 'OpenERP-%s_%s@%s' % (node.content.ics_object_id.model, str(obj.id), cr.dbname,) |
327 | obj_class.write(cr, uid, [obj.id], {field.field_id.name: value}) |
328 | if ICS_TAGS[field.name]=='normal': |
329 | if type(value)==type(obj): |
330 | value=value.name |
331 | value = value or '' |
332 | event.add(field.name).value = value or '' |
333 | - elif ICS_TAGS[field.name]=='date': |
334 | - dt = value or time.strftime('%Y-%m-%d %H:%M:%S') |
335 | - if len(dt)==10: |
336 | - dt = dt+' 09:00:00' |
337 | - value = datetime.datetime.strptime(dt, '%Y-%m-%d %H:%M:%S') |
338 | + elif ICS_TAGS[field.name]=='date' and value: |
339 | + if field.name == 'dtstart': |
340 | + date_start = start_date = datetime.datetime.fromtimestamp(time.mktime(time.strptime(value , "%Y-%m-%d %H:%M:%S"))) |
341 | + if field.name == 'dtend' and isinstance(value, float): |
342 | + value = (start_date + datetime.timedelta(hours=value)).strftime('%Y-%m-%d %H:%M:%S') |
343 | + if len(value)==10: |
344 | + value = ics_datetime(value, True) |
345 | + else: |
346 | + value = ics_datetime(value) |
347 | event.add(field.name).value = value |
348 | s= StringIO.StringIO(cal.serialize().encode('utf8')) |
349 | s.name = node |
350 | @@ -138,8 +154,36 @@ |
351 | class crm_case(osv.osv): |
352 | _inherit = 'crm.case' |
353 | _columns = { |
354 | - 'code': fields.char('Calendar Code', size=64) |
355 | - } |
356 | + 'code': fields.char('Calendar Code', size=64), |
357 | + 'date_deadline': fields.datetime('Deadline', help="Deadline Date is automatically computed from Start Date + Duration"), |
358 | + } |
359 | + |
360 | + _defaults = { |
361 | + 'code': lambda obj, cr, uid, context: obj.pool.get('ir.sequence').get(cr, uid, 'crm.case'), |
362 | + } |
363 | + |
364 | + def copy(self, cr, uid, id, default=None, context=None): |
365 | + """ |
366 | + code field must be unique in ICS file |
367 | + """ |
368 | + if not default: default = {} |
369 | + if not context: context = {} |
370 | + default.update({'code': self.pool.get('ir.sequence').get(cr, uid, 'crm.case'), 'id': False}) |
371 | + return super(crm_case, self).copy(cr, uid, id, default, context) |
372 | + |
373 | + def on_change_duration(self, cr, uid, id, date, duration): |
374 | + if not date: |
375 | + return {} |
376 | + start_date = datetime.datetime.fromtimestamp(time.mktime(time.strptime(date, "%Y-%m-%d %H:%M:%S"))) |
377 | + if duration >= 0 : |
378 | + end = start_date + datetime.timedelta(hours=duration) |
379 | + if duration < 0: |
380 | + raise osv.except_osv(_('Warning !'), |
381 | + _('You can not set negative Duration.')) |
382 | + |
383 | + res = {'value' : {'date_deadline' : end.strftime('%Y-%m-%d %H:%M:%S')}} |
384 | + return res |
385 | + |
386 | crm_case() |
387 | |
388 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
389 | |
390 | === modified file 'document_ics/document_data.xml' |
391 | --- document_ics/document_data.xml 2008-10-28 08:38:03 +0000 |
392 | +++ document_ics/document_data.xml 2009-04-24 08:40:05 +0000 |
393 | @@ -6,6 +6,21 @@ |
394 | <field name="code">.ics</field> |
395 | <field name="name">ICS Calendar</field> |
396 | </record> |
397 | - |
398 | </data> |
399 | -</openerp> |
400 | + |
401 | + |
402 | + <data noupdate="1"> |
403 | + <!-- Sequences for sale.order --> |
404 | + <record id="seq_type_crm_case_code" model="ir.sequence.type"> |
405 | + <field name="name">CRM Case Code</field> |
406 | + <field name="code">crm.case</field> |
407 | + </record> |
408 | + <record id="seq_sale_order" model="ir.sequence"> |
409 | + <field name="name">CRM Case</field> |
410 | + <field name="code">crm.case</field> |
411 | + <field name="prefix">CASE</field> |
412 | + <field name="padding">3</field> |
413 | + </record> |
414 | + </data> |
415 | + |
416 | +</openerp> |
417 | \ No newline at end of file |
418 | |
419 | === modified file 'document_ics/document_demo.xml' |
420 | --- document_ics/document_demo.xml 2009-04-22 05:50:44 +0000 |
421 | +++ document_ics/document_demo.xml 2009-04-29 05:03:05 +0000 |
422 | @@ -26,6 +26,11 @@ |
423 | <field name="field_id" ref="crm.field_crm_case_date"/> |
424 | <field name="content_id" ref="dir_content_calendar"/> |
425 | </record> |
426 | + <record model="document.directory.ics.fields" id="dir_field6"> |
427 | + <field name="name">dtend</field> |
428 | + <field name="field_id" ref="crm.field_crm_case_date_deadline"/> |
429 | + <field name="content_id" ref="dir_content_calendar"/> |
430 | + </record> |
431 | <record model="document.directory.ics.fields" id="dir_field2"> |
432 | <field name="name">summary</field> |
433 | <field name="field_id" ref="crm.field_crm_case_name"/> |
434 | |
435 | === added file 'document_ics/document_ics_config_wizard.py' |
436 | --- document_ics/document_ics_config_wizard.py 1970-01-01 00:00:00 +0000 |
437 | +++ document_ics/document_ics_config_wizard.py 2009-04-29 08:26:24 +0000 |
438 | @@ -0,0 +1,140 @@ |
439 | + # -*- encoding: utf-8 -*- |
440 | +############################################################################## |
441 | +# |
442 | +# OpenERP, Open Source Management Solution |
443 | +# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved |
444 | +# $Id$ |
445 | +# |
446 | +# This program is free software: you can redistribute it and/or modify |
447 | +# it under the terms of the GNU General Public License as published by |
448 | +# the Free Software Foundation, either version 3 of the License, or |
449 | +# (at your option) any later version. |
450 | +# |
451 | +# This program is distributed in the hope that it will be useful, |
452 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
453 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
454 | +# GNU General Public License for more details. |
455 | +# |
456 | +# You should have received a copy of the GNU General Public License |
457 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
458 | +# |
459 | +############################################################################## |
460 | + |
461 | +import time |
462 | +import tools |
463 | +from osv import fields, osv, orm |
464 | +import os |
465 | +import mx.DateTime |
466 | +import base64 |
467 | +import pooler |
468 | + |
469 | +SECTION_NAME = { |
470 | + 'meeting' : 'Meetings', |
471 | + 'lead':'Prospects', |
472 | + 'opportunity':'Opportunities', |
473 | + 'jobs':'Jobs', |
474 | + 'bugs':'Bug Tracking', |
475 | + 'fund':'Fund Raising', |
476 | + 'helpdesk':'HelpDesk', |
477 | + 'claims':'Claims', |
478 | + 'phonecall':'Phone Calls', |
479 | + } |
480 | + |
481 | +ICS_TAGS = { |
482 | + 'summary':'Description', |
483 | + 'uid':'Calendar Code' , |
484 | + 'dtstart':'Date' , |
485 | + 'dtend':'Deadline' , |
486 | + 'url':'Partner Email' , |
487 | + 'description':'Your action', |
488 | + } |
489 | + |
490 | +class document_ics_crm_wizard(osv.osv_memory): |
491 | + _name='document.ics.crm.wizard' |
492 | + _columns = { |
493 | + 'name':fields.char('Name', size=64), |
494 | + 'meeting' : fields.boolean('Calendar of Meetings', help="Manages the calendar of meetings of the users."), |
495 | + '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."), |
496 | + 'opportunity' : fields.boolean('Business Opportunities', help="Tracks identified business opportunities for your sales pipeline."), |
497 | + 'jobs' : fields.boolean('Jobs Hiring Process', help="Help you to organise the jobs hiring process: evaluation, meetings, email integration..."), |
498 | + 'document_ics':fields.boolean('Shared Calendar', help=" Will allow you to synchronise your Open ERP calendars with your phone, outlook, Sunbird, ical, ..."), |
499 | + 'bugs' : fields.boolean('Bug Tracking', help="Used by companies to track bugs and support requests on softwares"), |
500 | + 'helpdesk': fields.boolean('Helpdesk', help="Manages an Helpdesk service."), |
501 | + 'fund' : fields.boolean('Fund Raising Operations', help="This may help associations in their fund raising process and tracking."), |
502 | + 'claims' : fields.boolean('Claims', help="Manages the supplier and customers claims, including your corrective or preventive actions."), |
503 | + '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."), |
504 | + } |
505 | + _defaults = { |
506 | + 'meeting': lambda *args: True, |
507 | + 'opportunity': lambda *args: True, |
508 | + 'phonecall': lambda *args: True, |
509 | + } |
510 | + |
511 | + def action_create(self, cr, uid, ids, context=None): |
512 | + data=self.read(cr, uid, ids, [])[0] |
513 | + dir_obj = self.pool.get('document.directory') |
514 | + dir_cont_obj = self.pool.get('document.directory.content') |
515 | + parent_dir = dir_obj.search(cr, uid, [('name', '=', 'Calendars')]) |
516 | + if parent_dir: |
517 | + parent_dir = parent_dir[0] |
518 | + else: |
519 | + parent_dir = dir_obj.create(cr, uid, {'name': 'Calendars' ,'user_id' : uid, 'type': 'directory'}) |
520 | + for section in ['meeting', 'lead', 'opportunity', 'jobs', 'bugs', 'fund', 'helpdesk', 'claims', 'phonecall']: |
521 | + if (not data[section]): |
522 | + continue |
523 | + else: |
524 | + section_id=self.pool.get('crm.case.section').search(cr, uid, [('name', '=', SECTION_NAME[section])]) |
525 | + if not section_id: |
526 | + continue |
527 | + else: |
528 | + vals = { |
529 | + 'name':SECTION_NAME[section]+' Calendars', |
530 | + 'parent_id': parent_dir, |
531 | + 'type' : 'directory', |
532 | + 'user_id' : uid |
533 | + } |
534 | + dir_id = dir_obj.create(cr, uid, vals) |
535 | + object_id=self.pool.get('ir.model').search(cr, uid, [('name', '=', 'Case')])[0] |
536 | + |
537 | + vals_cont={ |
538 | + 'name': SECTION_NAME[section], |
539 | + 'sequence': 1, |
540 | + 'directory_id': dir_id, |
541 | + 'suffix': section, |
542 | + 'extension': '.ics', |
543 | + 'ics_object_id': object_id, |
544 | + 'ics_domain': [('section_id', '=', section_id[0])], |
545 | + 'include_name' : False |
546 | + } |
547 | + |
548 | + content_id = dir_cont_obj.create(cr, uid, vals_cont) |
549 | + |
550 | + ics_obj=self.pool.get('document.directory.ics.fields') |
551 | + for tag in ['description', 'url', 'summary', 'dtstart', 'dtend', 'uid']: |
552 | + field_id = self.pool.get('ir.model.fields').search(cr, uid, [('model_id.name', '=', 'Case'), ('field_description', '=', ICS_TAGS[tag])])[0] |
553 | + vals_ics={ |
554 | + 'field_id': field_id , |
555 | + 'name': tag , |
556 | + 'content_id': content_id , |
557 | + } |
558 | + ics_obj.create(cr, uid, vals_ics) |
559 | + |
560 | + return { |
561 | + 'view_type': 'form', |
562 | + "view_mode": 'form', |
563 | + 'res_model': 'ir.actions.configuration.wizard', |
564 | + 'type': 'ir.actions.act_window', |
565 | + 'target':'new', |
566 | + } |
567 | + def action_cancel(self, cr, uid, ids, conect=None): |
568 | + return { |
569 | + 'view_type': 'form', |
570 | + "view_mode": 'form', |
571 | + 'res_model': 'ir.actions.configuration.wizard', |
572 | + 'type': 'ir.actions.act_window', |
573 | + 'target':'new', |
574 | + } |
575 | + |
576 | +document_ics_crm_wizard() |
577 | + |
578 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
579 | |
580 | === added file 'document_ics/document_ics_config_wizard.xml' |
581 | --- document_ics/document_ics_config_wizard.xml 1970-01-01 00:00:00 +0000 |
582 | +++ document_ics/document_ics_config_wizard.xml 2009-04-23 13:46:21 +0000 |
583 | @@ -0,0 +1,50 @@ |
584 | +<?xml version="1.0" encoding="utf-8"?> |
585 | +<openerp> |
586 | + <data> |
587 | + |
588 | + <record id="view_document_ics_config_directories" model="ir.ui.view"> |
589 | + <field name="name">Configure Directory for Sections</field> |
590 | + <field name="model">document.ics.crm.wizard</field> |
591 | + <field name="type">form</field> |
592 | + <field name="arch" type="xml"> |
593 | + <form string="Configure CRM Sections"> |
594 | + <separator colspan="4" string="Create Pre-Configured Directories"/> |
595 | + <newline/> |
596 | + <field name="meeting"/> |
597 | + <field name="opportunity"/> |
598 | + <field name="phonecall"/> |
599 | + <field name="lead"/> |
600 | + <field name="claims"/> |
601 | + <field name="bugs"/> |
602 | + <field name="helpdesk"/> |
603 | + <field name="jobs"/> |
604 | + <field name="fund"/> |
605 | + <newline/> |
606 | + <group col="4" colspan="4"> |
607 | + <button icon="gtk-cancel" name="action_cancel" type="object" special="cancel" string="Cancel"/> |
608 | + <button icon="gtk-go-forward" name="action_create" string="Next" type="object"/> |
609 | + </group> |
610 | + </form> |
611 | + </field> |
612 | + </record> |
613 | + |
614 | + <record id="action_view_document_ics_config_directories" model="ir.actions.act_window"> |
615 | + <field name="name">Configure Directory for Sections </field> |
616 | + <field name="type">ir.actions.act_window</field> |
617 | + <field name="res_model">document.ics.crm.wizard</field> |
618 | + <field name="view_type">form</field> |
619 | + <field name="view_mode">form</field> |
620 | + <field name="target">new</field> |
621 | + </record> |
622 | + |
623 | + <!-- register configuration wizard --> |
624 | + <record id="config_wizard_step_case_section_menu" model="ir.actions.todo"> |
625 | + <field name="name">Create Directories for CRM Case Section</field> |
626 | + <field name="note">This Configuration step use to create Directories in document for all Case Sections</field> |
627 | + <field name="action_id" ref="action_view_document_ics_config_directories"/> |
628 | + </record> |
629 | + |
630 | + |
631 | + </data> |
632 | +</openerp> |
633 | + |
634 | |
635 | === modified file 'document_ics/document_view.xml' |
636 | --- document_ics/document_view.xml 2008-10-28 10:07:10 +0000 |
637 | +++ document_ics/document_view.xml 2009-04-27 12:42:32 +0000 |
638 | @@ -20,6 +20,31 @@ |
639 | </field> |
640 | </field> |
641 | </record> |
642 | - |
643 | + |
644 | + <record model="ir.ui.view" id="view_case_inherit_form"> |
645 | + <field name="name">crm.case.code.form</field> |
646 | + <field name="model">crm.case</field> |
647 | + <field name="type">form</field> |
648 | + <field name="inherit_id" ref="crm.crm_case-view"/> |
649 | + <field name="arch" type="xml"> |
650 | + <field name="priority" position="after"> |
651 | + <field name="code"/> |
652 | + </field> |
653 | + </field> |
654 | + </record> |
655 | + |
656 | + <record model="ir.ui.view" id="view_case_inherit_form1"> |
657 | + <field name="name">crm.case.inherit.form1</field> |
658 | + <field name="model">crm.case</field> |
659 | + <field name="type">form</field> |
660 | + <field name="inherit_id" ref="crm.crm_case-view"/> |
661 | + <field name="arch" type="xml"> |
662 | + <field name="date" position="replace"> |
663 | + <field name="date" on_change="on_change_duration(date, duration)" required="1"/> |
664 | + <field name="duration" string="Duration(In Hour)" on_change="on_change_duration(date, duration)" widget="float_time"/> |
665 | + </field> |
666 | + </field> |
667 | + </record> |
668 | + |
669 | </data> |
670 | </openerp> |
671 | |
672 | === modified file 'event/event.py' |
673 | --- event/event.py 2009-03-06 23:50:10 +0000 |
674 | +++ event/event.py 2009-04-28 08:37:32 +0000 |
675 | @@ -131,7 +131,7 @@ |
676 | 'register_prospect': fields.function(_get_prospect, method=True, string='Unconfirmed Registrations'), |
677 | 'date_begin': fields.datetime('Beginning date', required=True), |
678 | 'date_end': fields.datetime('Ending date', required=True), |
679 | - 'state': fields.selection([('draft','Draft'),('confirm','Confirmed'),('done','Done'),('cancel','Canceled')], 'Status', readonly=True, required=True), |
680 | + 'state': fields.selection([('draft','Draft'),('confirm','Confirmed'),('done','Done'),('cancel','Cancelled')], 'Status', readonly=True, required=True), |
681 | 'mail_auto_registr':fields.boolean('Mail Auto Register',help='Check this box if you want to use the automatic mailing for new registration'), |
682 | 'mail_auto_confirm':fields.boolean('Mail Auto Confirm',help='Check this box if you want ot use the automatic confirmation emailing or the reminder'), |
683 | 'mail_registr':fields.text('Registration Email',help='This email will be sent when someone subscribes to the event.'), |
684 | |
685 | === modified file 'hr_holidays/hr.py' |
686 | --- hr_holidays/hr.py 2009-04-29 05:53:37 +0000 |
687 | +++ hr_holidays/hr.py 2009-04-29 11:23:12 +0000 |
688 | @@ -110,7 +110,7 @@ |
689 | |
690 | _columns = { |
691 | 'name' : fields.char('Description', required=True, readonly=True, size=64, states={'draft':[('readonly',False)]}), |
692 | - 'state': fields.selection([('draft', 'draft'), ('confirm', 'Waiting Validation'), ('refuse', 'Refused'), ('validate', 'Validate'), ('cancel', 'Cancel')], 'Status', readonly=True), |
693 | + 'state': fields.selection([('draft', 'Draft'), ('confirm', 'Waiting Validation'), ('refuse', 'Refused'), ('validate', 'Validated'), ('cancel', 'Cancelled')], 'Status', readonly=True), |
694 | 'date_from' : fields.datetime('Vacation start day', required=True, readonly=True, states={'draft':[('readonly',False)]}), |
695 | 'date_to' : fields.datetime('Vacation end day',required=True,readonly=True, states={'draft':[('readonly',False)]}), |
696 | 'holiday_status' : fields.many2one("hr.holidays.status", "Holiday's Status", required=True,readonly=True, states={'draft':[('readonly',False)]}), |
697 | |
698 | === modified file 'hr_timesheet_invoice/hr_timesheet_invoice.py' |
699 | --- hr_timesheet_invoice/hr_timesheet_invoice.py 2009-01-04 22:12:50 +0000 |
700 | +++ hr_timesheet_invoice/hr_timesheet_invoice.py 2009-04-27 10:55:58 +0000 |
701 | @@ -67,6 +67,24 @@ |
702 | _defaults = { |
703 | 'pricelist_id': lambda self,cr, uid, ctx: ctx.get('pricelist_id', False), |
704 | } |
705 | + |
706 | + def action_open(self, cr, uid, id, context={}): |
707 | + self.write(cr, uid, id, {'state' : 'open'}) |
708 | + return True |
709 | + |
710 | + def action_close(self, cr, uid, id, context={}): |
711 | + self.write(cr, uid, id, {'state' : 'close'}) |
712 | + return True |
713 | + |
714 | + def action_pending(self, cr, uid, id, context={}): |
715 | + self.write(cr, uid, id, {'state' : 'pending'}) |
716 | + return True |
717 | + |
718 | + def action_draft(self, cr, uid, id, context={}): |
719 | + self.write(cr, uid, id, {'state' : 'draft'}) |
720 | + return True |
721 | + |
722 | + |
723 | account_analytic_account() |
724 | |
725 | |
726 | |
727 | === modified file 'hr_timesheet_invoice/hr_timesheet_invoice_view.xml' |
728 | --- hr_timesheet_invoice/hr_timesheet_invoice_view.xml 2008-10-27 15:29:13 +0000 |
729 | +++ hr_timesheet_invoice/hr_timesheet_invoice_view.xml 2009-04-27 10:55:58 +0000 |
730 | @@ -16,7 +16,13 @@ |
731 | <field name="amount_max"/> |
732 | <field name="amount_invoiced"/> |
733 | <separator colspan="4" string="Status"/> |
734 | - <field name="state"/> |
735 | + <group col="6" colspan="4"> |
736 | + <field name="state" readonly="1"/> |
737 | + <button name="action_open" states="draft" string="Open" type="object" icon="gtk-go-forward"/> |
738 | + <button name="action_pending" states="open" string="Pending" type="object" icon="gtk-media-pause"/> |
739 | + <button name="action_draft" states="close,pending" string="Set to Draft" type="object" icon="gtk-convert"/> |
740 | + <button name="action_close" states="draft,open,pending" string="Close" type="object" icon="gtk-close"/> |
741 | + </group> |
742 | </group> |
743 | </field> |
744 | </field> |
745 | |
746 | === modified file 'idea/idea.py' |
747 | --- idea/idea.py 2009-01-04 22:12:50 +0000 |
748 | +++ idea/idea.py 2009-04-28 08:37:32 +0000 |
749 | @@ -120,7 +120,7 @@ |
750 | 'count_votes' : fields.function(_vote_count, method=True, string="Count of votes", type="integer"), |
751 | 'count_comments': fields.function(_comment_count, method=True, string="Count of comments", type="integer"), |
752 | 'category_id': fields.many2one('idea.category', 'Category', required=True ), |
753 | - 'state': fields.selection([('draft','Draft'),('open','Opened'),('close','Accepted'),('cancel','Canceled')], 'Status', readonly=True), |
754 | + 'state': fields.selection([('draft','Draft'),('open','Opened'),('close','Accepted'),('cancel','Cancelled')], 'Status', readonly=True), |
755 | 'stat_vote_ids': fields.one2many('idea.vote.stat', 'idea_id', 'Statistics', readonly=True), |
756 | } |
757 | |
758 | |
759 | === modified file 'membership/membership.py' |
760 | --- membership/membership.py 2009-03-11 13:41:51 +0000 |
761 | +++ membership/membership.py 2009-04-28 08:37:32 +0000 |
762 | @@ -483,158 +483,158 @@ |
763 | _rec_name = 'year' |
764 | _columns = { |
765 | 'year': fields.char('Year', size='4', readonly=True, select=1), |
766 | - 'canceled_number': fields.integer('Canceled', readonly=True), |
767 | - 'waiting_number': fields.integer('Waiting', readonly=True), |
768 | - 'invoiced_number': fields.integer('Invoiced', readonly=True), |
769 | - 'paid_number': fields.integer('Paid', readonly=True), |
770 | - 'canceled_amount': fields.float('Canceled', digits=(16, 2), readonly=True), |
771 | - 'waiting_amount': fields.float('Waiting', digits=(16, 2), readonly=True), |
772 | - 'invoiced_amount': fields.float('Invoiced', digits=(16, 2), readonly=True), |
773 | - 'paid_amount': fields.float('Paid', digits=(16, 2), readonly=True), |
774 | - 'currency': fields.many2one('res.currency', 'Currency', readonly=True, |
775 | - select=2), |
776 | - } |
777 | - |
778 | - def init(self, cr): |
779 | - '''Create the view''' |
780 | - cr.execute(""" |
781 | - CREATE OR REPLACE VIEW report_partner_member_year AS ( |
782 | - SELECT |
783 | - MIN(id) AS id, |
784 | - COUNT(ncanceled) as canceled_number, |
785 | - COUNT(npaid) as paid_number, |
786 | - COUNT(ninvoiced) as invoiced_number, |
787 | - COUNT(nwaiting) as waiting_number, |
788 | - SUM(acanceled) as canceled_amount, |
789 | - SUM(apaid) as paid_amount, |
790 | - SUM(ainvoiced) as invoiced_amount, |
791 | - SUM(awaiting) as waiting_amount, |
792 | - year, |
793 | - currency |
794 | - FROM (SELECT |
795 | - CASE WHEN ai.state = 'cancel' THEN ml.id END AS ncanceled, |
796 | - CASE WHEN ai.state = 'paid' THEN ml.id END AS npaid, |
797 | - CASE WHEN ai.state = 'open' THEN ml.id END AS ninvoiced, |
798 | - CASE WHEN (ai.state = 'draft' OR ai.state = 'proforma') |
799 | - THEN ml.id END AS nwaiting, |
800 | - CASE WHEN ai.state = 'cancel' |
801 | - THEN SUM(ail.price_unit * ail.quantity * (1 - ail.discount / 100)) |
802 | - ELSE 0 END AS acanceled, |
803 | - CASE WHEN ai.state = 'paid' |
804 | - THEN SUM(ail.price_unit * ail.quantity * (1 - ail.discount / 100)) |
805 | - ELSE 0 END AS apaid, |
806 | - CASE WHEN ai.state = 'open' |
807 | - THEN SUM(ail.price_unit * ail.quantity * (1 - ail.discount / 100)) |
808 | - ELSE 0 END AS ainvoiced, |
809 | - CASE WHEN (ai.state = 'draft' OR ai.state = 'proforma') |
810 | - THEN SUM(ail.price_unit * ail.quantity * (1 - ail.discount / 100)) |
811 | - ELSE 0 END AS awaiting, |
812 | - TO_CHAR(ml.date_from, 'YYYY') AS year, |
813 | - ai.currency_id AS currency, |
814 | - MIN(ml.id) AS id |
815 | - FROM membership_membership_line ml |
816 | - JOIN (account_invoice_line ail |
817 | - LEFT JOIN account_invoice ai |
818 | - ON (ail.invoice_id = ai.id)) |
819 | - ON (ml.account_invoice_line = ail.id) |
820 | - JOIN res_partner p |
821 | - ON (ml.partner = p.id) |
822 | - GROUP BY TO_CHAR(ml.date_from, 'YYYY'), ai.state, |
823 | - ai.currency_id, ml.id) AS foo |
824 | - GROUP BY year, currency) |
825 | - """) |
826 | - |
827 | -ReportPartnerMemberYear() |
828 | - |
829 | - |
830 | -class ReportPartnerMemberYearNew(osv.osv): |
831 | - '''New Membership by Years''' |
832 | - |
833 | - _name = 'report.partner_member.year_new' |
834 | - _description = __doc__ |
835 | - _auto = False |
836 | - _rec_name = 'year' |
837 | - |
838 | - _columns = { |
839 | - 'year': fields.char('Year', size='4', readonly=True, select=1), |
840 | - 'canceled_number': fields.integer('Canceled', readonly=True), |
841 | - 'waiting_number': fields.integer('Waiting', readonly=True), |
842 | - 'invoiced_number': fields.integer('Invoiced', readonly=True), |
843 | - 'paid_number': fields.integer('Paid', readonly=True), |
844 | - 'canceled_amount': fields.float('Canceled', digits=(16, 2), readonly=True), |
845 | - 'waiting_amount': fields.float('Waiting', digits=(16, 2), readonly=True), |
846 | - 'invoiced_amount': fields.float('Invoiced', digits=(16, 2), readonly=True), |
847 | - 'paid_amount': fields.float('Paid', digits=(16, 2), readonly=True), |
848 | - 'currency': fields.many2one('res.currency', 'Currency', readonly=True, |
849 | - select=2), |
850 | - } |
851 | - |
852 | - def init(self, cr): |
853 | - '''Create the view''' |
854 | - cr.execute(""" |
855 | - CREATE OR REPLACE VIEW report_partner_member_year AS ( |
856 | - SELECT |
857 | - MIN(id) AS id, |
858 | - COUNT(ncanceled) as canceled_number, |
859 | - COUNT(npaid) as paid_number, |
860 | - COUNT(ninvoiced) as invoiced_number, |
861 | - COUNT(nwaiting) as waiting_number, |
862 | - SUM(acanceled) as canceled_amount, |
863 | - SUM(apaid) as paid_amount, |
864 | - SUM(ainvoiced) as invoiced_amount, |
865 | - SUM(awaiting) as waiting_amount, |
866 | - year, |
867 | - currency |
868 | - FROM (SELECT |
869 | - CASE WHEN ai.state = 'cancel' THEN ml.id END AS ncanceled, |
870 | - CASE WHEN ai.state = 'paid' THEN ml.id END AS npaid, |
871 | - CASE WHEN ai.state = 'open' THEN ml.id END AS ninvoiced, |
872 | - CASE WHEN (ai.state = 'draft' OR ai.state = 'proforma') |
873 | - THEN ml.id END AS nwaiting, |
874 | - CASE WHEN ai.state = 'cancel' |
875 | - THEN SUM(ail.price_unit * ail.quantity * (1 - ail.discount / 100)) |
876 | - ELSE 0 END AS acanceled, |
877 | - CASE WHEN ai.state = 'paid' |
878 | - THEN SUM(ail.price_unit * ail.quantity * (1 - ail.discount / 100)) |
879 | - ELSE 0 END AS apaid, |
880 | - CASE WHEN ai.state = 'open' |
881 | - THEN SUM(ail.price_unit * ail.quantity * (1 - ail.discount / 100)) |
882 | - ELSE 0 END AS ainvoiced, |
883 | - CASE WHEN (ai.state = 'draft' OR ai.state = 'proforma') |
884 | - THEN SUM(ail.price_unit * ail.quantity * (1 - ail.discount / 100)) |
885 | - ELSE 0 END AS awaiting, |
886 | - TO_CHAR(ml.date_from, 'YYYY') AS year, |
887 | - ai.currency_id AS currency, |
888 | - MIN(ml.id) AS id |
889 | - FROM membership_membership_line ml |
890 | - JOIN (account_invoice_line ail |
891 | - LEFT JOIN account_invoice ai |
892 | - ON (ail.invoice_id = ai.id)) |
893 | - ON (ml.account_invoice_line = ail.id) |
894 | - JOIN res_partner p |
895 | - ON (ml.partner = p.id) |
896 | - GROUP BY TO_CHAR(ml.date_from, 'YYYY'), ai.state, |
897 | - ai.currency_id, ml.id) AS foo |
898 | - GROUP BY year, currency) |
899 | - """) |
900 | - |
901 | -ReportPartnerMemberYear() |
902 | - |
903 | - |
904 | -class ReportPartnerMemberYearNew(osv.osv): |
905 | - '''New Membership by Years''' |
906 | - |
907 | - _name = 'report.partner_member.year_new' |
908 | - _description = __doc__ |
909 | - _auto = False |
910 | - _rec_name = 'year' |
911 | - _columns = { |
912 | - 'year': fields.char('Year', size='4', readonly=True, select=1), |
913 | - 'canceled_number': fields.integer('Canceled', readonly=True), |
914 | - 'waiting_number': fields.integer('Waiting', readonly=True), |
915 | - 'invoiced_number': fields.integer('Invoiced', readonly=True), |
916 | - 'paid_number': fields.integer('Paid', readonly=True), |
917 | - 'canceled_amount': fields.float('Canceled', digits=(16, 2), readonly=True), |
918 | + 'canceled_number': fields.integer('Cancelled', readonly=True), |
919 | + 'waiting_number': fields.integer('Waiting', readonly=True), |
920 | + 'invoiced_number': fields.integer('Invoiced', readonly=True), |
921 | + 'paid_number': fields.integer('Paid', readonly=True), |
922 | + 'canceled_amount': fields.float('Cancelled', digits=(16, 2), readonly=True), |
923 | + 'waiting_amount': fields.float('Waiting', digits=(16, 2), readonly=True), |
924 | + 'invoiced_amount': fields.float('Invoiced', digits=(16, 2), readonly=True), |
925 | + 'paid_amount': fields.float('Paid', digits=(16, 2), readonly=True), |
926 | + 'currency': fields.many2one('res.currency', 'Currency', readonly=True, |
927 | + select=2), |
928 | + } |
929 | + |
930 | + def init(self, cr): |
931 | + '''Create the view''' |
932 | + cr.execute(""" |
933 | + CREATE OR REPLACE VIEW report_partner_member_year AS ( |
934 | + SELECT |
935 | + MIN(id) AS id, |
936 | + COUNT(ncanceled) as canceled_number, |
937 | + COUNT(npaid) as paid_number, |
938 | + COUNT(ninvoiced) as invoiced_number, |
939 | + COUNT(nwaiting) as waiting_number, |
940 | + SUM(acanceled) as canceled_amount, |
941 | + SUM(apaid) as paid_amount, |
942 | + SUM(ainvoiced) as invoiced_amount, |
943 | + SUM(awaiting) as waiting_amount, |
944 | + year, |
945 | + currency |
946 | + FROM (SELECT |
947 | + CASE WHEN ai.state = 'cancel' THEN ml.id END AS ncanceled, |
948 | + CASE WHEN ai.state = 'paid' THEN ml.id END AS npaid, |
949 | + CASE WHEN ai.state = 'open' THEN ml.id END AS ninvoiced, |
950 | + CASE WHEN (ai.state = 'draft' OR ai.state = 'proforma') |
951 | + THEN ml.id END AS nwaiting, |
952 | + CASE WHEN ai.state = 'cancel' |
953 | + THEN SUM(ail.price_unit * ail.quantity * (1 - ail.discount / 100)) |
954 | + ELSE 0 END AS acanceled, |
955 | + CASE WHEN ai.state = 'paid' |
956 | + THEN SUM(ail.price_unit * ail.quantity * (1 - ail.discount / 100)) |
957 | + ELSE 0 END AS apaid, |
958 | + CASE WHEN ai.state = 'open' |
959 | + THEN SUM(ail.price_unit * ail.quantity * (1 - ail.discount / 100)) |
960 | + ELSE 0 END AS ainvoiced, |
961 | + CASE WHEN (ai.state = 'draft' OR ai.state = 'proforma') |
962 | + THEN SUM(ail.price_unit * ail.quantity * (1 - ail.discount / 100)) |
963 | + ELSE 0 END AS awaiting, |
964 | + TO_CHAR(ml.date_from, 'YYYY') AS year, |
965 | + ai.currency_id AS currency, |
966 | + MIN(ml.id) AS id |
967 | + FROM membership_membership_line ml |
968 | + JOIN (account_invoice_line ail |
969 | + LEFT JOIN account_invoice ai |
970 | + ON (ail.invoice_id = ai.id)) |
971 | + ON (ml.account_invoice_line = ail.id) |
972 | + JOIN res_partner p |
973 | + ON (ml.partner = p.id) |
974 | + GROUP BY TO_CHAR(ml.date_from, 'YYYY'), ai.state, |
975 | + ai.currency_id, ml.id) AS foo |
976 | + GROUP BY year, currency) |
977 | + """) |
978 | + |
979 | +ReportPartnerMemberYear() |
980 | + |
981 | + |
982 | +class ReportPartnerMemberYearNew(osv.osv): |
983 | + '''New Membership by Years''' |
984 | + |
985 | + _name = 'report.partner_member.year_new' |
986 | + _description = __doc__ |
987 | + _auto = False |
988 | + _rec_name = 'year' |
989 | + |
990 | + _columns = { |
991 | + 'year': fields.char('Year', size='4', readonly=True, select=1), |
992 | + 'canceled_number': fields.integer('Cancelled', readonly=True), |
993 | + 'waiting_number': fields.integer('Waiting', readonly=True), |
994 | + 'invoiced_number': fields.integer('Invoiced', readonly=True), |
995 | + 'paid_number': fields.integer('Paid', readonly=True), |
996 | + 'canceled_amount': fields.float('Cancelled', digits=(16, 2), readonly=True), |
997 | + 'waiting_amount': fields.float('Waiting', digits=(16, 2), readonly=True), |
998 | + 'invoiced_amount': fields.float('Invoiced', digits=(16, 2), readonly=True), |
999 | + 'paid_amount': fields.float('Paid', digits=(16, 2), readonly=True), |
1000 | + 'currency': fields.many2one('res.currency', 'Currency', readonly=True, |
1001 | + select=2), |
1002 | + } |
1003 | + |
1004 | + def init(self, cr): |
1005 | + '''Create the view''' |
1006 | + cr.execute(""" |
1007 | + CREATE OR REPLACE VIEW report_partner_member_year AS ( |
1008 | + SELECT |
1009 | + MIN(id) AS id, |
1010 | + COUNT(ncanceled) as canceled_number, |
1011 | + COUNT(npaid) as paid_number, |
1012 | + COUNT(ninvoiced) as invoiced_number, |
1013 | + COUNT(nwaiting) as waiting_number, |
1014 | + SUM(acanceled) as canceled_amount, |
1015 | + SUM(apaid) as paid_amount, |
1016 | + SUM(ainvoiced) as invoiced_amount, |
1017 | + SUM(awaiting) as waiting_amount, |
1018 | + year, |
1019 | + currency |
1020 | + FROM (SELECT |
1021 | + CASE WHEN ai.state = 'cancel' THEN ml.id END AS ncanceled, |
1022 | + CASE WHEN ai.state = 'paid' THEN ml.id END AS npaid, |
1023 | + CASE WHEN ai.state = 'open' THEN ml.id END AS ninvoiced, |
1024 | + CASE WHEN (ai.state = 'draft' OR ai.state = 'proforma') |
1025 | + THEN ml.id END AS nwaiting, |
1026 | + CASE WHEN ai.state = 'cancel' |
1027 | + THEN SUM(ail.price_unit * ail.quantity * (1 - ail.discount / 100)) |
1028 | + ELSE 0 END AS acanceled, |
1029 | + CASE WHEN ai.state = 'paid' |
1030 | + THEN SUM(ail.price_unit * ail.quantity * (1 - ail.discount / 100)) |
1031 | + ELSE 0 END AS apaid, |
1032 | + CASE WHEN ai.state = 'open' |
1033 | + THEN SUM(ail.price_unit * ail.quantity * (1 - ail.discount / 100)) |
1034 | + ELSE 0 END AS ainvoiced, |
1035 | + CASE WHEN (ai.state = 'draft' OR ai.state = 'proforma') |
1036 | + THEN SUM(ail.price_unit * ail.quantity * (1 - ail.discount / 100)) |
1037 | + ELSE 0 END AS awaiting, |
1038 | + TO_CHAR(ml.date_from, 'YYYY') AS year, |
1039 | + ai.currency_id AS currency, |
1040 | + MIN(ml.id) AS id |
1041 | + FROM membership_membership_line ml |
1042 | + JOIN (account_invoice_line ail |
1043 | + LEFT JOIN account_invoice ai |
1044 | + ON (ail.invoice_id = ai.id)) |
1045 | + ON (ml.account_invoice_line = ail.id) |
1046 | + JOIN res_partner p |
1047 | + ON (ml.partner = p.id) |
1048 | + GROUP BY TO_CHAR(ml.date_from, 'YYYY'), ai.state, |
1049 | + ai.currency_id, ml.id) AS foo |
1050 | + GROUP BY year, currency) |
1051 | + """) |
1052 | + |
1053 | +ReportPartnerMemberYear() |
1054 | + |
1055 | + |
1056 | +class ReportPartnerMemberYearNew(osv.osv): |
1057 | + '''New Membership by Years''' |
1058 | + |
1059 | + _name = 'report.partner_member.year_new' |
1060 | + _description = __doc__ |
1061 | + _auto = False |
1062 | + _rec_name = 'year' |
1063 | + _columns = { |
1064 | + 'year': fields.char('Year', size='4', readonly=True, select=1), |
1065 | + 'canceled_number': fields.integer('Cancelled', readonly=True), |
1066 | + 'waiting_number': fields.integer('Waiting', readonly=True), |
1067 | + 'invoiced_number': fields.integer('Invoiced', readonly=True), |
1068 | + 'paid_number': fields.integer('Paid', readonly=True), |
1069 | + 'canceled_amount': fields.float('Cancelled', digits=(16, 2), readonly=True), |
1070 | 'waiting_amount': fields.float('Waiting', digits=(16, 2), readonly=True), |
1071 | 'invoiced_amount': fields.float('Invoiced', digits=(16, 2), readonly=True), |
1072 | 'paid_amount': fields.float('Paid', digits=(16, 2), readonly=True), |
1073 | |
1074 | === modified file 'mrp/mrp.py' |
1075 | --- mrp/mrp.py 2009-04-09 13:28:40 +0000 |
1076 | +++ mrp/mrp.py 2009-04-29 05:03:05 +0000 |
1077 | @@ -425,7 +425,7 @@ |
1078 | 'product_lines': fields.one2many('mrp.production.product.line', 'production_id', 'Scheduled goods'), |
1079 | 'workcenter_lines': fields.one2many('mrp.production.workcenter.line', 'production_id', 'Workcenters Utilisation'), |
1080 | |
1081 | - 'state': fields.selection([('draft','Draft'),('picking_except', 'Packing Exception'),('confirmed','Waiting Goods'),('ready','Ready to Produce'),('in_production','In Production'),('cancel','Canceled'),('done','Done')],'Status', readonly=True), |
1082 | + 'state': fields.selection([('draft','Draft'),('picking_except', 'Packing Exception'),('confirmed','Waiting Goods'),('ready','Ready to Produce'),('in_production','In Production'),('cancel','Cancelled'),('done','Done')],'Status', readonly=True), |
1083 | 'hour_total': fields.function(_production_calc, method=True, type='float', string='Total Hours', multi='workorder'), |
1084 | 'cycle_total': fields.function(_production_calc, method=True, type='float', string='Total Cycles', multi='workorder'), |
1085 | |
1086 | |
1087 | === modified file 'mrp/mrp_view.xml' |
1088 | --- mrp/mrp_view.xml 2009-04-17 10:37:08 +0000 |
1089 | +++ mrp/mrp_view.xml 2009-04-27 08:47:41 +0000 |
1090 | @@ -17,8 +17,9 @@ |
1091 | <field name="arch" type="xml"> |
1092 | <form string="Properties categories"> |
1093 | <separator colspan="4" string="General Information"/> |
1094 | - <field colspan="4" name="name" select="1"/> |
1095 | - <field colspan="4" name="description"/> |
1096 | + <field name="name" select="1"/> |
1097 | + <newline/> |
1098 | + <field name="description"/> |
1099 | </form> |
1100 | </field> |
1101 | </record> |
1102 | |
1103 | === modified file 'mrp_operations/mrp_operations.py' |
1104 | --- mrp_operations/mrp_operations.py 2009-03-06 23:50:10 +0000 |
1105 | +++ mrp_operations/mrp_operations.py 2009-04-28 08:37:32 +0000 |
1106 | @@ -42,7 +42,7 @@ |
1107 | class mrp_production_workcenter_line(osv.osv): |
1108 | _inherit = 'mrp.production.workcenter.line' |
1109 | _columns = { |
1110 | - 'state': fields.selection([('draft','Draft'),('startworking', 'In Progress'),('pause','Pause'),('cancel','Canceled'),('done','Finished')],'Status', readonly=True), |
1111 | + 'state': fields.selection([('draft','Draft'),('startworking', 'In Progress'),('pause','Paused'),('cancel','Cancelled'),('done','Finished')],'Status', readonly=True), |
1112 | 'date_planned': fields.related('production_id', 'date_planned', type='datetime', string='Date Planned'), |
1113 | 'date_start': fields.datetime('Start Date'), |
1114 | 'date_finnished': fields.datetime('End Date'), |
1115 | @@ -226,7 +226,7 @@ |
1116 | raise osv.except_osv(_('Sorry!'),_('You cannot finish the operation without Starting/Resuming it !')) |
1117 | return False |
1118 | if 'cancel' in code_lst: |
1119 | - raise osv.except_osv(_('Sorry!'),_('Operation is Already Cancelled !')) |
1120 | + raise osv.except_osv(_('Sorry!'),_('Operation is Already Canceled !')) |
1121 | return False |
1122 | if code.start_stop=='cancel': |
1123 | if not 'start' in code_lst : |
1124 | |
1125 | === modified file 'mrp_repair/mrp_repair.py' |
1126 | --- mrp_repair/mrp_repair.py 2009-03-25 04:55:54 +0000 |
1127 | +++ mrp_repair/mrp_repair.py 2009-04-28 08:37:32 +0000 |
1128 | @@ -504,7 +504,7 @@ |
1129 | 'location_id': fields.many2one('stock.location', 'Source Location', required=True, select=True), |
1130 | 'location_dest_id': fields.many2one('stock.location', 'Dest. Location', required=True, select=True), |
1131 | 'move_id': fields.many2one('stock.move', 'Inventory Move', readonly=True), |
1132 | - 'state': fields.selection([('draft','Draft'),('confirmed','Confirmed'),('done','Done'),('cancel','Canceled')], 'Status', required=True, readonly=True), |
1133 | + 'state': fields.selection([('draft','Draft'),('confirmed','Confirmed'),('done','Done'),('cancel','Cancelled')], 'Status', required=True, readonly=True), |
1134 | } |
1135 | _defaults = { |
1136 | 'state': lambda *a: 'draft', |
1137 | |
1138 | === modified file 'project/project_view.xml' |
1139 | --- project/project_view.xml 2009-04-28 09:49:50 +0000 |
1140 | +++ project/project_view.xml 2009-04-29 05:03:05 +0000 |
1141 | @@ -298,7 +298,7 @@ |
1142 | <button name="do_open" states="pending,draft" string="Start Task" type="object" icon="gtk-execute"/> |
1143 | <button name="do_reopen" states="done,cancelled" string="Reactivate" type="object" icon="gtk-convert"/> |
1144 | <button name="do_pending" states="open" string="Pending" type="object" icon="gtk-media-pause"/> |
1145 | - <button groups="base.group_extended" name="%(wizard_delegate_task)d" states="pending,open" string="Delegate" type="action" icon="gtk-sort-descending"/> |
1146 | + <button groups="base.group_extended" name="%(wizard_delegate_task)d" states="pending,open,draft" string="Delegate" type="action" icon="gtk-sort-descending"/> |
1147 | <button name="%(wizard_close_task)d" states="pending,open" string="Done" type="action" icon="gtk-jump-to"/> |
1148 | <button name="do_cancel" states="draft,open,pending" string="Cancel" type="object" icon="gtk-cancel"/> |
1149 | |
1150 | |
1151 | === removed file 'report_analytic_planning/report_account_analytic.planning.csv' |
1152 | --- report_analytic_planning/report_account_analytic.planning.csv 2007-08-09 11:20:41 +0000 |
1153 | +++ report_analytic_planning/report_account_analytic.planning.csv 1970-01-01 00:00:00 +0000 |
1154 | @@ -1,10 +0,0 @@ |
1155 | -name,line_ids/amount,line_ids/amount_unit,line_ids/user_id,line_ids/account_id,user_id |
1156 | -Planning 2007,5.0,Day,admin,Seagate P1,admin |
1157 | -,7.0,Day,admin,Seagate P2, |
1158 | -,2.0,Day,admin,Sednacom, |
1159 | -,3.0,Day,admin,Administratif, |
1160 | -,4.0,Day,admin,Commercial & Marketing, |
1161 | -,6.0,Day,demo,Seagate P1, |
1162 | -,7.0,Day,demo,Seagate P2, |
1163 | -,1.0,Day,demo,CampToCamp, |
1164 | -,7.0,Day,demo,Agrolait, |
1165 | |
1166 | === modified file 'report_analytic_planning/report_analytic_planning.py' |
1167 | --- report_analytic_planning/report_analytic_planning.py 2009-01-04 22:12:50 +0000 |
1168 | +++ report_analytic_planning/report_analytic_planning.py 2009-04-29 05:03:05 +0000 |
1169 | @@ -29,15 +29,16 @@ |
1170 | _name = "report_account_analytic.planning" |
1171 | _description = "Planning" |
1172 | _columns = { |
1173 | - 'name': fields.char('Planning Name', size=32, required=True), |
1174 | - 'user_id': fields.many2one('res.users', 'Responsible', required=True), |
1175 | - 'date_from':fields.date('Start Date', required=True), |
1176 | - 'date_to':fields.date('End Date', required=True), |
1177 | - 'line_ids': fields.one2many('report_account_analytic.planning.line', 'planning_id', 'Planning lines'), |
1178 | + 'name': fields.char('Planning Name', size=32, required=True, readonly=True, states={'open':[('readonly',False)]}), |
1179 | + 'user_id': fields.many2one('res.users', 'Responsible', required=True, readonly=True, states={'open':[('readonly',False)]}), |
1180 | + 'date_from':fields.date('Start Date', required=True, readonly=True, states={'open':[('readonly',False)]}), |
1181 | + 'date_to':fields.date('End Date', required=True, readonly=True, states={'open':[('readonly',False)]}), |
1182 | + 'line_ids': fields.one2many('report_account_analytic.planning.line', 'planning_id', 'Planning lines', readonly=True, states={'open':[('readonly',False)]}), |
1183 | 'stat_ids': fields.one2many('report_account_analytic.planning.stat', 'planning_id', 'Planning analysis', readonly=True), |
1184 | 'stat_user_ids': fields.one2many('report_account_analytic.planning.stat.user', 'planning_id', 'Planning by user', readonly=True), |
1185 | 'stat_account_ids': fields.one2many('report_account_analytic.planning.stat.account', 'planning_id', 'Planning by account', readonly=True), |
1186 | - 'state': fields.selection([('open','Open'),('done','Done')], 'Status', required=True) |
1187 | + 'state': fields.selection([('open','Open'),('done','Done')], 'Status', required=True), |
1188 | + 'business_days' : fields.integer('Business Days') |
1189 | } |
1190 | _defaults = { |
1191 | 'name': lambda *a: time.strftime('%Y-%m-%d'), |
1192 | @@ -47,6 +48,15 @@ |
1193 | 'state': lambda *args: 'open' |
1194 | } |
1195 | _order = 'date_from desc' |
1196 | + |
1197 | + def action_open(self, cr, uid, id, context={}): |
1198 | + self.write(cr, uid, id, {'state' : 'open'}) |
1199 | + return True |
1200 | + |
1201 | + def action_done(self, cr, uid, id, context={}): |
1202 | + self.write(cr, uid, id, {'state' : 'done'}) |
1203 | + return True |
1204 | + |
1205 | report_account_analytic_planning() |
1206 | |
1207 | class report_account_analytic_planning_line(osv.osv): |
1208 | |
1209 | === modified file 'report_analytic_planning/report_analytic_planning_view.xml' |
1210 | --- report_analytic_planning/report_analytic_planning_view.xml 2009-01-27 11:15:46 +0000 |
1211 | +++ report_analytic_planning/report_analytic_planning_view.xml 2009-04-29 05:03:05 +0000 |
1212 | @@ -22,13 +22,13 @@ |
1213 | <field name="type">form</field> |
1214 | <field name="arch" type="xml"> |
1215 | <form string="Planning by Account"> |
1216 | - <notebook> |
1217 | - <page string="Planning"> |
1218 | - <field name="name" select="1"/> |
1219 | - <field name="user_id" select="1"/> |
1220 | - <field name="date_from"/> |
1221 | - <field name="date_to"/> |
1222 | - <field colspan="4" name="line_ids" nolabel="1"> |
1223 | + <field name="name" select="1"/> |
1224 | + <field name="user_id" select="1"/> |
1225 | + <field name="date_from"/> |
1226 | + <field name="date_to"/> |
1227 | + <notebook> |
1228 | + <page string="Planning"> |
1229 | + <field colspan="4" name="line_ids" nolabel="1"> |
1230 | <tree editable="bottom" string="Planning Line"> |
1231 | <field name="user_id"/> |
1232 | <field name="account_id"/> |
1233 | @@ -36,8 +36,20 @@ |
1234 | <field name="amount_unit"/> |
1235 | <field name="note"/> |
1236 | </tree> |
1237 | + <form string="Planning Line"> |
1238 | + <field name="user_id"/> |
1239 | + <field name="account_id"/> |
1240 | + <field name="amount"/> |
1241 | + <field name="amount_unit"/> |
1242 | + <separator string="Notes" colspan="4" /> |
1243 | + <field name="note" colspan="4" nolabel="1"/> |
1244 | + </form> |
1245 | </field> |
1246 | - <field name="state" select="1"/> |
1247 | + <group col="4" colspan="4"> |
1248 | + <field name="state" select="1" readonly="1"/> |
1249 | + <button name="action_open" states="done" string="Re-Open" type="object" icon="gtk-convert"/> |
1250 | + <button name="action_done" states="open" string="Done" type="object" icon="gtk-jump-to"/> |
1251 | + </group> |
1252 | </page> |
1253 | <page string="Analysis"> |
1254 | <field colspan="4" name="stat_ids" nolabel="1" readonly="1"> |
1255 | |
1256 | === modified file 'report_crm/report_crm.py' |
1257 | --- report_crm/report_crm.py 2009-03-20 11:28:18 +0000 |
1258 | +++ report_crm/report_crm.py 2009-04-28 08:37:32 +0000 |
1259 | @@ -25,7 +25,7 @@ |
1260 | AVAILABLE_STATES = [ |
1261 | ('draft','Draft'), |
1262 | ('open','Open'), |
1263 | - ('cancel', 'Canceled'), |
1264 | + ('cancel', 'Cancelled'), |
1265 | ('done', 'Closed'), |
1266 | ('pending','Pending') |
1267 | ] |
1268 | |
1269 | === modified file 'sale/sale.py' |
1270 | --- sale/sale.py 2009-03-19 15:56:46 +0000 |
1271 | +++ sale/sale.py 2009-04-28 08:37:32 +0000 |
1272 | @@ -729,7 +729,7 @@ |
1273 | 'number_packages': fields.function(_number_packages, method=True, type='integer', string='Number Packages'), |
1274 | 'notes': fields.text('Notes'), |
1275 | 'th_weight' : fields.float('Weight'), |
1276 | - 'state': fields.selection([('draft','Draft'),('confirmed','Confirmed'),('done','Done'),('cancel','Canceled'),('exception','Exception')], 'Status', required=True, readonly=True), |
1277 | + 'state': fields.selection([('draft','Draft'),('confirmed','Confirmed'),('done','Done'),('cancel','Cancelled'),('exception','Exception')], 'Status', required=True, readonly=True), |
1278 | 'order_partner_id': fields.related('order_id', 'partner_id', type='many2one', relation='res.partner', string='Customer') |
1279 | } |
1280 | _order = 'sequence, id' |
1281 | |
1282 | === modified file 'scrum/scrum_view.xml' |
1283 | --- scrum/scrum_view.xml 2008-10-27 15:29:13 +0000 |
1284 | +++ scrum/scrum_view.xml 2009-04-27 08:47:41 +0000 |
1285 | @@ -16,12 +16,12 @@ |
1286 | <field name="type">form</field> |
1287 | <field name="inherit_id" ref="project.edit_project"/> |
1288 | <field name="arch" type="xml"> |
1289 | - <field name="state" position="after"> |
1290 | + <group col="9" colspan="8" position="before"> |
1291 | <separator string="Scrum Data" colspan="4"/> |
1292 | <field name="product_owner_id" required="1" select="1"/> |
1293 | - <field name="sprint_size"/> |
1294 | - <newline/> |
1295 | - </field> |
1296 | + <field name="sprint_size" colspan="2"/> |
1297 | + <separator string="State" colspan="4"/> |
1298 | + </group> |
1299 | </field> |
1300 | </record> |
1301 | |
1302 | @@ -99,10 +99,12 @@ |
1303 | <field name="user_id" select="1"/> |
1304 | <field name="active" select="1"/> |
1305 | <field colspan="4" name="note"/> |
1306 | + <field name="progress"/> |
1307 | + <field name="effective_hours" widget="float_time"/> |
1308 | + <field name="planned_hours" widget="float_time"/> |
1309 | + <newline/> |
1310 | + <separator colspan="4" string="Status"/> |
1311 | <field name="state" select="1"/> |
1312 | - <field name="progress"/> |
1313 | - <field name="effective_hours" widget="float_time"/> |
1314 | - <field name="planned_hours" widget="float_time"/> |
1315 | </page> |
1316 | <page string="Tasks"> |
1317 | <field colspan="4" name="tasks_id" nolabel="1" widget="one2many_list"/> |
1318 | @@ -289,7 +291,7 @@ |
1319 | <separator colspan="4" string="Is there anything blocking you ?"/> |
1320 | <field colspan="4" name="question_blocks" nolabel="1"/> |
1321 | </page> |
1322 | - <page string="Optionnal Info"> |
1323 | + <page string="Optional Info"> |
1324 | <field name="date"/> |
1325 | <newline/> |
1326 | <separator colspan="4" string="Are your Sprint Backlog estimate accurate ?"/> |
1327 | @@ -393,13 +395,47 @@ |
1328 | </field> |
1329 | </field> |
1330 | </record> |
1331 | + |
1332 | + <record id="view_task_tree2" model="ir.ui.view"> |
1333 | + <field name="name">scrum.task.tree</field> |
1334 | + <field name="model">scrum.task</field> |
1335 | + <field name="type">tree</field> |
1336 | + <field name="arch" type="xml"> |
1337 | + <tree string="Tasks"> |
1338 | + <field name="sequence"/> |
1339 | + <field name="name" select="1"/> |
1340 | + <field name="project_id" select="1"/> |
1341 | + <field name="user_id" select="1"/> |
1342 | + <field name="date_deadline" select="2"/> |
1343 | + <field name="progress" widget="progressbar"/> |
1344 | + <field name="product_backlog_id"/> |
1345 | + <field name="state" select="2"/> |
1346 | + </tree> |
1347 | + </field> |
1348 | + </record> |
1349 | + |
1350 | |
1351 | <record id="action_view_task" model="ir.actions.act_window"> |
1352 | <field name="name">All Tasks</field> |
1353 | <field name="res_model">scrum.task</field> |
1354 | <field name="view_type">form</field> |
1355 | + <field name="view_id" ref="view_task_tree2" /> |
1356 | <field name="domain">[('scrum','=',1)]</field> |
1357 | </record> |
1358 | + |
1359 | + <record id="action_view_task_view1" model="ir.actions.act_window.view"> |
1360 | + <field eval="1" name="sequence" /> |
1361 | + <field name="view_mode">tree</field> |
1362 | + <field name="view_id" ref="view_task_tree2" /> |
1363 | + <field name="act_window_id" ref="action_view_task" /> |
1364 | + </record> |
1365 | + |
1366 | + <record id="action_view_task_view2" model="ir.actions.act_window.view"> |
1367 | + <field eval="2" name="sequence" /> |
1368 | + <field name="view_mode">form</field> |
1369 | + <field name="view_id" ref="view_task_form2" /> |
1370 | + <field name="act_window_id" ref="action_view_task" /> |
1371 | + </record> |
1372 | <menuitem action="action_view_task" id="menu_action_view_task" parent="scrum.next_id_67"/> |
1373 | |
1374 | <record id="action_view_task4" model="ir.actions.act_window"> |
1375 | @@ -409,6 +445,21 @@ |
1376 | <field name="view_mode">tree,form</field> |
1377 | <field name="domain">[('user_id', '=', uid),('scrum','=',1)]</field> |
1378 | </record> |
1379 | + |
1380 | + <record id="action_view_task4_view1" model="ir.actions.act_window.view"> |
1381 | + <field eval="1" name="sequence" /> |
1382 | + <field name="view_mode">tree</field> |
1383 | + <field name="view_id" ref="view_task_tree2" /> |
1384 | + <field name="act_window_id" ref="action_view_task4" /> |
1385 | + </record> |
1386 | + |
1387 | + <record id="action_view_task4_view2" model="ir.actions.act_window.view"> |
1388 | + <field eval="2" name="sequence" /> |
1389 | + <field name="view_mode">form</field> |
1390 | + <field name="view_id" ref="view_task_form2" /> |
1391 | + <field name="act_window_id" ref="action_view_task4" /> |
1392 | + </record> |
1393 | + |
1394 | <menuitem action="action_view_task4" id="menu_action_view_task4" parent="scrum.menu_action_view_task"/> |
1395 | |
1396 | <record id="action_view_task5" model="ir.actions.act_window"> |
1397 | @@ -418,6 +469,20 @@ |
1398 | <field name="view_mode">tree,form</field> |
1399 | <field name="domain">[('user_id','=',uid),('state','=','open'),('scrum','=',1)]</field> |
1400 | </record> |
1401 | + |
1402 | + <record id="action_view_task5_view1" model="ir.actions.act_window.view"> |
1403 | + <field eval="1" name="sequence" /> |
1404 | + <field name="view_mode">tree</field> |
1405 | + <field name="view_id" ref="view_task_tree2" /> |
1406 | + <field name="act_window_id" ref="action_view_task5" /> |
1407 | + </record> |
1408 | + |
1409 | + <record id="action_view_task5_view2" model="ir.actions.act_window.view"> |
1410 | + <field eval="2" name="sequence" /> |
1411 | + <field name="view_mode">form</field> |
1412 | + <field name="view_id" ref="view_task_form2" /> |
1413 | + <field name="act_window_id" ref="action_view_task5" /> |
1414 | + </record> |
1415 | <menuitem action="action_view_task5" id="menu_tasks_yours" parent="scrum.menu_action_view_task4"/> |
1416 | |
1417 | <record id="action_view_task6" model="ir.actions.act_window"> |
1418 | @@ -427,6 +492,20 @@ |
1419 | <field name="view_mode">tree,form</field> |
1420 | <field name="domain">[('state','=','open'),('scrum','=',1)]</field> |
1421 | </record> |
1422 | + |
1423 | + <record id="action_view_task6_view1" model="ir.actions.act_window.view"> |
1424 | + <field eval="1" name="sequence" /> |
1425 | + <field name="view_mode">tree</field> |
1426 | + <field name="view_id" ref="view_task_tree2" /> |
1427 | + <field name="act_window_id" ref="action_view_task6" /> |
1428 | + </record> |
1429 | + |
1430 | + <record id="action_view_task6_view2" model="ir.actions.act_window.view"> |
1431 | + <field eval="2" name="sequence" /> |
1432 | + <field name="view_mode">form</field> |
1433 | + <field name="view_id" ref="view_task_form2" /> |
1434 | + <field name="act_window_id" ref="action_view_task6" /> |
1435 | + </record> |
1436 | <menuitem action="action_view_task6" id="menu_action_view_task6" parent="project.menu_action_view_task"/> |
1437 | |
1438 | </data> |
1439 | |
1440 | === modified file 'stock/stock.py' |
1441 | --- stock/stock.py 2009-04-20 07:05:10 +0000 |
1442 | +++ stock/stock.py 2009-04-28 08:37:32 +0000 |
1443 | @@ -926,7 +926,7 @@ |
1444 | |
1445 | 'note': fields.text('Notes'), |
1446 | |
1447 | - 'state': fields.selection([('draft','Draft'),('waiting','Waiting'),('confirmed','Confirmed'),('assigned','Available'),('done','Done'),('cancel','Canceled')], 'Status', readonly=True, select=True), |
1448 | + 'state': fields.selection([('draft','Draft'),('waiting','Waiting'),('confirmed','Confirmed'),('assigned','Available'),('done','Done'),('cancel','Cancelled')], 'Status', readonly=True, select=True), |
1449 | 'price_unit': fields.float('Unit Price', |
1450 | digits=(16, int(config['price_accuracy']))), |
1451 | } |
Fixes: Missing button of Proforma in invoice view
Improvement :"Canceled" > "Cancelled"