Browse Source

Merge pull request #5 from ilyasProgrammer/9.0-res_partner_mais_count_fix_docs

9.0 fixes in res_partner_mails_count branch
pull/23/head
Ivan Yelizariev 9 years ago
parent
commit
500637b12d
  1. 2
      mail_archives/__openerp__.py
  2. 2
      mail_archives/tests/test_js.py
  3. 2
      res_partner_mails_count/__openerp__.py
  4. BIN
      res_partner_mails_count/static/description/1.png
  5. BIN
      res_partner_mails_count/static/description/2.png
  6. BIN
      res_partner_mails_count/static/description/3.png
  7. 33
      res_partner_mails_count/static/src/js/res_partner_mails_count_tour.js
  8. 9
      res_partner_mails_count/templates.xml
  9. 5
      res_partner_mails_count/tests/test_phantom.py

2
mail_archives/__openerp__.py

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
{ {
"name": "mail_archives",
"name": "Mail archives",
"summary": """Adds menu to find old messages""", "summary": """Adds menu to find old messages""",
"category": "Discuss", "category": "Discuss",
"images": [], "images": [],

2
mail_archives/tests/test_js.py

@ -12,4 +12,4 @@ class TestUi(openerp.tests.HttpCase):
}, 1000); }, 1000);
""" """
link = '/web#action=%s' % self.ref('mail.mail_channel_action_client_chat') link = '/web#action=%s' % self.ref('mail.mail_channel_action_client_chat')
self.phantom_js(link, code, "odoo.__DEBUG__.services['mail_archives.archives']", login="demo")
self.phantom_js(link, code, "odoo.__DEBUG__.services['mail_archives.archives']", login="admin")

2
res_partner_mails_count/__openerp__.py

@ -13,7 +13,7 @@
"currency": "EUR", "currency": "EUR",
"depends": [ "depends": [
'mail_archives'
'mail_archives',
'web_tour_extra' , 'web_tour_extra' ,
], ],
"external_dependencies": {"python": [], "bin": []}, "external_dependencies": {"python": [], "bin": []},

BIN
res_partner_mails_count/static/description/1.png

Before

Width: 1128  |  Height: 528  |  Size: 92 KiB

After

Width: 1128  |  Height: 528  |  Size: 66 KiB

BIN
res_partner_mails_count/static/description/2.png

Before

Width: 1128  |  Height: 528  |  Size: 91 KiB

After

Width: 1128  |  Height: 528  |  Size: 63 KiB

BIN
res_partner_mails_count/static/description/3.png

Before

Width: 1128  |  Height: 528  |  Size: 77 KiB

After

Width: 1128  |  Height: 528  |  Size: 46 KiB

33
res_partner_mails_count/static/src/js/res_partner_mails_count_tour.js

@ -1,14 +1,14 @@
(function () {
odoo.define('res_partner_mails_count.res_partner_mails_count_tour', function (require) {
'use strict'; 'use strict';
var Core = require('web.core');
var Tour = require('web.Tour');
var _t = Core._t;
var _t = openerp._t;
openerp.Tour.register({
Tour.register({
id: 'mails_count_tour', id: 'mails_count_tour',
name: _t("Mails count Tour"), name: _t("Mails count Tour"),
mode: 'test', mode: 'test',
path: '/web?res_partner_mails_count=tutorial#id=3&view_type=form&model=res.partner',
// mode: 'tutorial',
path: '/web?&res_partner_mails_count=tutorial#id=3&view_type=form&model=res.partner',
steps: [ steps: [
{ {
title: _t("Mails count tutorial"), title: _t("Mails count tutorial"),
@ -19,28 +19,17 @@
title: _t("New fields"), title: _t("New fields"),
content: _t("Here is new fields with mails counters. Press one of it."), content: _t("Here is new fields with mails counters. Press one of it."),
element: '.mails_to', element: '.mails_to',
waitFor: '.mails_to:visible',
}, },
{ {
waitNot: '.mails_to:visible',
title: _t("Send message from here"),
placement: 'left',
content: _t("Now you can see corresponding mails. You can send mail to this partner right from here. Press <em>'Send a mesage'</em>."),
element: '.oe_mail_wall .oe_msg.oe_msg_composer_compact>div>.oe_compose_post',
},
{
title: "New message",
placement: 'left',
content: _t("You can type message here."),
element: 'div.oe_msg_content>textarea.field_text',
},
{
wait: '7000',
title: "That's it",
wait: '2000',
waitFor: '.o_channel_name.mail_archives:visible',
title: _t("That's it"),
content: _t("Enjoy your day! <br/> <br/><a href='https://www.it-projects.info/apps' target='_blank'>IT-Projects LLC</a> team "), content: _t("Enjoy your day! <br/> <br/><a href='https://www.it-projects.info/apps' target='_blank'>IT-Projects LLC</a> team "),
popover: { next: _t("Close Tutorial") }, popover: { next: _t("Close Tutorial") },
}, },
] ]
}); });
}());
});

9
res_partner_mails_count/templates.xml

@ -1,6 +1,13 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<openerp> <openerp>
<data> <data>
<template id="res_partner_mails_count_assets_backend"
inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<script src="/res_partner_mails_count/static/src/js/res_partner_mails_count_tour.js"
type="text/javascript"></script>
</xpath>
</template>
<record id="view_res_partner_mails_count_info_form" model="ir.ui.view"> <record id="view_res_partner_mails_count_info_form" model="ir.ui.view">
<field name="name">res.partner.mails.count</field> <field name="name">res.partner.mails.count</field>
<field name="model">res.partner</field> <field name="model">res.partner</field>
@ -23,6 +30,8 @@
</div> </div>
</field> </field>
</record> </record>
</data>
<data noupdate="true">
<record id="res_partner_mails_count_tutorial" model="ir.actions.act_url"> <record id="res_partner_mails_count_tutorial" model="ir.actions.act_url">
<field name="name">res_partner_mails_count Tutorial</field> <field name="name">res_partner_mails_count Tutorial</field>
<field name="url" eval="'/web?debug=1&amp;res_partner_mails_count=tutorial#id='+str(ref('base.partner_root'))+'&amp;view_type=form&amp;model=res.partner&amp;/#tutorial_extra.mails_count_tour=true'"/> <field name="url" eval="'/web?debug=1&amp;res_partner_mails_count=tutorial#id='+str(ref('base.partner_root'))+'&amp;view_type=form&amp;model=res.partner&amp;/#tutorial_extra.mails_count_tour=true'"/>

5
res_partner_mails_count/tests/test_phantom.py

@ -4,7 +4,8 @@ import openerp.tests
@openerp.tests.common.post_install(True) @openerp.tests.common.post_install(True)
class TestUi(openerp.tests.HttpCase): class TestUi(openerp.tests.HttpCase):
def test_01_res_partner_mails_to_count(self): def test_01_res_partner_mails_to_count(self):
self.phantom_js('/', "openerp.Tour.run('mails_count_tour', 'test')", "openerp.Tour.tours.mails_count_tour", login="admin")
# self.phantom_js('/', "openerp.Tour.run('mails_count_tour', 'test')", "openerp.Tour.tours.mails_count_tour", login="admin")
self.phantom_js("/", "odoo.__DEBUG__.services['web.Tour'].run('mails_count_tour', 'test')","odoo.__DEBUG__.services['web.Tour'].tours.mails_count_tour", login="admin")
def test_02_res_partner_mails_from_count(self): def test_02_res_partner_mails_from_count(self):
# wait till page loaded and then click and wait again # wait till page loaded and then click and wait again
@ -15,4 +16,4 @@ class TestUi(openerp.tests.HttpCase):
}, 3000); }, 3000);
""" """
link = '/web#id=3&view_type=form&model=res.partner' link = '/web#id=3&view_type=form&model=res.partner'
self.phantom_js(link, code, "openerp.Tour.tours.mails_count_tour", login="admin")
self.phantom_js(link, code, "odoo.__DEBUG__.services['web.Tour'].tours.mails_count_tour", login="admin")
Loading…
Cancel
Save