This commit is contained in:
alfredoavanzosc
2014-10-09 16:56:42 +02:00
committed by Pedro M. Baeza
parent 0d6ce67541
commit 697cba0946
9 changed files with 1268 additions and 2597 deletions

View File

@@ -40,10 +40,10 @@ class QcTestWizard(orm.TransientModel):
_name = 'qc.test.set.template.wizard'
def _default_test_template_id(self, cr, uid, context=None):
id = context.get('active_id', False)
test = self.pool['qc.test'].browse(cr, uid, id, context=context)
ids = self.pool['qc.test.template'].search(cr, uid, [('object_id', '=',
test.object_id)],
test = self.pool['qc.test'].browse(
cr, uid, context.get('active_id', False), context=context)
cond = [('object_id', '=', test.object_id.id)]
ids = self.pool['qc.test.template'].search(cr, uid, cond,
context=context)
return ids and ids[0] or False