You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
<?xml version="1.0" encoding="utf-8"?> <odoo> <!-- Tree view --> <record id="view_sendgrid_template_tree" model="ir.ui.view"> <field name="name">sendgrid.template.tree</field> <field name="model">sendgrid.template</field> <field name="arch" type="xml"> <tree string="Templates"> <field name="remote_id"/> <field name="name"/> </tree> </field> </record>
<!-- Form view --> <record id="view_sendgrid_template_form" model="ir.ui.view"> <field name="name">sendgrid.template.form</field> <field name="model">sendgrid.template</field> <field name="arch" type="xml"> <form string="Template"> <sheet> <group> <field name="name"/> <field name="remote_id"/> <field name="detected_keywords"/> </group> <notebook> <page string="Html"> <field name="html_content"/> </page> <page string="Plain text"> <field name="plain_content"/> </page> </notebook> </sheet> </form> </field> </record>
<!-- Action opening the tree view --> <record id="open_view_sendgrid_template_tree" model="ir.actions.act_window"> <field name="name">Template</field> <field name="res_model">sendgrid.template</field> <field name="view_type">form</field> <field name="view_mode">form,tree</field> <field name="view_id" ref="view_sendgrid_template_tree"/> </record>
<record model="ir.actions.server" id="update_sendgrid_templates"> <field name="name">Update Sendgrid Templates</field> <field name="model_id" ref="mail_sendgrid.model_sendgrid_template"/> <field name="code"> env['sendgrid.template'].update_templates() action = { 'name': 'Sendgrid templates', 'type': 'ir.actions.act_window', 'res_model': 'sendgrid.template', 'view_mode': 'tree,form' } </field> </record>
<!-- Add menu entry in Settings/Email --> <menuitem name="SendGrid Templates" id="menu_sendgrid_template" parent="base.menu_email" sequence="8" action="open_view_sendgrid_template_tree"/> <menuitem name="Update SendGrid" id="menu_update_sendgrid_template" parent="base.menu_email" sequence="9" action="update_sendgrid_templates"/> </odoo>
|