[MERGE] [DEMO] mail, crm: improved demo data.

Misc :
- added message subtypes to CRM
- archives and sent mailboxes unified
- mail.group description displayed in discussion view
- fixe some issues in Chatter
- fixed some action rules now having user_id = False; otherwise they could not be used to anybody else than admin, leading to a crash

bzr revid: tde@openerp.com-20121120112022-hzdt2x29wvlhs0nz
This commit is contained in:
Thibault Delavallée 2012-11-20 12:20:22 +01:00
commit cf04a17078
20 changed files with 761 additions and 210 deletions

View File

@ -16,7 +16,7 @@
<group col="4">
<field name="name"/>
<field name="model_id"/>
<field name="filter_id" domain="[('model_id','=',model)]" context="{'default_model_id': model}"/>
<field name="filter_id" domain="[('model_id','=',model), ('user_id', '=', False)]" context="{'default_model_id': model}"/>
<field name="sequence"/>
<field name="active"/>
<field name="model" invisible="1"/>

View File

@ -99,7 +99,6 @@ Dashboard for CRM will include:
'board_crm_view.xml',
'res_config_view.xml',
],
'demo': [
'crm_demo.xml',

View File

@ -46,6 +46,7 @@ Thanks,
<field name="name">Filter on leads which are draft.</field>
<field name="model_id">crm.lead</field>
<field name="domain">[('state','=','draft')]</field>
<field name="user_id" eval="False"/>
</record>
<!-- automated actions -->
@ -64,6 +65,7 @@ Thanks,
<field name="name">Filter on leads which come from USA.</field>
<field name="model_id">crm.lead</field>
<field name="domain">[('country_id','=','United States')]</field>
<field name="user_id" eval="False"/>
</record>
<record id="rule_set_followers_lead" model="base.action.rule">

View File

@ -846,7 +846,7 @@ class crm_lead(base_stage, format_address, osv.osv):
def stage_set_send_note(self, cr, uid, ids, stage_id, context=None):
""" Override of the (void) default notification method. """
stage_name = self.pool.get('crm.case.stage').name_get(cr, uid, [stage_id], context=context)[0][1]
return self.message_post(cr, uid, ids, body= _("Stage changed to <b>%s</b>.") % (stage_name), context=context)
return self.message_post(cr, uid, ids, body=_("Stage changed to <b>%s</b>.") % (stage_name), subtype="mt_crm_stage", context=context)
def case_get_note_msg_prefix(self, cr, uid, lead, context=None):
if isinstance(lead, (int, long)):
@ -855,17 +855,17 @@ class crm_lead(base_stage, format_address, osv.osv):
def create_send_note(self, cr, uid, ids, context=None):
for id in ids:
message = _("%s has been <b>created</b>.")% (self.case_get_note_msg_prefix(cr, uid, id, context=context))
message = _("%s has been <b>created</b>.") % (self.case_get_note_msg_prefix(cr, uid, id, context=context))
self.message_post(cr, uid, [id], body=message, context=context)
return True
def case_mark_lost_send_note(self, cr, uid, ids, context=None):
message = _("Opportunity has been <b>lost</b>.")
return self.message_post(cr, uid, ids, body=message, context=context)
return self.message_post(cr, uid, ids, body=message, subtype="mt_crm_lost", context=context)
def case_mark_won_send_note(self, cr, uid, ids, context=None):
message = _("Opportunity has been <b>won</b>.")
return self.message_post(cr, uid, ids, body=message, context=context)
return self.message_post(cr, uid, ids, body=message, subtype="mt_crm_won", context=context)
def schedule_phonecall_send_note(self, cr, uid, ids, phonecall_id, action, context=None):
phonecall = self.pool.get('crm.phonecall').browse(cr, uid, [phonecall_id], context=context)[0]

View File

@ -154,5 +154,21 @@
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
</record>
<!-- mail subtype -->
<record id="mail.mt_crm_won" model="mail.message.subtype">
<field name="name">Won</field>
<field name="res_model">crm.lead</field>
</record>
<record id="mail.mt_crm_lost" model="mail.message.subtype">
<field name="name">Lost</field>
<field name="res_model">crm.lead</field>
<field name="default" eval="False"/>
</record>
<record id="mail.mt_crm_stage" model="mail.message.subtype">
<field name="name">Stage Changed</field>
<field name="res_model">crm.lead</field>
<field name="default" eval="False"/>
</record>
</data>
</openerp>

View File

@ -324,12 +324,14 @@ Andrew</field>
<record id="crm_case_15" model="crm.lead">
<field name="type">opportunity</field>
<field name="name">Plan to buy a Laptop</field>
<field eval="2570" name="planned_revenue"/>
<field name="name">Plan to buy RedHat servers</field>
<field eval="35000" name="planned_revenue"/>
<field eval="30.0" name="probability"/>
<field name="street">12 rue Albert Einstein</field>
<field name="country_id" ref="base.tr"/>
<field name="city">Istanbul</field>
<field name="street">69 rue de Chimay</field>
<field name="country_id" ref="base.be"/>
<field name="city">Wavre</field>
<field name="email_from">virginie@agrolait.com</field>
<field name="partner_id" ref="base.res_partner_2"/>
<field name="type_id" ref="type_lead8"/>
<field name="categ_ids" eval="[(6, 0, [categ_oppor1])]"/>
<field name="priority">1</field>
@ -337,7 +339,7 @@ Andrew</field>
<field eval="time.strftime('%Y-%m-10')" name="date_action"/>
<field name="title_action">Call to ask system requirement</field>
<field name="section_id" ref="crm_case_section_3"/>
<field name="user_id" ref="base.user_root"/>
<field name="user_id" ref="base.user_demo"/>
<field name="stage_id" ref="crm.stage_lead4"/>
<field eval="1" name="active"/>
</record>
@ -372,6 +374,8 @@ Andrew</field>
<field eval="100" name="planned_revenue"/>
<field eval="35.0" name="probability"/>
<field name="contact_name">Oliver Passot</field>
<field name="email_from">olivier.passo@balmer.inc.sa</field>
<field name="phone">+32 469 12 45 78</field>
<field name="partner_name">BalmerInc S.A.</field>
<field name="street">Rue des Palais 51, bte 33</field>
<field name="country_id" ref="base.be"/>
@ -391,14 +395,16 @@ Andrew</field>
<record id="crm_case_18" model="crm.lead">
<field name="type">opportunity</field>
<field name="name">Student's training plan in your Organization</field>
<field name="name">Trainee's training plan in your Organization</field>
<field eval="35000" name="planned_revenue"/>
<field eval="25.0" name="probability"/>
<field name="contact_name">Leland Martinez</field>
<field name="partner_name">Toronto University</field>
<field name="street">2488 Queens Bay</field>
<field name="country_id" ref="base.ca"/>
<field name="city">Toronto</field>
<field name="email_from">info@deltapc.com</field>
<field name="partner_name">Delta PC</field>
<field name="city">Fremont</field>
<field name="street">3661 Station Street</field>
<field name="country_id" ref="base.us"/>
<field name="partner_id" ref="base.res_partner_4"/>
<field name="type_id" ref="type_lead8"/>
<field name="categ_ids" eval="[(6, 0, [categ_oppor4,categ_oppor6])]"/>
<field name="priority">4</field>
@ -406,7 +412,7 @@ Andrew</field>
<field eval="time.strftime('%Y-%m-4')" name="date_action"/>
<field name="title_action">Call to define real needs about training</field>
<field name="section_id" ref="crm_case_section_2"/>
<field name="user_id" ref="base.user_root"/>
<field name="user_id" ref="base.user_demo"/>
<field name="stage_id" ref="crm.stage_lead3"/>
<field eval="1" name="active"/>
</record>
@ -542,77 +548,127 @@ Andrew</field>
<field eval="1" name="active"/>
</record>
<!-- Some messages linked to the previous opportunity -->
<record id="message_email0" model="mail.message">
<field name="subject">Plan to buy a Laptop</field>
<!-- Unsubscribe Admin from case15, subscribe Demo -->
<record id="crm_case_15" model="crm.lead">
<field name="message_follower_ids" eval="[(3, ref('base.partner_root')), (4, ref('base.partner_demo'))]"/>
</record>
<record id="crm_case_17" model="crm.lead">
<field name="message_follower_ids" eval="[(3, ref('base.partner_root')), (4, ref('base.partner_demo'))]"/>
</record>
<record id="crm_case_18" model="crm.lead">
<field name="message_follower_ids" eval="[(4, ref('base.partner_demo'))]"/>
</record>
<!-- Some messages linked to the previous opportunities -->
<record id="msg_case15_attach1" model="ir.attachment">
<field name="datas">bWlncmF0aW9uIHRlc3Q=</field>
<field name="datas_fname">YourCompany2012.doc</field>
<field name="name">YourCompany2012.doc</field>
</record>
<record id="msg_case15_1" model="mail.message">
<field name="subject">Plan to buy RedHat servers</field>
<field name="model">crm.lead</field>
<field name="res_id" ref="crm_case_15"/>
<field name="body">&lt;![CDATA[Email0 inquiry]]&gt;&lt;div&gt;&lt;font size="2"&gt;Hello,&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font size="2"&gt;&lt;br&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font size="2"&gt;I am interested in your company's product and I plan to buy a new laptop having latest technologies and affordable price.&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font size="2"&gt;Can you please send me product catalogue?&lt;/font&gt;&lt;/div&gt;</field>
<field name="body"><![CDATA[<div>
<p>Hello,</p>
<p>I am interested in your company's products and I plan to buy a new laptop having latest technologies as well as an affordable price.</p>
<p>Could you please send me the product catalog?</p>]]></field>
<field name="type">email</field>
<field name="subtype_id" ref="mail.mt_comment"/>
<field name="email_from">virginie@agrolait.fr</field>
<field name="author_id" eval="False"/>
</record>
<record id="message_note0" model="mail.message">
<field name="subject">Re: Plan to buy a Laptop</field>
<record id="msg_case15_1_1" model="mail.message">
<field name="subject">Re: Plan to buy RedHat servers</field>
<field name="model">crm.lead</field>
<field name="res_id" ref="crm_case_15"/>
<field name="type">comment</field>
<field name="body">Dear Customer,
Thanks for showing interest in our products.
We have attached the catalogue,
We would like to know your interests, so let us know when we can call you for more details.
Regards</field>
<field name="parent_id" ref="message_email0"/>
<field name="author_id" ref="base.partner_root"/>
<field name="subtype_id" ref="mail.mt_comment"/>
<field name="body"><![CDATA[<p>Dear customer,<br/>
Thanks for showing interest in our products! As requested, I send to you our products catalog.<br />
To be able to finely tune the solution, we would like to know precise needs. This way we wil be able to help you choosing the right infrastructure according to your requirements.<br/>
Best regards,</p>]]></field>
<field name="parent_id" ref="msg_case15_1"/>
<field name="author_id" ref="base.partner_demo"/>
<field name="attachment_ids" eval="[(6, 0, [ref('msg_case15_attach1')])]"/>
</record>
<record id="message_note0_comment0" model="mail.message">
<field name="subject">Re: Plan to buy a Laptop</field>
<record id="msg_case15_1_2" model="mail.message">
<field name="subject">Re: Plan to buy RedHat servers</field>
<field name="model">crm.lead</field>
<field name="res_id" ref="crm_case_15"/>
<field name="type">comment</field>
<field name="body">&lt;div&gt;Thanks for the information,&lt;/div&gt;&lt;div&gt;I will visit the store soon.&lt;/div&gt;</field>
<field name="parent_id" ref="message_note0"/>
<field name="body"><![CDATA[<p>Thanks for the information!<br />I asked a precise specification to our technical expert. Here is what we precisely need:</p>
<ul>
<li>weekly backups, every Monday</li>
<li>backup time is not a blocking point for us, as we are closed all Monday, leaving time enough to perform the backup</li>
<li>reliability is very important; we need redundant servers and rollback capacity</li>
<li>a total capacity of about 2 TB</li>
</ul>
<p>Best regards,</p>]]></field>
<field name="type">email</field>
<field name="subtype_id" ref="mail.mt_comment"/>
<field name="parent_id" ref="msg_case15_1"/>
<field name="email_from">virginie@agrolait.fr</field>
<field name="author_id" eval="False"/>
</record>
<record id="msg_case15_1_3" model="mail.message">
<field name="subject">Re: Plan to buy RedHat servers</field>
<field name="model">crm.lead</field>
<field name="res_id" ref="crm_case_15"/>
<field name="body"><![CDATA[<p>Hello</p>
<p>After our phonecall and discussion with our technical experts, here is the offer of YourCompany. We believe it will meet every requirement you had in mind. Please feel free to contact me for any detail or technical detail that is not clear enough for you.</p>
<p>Notice that as agreed on phone, we offer you a <b>10% discount on the hardware</b>!</p>
<p>Best regards,</p>]]></field>
<field name="type">email</field>
<field name="parent_id" ref="msg_case15_1"/>
<field name="author_id" ref="base.partner_demo"/>
</record>
<record id="message_note0_comment1" model="mail.message">
<field name="subject">Re: Plan to buy a Laptop</field>
<record id="msg_case17_1" model="mail.message">
<field name="subject">Catalog to send</field>
<field name="model">crm.lead</field>
<field name="res_id" ref="crm_case_15"/>
<field name="res_id" ref="crm_case_17"/>
<field name="body"><![CDATA[<p>They just want pricing information about our services. I think sending our catalog should be sufficient.</p>]]></field>
<field name="type">comment</field>
<field name="body">&lt;font color="#1f1f1f"&gt;Can you tell me if the store is open at 9:00 PM?&lt;/b&gt;&lt;/font&gt;</field>
<field name="parent_id" ref="message_note0"/>
<field name="subtype_id" ref="mail.mt_comment"/>
<field name="author_id" ref="base.partner_demo"/>
</record>
<record id="message_email1" model="mail.message">
<field name="subject">Re: Plan to buy a Laptop</field>
<record id="msg_case18_1" model="mail.message">
<field name="subject">Inquiry</field>
<field name="model">crm.lead</field>
<field name="res_id" ref="crm_case_15"/>
<field name="body">Yes, its open till 10:00 PM, you are welcome!</field>
<field name="type">email</field>
<field name="author_id" ref="base.partner_root"/>
<field name="res_id" ref="crm_case_18"/>
<field name="body"><![CDATA[<p>Hello!<br />
I am Leland Martinez, from the Delta PC. Maybe you remember, we talked a bit last month at this international conference.<br />
We would like to attend a training, but we are not quite sure about what we can ask. Maybe we should meet and talk about that?<br />
Best regards,</p>]]></field>
<field name="type">comment</field>
<field name="subtype_id" ref="mail.mt_comment"/>
<field name="author_id" ref="base.res_partner_4"/>
<field name="favorite_user_ids" eval="[(6, 0, [ref('base.user_root')])]"/>
</record>
<record id="message_email_12" model="mail.message">
<record id="msg_case18_2" model="mail.message">
<field name="model">crm.lead</field>
<field name="res_id" ref="crm_case_18"/>
<field name="body"><![CDATA[<p>It seems very interesting. As you say, first of all we will have to define precisely what the training will be about, and your precise needs.</p>]]></field>
<field name="type">comment</field>
<field name="subtype_id" ref="mail.mt_comment"/>
<field name="parent_id" ref="msg_case18_1"/>
<field name="author_id" ref="base.partner_demo"/>
<field name="favorite_user_ids" eval="[(6, 0, [ref('base.user_root')])]"/>
</record>
<record id="msg_case1_1" model="mail.message">
<field name="subject">Inquiry</field>
<field name="model">crm.lead</field>
<field name="res_id" ref="crm_case_1"/>
<field name="body">Hello,
I am Jason from Le Club SARL.
I am intertested to attend a training organized in your company.
Can you send me the details ?</field>
<field name="body"><![CDATA[<p>Hello,<br />
I am Jason from Le Club SARL. I am interested to attend a training organized in your company.<br />
Can you send me the details ?</p>]]></field>
<field name="type">email</field>
</record>
<record id="message_email_13" model="mail.message">
<record id="msg_case2_1" model="mail.message">
<field name="subject">Need Details</field>
<field name="model">crm.lead</field>
<field name="res_id" ref="crm_case_2"/>
<field name="body">Want to know features and benifits to use the new software.</field>
<field name="body">Want to know features and benefits to use the new software.</field>
<field name="type">comment</field>
</record>
<!-- Call Function to set the opportunities as Unread -->
<function model="crm.lead" name="message_mark_as_unread"
eval="[ ref('crm_case_15'), ref('crm_case_16'),
ref('crm_case_23'), ref('crm_case_19')], {}"
/>
</data>
</openerp>

View File

@ -65,7 +65,10 @@ Main Features
'mail_alias_view.xml',
'res_users_view.xml',
],
'demo': ['data/mail_demo.xml'],
'demo': [
'data/mail_demo.xml',
'data/mail_group_demo_data.xml',
],
'installable': True,
'auto_install': False,
'application': True,

View File

@ -2,90 +2,354 @@
<openerp>
<data noupdate="1">
<!-- Update demo user to avoid mail bombing -->
<!-- Update 'Demo user' and partners email preferences to avoid mail bombing -->
<record id="base.partner_demo" model="res.partner">
<field name="notification_email_send">none</field>
</record>
<!-- Pushed to all employees -->
<record id="message_blogpost0" model="mail.message">
<field name="model">mail.group</field>
<field name="res_id" ref="mail.group_all_employees"/>
<field name="body"><![CDATA[<p>Your monthly meal vouchers arrived. You can get them at Christine's office.</p>]]></field>
<field name="type">comment</field>
<field name="subtype_id" ref="mt_comment"/>
<field name="author_id" ref="base.partner_root"/>
<record id="base.res_partner_1" model="res.partner">
<field name="notification_email_send">none</field>
</record>
<record id="message_blogpost0_comment0" model="mail.message">
<field name="model">mail.group</field>
<field name="res_id" ref="group_all_employees"/>
<field name="body"><![CDATA[<p>Oh, I had forgotten. This month you also get 250 EUR of eco-vouchers if you have been in the company for more than a year.</p>]]></field>
<field name="parent_id" ref="message_blogpost0"/>
<field name="type">comment</field>
<field name="subtype_id" ref="mt_comment"/>
<field name="author_id" ref="base.partner_root"/>
<record id="base.res_partner_2" model="res.partner">
<field name="notification_email_send">none</field>
</record>
<record id="message_blogpost0_comment1" model="mail.message">
<field name="model">mail.group</field>
<field name="res_id" ref="group_all_employees"/>
<field name="body"><![CDATA[<p>Thanks! Could you please remind me where is Christine's office, if I may ask? I'm new here!</p>]]></field>
<field name="parent_id" ref="message_blogpost0"/>
<field name="type">comment</field>
<field name="subtype_id" ref="mt_comment"/>
<field name="author_id" ref="base.partner_demo"/>
<record id="base.res_partner_3" model="res.partner">
<field name="notification_email_send">none</field>
</record>
<!-- This one is starred for having mailboxes with demo data -->
<record id="message_blogpost0_comment2" model="mail.message">
<field name="model">mail.group</field>
<field name="res_id" ref="group_all_employees"/>
<field name="body"><![CDATA[<p>Building B3, second floor on the right :-).</p>]]></field>
<field name="parent_id" ref="message_blogpost0"/>
<field name="type">comment</field>
<field name="subtype_id" ref="mt_comment"/>
<field name="author_id" ref="base.partner_root"/>
<field name="favorite_user_ids" eval="[(6, 0, [ref('base.user_root'), ref('base.user_demo')])]"/>
<record id="base.res_partner_4" model="res.partner">
<field name="notification_email_send">none</field>
</record>
<record id="message_blogpost0_comment3" model="mail.message">
<field name="model">mail.group</field>
<field name="res_id" ref="group_all_employees"/>
<field name="body"><![CDATA[<p>Many thanks. Actually that's good news, next year I'll have to buy a new fridge, I think I will pay it with the eco-vouchers!</p>]]></field>
<field name="parent_id" ref="message_blogpost0"/>
<field name="type">comment</field>
<field name="subtype_id" ref="mt_comment"/>
<field name="author_id" ref="base.partner_demo"/>
<record id="base.res_partner_5" model="res.partner">
<field name="notification_email_send">none</field>
</record>
<record id="base.res_partner_6" model="res.partner">
<field name="notification_email_send">none</field>
</record>
<record id="base.res_partner_7" model="res.partner">
<field name="notification_email_send">none</field>
</record>
<record id="base.res_partner_8" model="res.partner">
<field name="notification_email_send">none</field>
</record>
<record id="base.res_partner_9" model="res.partner">
<field name="notification_email_send">none</field>
</record>
<record id="base.res_partner_10" model="res.partner">
<field name="notification_email_send">none</field>
</record>
<record id="base.res_partner_11" model="res.partner">
<field name="notification_email_send">none</field>
</record>
<record id="base.res_partner_12" model="res.partner">
<field name="notification_email_send">none</field>
</record>
<record id="base.res_partner_13" model="res.partner">
<field name="notification_email_send">none</field>
</record>
<record id="base.res_partner_14" model="res.partner">
<field name="notification_email_send">none</field>
</record>
<record id="base.res_partner_15" model="res.partner">
<field name="notification_email_send">none</field>
</record>
<record id="base.res_partner_16" model="res.partner">
<field name="notification_email_send">none</field>
</record>
<record id="base.res_partner_17" model="res.partner">
<field name="notification_email_send">none</field>
</record>
<record id="base.res_partner_18" model="res.partner">
<field name="notification_email_send">none</field>
</record>
<record id="base.res_partner_19" model="res.partner">
<field name="notification_email_send">none</field>
</record>
<record id="base.res_partner_20" model="res.partner">
<field name="notification_email_send">none</field>
</record>
<record id="base.res_partner_21" model="res.partner">
<field name="notification_email_send">none</field>
</record>
<record id="base.res_partner_22" model="res.partner">
<field name="notification_email_send">none</field>
</record>
<record id="base.res_partner_23" model="res.partner">
<field name="notification_email_send">none</field>
</record>
<!-- Demo user and admin conversation -->
<record id="message_discussion" model="mail.message">
<field name="body">Hello Demo User! I was wondering whether you had some issues with our secret task about putting cats everywhere in OpenERP.</field>
<!-- Discussion: attachments and spec [DEMO: search on has_attachments -->
<record id="msg_discus6_attach1" model="ir.attachment">
<field name="datas">bWlncmF0aW9uIHRlc3Q=</field>
<field name="datas_fname">RedHat_spec.doc</field>
<field name="name">RedHat_spec.doc</field>
</record>
<record id="msg_discus6_attach2" model="ir.attachment">
<field name="datas">bWlncmF0aW9uIHRlc3Q=</field>
<field name="datas_fname">RedHat_spec_draft_v3.doc</field>
<field name="name">RedHat_spec_draft_v3.doc</field>
</record>
<record id="msg_discus6" model="mail.message">
<field name="subject">RedHat server updated spec</field>
<field name="body"><![CDATA[<p>Hello Demo,</p>
<p>We have a lot of inquiries about our now solution based on RedHat servers. However I do not have the updated specification ready at hand.</p>
<p>Could you please send me the last version of the file asap?</p>
<p>Thanks,</p>]]></field>
<field name="type">comment</field>
<field name="subtype_id" ref="mt_comment"/>
<field name="author_id" ref="base.partner_root"/>
<field name="partner_ids" eval="[(6, 0, [ref('base.partner_demo')])]"/>
<field name="date" eval="(DateTime.today() - timedelta(days=1)).strftime('%Y-%m-%d %H:%M')"/>
</record>
<record id="message_discussion_answer1" model="mail.message">
<field name="body">No specific issues, I think everything is clear.</field>
<field name="parent_id" ref="message_discussion"/>
<record id="msg_discus6_1" model="mail.message">
<field name="body"><![CDATA[<p>Sure, here it is. Have a nice day!</p>]]></field>
<field name="type">comment</field>
<field name="subtype_id" ref="mt_comment"/>
<field name="parent_id" ref="msg_discus6"/>
<field name="author_id" ref="base.partner_demo"/>
<field name="partner_ids" eval="[(6, 0, [ref('base.partner_root')])]"/>
<field name="attachment_ids" eval="[(6, 0, [ref('msg_discus6_attach1')])]"/>
<field name="date" eval="(DateTime.today() - timedelta(hours=3)).strftime('%Y-%m-%d %H:%M')"/>
</record>
<record id="message_discussion_answer2" model="mail.message">
<field name="body">Ow, just to be sure... we were talking about lolcats, right ?</field>
<field name="parent_id" ref="message_discussion"/>
<record id="msg_discus6_2" model="mail.message">
<field name="body"><![CDATA[<p>I just found a more recent draft of the spec. Jon did some cleaning in the specifications. Could you merge the two documents to have an updated one?</p><p>When it's done, put it on the internal document management system.</p><p>Thanks,</p>]]></field>
<field name="type">comment</field>
<field name="subtype_id" ref="mt_comment"/>
<field name="parent_id" ref="msg_discus6"/>
<field name="author_id" ref="base.partner_demo"/>
<field name="partner_ids" eval="[(6, 0, [ref('base.partner_root')])]"/>
<field name="attachment_ids" eval="[(6, 0, [ref('msg_discus6_attach2')])]"/>
<field name="date" eval="(DateTime.today() - timedelta(hours=3)).strftime('%Y-%m-%d %H:%M')"/>
</record>
<record id="message_discussion_answer3" model="mail.message">
<field name="body">Absolutely!</field>
<field name="parent_id" ref="message_discussion"/>
<!-- Thread: 1 incoming email -->
<record id="msg_discus5" model="mail.message">
<field name="subject">Plan to install backup servers</field>
<field name="body"><![CDATA[<p>Hello,</p>
<p>We need to deploy new backup servers, with the following requirements:</p>
<ul>
<li>daily incremental backups, with an history of 15 days,</li>
<li>45 servers should be backuped between 1am and 3am when our offices are closed,</li>
<li>two redundant servers,</li>
<li>total capacity of 200Gb.</li>
</ul>
<p>
Do you have a simple solution with servers running on Redhat Linux?
</p>
<p>Best regards,</p>
]]></field>
<field name="type">email</field>
<field name="subtype_id" ref="mt_comment"/>
<field name="email_from">virginie@agrolait.fr</field>
<field name="author_id" eval="False"/>
<field name="partner_ids" eval="[(6, 0, [ref('base.partner_demo'), ref('base.partner_root')])]"/>
<field name="date" eval="(DateTime.today() - timedelta(days=2)).strftime('%Y-%m-%d %H:%M')"/>
</record>
<!-- Admin and Demo with attachments -->
<record id="msg_discus4_attach1" model="ir.attachment">
<field name="datas">bWlncmF0aW9uIHRlc3Q=</field>
<field name="datas_fname">catalog.doc</field>
<field name="name">catalog.doc</field>
</record>
<record id="msg_discus4_attach2" model="ir.attachment">
<field name="datas_fname">activity_graph_2012.jpg</field>
<field name="name">activity_graph_2012</field>
<field name="datas">
/9j/4AAQSkZJRgABAQEASABIA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tJ2M3oPsR3YQAJnwoOgeP8A
6hgkkS3L22W3NwYpz/GrXc3wpS7Oudu+RXUpyE003qLif7SHQXA/UhLRIHUTRuMv9S/f/H4njR6H
JNK4mGf01rWv8yPgTl90ivV6eFrSQDuIJ67kP6HjhymzqI2WOwbemv3oAdRSZ+YQ622973/E1WDQ
6/blTXeuaYBaRsCAADoO/jzwu05KrZWta316Y3JdsslUNB76EIR+RBw3LatyVSrk9QpaAJzWUPWd
B0zi1VkNbObGbGF6HyE6yRv2TuGj7/UQu+IaBTq7TrIOhHSBNY9PPGLoOmsZ+vBKQOIl8My05uDb
O1WR63FN74OlZFz8JXMmTfQLGZAPDeJjOFmZyeKi5hnC3upfvguj2XpIuNcinL/TXLn9/vLUpDNw
kxzLdwM111ZhJXPm0ixn3/rQxvK6Vd4vn//Z
</field>
</record>
<record id="msg_discus4" model="mail.message">
<field name="body"><![CDATA[<p>Hi Demo,</p>
<p>The next version of our products catalog is scheduled for next month. Our product team send me their updated document holding the prices and costs, and I updated our catalog.</p>
<p>You will find it in attachment, as well as a comparative benchmark of the different solutions currently existing on the market.<br />Have a nice reading!<br />
Sincerely,</p>]]></field>
<field name="type">comment</field>
<field name="subtype_id" ref="mt_comment"/>
<field name="author_id" ref="base.partner_root"/>
<field name="partner_ids" eval="[(6, 0, [ref('base.partner_demo')])]"/>
<field name="attachment_ids" eval="[(6, 0, [ref('msg_discus4_attach1'), ref('msg_discus4_attach2')])]"/>
<field name="date" eval="(DateTime.today() - timedelta(days=1)).strftime('%Y-%m-%d %H:%M')"/>
</record>
<record id="msg_discuss4_1" model="mail.message">
<field name="body"><![CDATA[<p>Thank you!<br/>Could you send me the updated pricelists as negotiated at the beginning of this year?</p>
<p>Sincerely,</p>]]></field>
<field name="type">comment</field>
<field name="subtype_id" ref="mt_comment"/>
<field name="parent_id" ref="msg_discus4"/>
<field name="author_id" ref="base.partner_demo"/>
<field name="partner_ids" eval="[(6, 0, [ref('base.partner_root'), ref('base.partner_demo')])]"/>
<field name="date" eval="(DateTime.today() - timedelta(hours=1, minutes=30)).strftime('%Y-%m-%d %H:%M')"/>
</record>
<!-- Thread: Demo (network admin) and Admin -->
<record id="msg_discus3" model="mail.message">
<field name="body"><![CDATA[<p>Hello,</p><p>I have a friend working at Epic Technologies. He told me they plan to upgrade their backup servers within the next 3 months.</p><p>I think that someone should contact them and check if there is an opportunity.</p>]]></field>
<field name="type">comment</field>
<field name="subtype_id" ref="mt_comment"/>
<field name="author_id" ref="base.partner_demo"/>
<field name="partner_ids" eval="[(6, 0, [ref('base.partner_root')])]"/>
<field name="date" eval="(DateTime.today() - timedelta(hours=3)).strftime('%Y-%m-%d %H:%M')"/>
</record>
<record id="msg_discus3_1" model="mail.message">
<field name="body"><![CDATA[Contact Chris: +1 (650) 307-6736.]]></field>
<field name="parent_id" ref="msg_discus3"/>
<field name="type">comment</field>
<field name="subtype_id" ref="mt_comment"/>
<field name="author_id" ref="base.partner_demo"/>
<field name="notified_partner_ids" eval="[(6, 0, [ref('base.partner_root')])]"/>
<field name="date" eval="(DateTime.today() - timedelta(hours=1)).strftime('%Y-%m-%d %H:%M')"/>
</record>
<!-- Thread: Epic Technologies and Admin as salesman discuss about a meeting [DEMO: see context, mark thread as done] -->
<record id="msg_discus2" model="mail.message">
<field name="subject">Information meeting</field>
<field name="body"><![CDATA[<p>Hello,</p><p>Epic Technologies is a small company specialized in software managing huge volume of data. Having an efficient and reliable backup system is very important for us, and critical for our customers. I eared you have some interesting solutions to manage our backups. Could we meet each other as soon as possible to discuss our need? Here is a first list of requirements:</p>
<ul>
<li>about 25 backup servers, running on Redhat Linux</li>
<li>minimum 200Gb of storage per server</li>
<li>setup a VPN between all our servers in New York and Chicago</li>
</ul>
<p>Thanks,</p>
]]></field>
<field name="type">comment</field>
<field name="subtype_id" ref="mt_comment"/>
<field name="author_id" ref="base.res_partner_5"/>
<field name="partner_ids" eval="[(6, 0, [ref('base.partner_root')])]"/>
<field name="date" eval="(DateTime.today() - timedelta(days=1)).strftime('%Y-%m-%d %H:%M')"/>
</record>
<record id="msg_discus2_1" model="mail.message">
<field name="subject">RE: Information meeting</field>
<field name="body"><![CDATA[<p>Hello Epic!</p>
<p>I am glad you are interested in our products. Indeed, we are have several backup solutions that should meet your requirements. In order to prepare a detailed offer, we will have to discuss several technical points about your needs and the context of your data management.</p>
<p>I propose to have a meeting tomorrow at 2 PM. Does it seem suitable for you ?<br />Best regards,</p>]]></field>
<field name="parent_id" ref="msg_discus2"/>
<field name="type">comment</field>
<field name="subtype_id" ref="mt_comment"/>
<field name="author_id" ref="base.partner_root"/>
<field name="partner_ids" eval="[(6, 0, [ref('base.res_partner_5')])]"/>
<field name="date" eval="(DateTime.today() - timedelta(hours=1)).strftime('%Y-%m-%d %H:%M')"/>
</record>
<record id="msg_discus2_2" model="mail.message">
<field name="subject">RE: Information meeting</field>
<field name="body"><![CDATA[<p>It is not possible for me to come tomorrow at 2 PM. Maybe at 4 PM?</p>]]></field>
<field name="parent_id" ref="msg_discus2"/>
<field name="type">comment</field>
<field name="subtype_id" ref="mt_comment"/>
<field name="author_id" ref="base.res_partner_5"/>
<field name="date" eval="(DateTime.today() - timedelta(minutes=35)).strftime('%Y-%m-%d %H:%M')"/>
</record>
<record id="msg_discus2_3" model="mail.message">
<field name="subject">RE: Information meeting</field>
<field name="body"><![CDATA[<p>4 PM is fine! See you tomorrow!<br />Best regards,</p>]]></field>
<field name="parent_id" ref="msg_discus2"/>
<field name="type">comment</field>
<field name="subtype_id" ref="mt_comment"/>
<field name="author_id" ref="base.partner_root"/>
<field name="partner_ids" eval="[(6, 0, [ref('base.res_partner_5')])]"/>
<field name="date" eval="(DateTime.today() - timedelta(minutes=30)).strftime('%Y-%m-%d %H:%M')"/>
</record>
<record id="msg_discus2_4" model="mail.message">
<field name="subject">RE: Information meeting</field>
<field name="body"><![CDATA[<p>Ok! See you tomorrow.</p>]]></field>
<field name="parent_id" ref="msg_discus2"/>
<field name="type">comment</field>
<field name="subtype_id" ref="mt_comment"/>
<field name="author_id" ref="base.res_partner_5"/>
<field name="partner_ids" eval="[(6, 0, [ref('base.partner_root')])]"/>
<field name="date" eval="(DateTime.today() - timedelta(minutes=10)).strftime('%Y-%m-%d %H:%M')"/>
</record>
<!-- Short thread: Admin ask, Agrolait answer [DEMO: mark thread as done] -->
<record id="msg_discus1" model="mail.message">
<field name="subject">Feedback about our On Site Assistance</field>
<field name="body"><![CDATA[<p>Hi Virginie,</p><p>I writing to you about our <i>On Site Assistance Service</i> that we delivered to Agrolait last week. Do you have any feedback or remark about our service? I noticed you requested new IP phones. Will it be used for new employees, or did you have any issue with the ones we provided?<br />Best regards,</p>]]></field>
<field name="type">comment</field>
<field name="subtype_id" ref="mt_comment"/>
<field name="author_id" ref="base.partner_root"/>
<field name="partner_ids" eval="[(6, 0, [ref('base.res_partner_2')])]"/>
<field name="date" eval="(DateTime.today() - timedelta(days=2)).strftime('%Y-%m-%d %H:%M')"/>
</record>
<record id="msg_discus1_1" model="mail.message">
<field name="subject">RE: Feedback about our On Site Assistance</field>
<field name="body"><![CDATA[<p>Hello Administrator,</p><p>Glad to hearing from you! Everything is perfect, thanks for asking. Concerning the order of 2 IP phones, I ordered them for new employees. We are satisfied with the products of <i>YourCompany</i>, and we plan to fit out each new employee with one of your phone this year.<br />Regards,</p>]]></field>
<field name="parent_id" ref="msg_discus1"/>
<field name="type">comment</field>
<field name="subtype_id" ref="mt_comment"/>
<field name="author_id" ref="base.res_partner_2"/>
<field name="partner_ids" eval="[(6, 0, [ref('base.partner_root')])]"/>
<field name="date" eval="(DateTime.today() - timedelta(minutes=5)).strftime('%Y-%m-%d %H:%M')"/>
</record>
<!-- Header only: message from res_partner_1 [DEMO: mark as done] -->
<record id="msg_discus0" model="mail.message">
<field name="subject">FWD: Meeting with Demo </field>
<field name="body"><![CDATA[<p>Hello Administrator,</p><p>A small email to inform you that we will have a meeting with Mr Demo next Tuesday. Everything is under control!<br />Regards,</p>]]></field>
<field name="type">comment</field>
<field name="subtype_id" ref="mt_comment"/>
<field name="author_id" ref="base.res_partner_1"/>
<field name="partner_ids" eval="[(6, 0, [ref('base.partner_root')])]"/>
<field name="date" eval="(DateTime.today() - timedelta(minutes=1)).strftime('%Y-%m-%d %H:%M')"/>
</record>
</data>

View File

@ -2,10 +2,6 @@
<openerp>
<data noupdate="1">
<record model="mail.group" id="group_sales">
<field name="name">Sales</field>
<field name="description">Discussion about best sales practices and deals.</field>
</record>
<record model="mail.group" id="group_all_employees">
<field name="name">Whole Company</field>
<field name="group_ids" eval="[(4, ref('base.group_user'))]"/>
@ -19,9 +15,9 @@
<field name="type">notification</field>
<field name="subtype_id" ref="mail.mt_comment"/>
<field name="subject">Welcome to OpenERP!</field>
<field name="body"><![CDATA[<p>Your homepage is a summary of messages you received and key information about documents you follow.</p><p>
The top menu bar contains all applications you installed. You can use the <i>Settings</i> menu to install more applications, activate others features or give access to new users.</p><p>
To setup your preferences (name, email signature, avatar), click on the top right corner.</p>]]></field>
<field name="body"><![CDATA[<p>Your homepage is a summary of messages you received and key information about documents you follow.</p>
<p>The top menu bar contains all applications you installed. You can use the <i>Settings</i> menu to install more applications, activate others features or give access to new users.</p>
<p>To setup your preferences (name, email signature, avatar), click on the top right corner.</p>]]></field>
</record>
</data>
</openerp>

View File

@ -0,0 +1,197 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="1">
<!-- Discussion groups, done in 2 steps to remove creator from followers -->
<record model="mail.group" id="group_best_sales_practices">
<field name="name">Best Sales Practices</field>
<field name="description">Discussion about best sales practices and deals.</field>
</record>
<record model="mail.group" id="group_best_sales_practices">
<field name="message_follower_ids" eval="[(6, 0, [ref('base.partner_demo')])]"/>
</record>
<record model="mail.group" id="group_board">
<field name="name">Board meetings</field>
<field name="description">Board meetings, budgets, strategic plans</field>
</record>
<record model="mail.group" id="group_board">
<field name="message_follower_ids" eval="[(6, 0, [])]"/>
</record>
<record model="mail.group" id="group_rd">
<field name="name">R&amp;D</field>
<field name="description">Research and development discussion group</field>
</record>
<record model="mail.group" id="group_hr_policies">
<field name="name">HR Policies</field>
<field name="description">Company cars, holidays and other advantages</field>
</record>
<record model="mail.group" id="group_rd">
<field name="message_follower_ids" eval="[(6, 0, [])]"/>
</record>
<record model="mail.group" id="group_support">
<field name="name">Support</field>
<field name="description">Support team</field>
</record>
<!-- Best sales practices messages -->
<record id="msg_group_1_1" model="mail.message">
<field name="model">mail.group</field>
<field name="res_id" ref="mail.group_best_sales_practices"/>
<field name="body"><![CDATA[<p>Selling a training session and selling the products after the training session is more efficient than directly selling a pack with the training session and the products.</p>]]></field>
<field name="type">comment</field>
<field name="subtype_id" ref="mt_comment"/>
<field name="author_id" ref="base.partner_demo"/>
<field name="date" eval="(DateTime.today() - timedelta(days=5)).strftime('%Y-%m-%d %H:%M')"/>
</record>
<record id="msg_group_1_2" model="mail.message">
<field name="model">mail.group</field>
<field name="res_id" ref="mail.group_best_sales_practices"/>
<field name="body"><![CDATA[<p>I noted I can not manage efficiently my pipeline when I have more than 50 opportunities in the qualification stage.</p><p>Any advice on this? How do you organize your activities with more than 50 opportunities?</p>]]></field>
<field name="type">comment</field>
<field name="subtype_id" ref="mt_comment"/>
<field name="author_id" ref="base.partner_root"/>
<field name="date" eval="(DateTime.today() - timedelta(days=4)).strftime('%Y-%m-%d %H:%M')"/>
</record>
<record id="msg_group_1_3" model="mail.message">
<field name="model">mail.group</field>
<field name="res_id" ref="mail.group_best_sales_practices"/>
<field name="body"><![CDATA[<p>When I have too much opportunities in the pipe, I start communicating with prospects more by email than phonecalls.</p><p>I send an email to create a sense of emergency, like <i>"can I call you this week about our quote?"</i> and I call only those that answer this email.</p><p>You can use the email template feature of OpenERP to automate email composition.</p>]]></field>
<field name="type">comment</field>
<field name="parent_id" ref="msg_group_1_2"/>
<field name="subtype_id" ref="mt_comment"/>
<field name="author_id" ref="base.partner_demo"/>
<field name="vote_user_ids" eval="[(6, 0, [ref('base.user_demo')])]"/>
<field name="date" eval="(DateTime.today() - timedelta(days=3)).strftime('%Y-%m-%d %H:%M')"/>
</record>
<record id="msg_group_1_4" model="mail.message">
<field name="model">mail.group</field>
<field name="res_id" ref="mail.group_best_sales_practices"/>
<field name="body"><![CDATA[<p>When you sell a tablet PC, don't forget to propose a docking station with it. I offer 20% on the docking stating (not the tablet) and I have a 70% success rate with this combo.</p>]]></field>
<field name="type">comment</field>
<field name="subtype_id" ref="mt_comment"/>
<field name="author_id" ref="base.partner_demo"/>
<field name="vote_user_ids" eval="[(6, 0, [ref('base.user_demo'), ref('base.user_root')])]"/>
<field name="date" eval="(DateTime.today() - timedelta(days=2)).strftime('%Y-%m-%d %H:%M')"/>
</record>
<!-- Pushed to all employees -->
<record id="msg_empl_1" model="mail.message">
<field name="model">mail.group</field>
<field name="res_id" ref="mail.group_hr_policies"/>
<field name="body"><![CDATA[<p>Your monthly meal vouchers arrived. You can get them at the HR's office.</p>]]></field>
<field name="type">comment</field>
<field name="author_id" ref="base.partner_demo"/>
<field name="date" eval="(DateTime.today() - timedelta(hours=1)).strftime('%Y-%m-%d %H:%M')"/>
</record>
<record id="msg_empl_1_1" model="mail.message">
<field name="model">mail.group</field>
<field name="res_id" ref="group_hr_policies"/>
<field name="body"><![CDATA[<p>Oh, I had forgotten. This month you also get 250 EUR of eco-vouchers if you have been in the company for more than a year.</p>]]></field>
<field name="parent_id" ref="msg_empl_1"/>
<field name="type">comment</field>
<field name="author_id" ref="base.partner_demo"/>
<field name="date" eval="(DateTime.today() - timedelta(minutes=57)).strftime('%Y-%m-%d %H:%M')"/>
</record>
<record id="msg_empl_1_2" model="mail.message">
<field name="model">mail.group</field>
<field name="res_id" ref="group_hr_policies"/>
<field name="body"><![CDATA[<p>Thanks! Could you please remind me where is Christine's office, if I may ask? I'm new here!</p>]]></field>
<field name="parent_id" ref="msg_empl_1"/>
<field name="type">comment</field>
<field name="author_id" ref="base.partner_root"/>
<field name="date" eval="(DateTime.today() - timedelta(minutes=34)).strftime('%Y-%m-%d %H:%M')"/>
</record>
<record id="msg_empl_1_3" model="mail.message">
<field name="model">mail.group</field>
<field name="res_id" ref="group_hr_policies"/>
<field name="body"><![CDATA[<p>Building B3, second floor on the right :-).</p>]]></field>
<field name="parent_id" ref="msg_empl_1"/>
<field name="type">comment</field>
<field name="author_id" ref="base.partner_demo"/>
<field name="date" eval="(DateTime.today() - timedelta(minutes=22)).strftime('%Y-%m-%d %H:%M')"/>
</record>
<!-- Board messages -->
<record id="msg_board_1" model="mail.message">
<field name="model">mail.group</field>
<field name="res_id" ref="mail.group_board"/>
<field name="body"><![CDATA[
<p>
Dear Board Members,
</p>
<p>
The main events of the month of October are:
</p>
<p>
<b>Sales:</b>
</p>
<ul>
<li>Invoicing is respectively of 442k€ for our European company (66% of the budget) and $404k for the U.S. office (75% of the budget). Despite these numbers that are far bellow our initial expectations, the growth of the month of October is 51% compared to last year.</li>
<li>The month of September having been better than our initial forecasts, the consolidated yearly revenue is only of $20k bellow our forecast made during the board of September.</li>
<li>The consolidated forecast for the end of the year is $6.749k, which is a growth of 76% compared to last year and an achievement of 87% of the budget.</li>
<li>The recruitment of new resellers has been very good, especially in Europe, where we signed 30 new resellers this month.</li>
</ul>
<p>
<b>Finance :</b>
</p>
<ul>
<li>The profit and loss has been negatively impacted this month by revenues that are far beyond the budget and charges that are 15% above the budget. The main extra we had in our charges this month is due to the provisioning of the salaries for the holidays period, $50k.</li>
<li>We also got the payment of our long awaited subsidies, the cash level has increased of 300K€ which gives a current balance of 963 K€ without including the straight loan of 350 K€.</li>
<li>The aged customer balance has been similar to the one of the last month with a small decrease of the DSO. We have recruited a new accountant assistant for the credit collection. She is mostly doing phone calls for all invoices that are due since 30 days, so we should get improvements of the DSO in November. The sum of the invoicing on which we have a risk in the aged customer balance is 100K€.</li>
</ul>
<p>
<b>Resellers and Customers:</b>
</p>
<ul>
<li>The total number of resellers is 429, across 87 countries.</li>
<li>The total number of installations of our software increased to 37K, against 33K for the month of September but we still did not reached the highest level we reached during this year (44K in march and may)</li>
<li>We have passed the 10000th customer in production with 10271 customers at the end of October. The paying customer ratio is 6,6%.</li>
</ul>
<p>
<b>Launch of the new release:</b>
</p>
<p>
We are working actively on the new release which is scheduled for the end of November.
</p>
<ul>
<li>We will publish the release note this week</li>
<li>The whole sales team will be trained on the new version this Friday</li>
<li>We will do a public announce to our resellers the 21th of November. We plan to show them: a description of the new features, the new distribution strategy, the new pricing and the communication plan.</li>
</ul>
<br/>
<p>
Nicolas, can you book a meeting room for our meeting of Friday 2pm?
</p>
<p>
Regards.
</p>
]]></field>
<field name="type">comment</field>
<field name="parent_id" ref="msg_group_1_2"/>
<field name="subtype_id" ref="mt_comment"/>
<field name="author_id" ref="base.partner_demo"/>
<field name="vote_user_ids" eval="[(6, 0, [ref('base.user_demo')])]"/>
<field name="date" eval="(DateTime.today() - timedelta(days=3)).strftime('%Y-%m-%d %H:%M')"/>
</record>
<!-- Whole Company messages -->
<record id="msg_whole_1_1" model="mail.message">
<field name="model">mail.group</field>
<field name="res_id" ref="mail.group_all_employees"/>
<field name="body"><![CDATA[
<p>
Great news!<br/>
Our company has received the Deloitte Fast 50 award. We are the fastest
growing company of the country, with a growth of 1549% over the past 5
years. You can get more information <a href="http://www.openerp.com/node/1244/2012/10">on our blog</a>.
</p>
]]></field>
<field name="type">comment</field>
<field name="author_id" ref="base.partner_demo"/>
<field name="date" eval="(DateTime.today() - timedelta(minutes=22)).strftime('%Y-%m-%d %H:%M')"/>
</record>
</data>
</openerp>

View File

@ -114,7 +114,7 @@ class mail_group(osv.Model):
alias_id = mail_alias.create_unique_alias(cr, uid,
# Using '+' allows using subaddressing for those who don't
# have a catchall domain setup.
{'alias_name': "group+"+vals['name']},
{'alias_name': "group+" + vals['name']},
model_name=self._name, context=context)
vals['alias_id'] = alias_id
@ -133,6 +133,7 @@ class mail_group(osv.Model):
'context': {'default_model': 'mail.group', 'default_res_id': mail_group_id, 'search_default_message_unread': True},
'res_model': 'mail.message',
'thread_level': 1,
'header_description': vals.get('description'),
}
cobj = self.pool.get('ir.actions.client')
newref = cobj.copy(cr, SUPERUSER_ID, ref[1], default={'params': str(params), 'name': vals['name']}, context=context)
@ -160,6 +161,13 @@ class mail_group(osv.Model):
result = super(mail_group, self).write(cr, uid, ids, vals, context=context)
if vals.get('group_ids'):
self._subscribe_users(cr, uid, ids, context=context)
# if description is changed: update client action
if vals.get('description'):
cobj = self.pool.get('ir.actions.client')
for action in [group.action for group in self.browse(cr, SUPERUSER_ID, ids, context=context) if group.action]:
new_params = action.params
new_params['header_description'] = vals.get('description')
cobj.write(cr, SUPERUSER_ID, [action.id], {'params': str(new_params)}, context=context)
return result
def action_follow(self, cr, uid, ids, context=None):

View File

@ -6,6 +6,17 @@
<field name="name">Discussion Group</field>
<field name="tag">mail.wall</field>
<field name="res_model">mail.message</field>
<field name="context">{
'search_default_message_unread': True
}</field>
<field name="params">{
'read_action': 'read'
}</field>
<field name="help" type="html">
<p>
No message in this group.
</p>
</field>
</record>
<!-- Group Kanban View !-->

View File

@ -377,7 +377,9 @@ class mail_message(osv.Model):
id_max = child_id
elif nb > 0:
exp_domain = [('id', '>=', id_min), ('id', '<=', id_max), ('id', 'child_of', message_id)]
messages.append(_get_expandable(exp_domain, nb, message_id, False))
idx = [msg.get('id') for msg in messages].index(child_id) + 1
# messages.append(_get_expandable(exp_domain, nb, message_id, False))
messages.insert(idx, _get_expandable(exp_domain, nb, message_id, False))
id_min, id_max, nb = max(child_ids), 0, 0
else:
id_min, id_max, nb = max(child_ids), 0, 0

View File

@ -79,7 +79,7 @@ class mail_thread(osv.AbstractModel):
# search for unread messages, directly in SQL to improve performances
cr.execute(""" SELECT m.res_id FROM mail_message m
RIGHT JOIN mail_notification n
ON (n.message_id = m.id AND n.partner_id = %s AND n.read = False)
ON (n.message_id = m.id AND n.partner_id = %s AND (n.read = False or n.read IS NULL))
WHERE m.model = %s AND m.res_id in %s""",
(user_pid, self._name, tuple(ids),))
msg_ids = [result[0] for result in cr.fetchall()]
@ -767,13 +767,19 @@ class mail_thread(osv.AbstractModel):
# 3. Post-processing
# HACK TDE FIXME: Chatter: attachments linked to the document (not done JS-side), load the message
if attachment_ids:
# TDE FIXME (?): when posting a private message, we use mail.thread as a model
# However, attaching doc to mail.thread is not possible, mail.thread does not have any table
model = self._name
if model == 'mail.thread':
model = False
filtered_attachment_ids = ir_attachment.search(cr, SUPERUSER_ID, [
('res_model', '=', 'mail.compose.message'),
('res_id', '=', 0),
('create_uid', '=', uid),
('id', 'in', attachment_ids)], context=context)
if filtered_attachment_ids:
ir_attachment.write(cr, SUPERUSER_ID, attachment_ids, {'res_model': self._name, 'res_id': thread_id}, context=context)
if thread_id and model:
ir_attachment.write(cr, SUPERUSER_ID, attachment_ids, {'res_model': model, 'res_id': thread_id}, context=context)
mail_message.write(cr, SUPERUSER_ID, [new_message_id], {'attachment_ids': [(6, 0, [pid for pid in attachment_ids])]}, context=context)
return new_message_id

View File

@ -84,29 +84,11 @@
'search_default_message_read': True
}</field>
<field name="params" eval="&quot;{
'domain': [('notification_ids.partner_id.user_ids', 'in', [uid])],
'view_mailbox': True,
'read_action': 'unread', }&quot;"/>
<field name="help" type="html">
<p>
No message found.
</p>
</field>
</record>
<record id="action_mail_sent_feeds" model="ir.actions.client">
<field name="name">Sent</field>
<field name="tag">mail.wall</field>
<field name="context">{
'default_model': 'res.users',
'default_res_id': uid
}</field>
<field name="params" eval="&quot;{
'domain': [('author_id.user_ids', 'in', [uid])],
'domain': ['|', ('notification_ids.partner_id.user_ids', 'in', [uid]), ('author_id.user_ids', 'in', [uid])],
'view_mailbox': True, }&quot;"/>
<field name="help" type="html">
<p>
<b>No message sent yet.</b>
No message found and no message sent yet.
</p><p>
Click on the top-right icon to compose a message. This
message will be sent by email if it's an internal contact.
@ -150,11 +132,5 @@
<field name="action" ref="action_mail_archives_feeds"/>
<field name="parent_id" ref="mail.mail_feeds"/>
</record>
<record id="mail_sentfeeds" model="ir.ui.menu">
<field name="name">Sent</field>
<field name="sequence" eval="18"/>
<field name="action" ref="action_mail_sent_feeds"/>
<field name="parent_id" ref="mail.mail_feeds"/>
</record>
</data>
</openerp>

View File

@ -220,9 +220,8 @@
/* --------------------- ATTACHMENTS --------------------- */
.openerp .oe_mail .oe_msg_attachment_list{
display: none;
margin-top: 12px;
margin-bottom: 12px;
margin-top: 4px;
margin-bottom: 4px;
}
.openerp .oe_mail .oe_msg_composer .oe_msg_attachment_list{
display: block;
@ -230,7 +229,7 @@
.openerp .oe_mail .oe_attachment{
display: inline-block;
width: 100px;
margin: 2px;
margin: 4px 2px;
min-height: 80px;
position: relative;
border-radius: 3px;
@ -243,7 +242,7 @@
padding: 1px 3px;
margin-top: 50px;
margin-bottom: 5px;
background: rgba(124, 123, 173, 0.13);
background: #F4F5FA;
overflow: hidden;
color: #4c4c4c;
text-shadow: none;
@ -299,12 +298,13 @@
.openerp .oe_mail .oe_attachment.oe_preview .oe_name{
position: absolute;
bottom: 0px;
margin: 0px;
margin: 3px;
left: 0px;
right: 0px;
max-height: 64px;
background: rgba(0,0,0,0.8);
color: white;
border-radius: 1px;
border-top-left-radius: 0px;
border-top-right-radius: 0px;
opacity: 0;
@ -333,9 +333,11 @@
position: relative;
margin:0px;
width: 100px;
height: 100px;
border-radius: 3px;
height: 80px;
border-radius: 1px;
border: solid 3px #FFF;
margin-left: -50px;
box-shadow: 0px 3px 10px rgba(0, 0, 0, 0.19);
}
.openerp .oe_mail .oe_attachment .oe_delete{
display: none;

View File

@ -251,7 +251,7 @@ openerp.mail = function (session) {
this.format_data();
// record options and data
this.show_record_name = this.record_name && !this.thread_level && this.model != 'res.partner';
this.show_record_name = this.options.show_record_name && this.record_name && !this.thread_level && this.model != 'res.partner';
this.options.show_read = false;
this.options.show_unread = false;
if (this.options.show_read_unread_button) {
@ -591,17 +591,17 @@ openerp.mail = function (session) {
//session.web.blockUI();
this.parent_thread.ds_thread.call('message_post_user_api', [
this.context.default_res_id,
mail.ChatterUtils.get_text2html(body),
body,
false,
this.context.default_parent_id,
attachments,
this.parent_thread.context
]).done(function (record) {
var thread = self.parent_thread;
var root = thread == self.options.root_thread;
if (self.options.display_indented_thread < self.thread_level && thread.parent_message) {
var thread = thread.parent_message.parent_thread;
}
var root = thread == self.options.root_thread;
// create object and attach to the thread object
thread.message_fetch([['id', 'child_of', [self.id]]], false, [record], function (arg, data) {
var message = thread.create_message_object( data[0] );
@ -734,7 +734,7 @@ openerp.mail = function (session) {
if(this.thread_level < this.options.display_indented_thread) {
this.create_thread();
}
this.$('.oe_msg_attachments, .oe_msg_images').addClass("oe_hidden");
this.display_attachments();
this.ds_notification = new session.web.DataSetSearch(this, 'mail.notification');
this.ds_message = new session.web.DataSetSearch(this, 'mail.message');
@ -752,8 +752,6 @@ openerp.mail = function (session) {
this.$('.oe_reply').on('click', this.on_message_reply);
this.$('.oe_star').on('click', this.on_star);
this.$('.oe_msg_vote').on('click', this.on_vote);
this.$('.oe_view_attachments').on('click', this.on_view_attachments);
},
/* Call the on_compose_message on the thread of this message. */
@ -812,17 +810,6 @@ openerp.mail = function (session) {
}
},
/* Call the on_compose_message on the thread of this message. */
on_view_attachments:function (event) {
event.stopPropagation();
var self = this;
if (!this.toggle_attachment) {
self.display_attachments();
this.toggle_attachment = true;
}
this.$('.oe_msg_attachment_list').toggle(200);
},
/**
* Wait a confirmation for delete the message on the DB.
* Make an animate destroy
@ -857,7 +844,10 @@ openerp.mail = function (session) {
msg.animated_destroy(150);
} else {
msg.renderElement();
msg.start()
msg.start();
}
if( self.options.root_thread.__parentedParent.__parentedParent.do_reload_menu_emails ) {
self.options.root_thread.__parentedParent.__parentedParent.do_reload_menu_emails();
}
});
@ -997,10 +987,7 @@ openerp.mail = function (session) {
init: function (parent, datasets, options) {
this._super(parent, options);
this.domain = options.domain || [];
this.context = _.extend({
default_model: 'mail.thread',
default_res_id: 0,
default_parent_id: false }, options.context || {});
this.context = _.extend(options.context || {});
this.options = options.options;
this.options.root_thread = (options.options.root_thread != undefined ? options.options.root_thread : this);
@ -1243,6 +1230,7 @@ openerp.mail = function (session) {
'default_parent_id': self.id,
}});
} else {
data.record_name= (data.record_name != '' && data.record_name) || (self.parent_message && self.parent_message.record_name);
var message = new mail.ThreadMessage(self, data, {'context':{
'default_model': data.model,
'default_res_id': data.res_id,
@ -1252,8 +1240,7 @@ openerp.mail = function (session) {
// check if the message is already create
for (var i in self.messages) {
if (self.messages[i] && self.messages[i].id == message.id) {
console.log('Reload message', message.id);
if (message.id && self.messages[i] && self.messages[i].id == message.id) {
self.messages[i].destroy();
}
}
@ -1280,10 +1267,9 @@ openerp.mail = function (session) {
this.$('.oe_view_nocontent').remove();
if (dom_insert_after) {
message.insertAfter(dom_insert_after);
}if (prepend) {
} else if (prepend) {
message.prependTo(self.$el);
} else {
message.appendTo(self.$el);
@ -1460,6 +1446,7 @@ openerp.mail = function (session) {
'show_record_name' : false,
'show_compose_message' : false,
'show_compact_message' : false,
'compose_placeholder': false,
'view_inbox': false,
'message_ids': undefined,
}, this.action.params);
@ -1524,14 +1511,18 @@ openerp.mail = function (session) {
init: function (parent, node) {
this._super.apply(this, arguments);
this.node = _.clone(node);
this.node.params = _.extend({
'display_indented_thread': -1,
'show_reply_button': false,
'show_read_unread_button': false,
'show_record_name': false,
'show_compact_message': 1,
}, this.node.params);
if (this.node.attrs.placeholder) {
this.node.params.compose_placeholder = this.node.attrs.placeholder;
}
this.domain = this.node.params && this.node.params.domain || [];
},
@ -1603,7 +1594,7 @@ openerp.mail = function (session) {
this.action = _.clone(action);
this.domain = this.action.params.domain || this.action.domain || [];
this.context = this.action.params.context || this.action.context || {};
this.context = _.extend(this.action.params.context || {}, this.action.context || {});
this.defaults = {};
for (var key in this.context) {
@ -1617,6 +1608,7 @@ openerp.mail = function (session) {
'show_reply_button': true,
'show_read_unread_button': true,
'show_compose_message': true,
'show_record_name': true,
'show_compact_message': this.action.params.view_mailbox ? false : 1,
'view_inbox': false,
}, this.action.params);
@ -1629,7 +1621,23 @@ openerp.mail = function (session) {
if (! this.searchview.has_defaults) {
this.message_render();
}
},
/**
* crete an object "related_menu"
* contain the menu widget and the the sub menu related of this wall
*/
do_reload_menu_emails: function () {
var menu = this.__parentedParent.__parentedParent.menu;
// return this.rpc("/web/menu/load", {'menu_id': 100}).done(function(r) {
// _.each(menu.data.data.children, function (val) {
// if (val.id == 100) {
// val.children = _.find(r.data.children, function (r_val) {return r_val.id == 100;}).children;
// }
// });
// var r = menu.data;
// window.setTimeout(function(){menu.do_reload();}, 0);
// });
},
/**

View File

@ -194,6 +194,7 @@ openerp_mail_followers = function(session, mail) {
display_subtypes:function (data) {
var self = this;
var subtype_list_ul = this.$('.oe_subtype_list');
subtype_list_ul.empty();
var records = data[this.view.datarecord.id || this.view.dataset.ids[0]].message_subtype_data;
_(records).each(function (record, record_name) {
record.name = record_name;

View File

@ -39,8 +39,9 @@
</div>
</div>
<div t-if="widget.show_compact_message and !widget.show_composer" t-attf-class="oe_msg oe_msg_composer_compact #{widget.thread_level and widget.options.display_indented_thread > -1 ? 'oe_msg_indented' : ''}">
<textarea t-if="!widget.options.view_mailbox" class="field_text oe_compact" placeholder="Write to the followers of this docmuent..."/>
<textarea t-if="widget.options.view_mailbox" class="field_text oe_compact" placeholder="Write to my followers..."/>
<textarea t-if="widget.options.compose_placeholder" class="field_text oe_compact" t-att-placeholder="widget.options.compose_placeholder"/>
<textarea t-if="!widget.options.compose_placeholder and !widget.options.view_mailbox" class="field_text oe_compact" placeholder="Write an internal note..."/>
<textarea t-if="!widget.options.compose_placeholder and widget.options.view_mailbox" class="field_text oe_compact" placeholder="Share to my followers..."/>
</div>
<span t-if="!(widget.show_compact_message and !widget.show_composer) and !widget.show_composer" class="oe_placeholder_compose"></span>
</t>
@ -84,7 +85,7 @@
</t>
<t t-if="attachment.filetype === 'webimage'">
<div t-attf-class="oe_attachment oe_preview #{attachment.upload ? 'oe_uploading' : ''}">
<a t-att-href='attachment.url'><img t-att-src="widget.attachments_resize_image(attachment.id, [100,100])"></img></a>
<a t-att-href='attachment.url'><img t-att-src="widget.attachments_resize_image(attachment.id, [100,80])"></img></a>
<div class='oe_delete oe_e'>[</div>
<div class='oe_name'><t t-raw='attachment.name' /></div>
<div class='oe_progress_bar'>
@ -101,7 +102,13 @@
<t t-name="mail.thread.list_recipients">
<div class="oe_mail_list_recipients">
To:
<span t-if="!widget.is_private" class="oe_all_follower">Followers <t t-raw="' of ' + (widget.parent_thread.parent_message.record_name ? '&quot;' + widget.parent_thread.parent_message.record_name + '&quot;' : 'this document')"/></span>
<t t-if="!widget.is_private">
<span class="oe_all_follower">
Followers of
<t t-if="widget.parent_thread.parent_message.record_name" t-raw="'&quot;' + widget.parent_thread.parent_message.record_name + '&quot;'"/>
<t t-if="!widget.parent_thread.parent_message.record_name">this document</t>
</span>
</t>
<t t-if="!widget.is_private and widget.partner_ids.length"> and </t>
<t t-set="inc" t-value="0"/>
<t t-if="widget.partner_ids.length" t-foreach="widget.partner_ids" t-as="partner"><span t-attf-class="oe_partner_follower #{inc>=3?'oe_hidden':''}"><t t-if="inc" t-raw="', '"/><a t-attf-href="#model=res.partner&amp;id=#{partner[0]}"><t t-raw="partner[1]"/></a></span><t t-set="inc" t-value="inc+1"/>
@ -129,9 +136,15 @@
<td colspan="2">
<h2 class="oe_view_title">
<span class="oe_view_title_text">
Email box
<t t-raw="widget.action.name"/>
</span>
</h2>
<t t-if="widget.action.params.header_description">
<br/>
<span class="oe_view_subtitle_text">
<t t-raw="widget.action.params.header_description"/>
</span>
</t>
</td>
<td><div class="oe_view_manager_view_search" t-opentag="true"/></td>
</tr>
@ -192,13 +205,11 @@
</div>
<!-- message itself -->
<div class="oe_msg_content">
<h1 t-if="widget.subject and !widget.thread_level" class="oe_msg_title">
<t t-raw="widget.subject"/>
<h1 t-if="(widget.show_record_name or widget.subject) and !widget.thread_level" class="oe_msg_title">
<a t-if="widget.show_record_name" class="oe_mail_action_model" t-attf-href="#model=#{widget.model}&amp;id=#{widget.res_id}"><t t-raw="widget.record_name"/></a>
<t t-if="widget.subject" t-raw="widget.subject"/>
</h1>
<div class="oe_msg_body">
<t t-if="widget.show_record_name">
<a class="oe_mail_action_model" t-attf-href="#model=#{widget.model}&amp;id=#{widget.res_id}"><t t-raw="widget.record_name"/></a>
</t>
<t t-raw="widget.body"/>
</div>
</div>
@ -209,13 +220,6 @@
<a t-if="widget.author_id" t-attf-href="#model=res.partner&amp;id=#{widget.author_id[0]}"><t t-raw="widget.author_id[1]"/></a>
<span class='oe_subtle'></span>
<span t-att-title="widget.date"><t t-raw="widget.timerelative"/></span>
<t t-if='widget.attachment_ids.length > 0'>
<span class='oe_subtle'></span>
<a class="oe_view_attachments">
<t t-if="widget.attachment_ids.length == 1">1 Attachment</t>
<t t-if="widget.attachment_ids.length > 1"><t t-raw="widget.attachment_ids.length"/> Attachments</t>
</a>
</t>
<span class='oe_subtle'></span>
<t t-call="mail.thread.message.vote"/>
</div>

View File

@ -60,7 +60,7 @@ Mr Demo Portal</field>
<record id="message_company_news0_comment2" model="mail.message">
<field name="model">mail.group</field>
<field name="res_id" ref="company_news_feed"/>
<field name="body"><![CDATA[<p>This feature is realy great! We will be able to communicate directly to our partners!</p>]]></field>
<field name="body"><![CDATA[<p>This feature is really great! We will be able to communicate directly to our partners!</p>]]></field>
<field name="parent_id" ref="message_company_news0"/>
<field name="type">comment</field>
<field name="subtype_id" ref="mail.mt_comment"/>