diff --git a/bin/addons/base/__openerp__.py b/bin/addons/base/__openerp__.py
index bb419fc90d3..cc1ed3778c6 100644
--- a/bin/addons/base/__openerp__.py
+++ b/bin/addons/base/__openerp__.py
@@ -52,6 +52,7 @@
'module/wizard/base_import_language_view.xml',
'module/wizard/base_module_upgrade_view.xml',
'module/wizard/base_module_configuration_view.xml',
+ 'module/wizard/base_module_shortcut_data.xml',
'module/wizard/base_export_language_view.xml',
'module/wizard/base_update_translations_view.xml',
'res/res_request_view.xml',
@@ -59,6 +60,7 @@
'res/res_log_view.xml',
'res/partner/partner_report.xml',
'res/partner/partner_view.xml',
+ 'res/partner/partner_shortcut_data.xml',
'res/bank_view.xml',
'res/country_view.xml',
'res/res_currency_view.xml',
diff --git a/bin/addons/base/ir/ir_model.py b/bin/addons/base/ir/ir_model.py
index abbcec9130a..b054fd0e0db 100644
--- a/bin/addons/base/ir/ir_model.py
+++ b/bin/addons/base/ir/ir_model.py
@@ -554,10 +554,14 @@ class ir_model_data(osv.osv):
def __init__(self, pool, cr):
osv.osv.__init__(self, pool, cr)
- self.loads = {}
self.doinit = True
self.unlink_mark = {}
+ # also stored in pool to avoid being discarded along with this osv instance
+ if getattr(pool, 'model_data_reference_ids', None) is None:
+ self.pool.model_data_reference_ids = {}
+ self.loads = self.pool.model_data_reference_ids
+
def _auto_init(self, cr, context=None):
super(ir_model_data, self)._auto_init(cr, context)
cr.execute('SELECT indexname FROM pg_indexes WHERE indexname = \'ir_model_data_module_name_index\'')
diff --git a/bin/addons/base/ir/workflow/print_instance.py b/bin/addons/base/ir/workflow/print_instance.py
index 259fe51d41a..4dd1f3d063b 100644
--- a/bin/addons/base/ir/workflow/print_instance.py
+++ b/bin/addons/base/ir/workflow/print_instance.py
@@ -38,7 +38,7 @@ def graph_get(cr, graph, wkf_ids, nested=False, workitem={}):
cr.execute('select * from wkf where id=%s', (n['subflow_id'],))
wkfinfo = cr.dictfetchone()
graph2 = pydot.Cluster('subflow'+str(n['subflow_id']), fontsize='12', label = """\"Subflow: %s\\nOSV: %s\"""" % ( n['name'], wkfinfo['osv']) )
- (s1,s2) = graph_get(cr, graph2, n['subflow_id'], nested,workitem)
+ (s1,s2) = graph_get(cr, graph2, [n['subflow_id']], nested,workitem)
graph.add_subgraph(graph2)
actfrom[n['id']] = s2
actto[n['id']] = s1
diff --git a/bin/addons/base/module/wizard/base_module_configuration_view.xml b/bin/addons/base/module/wizard/base_module_configuration_view.xml
index 8ab47e2c2bc..f8abf1e2732 100644
--- a/bin/addons/base/module/wizard/base_module_configuration_view.xml
+++ b/bin/addons/base/module/wizard/base_module_configuration_view.xml
@@ -24,7 +24,7 @@
action = obj.start()
-
@@ -38,12 +38,6 @@
action
ir.actions.todo
-
- Reconfigure
- ir.ui.menu
-
-
-
diff --git a/bin/addons/base/module/wizard/base_module_shortcut_data.xml b/bin/addons/base/module/wizard/base_module_shortcut_data.xml
new file mode 100644
index 00000000000..e5faaabdd5e
--- /dev/null
+++ b/bin/addons/base/module/wizard/base_module_shortcut_data.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+ Reconfigure
+ ir.ui.menu
+
+
+
+
+
+
diff --git a/bin/addons/base/res/partner/partner.py b/bin/addons/base/res/partner/partner.py
index d7f5b11a71b..a2de7f9d154 100644
--- a/bin/addons/base/res/partner/partner.py
+++ b/bin/addons/base/res/partner/partner.py
@@ -273,7 +273,7 @@ res_partner()
class res_partner_address(osv.osv):
_description ='Partner Addresses'
_name = 'res.partner.address'
- _order = 'name'
+ _order = 'type, name'
_columns = {
'partner_id': fields.many2one('res.partner', 'Partner Name', ondelete='set null', select=True, help="Keep empty for a private address, not related to partner."),
'type': fields.selection( [ ('default','Default'),('invoice','Invoice'), ('delivery','Delivery'), ('contact','Contact'), ('other','Other') ],'Address Type', help="Used to select automatically the right address according to the context in sales and purchases documents."),
diff --git a/bin/addons/base/res/partner/partner_shortcut_data.xml b/bin/addons/base/res/partner/partner_shortcut_data.xml
new file mode 100644
index 00000000000..ee534a2ff6b
--- /dev/null
+++ b/bin/addons/base/res/partner/partner_shortcut_data.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+ Customers
+ ir.ui.menu
+
+
+
+
+
+
diff --git a/bin/addons/base/res/partner/partner_view.xml b/bin/addons/base/res/partner/partner_view.xml
index cf1d36cbaec..9d46404132c 100644
--- a/bin/addons/base/res/partner/partner_view.xml
+++ b/bin/addons/base/res/partner/partner_view.xml
@@ -590,12 +590,5 @@
groups="base.group_extended"
/>
-
- Customers
- ir.ui.menu
-
-
-
-
diff --git a/bin/addons/base/res/res_request.py b/bin/addons/base/res/res_request.py
index 90cd3662684..d7c87274ea1 100644
--- a/bin/addons/base/res/res_request.py
+++ b/bin/addons/base/res/res_request.py
@@ -54,9 +54,9 @@ class res_request(osv.osv):
return True
def request_get(self, cr, uid):
- cr.execute('select id from res_request where act_to=%s and (trigger_date<=%s or trigger_date is null) and active=True', (uid,time.strftime('%Y-%m-%d')))
+ cr.execute('select id from res_request where act_to=%s and (trigger_date<=%s or trigger_date is null) and active=True and state != %s', (uid,time.strftime('%Y-%m-%d'), 'closed'))
ids = map(lambda x:x[0], cr.fetchall())
- cr.execute('select id from res_request where act_from=%s and (act_to<>%s) and (trigger_date<=%s or trigger_date is null) and active=True', (uid,uid,time.strftime('%Y-%m-%d')))
+ cr.execute('select id from res_request where act_from=%s and (act_to<>%s) and (trigger_date<=%s or trigger_date is null) and active=True and state != %s', (uid,uid,time.strftime('%Y-%m-%d'), 'closed'))
ids2 = map(lambda x:x[0], cr.fetchall())
return (ids, ids2)
diff --git a/bin/report/interface.py b/bin/report/interface.py
index ce14883986c..36f54b31fdb 100644
--- a/bin/report/interface.py
+++ b/bin/report/interface.py
@@ -33,16 +33,12 @@ import render
import urllib
#
-# encode a value to a string in utf8 and converts XML entities
+# coerce any type to a unicode string (to preserve non-ascii characters)
+# and escape XML entities
#
-def toxml(val):
- if isinstance(val, str):
- str_utf8 = val
- elif isinstance(val, unicode):
- str_utf8 = val.encode('utf-8')
- else:
- str_utf8 = str(val)
- return str_utf8.replace('&', '&').replace('<','<').replace('>','>')
+def toxml(value):
+ unicode_value = tools.ustr(value)
+ return unicode_value.replace('&', '&').replace('<','<').replace('>','>')
class report_int(netsvc.Service):
def __init__(self, name, audience='*'):
diff --git a/bin/service/websrv_lib.py b/bin/service/websrv_lib.py
index 13ba6cd6e95..859845de8f8 100644
--- a/bin/service/websrv_lib.py
+++ b/bin/service/websrv_lib.py
@@ -30,6 +30,7 @@
import socket
import base64
+import errno
import SocketServer
from BaseHTTPServer import *
from SimpleHTTPServer import SimpleHTTPRequestHandler
diff --git a/bin/tools/translate.py b/bin/tools/translate.py
index 0f47b6f4051..cfc747bafe0 100644
--- a/bin/tools/translate.py
+++ b/bin/tools/translate.py
@@ -919,7 +919,12 @@ def trans_load_data(cr, fileobj, fileformat, lang, lang_name=None, verbose=True,
('src', '=', dic['src']),
]
if dic['type'] == 'model':
- args.append(('res_id', '=', dic['res_id']))
+ if dic['res_id'] is False:
+ args.append(('res_id', '=', 0))
+ args.append(('module', '=', dic['module']))
+ args.append(('xml_id', '=', dic['xml_id']))
+ else:
+ args.append(('res_id', '=', dic['res_id']))
ids = trans_obj.search(cr, uid, args)
if ids:
if context.get('overwrite') and dic['value']:
@@ -935,10 +940,10 @@ def trans_load_data(cr, fileobj, fileformat, lang, lang_name=None, verbose=True,
def trans_update_res_ids(cr):
cr.execute("""
UPDATE ir_translation
- SET res_id = (SELECT ir_model_data.res_id
+ SET res_id = COALESCE ((SELECT ir_model_data.res_id
FROM ir_model_data
WHERE ir_translation.module = ir_model_data.module
- AND ir_translation.xml_id = ir_model_data.name)
+ AND ir_translation.xml_id = ir_model_data.name), 0)
WHERE ir_translation.module is not null
AND ir_translation.xml_id is not null
AND ir_translation.res_id = 0;