Skip to Content
Menu
This question has been flagged
1 Reply
2000 Views

when I click a button which run a function A;

I want to show two piece of information which are in different formates by "warning"; how shall I do that?

Avatar
Discard
Best Answer

Hi,

   Please check this example

   

raise exceptions.ValidationError(_("Cannot create new attendance record for %(empl_name)s,
 the employee was already checked in on %(datetime)s") % {
'empl_name': attendance.employee_id.name,
'datetime': fields.Datetime.to_string(fields.Datetime.context_timestamp(self, fields.Datetime.from_string(attendance.check_in))),
})

                                                                   

Avatar
Discard
Author

thank you; it is exactly what I want to