Revision 1fa4112b
Added by Thomas Noël about 12 years ago
extra/modules/abelium_domino_workflow.py | ||
---|---|---|
112 | 112 |
if form.get_submit() == 'update_button%s' % self.id: |
113 | 113 |
family = self.update(form, formdata, user, evo) |
114 | 114 |
msg = _('Sucessfully updated the family %s') |
115 |
log_msg = _('Sucessfully updated the family %s of %s')
|
|
115 |
log_msg = _('Sucessfully updated the family %(code)s of %(user)s')
|
|
116 | 116 |
elif form.get_submit() == 'create_button%s' % self.id: |
117 | 117 |
family = self.create(form, formdata, user, evo) |
118 | 118 |
msg = _('Sucessfully created the family %s') |
119 |
log_msg = _('Sucessfully created the family %s of %s')
|
|
119 |
log_msg = _('Sucessfully created the family %(code)s of %(user)s')
|
|
120 | 120 |
else: |
121 | 121 |
raise NotImplemented |
122 | 122 |
code_interne = family.code_interne.encode('utf8') |
123 | 123 |
msg = msg % code_interne |
124 |
logger.info(_('Sucessfully created the family %s of %s'), |
|
125 |
code_interne, formdata.get_user()) |
|
124 |
logger.info(log_msg, {'code': code_interne, 'user': formdata.get_user()}) |
|
126 | 125 |
form_user = formdata.get_user() |
127 | 126 |
form_user.abelium_domino_code_famille = code_interne |
128 | 127 |
form_user.store() |
Also available in: Unified diff
abelium workflow: really use log_msg