[MERGE]: Merge with latest trunk-server

bzr revid: rpa@tinyerp.com-20120817050643-kq0o3ybi6uxry3j3
This commit is contained in:
Rucha (Open ERP) 2012-08-17 10:36:43 +05:30
commit dfb9b473a1
7 changed files with 24 additions and 22 deletions

View File

@ -65,7 +65,7 @@
<field name="summary"/>
<templates>
<t t-name="kanban-box">
<div class="oe_module_vignette oe_kanban_auto_height">
<div class="oe_module_vignette">
<t t-set="installed" t-value="record.state.raw_value == 'installed'"/>
<img t-attf-src="#{record.icon.value}" class="oe_module_icon"/>
<div class="oe_module_desc">

View File

@ -3,7 +3,7 @@
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
# Copyright (C) 2010-2011 OpenERP s.a. (<http://openerp.com>).
# Copyright (C) 2010-2012 OpenERP s.a. (<http://openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
@ -332,7 +332,7 @@ class res_users(osv.osv):
return super(res_users, self).copy(cr, uid, id, copydef, context)
def context_get(self, cr, uid, context=None):
user = self.browse(cr, uid, uid, context)
user = self.browse(cr, 1, uid, context)
result = {}
for k in self._all_columns.keys():
if k.startswith('context_'):

View File

@ -215,9 +215,10 @@
<field name="signature" readonly="0"/>
</group>
<footer>
<button name="preference_save" type="object" string="Save"/>
<button name="preference_cancel" special="cancel" string="Cancel"/>
<button name="preference_change_password" type="object" string="Change password"/>
<button name="preference_save" type="object" string="Save"/>
or
<button name="preference_cancel" string="Cancel" special="cancel" class="oe_link"/>
</footer>
</form>
</field>

View File

@ -8,7 +8,7 @@ Tests can be explicitely added to the `fast_suite` or `checks` lists or not.
See the :ref:`test-framework` section in the :ref:`features` list.
"""
from . import test_expression, test_ir_sequence, test_orm,\
from . import test_expression, test_html_sanitize, test_ir_sequence, test_orm,\
test_view_validation, test_uninstall
fast_suite = [
@ -17,6 +17,7 @@ fast_suite = [
checks = [
test_expression,
test_html_sanitize,
test_orm,
test_view_validation,
]

View File

@ -596,7 +596,9 @@ form: module.record_id""" % (xml_id,)
"act_window": 'STOCK_NEW',
"report.xml": 'STOCK_PASTE',
"wizard": 'STOCK_EXECUTE',
"url": 'STOCK_JUMP_TO'
"url": 'STOCK_JUMP_TO',
"client": 'STOCK_EXECUTE',
"server": 'STOCK_EXECUTE',
}
values['icon'] = icons.get(a_type,'STOCK_NEW')
if a_type=='act_window':
@ -625,18 +627,19 @@ form: module.record_id""" % (xml_id,)
values['icon'] = 'STOCK_EXECUTE'
if not values.get('name', False):
values['name'] = action_name
elif a_type=='wizard':
elif a_type in ['wizard', 'url', 'client', 'server'] and not values.get('name'):
a_id = self.id_get(cr, a_action)
cr.execute('select name from ir_act_wizard where id=%s', (int(a_id),))
a_table = 'ir_act_%s' % a_type
cr.execute('select name from %s where id=%%s' % a_table, (int(a_id),))
resw = cr.fetchone()
if (not values.get('name', False)) and resw:
values['name'] = resw[0]
elif a_type=='url':
a_id = self.id_get(cr, a_action)
cr.execute('select name from ir_act_url where id=%s', (int(a_id),))
resw = cr.fetchone()
if (not values.get('name')) and resw:
if resw:
values['name'] = resw[0]
if not values.get('name'):
# ensure menu has a name
values['name'] = rec_id or '?'
if rec.get('sequence'):
values['sequence'] = int(rec.get('sequence'))
if rec.get('icon'):
@ -658,9 +661,7 @@ form: module.record_id""" % (xml_id,)
groups_value.append((4, group_id))
values['groups_id'] = groups_value
xml_id = rec.get('id','').encode('utf8')
self._test_xml_id(xml_id)
pid = self.pool.get('ir.model.data')._update(cr, self.uid, 'ir.ui.menu', self.module, values, xml_id, noupdate=self.isnoupdate(data_node), mode=self.mode, res_id=res and res[0] or False)
pid = self.pool.get('ir.model.data')._update(cr, self.uid, 'ir.ui.menu', self.module, values, rec_id, noupdate=self.isnoupdate(data_node), mode=self.mode, res_id=res and res[0] or False)
if rec_id and pid:
self.idref[rec_id] = int(pid)

View File

@ -1,8 +1,8 @@
from pyquery import PyQuery as pq
import re
def html_sanitize(x):
return x # It seems that our test suite doesn't care.
if not x:
return x
root = pq("<div />")
@ -59,4 +59,4 @@ def append_to(new_ones, el):
else:
children[-1].tail = i
else:
el.append(i)
el.append(i)

View File

@ -102,7 +102,6 @@ setuptools.setup(
'mako',
'psycopg2',
'pydot',
'pyquery',
'python-dateutil < 2',
'python-ldap',
'python-openid',