From 8f78e5a0a65dcd91a078aca5441f3ef1141a7f7e Mon Sep 17 00:00:00 2001
From: "dle@openerp.com" <>
Date: Mon, 24 Dec 2012 15:00:02 +0100
Subject: [PATCH 1/5] [FIX]Index content now works when adding attachement
bzr revid: dle@openerp.com-20121224140002-myl9eyp5e0st0kne
---
addons/document/document.py | 14 ++++++++++++++
addons/document/document_view.xml | 2 +-
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/addons/document/document.py b/addons/document/document.py
index 6cb2cabbf38..1671b6bc1ba 100644
--- a/addons/document/document.py
+++ b/addons/document/document.py
@@ -117,8 +117,22 @@ class document_file(osv.osv):
# take partner from uid
if vals.get('res_id', False) and vals.get('res_model', False) and not vals.get('partner_id', False):
vals['partner_id'] = self.__get_partner_id(cr, uid, vals['res_model'], vals['res_id'], context)
+ if vals.get('datas', False):
+ vals['file_type'], vals['index_content'] = self._index(cr, uid, vals['datas'].decode('base64'), vals.get('datas_fname', False), None)
return super(document_file, self).create(cr, uid, vals, context)
+ def write(self, cr, uid, ids, vals, context=None):
+ if context is None:
+ context = {}
+ if vals.get('datas', False):
+ vals['file_type'], vals['index_content'] = self._index(cr, uid, vals['datas'].decode('base64'), vals.get('datas_fname', False), None)
+ return super(document_file, self).write(cr, uid, ids, vals, context)
+
+ def _index(self, cr, uid, data, datas_fname, file_type):
+ mime, icont = cntIndex.doIndex(data, datas_fname, file_type or None, None)
+ icont_u = ustr(icont)
+ return mime, icont_u
+
def __get_partner_id(self, cr, uid, res_model, res_id, context=None):
""" A helper to retrieve the associated partner from any res_model+id
It is a hack that will try to discover if the mentioned record is
diff --git a/addons/document/document_view.xml b/addons/document/document_view.xml
index 4c2456de827..68f294b251c 100644
--- a/addons/document/document_view.xml
+++ b/addons/document/document_view.xml
@@ -167,7 +167,7 @@
-
+
From 47b4ed737f9bc29398867d729bcc7a7a5122709e Mon Sep 17 00:00:00 2001
From: Arnaud Pineux
Date: Wed, 26 Dec 2012 11:55:40 +0100
Subject: [PATCH 2/5] [FIX] lunch alert for every week is repaired
bzr revid: api@openerp.com-20121226105540-hl97n1o61id0j3sr
---
addons/lunch/lunch.py | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/addons/lunch/lunch.py b/addons/lunch/lunch.py
index 0a693f50a3f..f61ecc8eb7d 100644
--- a/addons/lunch/lunch.py
+++ b/addons/lunch/lunch.py
@@ -94,9 +94,8 @@ class lunch_order(osv.Model):
"""
today = datetime.now().isoweekday()
assert 1 <= today <= 7, "Should be between 1 and 7"
- mapping = dict((idx, name) for idx, name in enumerate('monday tuestday wednesday thursday friday saturday sunday'.split()))
- if today in mapping:
- return mapping[today]
+ mapping = dict((idx, name) for idx, name in enumerate('days monday tuesday wednesday thursday friday saturday sunday'.split()))
+ return alert[mapping[today]]
def can_display_alert(self, alert):
"""
From e5e8d2fbe00805b88fa6f925d14f7e9133b78ca8 Mon Sep 17 00:00:00 2001
From: "dle@openerp.com" <>
Date: Wed, 26 Dec 2012 12:01:41 +0100
Subject: [PATCH 3/5] [FIX]in leads form view, invisible Escalate button, when
sales team is blank,in sale order form view, visible update button in
Quotation Sent status
bzr revid: dle@openerp.com-20121226110141-fxrkpkbgh6bwy7j1
---
addons/crm/crm_lead_view.xml | 5 ++---
addons/sale/sale_view.xml | 2 +-
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/addons/crm/crm_lead_view.xml b/addons/crm/crm_lead_view.xml
index 2bab40ee457..24837cff586 100644
--- a/addons/crm/crm_lead_view.xml
+++ b/addons/crm/crm_lead_view.xml
@@ -156,7 +156,7 @@
-
+
@@ -421,8 +421,7 @@
-
+
diff --git a/addons/sale/sale_view.xml b/addons/sale/sale_view.xml
index 0edda45b6d1..7ded7cc1d42 100644
--- a/addons/sale/sale_view.xml
+++ b/addons/sale/sale_view.xml
@@ -246,7 +246,7 @@
From 19b34c4908ae7844c76ea06d7bf0e1c53f4593c5 Mon Sep 17 00:00:00 2001
From: Fabien Pinckaers
Date: Wed, 26 Dec 2012 15:25:24 +0100
Subject: [PATCH 4/5] [IMP] default analytic account type from so=contract
bzr revid: fp@tinyerp.com-20121226142524-7gdor0b13fvg0515
---
addons/sale/sale_view.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/sale/sale_view.xml b/addons/sale/sale_view.xml
index 7ded7cc1d42..18fdb739923 100644
--- a/addons/sale/sale_view.xml
+++ b/addons/sale/sale_view.xml
@@ -156,7 +156,7 @@
-
+
From 75272a50590bb37f51a80ee550a1d5afe3aa9bfa Mon Sep 17 00:00:00 2001
From: Cedric Snauwaert
Date: Wed, 26 Dec 2012 16:06:44 +0100
Subject: [PATCH 5/5] [FIX]traceback when trying to change appraisal plan in
employee form view
lp bug: https://launchpad.net/bugs/1091284 fixed
bzr revid: csn@openerp.com-20121226150644-u6ciicp8cao4bvm3
---
addons/hr_evaluation/hr_evaluation_view.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/hr_evaluation/hr_evaluation_view.xml b/addons/hr_evaluation/hr_evaluation_view.xml
index 54baee5f538..52b288fdad5 100644
--- a/addons/hr_evaluation/hr_evaluation_view.xml
+++ b/addons/hr_evaluation/hr_evaluation_view.xml
@@ -140,7 +140,7 @@
-
+