Files
gzth/sh_backmate_theme_adv_enterprise/views/notifications_view.xml
T
2024-12-15 22:36:47 +08:00

83 lines
2.8 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="sh_web_notitification_settings_form" model="ir.ui.view">
<field name="name">sh.announcement.form</field>
<field name="model">sh.announcement</field>
<field name="arch" type="xml">
<form>
<header>
<button name="notify_user" string="Notify User" type="object" class="btn-primary" invisible="is_popup_notification == False"/>
</header>
<sheet>
<widget name="web_ribbon" title="Archived" bg_color="bg-danger" invisible="active == True"/>
<label for="name"/>
<h1><field name="name" required="1"/></h1>
<group>
<group>
<field name="date"/><field name="active" invisible="1"/>
<field name="is_popup_notification"/>
</group>
<group>
<field name="user_ids" widget="many2many_tags"/>
<field name="simple_text" invisible="is_popup_notification == True"/>
</group>
</group>
<group invisible="is_popup_notification == True">
<group string="Animation">
<field name="is_animation"></field>
<field name="direction" widget="radio" invisible="is_animation == False"></field>
</group>
<group string="Design" invisible="simple_text == False">
<field name="font_color" widget="color" />
<field name="background_color" widget="color" />
<field name="font_family" widget="selection" />
<field name="font_size" />
<field name="padding" />
</group>
</group>
<group string="Description">
<field name="description" invisible="simple_text == True"></field>
<field name="description_text" invisible="simple_text == False"/>
</group>
</sheet>
</form>
</field>
</record>
<record id="sh_web_notitification_settings_tree" model="ir.ui.view">
<field name="name">sh.announcement.tree</field>
<field name="model">sh.announcement</field>
<field name="arch" type="xml">
<tree>
<field name="name"/>
<field name="date"/>
<field name="is_popup_notification"/>
<field name="simple_text"/>
<field name="is_animation"/>
<field name="active" widget="boolean_toggle"/>
</tree>
</field>
</record>
<!-- ACTION -->
<record id='sh_web_notitification_settings_action' model='ir.actions.act_window'>
<field name="name">Notification</field>
<field name="res_model">sh.announcement</field>
<field name="view_mode">tree,form</field>
<field name="type">ir.actions.act_window</field>
</record>
<!-- MENU ITEM -->
<menuitem id="sh_web_notitification_settings_menuitem"
action="sh_web_notitification_settings_action"
parent="base.menu_administration"
groups="sh_backmate_theme_adv_enterprise.group_web_notification"
sequence="10" />
</odoo>