From: Ludovic CHEVALIER Date: Mon, 6 Nov 2017 16:37:42 +0000 (+0100) Subject: [PYTHON] ~fix bikecoop partner form: studies fields didn't appear when a studie occup... X-Git-Url: http://git.cyclocoop.org/%22javascript:ModifierStyle%28%27%22.%24id.%22%27%29/%D0%9A%D0%B0%D1%82%D0%B5%D0%B3%D0%BE%D1%80%D0%B8%D1%98%D0%B0:%D0%9C%D0%B5%D0%B4%D0%B8%D0%B0W%D0%B8%D0%BA%D0%B8_%D0%A3%D1%81%D0%B5%D1%80%27%D1%81_%D0%93%D1%83%D0%B8%D0%B4%D0%B5?a=commitdiff_plain;h=999e53414fb68ff78d1de8b5e7c0d4fc7c97a910;p=burette%2Feturecup.git [PYTHON] ~fix bikecoop partner form: studies fields didn't appear when a studie occupation was selected in contact creation --- diff --git a/eturecup.py b/eturecup.py index 5f58510..0b934ed 100644 --- a/eturecup.py +++ b/eturecup.py @@ -43,13 +43,13 @@ class Partner(orm.Model): v = {} partners = self.browse(cr, uid, ids) occupations = self.pool.get('bikecoop.partner.theme') - for partner in partners: - occupation = occupations.browse(cr, uid, occupation_id) - if occupation.type == 'studies': + occupation = occupations.browse(cr, uid, occupation_id) + if occupation.type == 'studies': v['is_student'] = True - else: - v['is_student'] = False - v['is_scholarship'] = False + else: + v['is_student'] = False + v['is_scholarship'] = False + return {'value': v} _columns = {