From 091de4eb755b05bf1b6e2019fa84580ff0e1ad8d Mon Sep 17 00:00:00 2001
From: "Ravi Gohil (OpenERP)"
Date: Fri, 4 Apr 2014 12:32:54 +0530
Subject: [PATCH 1/6] [FIX] account_budget: Added missing 1 day in the(to the
elapsed days and total days) calculation of 'Theoretical Amount' in order to
have correct amount value for it. (Maintenance Case: 606232)
bzr revid: rgo@tinyerp.com-20140404070254-ey27l4kq6d1vypq9
---
addons/account_budget/account_budget.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/account_budget/account_budget.py b/addons/account_budget/account_budget.py
index a88c468fff1..daec4ea0a2f 100644
--- a/addons/account_budget/account_budget.py
+++ b/addons/account_budget/account_budget.py
@@ -164,7 +164,7 @@ class crossovered_budget_lines(osv.osv):
elapsed = strToDate(date_to) - strToDate(date_to)
if total.days:
- theo_amt = float(elapsed.days / float(total.days)) * line.planned_amount
+ theo_amt = float((elapsed.days + 1) / float(total.days + 1)) * line.planned_amount
else:
theo_amt = line.planned_amount
From 4065e368296a9cd22b551682ee1e89952fd86238 Mon Sep 17 00:00:00 2001
From: Olivier Dony
Date: Thu, 10 Apr 2014 16:02:44 +0200
Subject: [PATCH 2/6] [FIX] setup: allow using pywebdav 0.9.4.1 (and possible
future patches), we only want to stay below 0.9.8
lp bug: https://launchpad.net/bugs/1305872 fixed
bzr revid: odo@openerp.com-20140410140244-wu2l4hb5o1ct7tmm
---
setup.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/setup.py b/setup.py
index a6d5702e632..9dc814d420d 100644
--- a/setup.py
+++ b/setup.py
@@ -131,7 +131,7 @@ setuptools.setup(
'python-ldap', # optional
'python-openid',
'pytz',
- 'pywebdav <= 0.9.4',
+ 'pywebdav < 0.9.8',
'pyyaml',
'reportlab', # windows binary pypi.python.org/pypi/reportlab
'simplejson',
From 63e9150cff2f414713b8d88265758e203f336cb2 Mon Sep 17 00:00:00 2001
From: Launchpad Translations on behalf of openerp <>
Date: Fri, 11 Apr 2014 05:59:30 +0000
Subject: [PATCH 3/6] Launchpad automatic translations update.
bzr revid: launchpad_translations_on_behalf_of_openerp-20140411055930-7coykr7rveqsucp3
---
addons/hr_expense/i18n/de.po | 21 ++++++++++++++++-----
addons/sale/i18n/pl.po | 10 +++++-----
2 files changed, 21 insertions(+), 10 deletions(-)
diff --git a/addons/hr_expense/i18n/de.po b/addons/hr_expense/i18n/de.po
index 18b400da9ff..9f8177b66f4 100644
--- a/addons/hr_expense/i18n/de.po
+++ b/addons/hr_expense/i18n/de.po
@@ -8,13 +8,13 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME \n"
"POT-Creation-Date: 2013-06-07 19:36+0000\n"
-"PO-Revision-Date: 2014-04-05 22:16+0000\n"
+"PO-Revision-Date: 2014-04-10 13:40+0000\n"
"Last-Translator: Rudolf Schnapka \n"
"Language-Team: German \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-06 06:53+0000\n"
+"X-Launchpad-Export-Date: 2014-04-11 05:59+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: hr_expense
@@ -30,6 +30,8 @@ msgid ""
"No purchase account found for the product %s (or for his category), please "
"configure one."
msgstr ""
+"Kein Einkaufskonto zum Produkt %s (oder dessen Warengruppe) gefunden, bitte "
+"eines festlegen."
#. module: hr_expense
#: model:ir.model,name:hr_expense.model_hr_expense_line
@@ -100,7 +102,7 @@ msgstr "Ungelesene Mitteilungen"
#. module: hr_expense
#: selection:hr.expense.expense,state:0
msgid "Waiting Payment"
-msgstr ""
+msgstr "Zahlung erwartet"
#. module: hr_expense
#: field:hr.expense.expense,company_id:0
@@ -201,7 +203,7 @@ msgstr ""
#. module: hr_expense
#: view:hr.expense.expense:0
msgid "Open Accounting Entries"
-msgstr ""
+msgstr "Offene Buchungen"
#. module: hr_expense
#: help:hr.expense.expense,message_unread:0
@@ -289,6 +291,13 @@ msgid ""
" If the accounting entries are made for the expense request, the status is "
"'Waiting Payment'."
msgstr ""
+"Wenn der Spesenantrag im Status \"Entwurf\" ist\n"
+" wird er vom Benutzer bestätigt und zum Vorgesetzten mit Status \"Erwartet "
+"Bestätigung\" weitergeleitet.\n"
+"Wenn der Vorgesetzte diesen bestätigt gelangt er in den Status "
+"\"Akzeptiert\".\n"
+"Wenn dann die Buchungen für die Spesenantrag erfolgt sind, geht der Status "
+"auf \"Erwarte Zahlung\" über."
#. module: hr_expense
#: view:hr.expense.expense:0
@@ -447,13 +456,15 @@ msgstr "Genehmigungsdatum"
#: code:addons/hr_expense/hr_expense.py:378
#, python-format
msgid "Expense Account Move"
-msgstr ""
+msgstr "Spesenbuchung"
#. module: hr_expense
#: code:addons/hr_expense/hr_expense.py:240
#, python-format
msgid "The employee must have a payable account set on his home address."
msgstr ""
+"Der Mitarbeiter muss über ein Kreditorenkonto mit seiner Heimadresse "
+"verfügen."
#. module: hr_expense
#: view:hr.expense.report:0
diff --git a/addons/sale/i18n/pl.po b/addons/sale/i18n/pl.po
index 2f5d6db4ab8..d857da53615 100644
--- a/addons/sale/i18n/pl.po
+++ b/addons/sale/i18n/pl.po
@@ -8,14 +8,14 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME \n"
"POT-Creation-Date: 2013-06-07 19:36+0000\n"
-"PO-Revision-Date: 2014-02-22 18:59+0000\n"
-"Last-Translator: Dariusz Żbikowski \n"
+"PO-Revision-Date: 2014-04-10 20:03+0000\n"
+"Last-Translator: Dariusz Żbikowski (Krokus) \n"
"Language-Team: Polish \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-02-23 07:45+0000\n"
-"X-Generator: Launchpad (build 16926)\n"
+"X-Launchpad-Export-Date: 2014-04-11 05:59+0000\n"
+"X-Generator: Launchpad (build 16976)\n"
#. module: sale
#: model:ir.model,name:sale.model_account_config_settings
@@ -305,7 +305,7 @@ msgstr ""
" To jest lista pozycji do fakturowania. Możesz fakturować\n"
" zamówienie sprzedaży częściowo po pozycjach. Nie\n"
" potrzebujesz tej listy, jeśli fakturujesz z wydań\n"
-" zewnętrznych lub całościowo z amówienia.\n"
+" zewnętrznych lub całościowo z zamówienia.\n"
"
\n"
" "
From 4ed8413dc744a34784906b0560315934c121d70f Mon Sep 17 00:00:00 2001
From: Olivier Dony
Date: Fri, 11 Apr 2014 12:13:49 +0200
Subject: [PATCH 4/6] [FIX] mail.thread: avoid wrongly matching model,id from a
foreign OpenERP system
When emails transit from an OpenERP system to another
there is a chance of wrongly considering the foreign
model,id pair as local, possibly attaching a reply
to a wrong parent message.
This naive heuristic ignore the foreign identifiers
unless the hostname of the message-id mentioned in
the In-Reply-To header matches the local one.
This may fail after a change of local hostname but
is still better than the alternative.
In OpenERP v8 we should stop including the model,res_id
in outgoing Message-Id headers and only rely on the
stored, opaque, unique Message-Ids, preventing
any future mismatch.
bzr revid: odo@openerp.com-20140411101349-h3jmkdzvbr7lut26
---
addons/mail/mail_thread.py | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/addons/mail/mail_thread.py b/addons/mail/mail_thread.py
index 0c911bc51fe..97f09f17eaf 100644
--- a/addons/mail/mail_thread.py
+++ b/addons/mail/mail_thread.py
@@ -26,6 +26,7 @@ import email
import logging
import pytz
import re
+import socket
import time
import xmlrpclib
from email.message import Message
@@ -539,8 +540,12 @@ class mail_thread(osv.AbstractModel):
if ref_match:
thread_id = int(ref_match.group(1))
model = ref_match.group(2) or model
+ our_hostname = socket.gethostname()
+ reply_to_hostname = ref_match.group(3)
+ # do not match forwarded emails from another OpenERP system (thread_id collision!)
+ is_reply_to_local = (our_hostname == reply_to_hostname)
model_pool = self.pool.get(model)
- if thread_id and model and model_pool and model_pool.exists(cr, uid, thread_id) \
+ if thread_id and is_reply_to_local and model and model_pool and model_pool.exists(cr, uid, thread_id) \
and hasattr(model_pool, 'message_update'):
_logger.info('Routing mail from %s to %s with Message-Id %s: direct reply to model: %s, thread_id: %s, custom_values: %s, uid: %s',
email_from, email_to, message_id, model, thread_id, custom_values, uid)
From 452c77c09b9093885d61978733cca9e3e76793cc Mon Sep 17 00:00:00 2001
From: Denis Ledoux
Date: Fri, 11 Apr 2014 15:42:03 +0200
Subject: [PATCH 5/6] [FIX] 500 error on connection when using PyWebDAV 0.9.4
(and maybe others)
Courtesy of Holger Brunn (Therp)
bzr revid: dle@openerp.com-20140411134203-lxt4mnquiiclv6w3
---
addons/document_webdav/webdav_server.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/addons/document_webdav/webdav_server.py b/addons/document_webdav/webdav_server.py
index 1ee89eb04c3..fbe53fa4efe 100644
--- a/addons/document_webdav/webdav_server.py
+++ b/addons/document_webdav/webdav_server.py
@@ -93,6 +93,8 @@ class DAVHandler(DAVRequestHandler, HttpOptions, FixSendError):
self.client_address = client_address
self.server = server
self.setup()
+ if hasattr(self, '_init_buffer'):
+ self._init_buffer()
def get_userinfo(self, user, pw):
return False
From 9861b5cada9da17a126ccbddf1a226ba7f3e5586 Mon Sep 17 00:00:00 2001
From: Olivier Dony
Date: Fri, 11 Apr 2014 16:24:29 +0200
Subject: [PATCH 6/6] [FIX] mail.thread: avoid overwriting thread_id/model with
foreign values when reply-to hostname does not match + fix tests
This improve previous commit by making sure we
never consider the thread_id/model values in the
In-Reply-To/References header if the host name
did not match.
Also fixes the tests that were using the
6.1 compatibility mode to post in a mail group
thread instead of specifying the right
message-id.
bzr revid: odo@openerp.com-20140411142429-y0rpkzqbrsabxqsg
---
addons/mail/mail_thread.py | 23 +++++++++---------
addons/mail/tests/test_mail_gateway.py | 32 +++++++++++++-------------
2 files changed, 28 insertions(+), 27 deletions(-)
diff --git a/addons/mail/mail_thread.py b/addons/mail/mail_thread.py
index 97f09f17eaf..83f3693e3be 100644
--- a/addons/mail/mail_thread.py
+++ b/addons/mail/mail_thread.py
@@ -538,18 +538,19 @@ class mail_thread(osv.AbstractModel):
thread_references = references or in_reply_to
ref_match = thread_references and tools.reference_re.search(thread_references)
if ref_match:
- thread_id = int(ref_match.group(1))
- model = ref_match.group(2) or model
- our_hostname = socket.gethostname()
- reply_to_hostname = ref_match.group(3)
+ reply_thread_id = int(ref_match.group(1))
+ reply_model = ref_match.group(2) or model
+ reply_hostname = ref_match.group(3)
+ local_hostname = socket.gethostname()
# do not match forwarded emails from another OpenERP system (thread_id collision!)
- is_reply_to_local = (our_hostname == reply_to_hostname)
- model_pool = self.pool.get(model)
- if thread_id and is_reply_to_local and model and model_pool and model_pool.exists(cr, uid, thread_id) \
- and hasattr(model_pool, 'message_update'):
- _logger.info('Routing mail from %s to %s with Message-Id %s: direct reply to model: %s, thread_id: %s, custom_values: %s, uid: %s',
- email_from, email_to, message_id, model, thread_id, custom_values, uid)
- return [(model, thread_id, custom_values, uid)]
+ if local_hostname == reply_hostname:
+ thread_id, model = reply_thread_id, reply_model
+ model_pool = self.pool.get(model)
+ if thread_id and model and model_pool and model_pool.exists(cr, uid, thread_id) \
+ and hasattr(model_pool, 'message_update'):
+ _logger.info('Routing mail from %s to %s with Message-Id %s: direct reply to model: %s, thread_id: %s, custom_values: %s, uid: %s',
+ email_from, email_to, message_id, model, thread_id, custom_values, uid)
+ return [(model, thread_id, custom_values, uid)]
# Verify whether this is a reply to a private message
if in_reply_to:
diff --git a/addons/mail/tests/test_mail_gateway.py b/addons/mail/tests/test_mail_gateway.py
index e7a22065ea1..bc2f207464c 100644
--- a/addons/mail/tests/test_mail_gateway.py
+++ b/addons/mail/tests/test_mail_gateway.py
@@ -318,11 +318,11 @@ class TestMailgateway(TestMailBase):
# Test2: discussion update
# --------------------------------------------------
- # Do: even with a wrong destination, a reply should end up in the correct thread
+ # Do: even with a wrong destination, a reply should end up in the correct thread
frog_groups = format_and_process(MAIL_TEMPLATE, email_from='other@gmail.com',
msg_id='<1198923581.41972151344608186760.JavaMail.diff1@agrolait.com>',
to='erroneous@example.com>', subject='Re: news',
- extra='In-Reply-To: <12321321-openerp-%d-mail.group@example.com>\n' % frog_group.id)
+ extra='In-Reply-To: <1198923581.41972151344608186760.JavaMail@agrolait.com>\n')
# Test: no group 'Re: news' created, still only 1 Frogs group
self.assertEqual(len(frog_groups), 0,
'message_process: reply on Frogs should not have created a new group with new subject')
@@ -339,8 +339,8 @@ class TestMailgateway(TestMailBase):
# Do: due to some issue, same email goes back into the mailgateway
frog_groups = format_and_process(MAIL_TEMPLATE, email_from='other@gmail.com',
- msg_id='<1198923581.41972151344608186760.JavaMail.diff1@agrolait.com>',
- subject='Re: news', extra='In-Reply-To: <12321321-openerp-%d-mail.group@example.com>\n' % frog_group.id)
+ to='erroneous@example.com>', subject='Re: news',
+ extra='In-Reply-To: <1198923581.41972151344608186760.JavaMail@agrolait.com>\n')
# Test: no group 'Re: news' created, still only 1 Frogs group
self.assertEqual(len(frog_groups), 0,
'message_process: reply on Frogs should not have created a new group with new subject')
@@ -366,28 +366,28 @@ class TestMailgateway(TestMailBase):
# Do: post a new message, with a known partner -> duplicate emails -> partner
format_and_process(MAIL_TEMPLATE, email_from='Lombrik Lubrik ',
- to='erroneous@example.com>', subject='Re: news (2)',
- msg_id='<1198923581.41972151344608186760.JavaMail.new1@agrolait.com>',
- extra='In-Reply-To: <12321321-openerp-%d-mail.group@example.com>\n' % frog_group.id)
+ subject='Re: news (2)',
+ msg_id='<1198923581.41972151344608186760.JavaMail.new1@agrolait.com>',
+ extra='In-Reply-To: <1198923581.41972151344608186760.JavaMail@agrolait.com>\n')
frog_groups = self.mail_group.search(cr, uid, [('name', '=', 'Frogs')])
frog_group = self.mail_group.browse(cr, uid, frog_groups[0])
# Test: author is A-Raoul (only existing)
self.assertEqual(frog_group.message_ids[0].author_id.id, extra_partner_id,
- 'message_process: email_from -> author_id wrong')
+ 'message_process: email_from -> author_id wrong')
# Do: post a new message, with a known partner -> duplicate emails -> user
frog_group.message_unsubscribe([extra_partner_id])
raoul_email = self.user_raoul.email
self.res_users.write(cr, uid, self.user_raoul_id, {'email': 'test_raoul@email.com'})
format_and_process(MAIL_TEMPLATE, email_from='Lombrik Lubrik ',
- to='erroneous@example.com>', subject='Re: news (3)',
- msg_id='<1198923581.41972151344608186760.JavaMail.new2@agrolait.com>',
- extra='In-Reply-To: <12321321-openerp-%d-mail.group@example.com>\n' % frog_group.id)
+ to='groups@example.com', subject='Re: news (3)',
+ msg_id='<1198923581.41972151344608186760.JavaMail.new2@agrolait.com>',
+ extra='In-Reply-To: <1198923581.41972151344608186760.JavaMail@agrolait.com>\n')
frog_groups = self.mail_group.search(cr, uid, [('name', '=', 'Frogs')])
frog_group = self.mail_group.browse(cr, uid, frog_groups[0])
# Test: author is Raoul (user), not A-Raoul
self.assertEqual(frog_group.message_ids[0].author_id.id, self.partner_raoul_id,
- 'message_process: email_from -> author_id wrong')
+ 'message_process: email_from -> author_id wrong')
# Do: post a new message, with a known partner -> duplicate emails -> partner because is follower
frog_group.message_unsubscribe([self.partner_raoul_id])
@@ -395,14 +395,14 @@ class TestMailgateway(TestMailBase):
raoul_email = self.user_raoul.email
self.res_users.write(cr, uid, self.user_raoul_id, {'email': 'test_raoul@email.com'})
format_and_process(MAIL_TEMPLATE, email_from='Lombrik Lubrik ',
- to='erroneous@example.com>', subject='Re: news (3)',
- msg_id='<1198923581.41972151344608186760.JavaMail.new3@agrolait.com>',
- extra='In-Reply-To: <12321321-openerp-%d-mail.group@example.com>\n' % frog_group.id)
+ to='groups@example.com', subject='Re: news (3)',
+ msg_id='<1198923581.41972151344608186760.JavaMail.new3@agrolait.com>',
+ extra='In-Reply-To: <1198923581.41972151344608186760.JavaMail@agrolait.com>\n')
frog_groups = self.mail_group.search(cr, uid, [('name', '=', 'Frogs')])
frog_group = self.mail_group.browse(cr, uid, frog_groups[0])
# Test: author is Raoul (user), not A-Raoul
self.assertEqual(frog_group.message_ids[0].author_id.id, extra_partner_id,
- 'message_process: email_from -> author_id wrong')
+ 'message_process: email_from -> author_id wrong')
self.res_users.write(cr, uid, self.user_raoul_id, {'email': raoul_email})