Merge lp:~ajite/openobject-addons/elico-7.0-fix-0001 into lp:~openerp-community/openobject-addons/elico-7.0

Status: Merged
Merged at revision: 34
Proposed branch: lp:~ajite/openobject-addons/elico-7.0-fix-0001
Merge into: lp:~openerp-community/openobject-addons/elico-7.0
Diff against target: 127 lines (+38/-6)
5 files modified
mail_organizer/__openerp__.py (+4/-0)
mail_organizer/model_view.xml (+2/-2)
mail_organizer/static/description/index.html (+20/-0)
mail_organizer/wizard/wizard_mail_organizer.py (+6/-3)
mail_organizer/wizard/wizard_mail_organizer_view.xml (+6/-1)
To merge this branch: bzr merge lp:~ajite/openobject-addons/elico-7.0-fix-0001
Reviewer Review Type Date Requested Status
LIN Yu Pending
Review via email: mp+209649@code.launchpad.net

Description of the change

Fixed domain problem in the mail organizer wizard.
Added the html page for OpenERP APPS

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'mail_organizer/__openerp__.py'
2--- mail_organizer/__openerp__.py 2014-02-23 07:09:25 +0000
3+++ mail_organizer/__openerp__.py 2014-03-06 11:20:42 +0000
4@@ -32,6 +32,10 @@
5
6 You can configure the available model through
7 "Settings" -> "Technical" -> "Email Organizer"
8+
9+Screencasts available at:
10+ https://www.youtube.com/watch?v=XYgswq6_J1I
11+ http://v.youku.com/v_show/id_XNjc3Njc0Nzky.html
12 """,
13 'images': [],
14 'demo': [],
15
16=== modified file 'mail_organizer/model_view.xml'
17--- mail_organizer/model_view.xml 2014-02-23 07:09:25 +0000
18+++ mail_organizer/model_view.xml 2014-03-06 11:20:42 +0000
19@@ -26,7 +26,7 @@
20
21
22 <record model="ir.actions.act_window" id="action_mail_organizer">
23- <field name="name">Email organizer</field>
24+ <field name="name">Mail organizer</field>
25 <field name="view_id" ref="view_model_tree_editable"/>
26 <field name="res_model">ir.model</field>
27 <field name="view_type">form</field>
28@@ -34,7 +34,7 @@
29 </record>
30
31 <menuitem id="menu_email_organizer"
32- name="Email Organizer"
33+ name="Mail Organizer"
34 action="action_mail_organizer"
35 parent="base.menu_email" />
36 </data>
37
38=== added directory 'mail_organizer/static/description'
39=== added file 'mail_organizer/static/description/example.png'
40Binary files mail_organizer/static/description/example.png 1970-01-01 00:00:00 +0000 and mail_organizer/static/description/example.png 2014-03-06 11:20:42 +0000 differ
41=== added file 'mail_organizer/static/description/index.html'
42--- mail_organizer/static/description/index.html 1970-01-01 00:00:00 +0000
43+++ mail_organizer/static/description/index.html 2014-03-06 11:20:42 +0000
44@@ -0,0 +1,20 @@
45+<section class="oe_container">
46+ <div class="oe_row">
47+ <h2 class="oe_slogan">Mail Organizer</h2>
48+ <h4 class="oe_slogan"><a href="http://www.elico-corp.com">By Elico Corp</a></h4>
49+ <p>
50+ This module allows you to assign a message to an existing or a new resource dynamically.
51+ </p>
52+ <p>
53+ You can configure the available model through "Settings" -> "Technical" -> "Email Organizer"
54+ </p>
55+ <p>Screencast available at:</p>
56+ <ul>
57+ <li><a href="https://www.youtube.com/watch?v=XYgswq6_J1I">YouTube</a></li>
58+ <li><a href="http://v.youku.com/v_show/id_XNjc3Njc0Nzky.html">Youku</a></li>
59+ </ul>
60+ <div class="oe_row_img oe_centered oe_mt32">
61+ <img class="oe_picture oe_screenshot" src="example.png" />
62+ </div>
63+ </div>
64+</section>
65\ No newline at end of file
66
67=== modified file 'mail_organizer/wizard/wizard_mail_organizer.py'
68--- mail_organizer/wizard/wizard_mail_organizer.py 2014-02-23 07:09:25 +0000
69+++ mail_organizer/wizard/wizard_mail_organizer.py 2014-03-06 11:20:42 +0000
70@@ -43,8 +43,9 @@
71 'model': fields.selection(
72 _select_models, string="Model", readonly=True),
73 'new_res_id': fields.integer("New resource"),
74- 'new_model': fields.selection(_select_models, string="New model"),
75+ 'new_model': fields.selection(_select_models, string='New model'),
76 'subject': fields.char('Subject', readonly=True),
77+ 'email_from': fields.char('Email'),
78 'author_id': fields.many2one(
79 'res.partner', string='Author', readonly=True),
80 'has_domain': fields.boolean('Filter by partner'),
81@@ -63,11 +64,12 @@
82 res = {}
83 vals = {'new_res_id': None}
84 domain = {'new_res_id': []}
85- if new_model and has_domain:
86+ if new_model:
87 obj_pool = self.pool.get(new_model)
88 vals.update({'is_domain_visible': False})
89 if 'partner_id' in obj_pool._columns:
90- domain = {'new_res_id': [('partner_id', '=', author_id)]}
91+ if has_domain:
92+ domain = {'new_res_id': [('partner_id', '=', author_id)]}
93 vals.update({'is_domain_visible': True})
94 res.update({'value': vals, 'domain': domain})
95 return res
96@@ -89,6 +91,7 @@
97 vals.update({
98 'model': message.model,
99 'res': resource,
100+ 'email_from': message.email_from,
101 'author_id': (message.author_id and message.author_id.id
102 or None),
103 'subject': message.subject
104
105=== modified file 'mail_organizer/wizard/wizard_mail_organizer_view.xml'
106--- mail_organizer/wizard/wizard_mail_organizer_view.xml 2014-02-23 07:09:25 +0000
107+++ mail_organizer/wizard/wizard_mail_organizer_view.xml 2014-03-06 11:20:42 +0000
108@@ -12,13 +12,18 @@
109 </header>
110 <field name="message_id" invisible="True" on_change="onchange_message_id(message_id)" />
111 <field name="is_domain_visible" invisible="True" />
112+ <field name="email_from" invisible="True" />
113 <group col="4" colspan="2">
114 <field name="author_id" />
115 <field name="subject" />
116 <field name="model" />
117 <field name="res" />
118 <field name="new_model" colspan="2" on_change="onchange_new_model(new_model, has_domain, author_id)" />
119- <field name="new_res_id" colspan="2" widget="polymorphic" polymorphic="new_model"/>
120+ <field name="new_res_id"
121+ colspan="2"
122+ widget="polymorphic"
123+ polymorphic="new_model"
124+ />
125 <field name="has_domain"
126 on_change="onchange_new_model(new_model, has_domain, author_id)"
127 attrs="{'invisible':[('is_domain_visible', '=', False)]}" />