大家好,我想从中删除操作按钮odoo-10
,该按钮显示在打印旁边的页面顶部。在odoo-7
它odoo-10
被称为更多。
我尝试了下面的代码,但没有奏效。此代码从所有页面中隐藏操作按钮。
def fields_view_get(self, cr, user, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
ir_ids = self.pool.get("ir.values").search(cr, user, [('name', '=', 'more_action_id')])
if context:
if context.get('pass_any_value_in_context_of action') is True:
if ir_ids:
cr.execute("update ir_values set key2 ='client_action_multi' where id in % s", (tuple(ir_ids),))
if ir_ids:
cr.execute("update ir_values set key2 = where id in % s", (tuple(ir_ids),))
return super(product_supplierinfo, self).fields_view_get(cr, user, view_id, view_type, context, toolbar, submenu)