[MERGE] lp:931523 (fix error message when pushing on Documents)

bzr revid: rco@openerp.com-20120222153220-0ezmr1as14egzh18
This commit is contained in:
Raphael Collet 2012-02-22 16:32:20 +01:00
commit f266fa4c53
5 changed files with 19 additions and 8 deletions

View File

@ -417,7 +417,8 @@ class mail_message(osv.osv):
if 'text/html' in msg.get('content-type', ''):
msg['body_html'] = body
msg['subtype'] = 'html'
body = tools.html2plaintext(body)
if body:
body = tools.html2plaintext(body)
msg['body_text'] = tools.ustr(body, encoding)
attachments = []

View File

@ -144,7 +144,16 @@ namespace OpenERPOutlookPlugin
OpenERPConnect openerp_connect = openerp_outlook.Connection;
ArrayList args = new ArrayList();
Hashtable vals = new Hashtable();
string email = Tools.GetHeader(mail); //TODO: Outlook.MailItem Should be Converted into MIME Message
string email;
if (Tools.GetHeader(mail)!= null)
{
email = Tools.GetHeader(mail); //TODO: Outlook.MailItem Should be Converted into MIME Message
}
else
{
email = "";
}
args.Add(model);
args.Add(email.ToString());
args.Add(thread_id);

View File

@ -44,6 +44,7 @@
<IncrementalBuild>false</IncrementalBuild>
<RegisterForComInterop>true</RegisterForComInterop>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<PlatformTarget>AnyCPU</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugSymbols>false</DebugSymbols>
@ -241,12 +242,6 @@
<Content Include="Resources\Success.gif" />
<Content Include="Resources\Task.png" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\OpenERPClient\OpenERPClient.csproj">
<Project>{8E62B8DF-E3A2-4429-A820-FB8A31C2EB00}</Project>
<Name>OpenERPClient</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
@ -264,6 +259,12 @@
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\OpenERPClient\OpenERPClient.csproj">
<Project>{8E62B8DF-E3A2-4429-A820-FB8A31C2EB00}</Project>
<Name>OpenERPClient</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
<PropertyGroup>
<PreBuildEvent>