Merge lp:~credativ/openobject-addons/elico-6.1-fixes-gap-analysis-duplicate into lp:~openerp-community/openobject-addons/elico-6.1

Proposed by Tom Pickering
Status: Needs review
Proposed branch: lp:~credativ/openobject-addons/elico-6.1-fixes-gap-analysis-duplicate
Merge into: lp:~openerp-community/openobject-addons/elico-6.1
Diff against target: 26 lines (+8/-3)
1 file modified
gap_analysis/gap_analysis.py (+8/-3)
To merge this branch: bzr merge lp:~credativ/openobject-addons/elico-6.1-fixes-gap-analysis-duplicate
Reviewer Review Type Date Requested Status
OpenERP Community (OBSOLETE) Pending
Review via email: mp+218425@code.launchpad.net

Description of the change

This branch enables users to duplicate Gap Analyses.

To post a comment you must log in.

Unmerged revisions

11. By Jacob Hicks (credativ)

[IMP] Modify default values of duplicated gap analysis

10. By Tom Pickering

[IMP] Gap Analyses can now be duplicated.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'gap_analysis/gap_analysis.py'
--- gap_analysis/gap_analysis.py 2013-06-22 02:18:01 +0000
+++ gap_analysis/gap_analysis.py 2014-05-06 13:37:19 +0000
@@ -293,8 +293,13 @@
293 293
294 294
295 def copy(self, cr, uid, id, default=None, context=None):295 def copy(self, cr, uid, id, default=None, context=None):
296 raise osv.except_osv(_('Warning'), _("Copying a Gap Analysis is currently not allowed."))296 if default is None:
297 return False297 default = {}
298 if not default.get('reference', False):
299 default.update(reference=self.pool.get('ir.sequence').get(cr, uid, 'gap_analysis'))
300 if not default.get('name', False):
301 default.update(name=_('%s (copy)') % (self.browse(cr, uid, id, context=context).name))
302 return super(gap_analysis, self).copy(cr, uid, id, default, context)
298 303
299 304
300 def onchange_project_id(self, cr, uid, ids, project_id):305 def onchange_project_id(self, cr, uid, ids, project_id):
@@ -475,4 +480,4 @@
475 480
476gap_analysis_line()481gap_analysis_line()
477482
478# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
479\ No newline at end of file483\ No newline at end of file
484# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

Subscribers

People subscribed via source and target branches