添加功能
This commit is contained in:
@@ -1392,3 +1392,17 @@ class KsDashboardNinjaBoard(models.Model):
|
||||
rec.ks_domain_field_id.name]['selection']
|
||||
}
|
||||
return data
|
||||
|
||||
|
||||
def action_ks_dashboard(self):
|
||||
ks_ids = self.env["ks_dashboard_ninja.board"].browse(
|
||||
self._context.get('active_ids', self._context.get('active_id')))
|
||||
for rec in ks_ids:
|
||||
action_id = self.env['ir.actions.actions'].search([('name', '=', rec.name)])
|
||||
for group in rec.ks_dashboard_group_access:
|
||||
for user in group.users:
|
||||
res = self.env['res.users'].search([('id', '=', user.id)])
|
||||
res.write({
|
||||
'action_id':action_id.id})
|
||||
|
||||
|
||||
|
||||
@@ -92,6 +92,9 @@
|
||||
<field name="model">ks_dashboard_ninja.board</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree import="0" string="My Dashboard">
|
||||
<header>
|
||||
<button name="action_ks_dashboard" string="更新员工页面首页" type="object" class="btn btn-primary"/>
|
||||
</header>
|
||||
<field name="ks_dashboard_state" column_invisible="True"/>
|
||||
<!-- invisible="1" nolabel="1"/>-->
|
||||
<field name="id" column_invisible="True"/>
|
||||
|
||||
Reference in New Issue
Block a user