[MIG] web_notify: Migration to 12.0

Add self-test buttons in demo environment,
Updated readme to show how to test it.
Add buttons to users form
Do not rely on SUPERUSER_ID and avoid getattr usage
This commit is contained in:
Aitor Bouzas
2018-10-10 10:37:35 +02:00
committed by David
parent d21c87f525
commit 9cd5f5b981
17 changed files with 641 additions and 75 deletions

View File

@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2018 Aitor Bouzas <aitor.bouzas@adaptivecity.com>
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<odoo>
<record id="view_users_form_simple_modif_inherit" model="ir.ui.view">
<field name="name">res.users.form.simple.view.modif.inherit</field>
<field name="model">res.users</field>
<field name="inherit_id" ref="base.view_users_form"/>
<field name="arch" type="xml">
<xpath expr="//notebook/page[1]" position="after">
<page string="Test web notify" name="test_web_notify">
<group>
<group>
<button name="notify_info"
type="object"
string="Test info notification"
class="oe_highlight"/>
</group>
<group>
<button name="notify_warning"
type="object"
string="Test warning notification"
class="oe_highlight"/>
</group>
</group>
</page>
</xpath>
</field>
</record>
</odoo>

View File

@@ -1,10 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<template id="assets_backend" name="web_notify assets" inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<script type="text/javascript" src="/web_notify/static/src/js/web_client.js"/>
</xpath>
</template>
</data>
<template id="assets_backend" name="web_notify assets" inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<script type="text/javascript" src="/web_notify/static/src/js/web_client.js"/>
</xpath>
</template>
</odoo>