Saurang Suthar(OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-addons12-project-contract-ssu into
lp:openobject-addons.
Requested reviews:
Purnendu Singh (OpenERP) (psi-tinyerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-addons12-project-contract-ssu/+merge/127205
Hello sir,
I have fixed the following issues of project/contract:
- Task stages don't reflect specific stages of project.
- A contract of type "template" shouldn't create a project if use_tasks = true
or use_issues=true.
Thank you.
SSU
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-addons12-project-contract-ssu/+merge/127205
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-addons12-project-contract-ssu.
=== modified file 'project/project.py'
--- project/project.py 2012-09-29 19:58:25 +0000
+++ project/project.py 2012-10-01 08:47:04 +0000
@@ -587,7 +587,7 @@
project_id = self._resolve_project_id_from_context(cr, uid, context=context)
if project_id:
search_domain += ['|', ('project_ids', '=', project_id)]
- search_domain += ['|', ('id', 'in', ids), ('case_default', '=', True)]
+ search_domain += [('id', 'in', ids)]
stage_ids = stage_obj._search(cr, uid, search_domain, order=order, access_rights_uid=access_rights_uid, context=context)
result = stage_obj.name_get(cr, access_rights_uid, stage_ids, context=context)
# restore order of the search
@@ -722,7 +722,7 @@
'priority': fields.selection([('4','Very Low'), ('3','Low'), ('2','Medium'), ('1','Important'), ('0','Very important')], 'Priority', select=True),
'sequence': fields.integer('Sequence', select=True, help="Gives the sequence order when displaying a list of tasks."),
'stage_id': fields.many2one('project.task.type', 'Stage',
- domain="['&', ('fold', '=', False), '|', ('project_ids', '=', project_id), ('case_default', '=', True)]"),
+ domain="['&', ('fold', '=', False), ('project_ids', '=', project_id)]"),
'state': fields.related('stage_id', 'state', type="selection", store=True,
selection=_TASK_STATE, string="State", readonly=True,
help='The state is set to \'Draft\', when a case is created.\
@@ -1319,7 +1319,7 @@
'''
project_pool = self.pool.get('project.project')
project_id = project_pool.search(cr, uid, [('analytic_account_id','=', analytic_account_id)])
- if not project_id and self._trigger_project_creation(cr, uid, vals, context=context):
+ if not project_id and self._trigger_project_creation(cr, uid, vals, context=context) and vals.get('type') != 'template':
project_values = {
'name': vals.get('name'),
'analytic_account_id': analytic_account_id,
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp