In Odoo 11 I want two different action menu with two different functionality.
In the hr payroll I wanted to add email payslip link thats why I used this code to add the email payslip action menu
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="action_email_payslip" model="ir.actions.server">
<field name="name">Email Payslip</field>
<field name="model_id" ref="hr_payroll.model_hr_payslip"/>
<field name="binding_model_id" ref="hr_payroll.model_hr_payslip"/>
<field name="state">code</field>
<field name="code">
action = records.action_email_payslip_send()
</field>
</record>
</data>
</odoo>
But this one is adding the action menu in the employees row as well. In the employee rows I want a different action menu. So can some one tell me how to achieve that?
Ok, last change and I give up. I hope this is exactly what you want. Using the code of the answer I gave you in How to send an email from a button located in the action dropdown of an Odoo 11 form?, just replace the Python method by this one:
This will open you the email compose message pop-up you like even when you are selecting several payslips (in this case the preview will not replace the Mako variables).
I know it is difficult at the beginning, but as @EasyOdoo commented, you have to get ideas from the answers and investigate about it, that way you will be able to make smaller and more accurate questions and get good responses easily.