Hello,
I am just a newbie to this Odoo. I am creating a custom module in Odoo 11. So basically I have my code is like this
__init__.py
from . import models
__manifest__.py
{ 'name': 'Email Payslip', 'summary': """This module will send email with payslip""", 'version': '10.0.1.0.0', 'description': """This module will send email with payslip""", 'author': 'Test', 'company': 'Test', 'website': 'https://test.com', 'category': 'Tools', 'depends': ['base'], 'license': 'AGPL-3', 'data': [ 'views/view.xml', ], 'demo': [], 'installable': True, 'auto_install': False, } Models __init__.py
from . import model
Model model.py
from odoo import models, fields class EmailPayslip(models.Model): _name = 'email.payslip' description = 'Email Payslip'
Views view.xml
<?xml version="1.0" encoding="utf-8"?> <odoo> <data> <act_window id="email_payslip" src_model="hr.payslip" res_model="email.payslip" name="Email Payslip One"/> </data> </odoo>
This code is creating a new link in the hr.payslip module . But I just want to know how can I create an event like sending an email when doing click on that link?
Any suggestion or help will be really appreciable.
Thanks.
You can take a look on this link to catch the idea how it works:
https://www.odoo.yenthevg.com/sending-mail-templates-odoo/