Tmp action button add for res_log testing purpose

bzr revid: tde@openerp.com-20120207101657-phoxiwpa5q4g35sk
This commit is contained in:
Thibault Delavallée 2012-02-07 11:16:57 +01:00
parent 844f95fae3
commit b6739df297
2 changed files with 10 additions and 4 deletions

View File

@ -49,11 +49,14 @@ class mail_group(osv.osv):
return True
def action_follow(self, cr, uid, ids, context={}):
return self.message_subscribe(cr, uid, ids, context=context)
def action_test(self, cr, uid, ids, context={}):
for o in self.browse(cr, uid, ids):
message = _('You are doing things with the group %s, wooooh !') % (o.name,)
self.log(cr, uid, o.id, message)
return True
def action_unfollow(self, cr, uid, ids, context={}):
return self.message_unsubscribe(cr, uid, ids, context=context)
def action_null(self, cr, uid, ids, context={}):
return True
_columns = {
#'group_id': fields.many2one('res.groups', required=True, ondelete='cascade',

View File

@ -103,6 +103,9 @@
<label string="This group is visible by non members" colspan="2"/>
</group>
<separator string="OpenChatter" colspan="4"/>
<button name="action_test" string="Test" type="object" icon="gtk-go-forward" />
<button name="action_null" string="Test2" type="object" icon="gtk-go-forward" />
<separator string="OpenChatter" colspan="4"/>
<!-- <field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/> -->
</form>
</field>