Merge lp:~openerp-dev/openobject-addons/acct_prj_hr_logs into lp:~openerp-dev/openobject-addons/trunk-dev-addons3

Proposed by pap(openerp)
Status: Rejected
Rejected by: Mustufa Rangwala (Open ERP)
Proposed branch: lp:~openerp-dev/openobject-addons/acct_prj_hr_logs
Merge into: lp:~openerp-dev/openobject-addons/trunk-dev-addons3
Diff against target: 518 lines (+157/-66)
12 files modified
account/account.py (+13/-2)
account/account_bank_statement.py (+4/-0)
account/account_view.xml (+2/-2)
account/invoice.py (+7/-1)
account/wizard/account_invoice_refund.py (+1/-0)
account/wizard/account_reconcile_view.xml (+105/-61)
account_analytic_plans/account_analytic_plans.py (+2/-0)
account_budget/crossovered_budget.py (+7/-0)
account_payment/account_payment.py (+5/-0)
account_voucher/voucher.py (+4/-0)
hr/hr.py (+1/-0)
project/project.py (+6/-0)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/acct_prj_hr_logs
Reviewer Review Type Date Requested Status
Mustufa Rangwala (Open ERP) Needs Fixing
Review via email: mp+28030@code.launchpad.net

Description of the change

added logs for account, account_*, hr, hr_* and project modules

To post a comment you must log in.
Revision history for this message
Mustufa Rangwala (Open ERP) (mra-tinyerp) :
review: Needs Fixing

Unmerged revisions

3645. By pap(openerp)

merge

3644. By pap(openerp)

[ADD]:log messages for account, hr, project

3643. By pap(openerp)

merge

3642. By pap(openerp)

merge

3641. By pap(openerp)

[IMP]:if there is no invoice line inovice should not be created

3640. By pap(openerp)

merge

3639. By pap(openerp)

[IMP]:
1) added missing wizards under Financial Management/Periodical Processing
2) added entry_type on move line for different types of invoices

3638. By Mustufa Rangwala <mra@mra-laptop>

[MERGE]

3637. By Mustufa Rangwala <mra@mra-laptop>

[MERGE]

3636. By Mustufa Rangwala <mra@mra-laptop>

[FIX] Purchase: calculation of amount untax was wrong (ref: mtr)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account/account.py'
2--- account/account.py 2010-06-18 13:55:20 +0000
3+++ account/account.py 2010-06-21 08:36:32 +0000
4@@ -1041,7 +1041,8 @@
5 ]
6 def post(self, cr, uid, ids, context=None):
7 if self.validate(cr, uid, ids, context) and len(ids):
8- for move in self.browse(cr, uid, ids):
9+ moves = self.browse(cr, uid, ids)
10+ for move in moves:
11 if move.name =='/':
12 new_name = False
13 journal = move.journal_id
14@@ -1052,11 +1053,14 @@
15 raise osv.except_osv(_('Error'), _('No sequence defined in the journal !'))
16 if new_name:
17 self.write(cr, uid, [move.id], {'name':new_name})
18-
19 cr.execute('UPDATE account_move '\
20 'SET state=%s '\
21 'WHERE id IN %s',
22 ('posted', tuple(ids),))
23+ moves = self.browse(cr, uid, ids)
24+ for move in moves:
25+ msg = _("Move %s validated"%(move.name))
26+ self.log(cr, uid, move.id, msg)
27 else:
28 raise osv.except_osv(_('Integrity Error !'), _('You can not validate a non-balanced entry !\nMake sure you have configured Payment Term properly !\nIt should contain atleast one Payment Term Line with type "Balance" !'))
29 return True
30@@ -1995,6 +1999,7 @@
31 _order = "code"
32 _name = "account.account.template"
33 _description ='Templates for Accounts'
34+ _log_create=True
35
36 _columns = {
37 'name': fields.char('Name', size=128, required=True, select=True),
38@@ -2150,6 +2155,7 @@
39 class account_chart_template(osv.osv):
40 _name="account.chart.template"
41 _description= "Templates for Account Chart"
42+ _log_create=True
43
44 _columns={
45 'name': fields.char('Name', size=64, required=True),
46@@ -2171,6 +2177,7 @@
47
48 _name = 'account.tax.template'
49 _description = 'Templates for Taxes'
50+ _log_create=True
51
52 _columns = {
53 'chart_template_id': fields.many2one('account.chart.template', 'Chart Template', required=True),
54@@ -2248,6 +2255,7 @@
55 class account_fiscal_position_template(osv.osv):
56 _name = 'account.fiscal.position.template'
57 _description = 'Template for Fiscal Position'
58+ _log_create=True
59
60 _columns = {
61 'name': fields.char('Fiscal Position Template', size=64, translate=True, required=True),
62@@ -2262,6 +2270,7 @@
63 _name = 'account.fiscal.position.tax.template'
64 _description = 'Fiscal Position Template Tax Mapping'
65 _rec_name = 'position_id'
66+ _log_create=True
67
68 _columns = {
69 'position_id': fields.many2one('account.fiscal.position.template', 'Fiscal Position', required=True, ondelete='cascade'),
70@@ -2275,6 +2284,8 @@
71 _name = 'account.fiscal.position.account.template'
72 _description = 'Fiscal Position Template Account Mapping'
73 _rec_name = 'position_id'
74+ _log_create=True
75+
76 _columns = {
77 'position_id': fields.many2one('account.fiscal.position.template', 'Fiscal Position', required=True, ondelete='cascade'),
78 'account_src_id': fields.many2one('account.account.template', 'Account Source', domain=[('type','<>','view')], required=True),
79
80=== modified file 'account/account_bank_statement.py'
81--- account/account_bank_statement.py 2010-06-16 11:51:39 +0000
82+++ account/account_bank_statement.py 2010-06-21 08:36:32 +0000
83@@ -122,6 +122,7 @@
84 _order = "date desc"
85 _name = "account.bank.statement"
86 _description = "Bank Statement"
87+ _log_create = True
88 _columns = {
89 'name': fields.char('Name', size=64, required=True, states={'confirm': [('readonly', True)]}),
90 'date': fields.date('Date', required=True,
91@@ -323,6 +324,9 @@
92 account_move_obj.write(cr, uid, [move_id], {'state':'posted'})
93 done.append(st.id)
94 self.write(cr, uid, done, {'state':'confirm'}, context=context)
95+ for bnk_st in self.browse(cr, uid ,done):
96+ msg=_("Bank Statement")+" '"+bnk_st.name+"' "+_("confirmed")
97+ self.log(cr, uid, bnk_st.id, msg)
98 return True
99
100 def button_cancel(self, cr, uid, ids, context={}):
101
102=== modified file 'account/account_view.xml'
103--- account/account_view.xml 2010-06-18 11:15:59 +0000
104+++ account/account_view.xml 2010-06-21 08:36:32 +0000
105@@ -1041,7 +1041,7 @@
106 <field name="view_mode">tree,form</field>
107 <field name="view_id" ref="view_move_tree"/>
108 <field name="search_view_id" ref="view_account_move_filter"/>
109- <field name="domain">[('journal_id.type', '=', 'sale')]</field>
110+ <field name="domain">[('journal_id.type', 'in', ['sale', 'sale_refund'])]</field>
111 </record>
112
113 <menuitem action="action_account_moves_sale" id="menu_eaction_account_moves_sale" parent="menu_finance_receivables"/>
114@@ -1053,7 +1053,7 @@
115 <field name="view_mode">tree,form</field>
116 <field name="view_id" ref="view_move_tree"/>
117 <field name="search_view_id" ref="view_account_move_filter"/>
118- <field name="domain">[('journal_id.type', '=', 'purchase')]</field>
119+ <field name="domain">[('journal_id.type', 'in', ['purchase', 'purchase_refund'])]</field>
120 </record>
121
122 <menuitem action="action_account_moves_purchase" id="menu_eaction_account_moves_purchase" parent="menu_finance_payables"/>
123
124=== modified file 'account/invoice.py'
125--- account/invoice.py 2010-06-18 13:55:20 +0000
126+++ account/invoice.py 2010-06-21 08:36:32 +0000
127@@ -753,6 +753,8 @@
128 cur_obj = self.pool.get('res.currency')
129 context = {}
130 for inv in self.browse(cr, uid, ids):
131+ if not inv.invoice_line:
132+ raise osv.except_osv(_('No Invoice Lines !'), _('Please create some invoice lines.'))
133 if inv.move_id:
134 continue
135
136@@ -774,7 +776,8 @@
137
138 # one move line per tax line
139 iml += ait_obj.move_line_get(cr, uid, inv.id)
140-
141+
142+ entry_type=''
143 if inv.type in ('in_invoice', 'in_refund'):
144 ref = inv.reference
145 entry_type = 'journal_pur_voucher'
146@@ -1090,6 +1093,9 @@
147 entry_type = 'cont_voucher'
148 if invoice.type in ('in_invoice', 'in_refund'):
149 ref = invoice.reference
150+ entry_type = 'journal_pur_voucher'
151+ if invoice.type in ('in_refund'):
152+ entry_type = 'cont_voucher'
153 else:
154 ref = self._convert_ref(cr, uid, invoice.number)
155
156
157=== modified file 'account/wizard/account_invoice_refund.py'
158--- account/wizard/account_invoice_refund.py 2010-06-16 11:51:39 +0000
159+++ account/wizard/account_invoice_refund.py 2010-06-21 08:36:32 +0000
160@@ -30,6 +30,7 @@
161
162 _name = "account.invoice.refund"
163 _description = "Invoice Refund"
164+ _log_create=True
165 _columns = {
166 'date': fields.date('Operation date', help='This date will be used as the invoice date for Refund Invoice and Period will be chosen accordingly!'),
167 'period': fields.many2one('account.period', 'Force period'),
168
169=== modified file 'account/wizard/account_reconcile_view.xml'
170--- account/wizard/account_reconcile_view.xml 2010-06-16 11:41:41 +0000
171+++ account/wizard/account_reconcile_view.xml 2010-06-21 08:36:32 +0000
172@@ -2,86 +2,130 @@
173 <openerp>
174 <data>
175
176- <record id="view_account_move_line_reconcile_prompt" model="ir.ui.view">
177- <field name="name">account.move.line.reconcile.prompt.form</field>
178- <field name="model">account.move.line.reconcile.prompt</field>
179+<!-- <record id="view_account_move_line_reconcile_prompt" model="ir.ui.view">-->
180+<!-- <field name="name">account.move.line.reconcile.prompt.form</field>-->
181+<!-- <field name="model">account.move.line.reconcile.prompt</field>-->
182+<!-- <field name="type">form</field>-->
183+<!-- <field name="arch" type="xml">-->
184+<!-- <form string="Reconciliation">-->
185+<!-- <separator string="Are you sure you want to reconcile entries?" colspan="4"/>-->
186+<!-- <group colspan="4" col="6">-->
187+<!-- <label string ="" colspan="2"/>-->
188+<!---->
189+<!-- <button icon="gtk-cancel" special="cancel" string="Cancel"/>-->
190+<!-- <button icon="gtk-ok" string="Ok" name="ask_reconcilation" type="object" default_focus="1"/>-->
191+<!-- </group>-->
192+<!-- </form>-->
193+<!-- </field>-->
194+<!-- </record>-->
195+
196+<!-- <record id="action_view_account_move_line_reconcile_prompt" model="ir.actions.act_window">-->
197+<!-- <field name="name">Reconcile Entries</field>-->
198+<!-- <field name="res_model">account.move.line.reconcile.prompt</field>-->
199+<!-- <field name="view_type">form</field>-->
200+<!-- <field name="view_mode">tree,form</field>-->
201+<!-- <field name="view_id" ref="view_account_move_line_reconcile_prompt"/>-->
202+<!-- <field name="target">new</field>-->
203+<!-- </record>-->
204+
205+<!-- <record model="ir.values" id="action_account_move_line_reconcile_prompt_values">-->
206+<!-- <field name="model_id" ref="account.model_account_move_line" />-->
207+<!-- <field name="object" eval="1" />-->
208+<!-- <field name="name">Reconcile Entries</field>-->
209+<!-- <field name="key2">client_action_multi</field>-->
210+<!-- <field name="value" eval="'ir.actions.act_window,' +str(ref('action_view_account_move_line_reconcile_prompt'))" />-->
211+<!-- <field name="key">action</field>-->
212+<!-- <field name="model">account.move.line</field>-->
213+<!-- </record>-->
214+
215+ <record id="view_account_move_line_reconcile_full" model="ir.ui.view">
216+ <field name="name">account.move.line.reconcile.full.form</field>
217+ <field name="model">account.move.line.reconcile</field>
218 <field name="type">form</field>
219 <field name="arch" type="xml">
220 <form string="Reconciliation">
221- <separator string="Are you sure you want to reconcile entries?" colspan="4"/>
222- <group colspan="4" col="6">
223- <label string ="" colspan="2"/>
224-
225- <button icon="gtk-cancel" special="cancel" string="Cancel"/>
226- <button icon="gtk-ok" string="Ok" name="ask_reconcilation" type="object" default_focus="1"/>
227- </group>
228+ <group height="210" width="550">
229+ <separator string="Reconciliation transactions" colspan="4"/>
230+ <field name="trans_nbr"/>
231+ <newline/>
232+ <field name="credit"/>
233+ <field name="debit"/>
234+ <separator string="Write-Off" colspan="4"/>
235+ <field name="writeoff"/>
236+ <group colspan="4" col="6">
237+ <label string ="" colspan="2"/>
238+ <button icon="gtk-cancel" special="cancel" string="Cancel"/>
239+ <button icon="terp-stock_effects-object-colorize" string="Reconcile" name="trans_rec_reconcile_full" type="object" default_focus="1" attrs="{'invisible':[('writeoff','!=',0)]}"/>
240+ <button icon="gtk-ok" string="Reconcile With Write-Off" name="trans_rec_addendum_writeoff" type="object" attrs="{'invisible':[('writeoff','==',0)]}"/>
241+ <button icon="gtk-ok" string="Partial Reconcile" name="trans_rec_reconcile_partial_reconcile" type="object" attrs="{'invisible':[('writeoff','==',0)]}"/>
242+ </group>
243+ </group>
244 </form>
245 </field>
246 </record>
247-
248- <record id="action_view_account_move_line_reconcile_prompt" model="ir.actions.act_window">
249+
250+ <record id="action_view_account_move_line_reconcile" model="ir.actions.act_window">
251 <field name="name">Reconcile Entries</field>
252- <field name="res_model">account.move.line.reconcile.prompt</field>
253+ <field name="res_model">account.move.line.reconcile</field>
254 <field name="view_type">form</field>
255 <field name="view_mode">tree,form</field>
256- <field name="view_id" ref="view_account_move_line_reconcile_prompt"/>
257+ <field name="view_id" ref="view_account_move_line_reconcile_full"/>
258 <field name="target">new</field>
259 </record>
260-
261+
262 <record model="ir.values" id="action_account_move_line_reconcile_prompt_values">
263 <field name="model_id" ref="account.model_account_move_line" />
264 <field name="object" eval="1" />
265 <field name="name">Reconcile Entries</field>
266 <field name="key2">client_action_multi</field>
267- <field name="value" eval="'ir.actions.act_window,' +str(ref('action_view_account_move_line_reconcile_prompt'))" />
268+ <field name="value" eval="'ir.actions.act_window,' +str(ref('action_view_account_move_line_reconcile'))" />
269 <field name="key">action</field>
270 <field name="model">account.move.line</field>
271 </record>
272-
273- <record id="view_account_move_line_reconcile_full" model="ir.ui.view">
274- <field name="name">account.move.line.reconcile.full.form</field>
275- <field name="model">account.move.line.reconcile</field>
276- <field name="type">form</field>
277- <field name="arch" type="xml">
278- <form string="Reconciliation">
279- <separator string="Reconciliation transactions" colspan="4"/>
280- <field name="trans_nbr"/>
281- <newline/>
282- <field name="credit"/>
283- <field name="debit"/>
284- <separator string="Write-Off" colspan="4"/>
285- <field name="writeoff"/>
286- <group colspan="4" col="6">
287- <label string ="" colspan="2"/>
288- <button icon="gtk-cancel" special="cancel" string="Cancel"/>
289- <button icon="terp-stock_effects-object-colorize" string="Reconcile" name="trans_rec_reconcile_full" type="object" default_focus="1"/>
290- </group>
291- </form>
292- </field>
293- </record>
294-
295- <record id="view_account_move_line_reconcile_partial" model="ir.ui.view">
296- <field name="name">account.move.line.reconcile.partial.form</field>
297- <field name="model">account.move.line.reconcile</field>
298- <field name="type">form</field>
299- <field name="arch" type="xml">
300- <form string="Reconciliation">
301- <separator string="Reconciliation transactions" colspan="4"/>
302- <field name="trans_nbr"/>
303- <newline/>
304- <field name="credit"/>
305- <field name="debit"/>
306- <separator string="Write-Off" colspan="4"/>
307- <field name="writeoff"/>
308- <group colspan="4" col="6">
309- <label string ="" colspan="2"/>
310- <button icon="gtk-cancel" special="cancel" string="Cancel"/>
311- <button icon="gtk-ok" string="Reconcile With Write-Off" name="trans_rec_addendum_writeoff" type="object" default_focus="1"/>
312- <button icon="gtk-ok" string="Partial Reconcile" name="trans_rec_reconcile_partial_reconcile" type="object"/>
313- </group>
314- </form>
315- </field>
316- </record>
317+<!-- <record id="view_account_move_line_reconcile_full" model="ir.ui.view">-->
318+<!-- <field name="name">account.move.line.reconcile.full.form</field>-->
319+<!-- <field name="model">account.move.line.reconcile</field>-->
320+<!-- <field name="type">form</field>-->
321+<!-- <field name="arch" type="xml">-->
322+<!-- <form string="Reconciliation">-->
323+<!-- <separator string="Reconciliation transactions" colspan="4"/>-->
324+<!-- <field name="trans_nbr"/>-->
325+<!-- <newline/>-->
326+<!-- <field name="credit"/>-->
327+<!-- <field name="debit"/>-->
328+<!-- <separator string="Write-Off" colspan="4"/>-->
329+<!-- <field name="writeoff"/>-->
330+<!-- <group colspan="4" col="6">-->
331+<!-- <label string ="" colspan="2"/>-->
332+<!-- <button icon="gtk-cancel" special="cancel" string="Cancel"/>-->
333+<!-- <button icon="terp-stock_effects-object-colorize" string="Reconcile" name="trans_rec_reconcile_full" type="object" default_focus="1"/>-->
334+<!-- </group>-->
335+<!-- </form>-->
336+<!-- </field>-->
337+<!-- </record>-->
338+<!---->
339+<!-- <record id="view_account_move_line_reconcile_partial" model="ir.ui.view">-->
340+<!-- <field name="name">account.move.line.reconcile.partial.form</field>-->
341+<!-- <field name="model">account.move.line.reconcile</field>-->
342+<!-- <field name="type">form</field>-->
343+<!-- <field name="arch" type="xml">-->
344+<!-- <form string="Reconciliation">-->
345+<!-- <separator string="Reconciliation transactions" colspan="4"/>-->
346+<!-- <field name="trans_nbr"/>-->
347+<!-- <newline/>-->
348+<!-- <field name="credit"/>-->
349+<!-- <field name="debit"/>-->
350+<!-- <separator string="Write-Off" colspan="4"/>-->
351+<!-- <field name="writeoff"/>-->
352+<!-- <group colspan="4" col="6">-->
353+<!-- <label string ="" colspan="2"/>-->
354+<!-- <button icon="gtk-cancel" special="cancel" string="Cancel"/>-->
355+<!-- <button icon="gtk-ok" string="Reconcile With Write-Off" name="trans_rec_addendum_writeoff" type="object" default_focus="1"/>-->
356+<!-- <button icon="gtk-ok" string="Partial Reconcile" name="trans_rec_reconcile_partial_reconcile" type="object"/>-->
357+<!-- </group>-->
358+<!-- </form>-->
359+<!-- </field>-->
360+<!-- </record>-->
361
362 <record id="account_move_line_reconcile_writeoff" model="ir.ui.view">
363 <field name="name">account.move.line.reconcile.writeoff.form</field>
364
365=== modified file 'account_analytic_plans/account_analytic_plans.py'
366--- account_analytic_plans/account_analytic_plans.py 2010-06-18 08:38:59 +0000
367+++ account_analytic_plans/account_analytic_plans.py 2010-06-21 08:36:32 +0000
368@@ -55,6 +55,8 @@
369 class account_analytic_plan(osv.osv):
370 _name = "account.analytic.plan"
371 _description = "Analytic Plan"
372+ _log_create = True
373+
374 _columns = {
375 'name': fields.char('Analytic Plan', size=64, required=True, select=True,),
376 'plan_ids': fields.one2many('account.analytic.plan.line','plan_id','Analytic Plans'),
377
378=== modified file 'account_budget/crossovered_budget.py'
379--- account_budget/crossovered_budget.py 2010-06-16 11:51:39 +0000
380+++ account_budget/crossovered_budget.py 2010-06-21 08:36:32 +0000
381@@ -110,6 +110,7 @@
382 class crossovered_budget(osv.osv):
383 _name = "crossovered.budget"
384 _description = "Budget"
385+ _log_create = True
386
387 _columns = {
388 'name': fields.char('Name', size=50, required=True,states={'done':[('readonly',True)]}),
389@@ -138,6 +139,9 @@
390 self.write(cr, uid, ids, {
391 'state':'confirm'
392 })
393+ for bdgt in self.browse(cr, uid, ids):
394+ msg = _("Budget")+" '"+bdgt.name+"' "+_("confirmed")
395+ self.log(cr, uid, bdgt.id, msg)
396 return True
397
398 def budget_validate(self, cr, uid, ids, *args):
399@@ -145,6 +149,9 @@
400 'state':'validate',
401 'validating_user_id': uid,
402 })
403+ for bdgt in self.browse(cr, uid, ids):
404+ msg = _("Budget")+" '"+bdgt.name+"' "+_("validated")
405+ self.log(cr, uid, bdgt.id, msg)
406 return True
407
408 def budget_cancel(self, cr, uid, ids, *args):
409
410=== modified file 'account_payment/account_payment.py'
411--- account_payment/account_payment.py 2010-06-18 08:38:59 +0000
412+++ account_payment/account_payment.py 2010-06-21 08:36:32 +0000
413@@ -68,6 +68,7 @@
414 _name = 'payment.order'
415 _description = 'Payment Order'
416 _rec_name = 'reference'
417+ _log_create = True
418
419 def get_wizard(self, type):
420 logger = netsvc.Logger()
421@@ -132,10 +133,14 @@
422 return True
423
424 def set_done(self, cr, uid, id, *args):
425+ from tools.translate import _
426 self.write(cr,uid,id,{'date_done': time.strftime('%Y-%m-%d'),
427 'state': 'done',})
428 wf_service = netsvc.LocalService("workflow")
429 wf_service.trg_validate(uid, 'payment.order', id, 'done', cr)
430+ for pmnt in self.browse(cr, uid, [id]):
431+ msg = _("Payment Order with amount of ")+" '"+str(pmnt.total)+"' "+_("of user")+" '"+pmnt.user_id.name+"' "+_("is done")
432+ self.log(cr, uid, pmnt.id, msg)
433 return True
434
435 payment_order()
436
437=== modified file 'account_voucher/voucher.py'
438--- account_voucher/voucher.py 2010-06-16 11:51:39 +0000
439+++ account_voucher/voucher.py 2010-06-21 08:36:32 +0000
440@@ -100,6 +100,7 @@
441 _name = 'account.voucher'
442 _description = 'Accounting Voucher'
443 _order = "number"
444+ _log_create = True
445 _columns = {
446 'name':fields.char('Name', size=256, required=True, readonly=True, states={'draft':[('readonly',False)]}),
447 'type': fields.selection([
448@@ -210,6 +211,9 @@
449 self.action_number(cr, uid, ids)
450 self.action_move_line_create(cr, uid, ids)
451 self.write(cr, uid, ids, {'state':'posted'})
452+ for voucher in self.browse(cr, uid, ids):
453+ msg = _("Voucher")+" '"+voucher.name+"' "+_("is posted")
454+ self.log(cr, uid, voucher.id, msg)
455 return True
456
457 def cancel_voucher(self, cr, uid, ids, context={}):
458
459=== modified file 'hr/hr.py'
460--- hr/hr.py 2010-06-16 11:51:39 +0000
461+++ hr/hr.py 2010-06-21 08:36:32 +0000
462@@ -91,6 +91,7 @@
463 _name = "hr.employee"
464 _description = "Employee"
465 _inherits = {'resource.resource':"resource_id"}
466+ _log_create = True
467 _columns = {
468 'country_id' : fields.many2one('res.country', 'Nationality'),
469 'birthday' : fields.date("Birthday"),
470
471=== modified file 'project/project.py'
472--- project/project.py 2010-06-18 08:38:59 +0000
473+++ project/project.py 2010-06-21 08:36:32 +0000
474@@ -45,6 +45,7 @@
475 _name = "project.project"
476 _description = "Project"
477 _inherits = {'account.analytic.account':"category_id"}
478+ _log_create = True
479
480 def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False):
481 if context is None:
482@@ -164,10 +165,12 @@
483 ]
484 def set_template(self, cr, uid, ids, context={}):
485 res = self.setActive(cr, uid, ids, value=False, context=context)
486+ self.log(cr, uid, ids[0], _("Project %s is set as a template"%self.browse(cr,uid,ids[0]).complete_name))
487 return res
488
489 def set_done(self, cr, uid, ids, context={}):
490 self.write(cr, uid, ids, {'state':'close'}, context=context)
491+ self.log(cr, uid, ids[0], _("Project %s is done"%self.browse(cr,uid,ids[0]).complete_name))
492 return True
493
494 def set_cancel(self, cr, uid, ids, context={}):
495@@ -419,6 +422,7 @@
496 reopen = False
497 if reopen:
498 self.do_reopen(cr, uid, [parent_id.id])
499+ self.log(cr, uid, task.id, _("Task %s is done"%self.browse(cr,uid,ids[0]).name))
500 if mail_send:
501 model_data_ids = mod_obj.search(cr,uid,[('model','=','ir.ui.view'),('name','=','view_project_close_task')])
502 resource_id = mod_obj.read(cr, uid, model_data_ids, fields=['res_id'])[0]['res_id']
503@@ -434,6 +438,7 @@
504 'target': 'new',
505 'nodestroy': True
506 }
507+
508 return True
509
510 def do_reopen(self, cr, uid, ids, *args):
511@@ -453,6 +458,7 @@
512 })
513
514 self.write(cr, uid, [task.id], {'state': 'open'})
515+ self.log(cr, uid, task.id, _("Task %s is set to open"%self.browse(cr,uid,ids[0]).name))
516 return True
517
518 def do_cancel(self, cr, uid, ids, *args):