跳至内容
菜单
此问题已终结
572 查看

Hi all,


i want to add an item to the more menu in the employee overview (list view) and copy the email addresses of the selected employees to the clipboard.

But i never added an item to the more menu, i never created an action and i don´t know if i need a server or client action.

I think a client action is sufficient enought because the data i want are available in the browser.

Is this right?


First i create my model hr_employee_base: Do i need a model without an server action?

from odoo import models, fields, api, _


class HrEmployeeBase(models.Model):

    _name = "heinzmann.hr.employee.base"

    _inherit = "hr.employee.base"


And second i create an xml file named heinzmann_hr_action_items.xml


<?xml version="1.0" encoding="utf-8"?>

<odoo>

    <record model="ir.actions.act_window" id="test_action">

        <field name="name">A Test Action</field>

        <field name="res_model">hr.employee.base</field>

        <field name="view_mode">list</field>

        <field name="view_id" ref="hr.view_employee_tree"/>

    </record>

</odoo>



I updated my module without errors but i can´t see the item in the more menu.

Do i need permissions for this menu entry?

And now i don´t know what to do!? I only know i need the part of javascript too.


Can anyone help me?

形象
丢弃
相关帖文 回复 查看 活动
0
5月 15
3430
0
3月 15
3751
1
3月 15
4625
2
9月 21
7203
1
6月 17
4050