|
- [[ repeatIn(findflds(object.model), 'field') ]] [[ field[0] ]]
+ [[ repeatIn(findflds(object.model), 'field') ]] [[ field[0] ]]
|
[[ field[1].get('string', 'Unknown') ]], [[ field[1]['type'] ]] [[field[1].get('required',False) and ', required']] [[field[1].get('readonly',False) and ', readonly']]
diff --git a/bin/addons/base/module/report/ir_module_reference_print.py b/bin/addons/base/module/report/ir_module_reference_print.py
index b5c3468a0b3..47235430eff 100644
--- a/bin/addons/base/module/report/ir_module_reference_print.py
+++ b/bin/addons/base/module/report/ir_module_reference_print.py
@@ -37,12 +37,11 @@ class ir_module_reference_print(report_sxw.rml_parse):
return modobj.__doc__
def _object_find(self, module):
+ ids2 = self.pool.get('ir.model.data').search(self.cr, self.uid, [('module','=',module), ('model','=','ir.model')])
+ ids = []
+ for mod in self.pool.get('ir.model.data').browse(self.cr, self.uid, ids2):
+ ids.append(mod.res_id)
modobj = self.pool.get('ir.model')
- if module=='base':
- ids = modobj.search(self.cr, self.uid, [('model','=like','res%')])
- ids += modobj.search(self.cr, self.uid, [('model','=like','ir%')])
- else:
- ids = modobj.search(self.cr, self.uid, [('model','=like',module+'%')])
return modobj.browse(self.cr, self.uid, ids)
def _fields_find(self, obj):
diff --git a/bin/addons/base/module/wizard/wizard_import_lang.py b/bin/addons/base/module/wizard/wizard_import_lang.py
index 27e5eff26d8..82b67ab2ae4 100644
--- a/bin/addons/base/module/wizard/wizard_import_lang.py
+++ b/bin/addons/base/module/wizard/wizard_import_lang.py
@@ -34,8 +34,10 @@ view_form="""
-
+
+
"""
diff --git a/bin/addons/base/report/custom_new.xsl b/bin/addons/base/report/custom_new.xsl
index 2788c4d2ed9..d9f815be0df 100644
--- a/bin/addons/base/report/custom_new.xsl
+++ b/bin/addons/base/report/custom_new.xsl
@@ -14,19 +14,21 @@
-
+
-
+
+
-
+
+
-
+
@@ -36,7 +38,7 @@
-
+
@@ -53,8 +55,8 @@
|
-
-
+
+
|
@@ -79,12 +81,16 @@
+
+
+
+
diff --git a/bin/addons/base/res/res_user.py b/bin/addons/base/res/res_user.py
index d9f84a0d29d..a26e7ec6ede 100644
--- a/bin/addons/base/res/res_user.py
+++ b/bin/addons/base/res/res_user.py
@@ -1,7 +1,7 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
-# OpenERP, Open Source Management Solution
+# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2008 Tiny SPRL (). All Rights Reserved
# $Id$
#
@@ -96,7 +96,7 @@ class users(osv.osv):
_columns = {
'name': fields.char('Name', size=64, required=True, select=True),
'login': fields.char('Login', size=64, required=True),
- 'password': fields.char('Password', size=64, invisible=True),
+ 'password': fields.char('Password', size=64, invisible=True, help="Keep empty if you don't want the user to be able to connect on the system."),
'signature': fields.text('Signature', size=64),
'address_id': fields.many2one('res.partner.address', 'Address'),
'active': fields.boolean('Active'),
@@ -138,6 +138,10 @@ class users(osv.osv):
ids = self.pool.get('ir.actions.act_window').search(cr, uid, [('usage','=','menu')])
return ids and ids[0] or False
+ def _get_group(self,cr, uid, context={}):
+ ids = self.pool.get('res.groups').search(cr, uid, [('name','=','Employee')])
+ return ids or False
+
_defaults = {
'password' : lambda obj,cr,uid,context={} : '',
'context_lang': lambda *args: 'en_US',
@@ -145,6 +149,7 @@ class users(osv.osv):
'menu_id': _get_menu,
'action_id': _get_menu,
'company_id': _get_company,
+ 'groups_id': _get_group,
}
def company_get(self, cr, uid, uid2):
company_id = self.pool.get('res.users').browse(cr, uid, uid).company_id.id
diff --git a/bin/report/report_sxw.py b/bin/report/report_sxw.py
index 67f93fdb811..a776e4ee6c3 100644
--- a/bin/report/report_sxw.py
+++ b/bin/report/report_sxw.py
@@ -385,7 +385,7 @@ class rml_parse(object):
def _eval(self, expr):
try:
res = eval(expr, self.localcontext)
- if not res:
+ if (res is None) or (res=='') or (res is False):
res = ''
except Exception,e:
import traceback, sys
diff --git a/bin/tools/convert.py b/bin/tools/convert.py
index 557c1486516..f8207bcc585 100644
--- a/bin/tools/convert.py
+++ b/bin/tools/convert.py
@@ -1,7 +1,7 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
-# OpenERP, Open Source Management Solution
+# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2008 Tiny SPRL (). All Rights Reserved
# $Id$
#
@@ -375,6 +375,14 @@ form: module.record_id""" % (xml_id,)
and rec.getAttribute('auto_refresh').encode('utf-8')
# groups_id = rec.hasAttribute('groups') and rec.getAttribute('groups').encode('utf-8')
+ # def ref() added because , if context has ref('id') eval wil use this ref
+
+ active_id=str("active_id") # for further reference in client/bin/tools/__init__.py
+
+ def ref(str_id):
+ return self.id_get(cr, None, str_id)
+ context=eval(context)
+
res = {
'name': name,
'type': type,
@@ -582,7 +590,7 @@ form: module.record_id""" % (xml_id,)
rec_src = rec.getAttribute("search").encode('utf8')
rec_src_count = rec.getAttribute("count")
- severity = rec.getAttribute("severity").encode('ascii') or netsvc.LOG_ERROR
+ severity = rec.getAttribute("severity").encode('ascii') or netsvc.LOG_ERROR
rec_string = rec.getAttribute("string").encode('utf8') or 'unknown'
diff --git a/bin/tools/misc.py b/bin/tools/misc.py
index af765d58a7f..934bdd7a236 100644
--- a/bin/tools/misc.py
+++ b/bin/tools/misc.py
@@ -659,6 +659,7 @@ def get_languages():
'ro_RO': 'Romanian',
'ru_RU': 'Russian',
'sv_SE': 'Swedish',
+ 'ca_ES': 'CatalĂ ',
}
return languages
|