[REM] Removed patches.

bzr revid: tde@openerp.com-20130625105452-u7uqmvo73pqjzsp6
This commit is contained in:
Thibault Delavallée 2013-06-25 12:54:52 +02:00
parent 41c5283116
commit 734d900207
8 changed files with 0 additions and 237 deletions

View File

@ -1,20 +0,0 @@
bzr patch idea/doc/patch1_mailthread.txt
bzr ci -m "[IMP] Patch1: added mail_thread inheritance + widgets"
bzr patch idea/doc/patch2_needaction.txt
bzr ci -m "[IMP] Patch2: added ir_needactionmixin inheritance + unread filter"
bzr patch idea/doc/patch3_treebold.txt
bzr ci -m "[IMP] Patch3: use message_unread in tree view to put ideas in bold"
bzr patch idea/doc/patch4_chatterkanban.txt
bzr ci -m "[IMP] Patch4: add chatter data in kanban view"
bzr patch idea/doc/patch5_trackvisibility.txt
bzr ci -m "[IMP] Patch5: track user_id and state to automatically generate logs."
bzr patch idea/doc/patch6_subtypes.txt
bzr ci -m "[IMP] Patch6: add a subtype on messages about state changed and idea approved, using automatic tracking."
bzr patch idea/doc/patch7_messagepost.txt
bzr ci -m "[IMP] Patch7: add a message_post with a subtype"

View File

@ -1,29 +0,0 @@
=== modified file 'idea/models/idea.py'
--- idea/models/idea.py 2013-06-18 10:16:21 +0000
+++ idea/models/idea.py 2013-06-18 10:16:39 +0000
@@ -47,6 +47,7 @@
""" Model of an Idea """
_name = 'idea.idea'
_description = 'Propose and Share your Ideas'
+ _inherit = ['mail.thread']
_rec_name = 'name'
_order = 'name asc'
=== modified file 'idea/views/idea.xml'
--- idea/views/idea.xml 2013-06-18 10:16:21 +0000
+++ idea/views/idea.xml 2013-06-18 10:16:47 +0000
@@ -56,6 +56,12 @@
<field name="description"/>
</group>
</sheet>
+ <div class="oe_chatter">
+ <field name="message_follower_ids" widget="mail_followers"
+ groups="base.group_user"/>
+ <field name="message_ids" widget="mail_thread" options='{"thread_level": 1}'
+ placeholder="Share your thoughts about the idea"/>
+ </div>
</form>
</field>
</record>

View File

@ -1,27 +0,0 @@
=== modified file 'idea/models/idea.py'
--- idea/models/idea.py 2013-06-18 10:34:31 +0000
+++ idea/models/idea.py 2013-06-18 10:36:26 +0000
@@ -47,7 +47,7 @@
""" Model of an Idea """
_name = 'idea.idea'
_description = 'Propose and Share your Ideas'
- _inherit = ['mail.thread']
+ _inherit = ['mail.thread', 'ir.needaction_mixin']
_rec_name = 'name'
_order = 'name asc'
=== modified file 'idea/views/idea.xml'
--- idea/views/idea.xml 2013-06-18 10:34:31 +0000
+++ idea/views/idea.xml 2013-06-18 10:36:08 +0000
@@ -92,6 +92,9 @@
help="Open Ideas"/>
<filter string="Accepted" domain="[('state','=', 'close')]"
help="Accepted Ideas" />
+ <filter string="Unread Messages" name="message_unread"
+ domain="[('message_unread','=',True)]"
+ help="Unread messages"/>
<group expand="0" string="Group By...">
<filter string="Creator" help="By Responsible" context="{'group_by': 'user_id'}"/>
<filter string="Category" help="By Category" context="{'group_by': 'category_ids'}"/>

View File

@ -1,20 +0,0 @@
=== modified file 'idea/views/idea.xml'
--- idea/views/idea.xml 2013-06-18 13:17:10 +0000
+++ idea/views/idea.xml 2013-06-18 13:17:57 +0000
@@ -75,11 +75,14 @@
<field name="name">idea.idea.tree</field>
<field name="model">idea.idea</field>
<field name="arch" type="xml">
- <tree colors="blue:state == 'draft';black:state in ('open', 'close'); gray:state == 'cancel'" string="Ideas">
+ <tree string="Ideas"
+ colors="blue:state == 'draft';black:state in ('open', 'close'); gray:state == 'cancel';"
+ fonts="bold:message_unread==True">
<field name="name"/>
<field name="user_id"/>
<field name="priority"/>
<field name="state"/>
+ <field name="message_unread" invisible="True"/>
</tree>
</field>
</record>

View File

@ -1,27 +0,0 @@
=== modified file 'idea/views/idea.xml'
--- idea/views/idea.xml 2013-06-18 10:58:33 +0000
+++ idea/views/idea.xml 2013-06-18 11:03:38 +0000
@@ -8,6 +8,9 @@
<field name="arch" type="xml">
<kanban version="7.0" default_group_by="state" class="oe_background_grey">
<field name="user_id"/>
+ <field name="message_follower_ids"/>
+ <field name="message_ids"/>
+ <field name="message_summary"/>
<templates>
<t t-name="kanban-box">
<div t-attf-class="oe_kanban_card oe_kanban_idea_idea oe_kanban_global_click">
@@ -27,6 +30,12 @@
<div class="oe_kanban_bottom_right">
<img t-att-src="kanban_image('res.users', 'image_small', record.user_id.raw_value)" t-att-title="record.user_id.value" width="24" height="24" class="oe_kanban_avatar" t-if="record.user_id.value"/>
</div>
+
+ <div class="oe_kanban_footer_left">
+ <t t-raw="record.message_summary.raw_value"/>
+ <span title='Messages'><span class='oe_e'>9</span><t t-esc="record.message_ids.raw_value.length"/></span>
+ <span title='Followers'><span class='oe_e'>+</span><t t-esc="record.message_follower_ids.raw_value.length"/></span>
+ </div>
</div>
<div class="oe_clear"></div>
</div>

View File

@ -1,28 +0,0 @@
=== modified file 'idea/models/idea.py'
--- idea/models/idea.py 2013-06-18 13:29:15 +0000
+++ idea/models/idea.py 2013-06-18 13:29:38 +0000
@@ -63,7 +63,8 @@
return res
_columns = {
- 'user_id': fields.many2one('res.users', 'Responsible', required=True),
+ 'user_id': fields.many2one('res.users', 'Responsible', required=True,
+ track_visibility='onchange'),
'name': fields.char('Summary', required=True, readonly=True,
states={'draft': [('readonly', False)]},
oldname='title'),
@@ -71,9 +72,11 @@
states={'draft': [('readonly', False)]},
help='Content of the idea'),
'category_ids': fields.many2many('idea.category', string='Tags'),
- 'state': fields.selection(_get_state_list, string='Status', required=True),
+ 'state': fields.selection(_get_state_list, string='Status', required=True,
+ track_visibility='onchange'),
'priority': fields.selection([('low', 'Low'), ('normal', 'Normal'), ('high', 'High')],
- string='Priority', required=True),
+ string='Priority', required=True,
+ track_visibility='always'),
'color': fields.function(_get_color, type='integer', string='Color Index'),
}

View File

@ -1,55 +0,0 @@
=== modified file 'idea/__openerp__.py'
--- idea/__openerp__.py 2013-06-18 10:16:21 +0000
+++ idea/__openerp__.py 2013-06-18 13:23:42 +0000
@@ -41,6 +41,7 @@
'security/ir.model.access.csv',
'views/idea.xml',
'views/category.xml',
+ 'data/idea.xml',
'data/idea_workflow.xml',
],
'demo': [
=== modified file 'idea/data/idea.xml'
--- idea/data/idea.xml 2013-06-18 13:23:19 +0000
+++ idea/data/idea.xml 2013-06-18 13:23:56 +0000
@@ -2,5 +2,19 @@
<openerp>
<data>
+ <!-- CRM-related subtypes for messaging / Chatter -->
+ <record id="mt_state_change" model="mail.message.subtype">
+ <field name="name">State Changed</field>
+ <field name="res_model">idea.idea</field>
+ <field name="default" eval="False"/>
+ <field name="description">State changed</field>
+ </record>
+ <record id="mt_state_approved" model="mail.message.subtype">
+ <field name="name">Idea Approved</field>
+ <field name="res_model">idea.idea</field>
+ <field name="default" eval="True"/>
+ <field name="description">Idea approved</field>
+ </record>
+
</data>
</openerp>
\ No newline at end of file
=== modified file 'idea/models/idea.py'
--- idea/models/idea.py 2013-06-18 13:23:37 +0000
+++ idea/models/idea.py 2013-06-18 13:23:42 +0000
@@ -47,6 +47,13 @@
_rec_name = 'name'
_order = 'name asc'
+ _track = {
+ 'state': {
+ 'idea.mt_state_approved': lambda self, cr, uid, obj, ctx=None: obj['state'] == 'close',
+ 'idea.mt_state_change': lambda self, cr, uid, obj, ctx=None: obj['state'] != 'close',
+ },
+ }
+
def _get_state_list(self, cr, uid, context=None):
return [('draft', 'New'),
('open', 'In discussion'),

View File

@ -1,31 +0,0 @@
=== modified file 'idea/data/idea.xml'
--- idea/data/idea.xml 2013-06-18 13:25:00 +0000
+++ idea/data/idea.xml 2013-06-18 13:27:58 +0000
@@ -15,6 +15,11 @@
<field name="default" eval="True"/>
<field name="description">Idea approved</field>
</record>
+ <record id="mt_priority_high" model="mail.message.subtype">
+ <field name="name">Priority High</field>
+ <field name="res_model">idea.idea</field>
+ <field name="description">Priority set to high</field>
+ </record>
</data>
</openerp>
\ No newline at end of file
=== modified file 'idea/models/idea.py'
--- idea/models/idea.py 2013-06-18 13:25:00 +0000
+++ idea/models/idea.py 2013-06-18 13:26:50 +0000
@@ -136,4 +136,9 @@
return self.write(cr, uid, ids, {'priority': 'normal'}, context=context)
def idea_set_high_priority(self, cr, uid, ids, context={}):
+ for idea in self.browse(cr, uid, ids, context=context):
+ self.message_post(cr, uid, ids, body='Your idea has been set as high priority. Congratulations!',
+ subtype='idea.mt_priority_high',
+ partner_ids=[idea.user_id.partner_id.id],
+ context=context)
return self.write(cr, uid, ids, {'priority': 'high'}, context=context)