[Merge]
bzr revid: vir@tinyerp.com-20101119044839-8cwlqycamcae42n6 bzr revid: vir@tinyerp.com-20101122044725-weeo06d2b5s2op3f bzr revid: vir@tinyerp.com-20101123044335-es0ltyh2128liyea bzr revid: vir@tinyerp.com-20101124050116-dd0n5f6ypvk58gtx
This commit is contained in:
@@ -30,7 +30,7 @@ import tools
|
||||
import tools.osutil
|
||||
from tools.safe_eval import safe_eval as eval
|
||||
import pooler
|
||||
|
||||
from tools.translate import _
|
||||
|
||||
import netsvc
|
||||
|
||||
@@ -806,7 +806,7 @@ def load_modules(db, force_demo=False, status=None, update_module=False):
|
||||
graph = create_graph(cr, ['base'], force)
|
||||
if not graph:
|
||||
logger.notifyChannel('init', netsvc.LOG_CRITICAL, 'module base cannot be loaded! (hint: verify addons-path)')
|
||||
raise osv.osv.except_osv('Could not load base module', 'module base cannot be loaded! (hint: verify addons-path)')
|
||||
raise osv.osv.except_osv(_('Could not load base module'), _('module base cannot be loaded! (hint: verify addons-path)'))
|
||||
has_updates = load_module_graph(cr, graph, status, perform_checks=(not update_module), report=report)
|
||||
|
||||
if update_module:
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
+598
-327
File diff suppressed because it is too large
Load Diff
+871
-430
File diff suppressed because it is too large
Load Diff
+791
-442
File diff suppressed because it is too large
Load Diff
+1164
-653
File diff suppressed because it is too large
Load Diff
+3956
-1965
File diff suppressed because it is too large
Load Diff
+685
-371
File diff suppressed because it is too large
Load Diff
+853
-469
File diff suppressed because it is too large
Load Diff
@@ -485,7 +485,7 @@ class actions_server(osv.osv):
|
||||
for field in fields:
|
||||
try:
|
||||
obj = getattr(obj, field)
|
||||
except Exception,e :
|
||||
except Exception:
|
||||
logger.notifyChannel('Workflow', netsvc.LOG_ERROR, 'Failed to parse : %s' % (field))
|
||||
|
||||
return obj
|
||||
@@ -506,7 +506,7 @@ class actions_server(osv.osv):
|
||||
for field in fields:
|
||||
try:
|
||||
obj = getattr(obj, field)
|
||||
except Exception,e :
|
||||
except Exception:
|
||||
logger.notifyChannel('Workflow', netsvc.LOG_ERROR, 'Failed to parse : %s' % (field))
|
||||
|
||||
return obj
|
||||
@@ -514,7 +514,6 @@ class actions_server(osv.osv):
|
||||
def merge_message(self, cr, uid, keystr, action, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
logger = netsvc.Logger()
|
||||
def merge(match):
|
||||
obj_pool = self.pool.get(action.model_id.model)
|
||||
id = context.get('active_id')
|
||||
|
||||
@@ -57,7 +57,7 @@ class ir_model(osv.osv):
|
||||
return []
|
||||
field, operator, value = domain[0]
|
||||
if operator not in ['=', '!=']:
|
||||
raise osv.except_osv('Invalid search criterions','The osv_memory field can only be compared with = and != operator.')
|
||||
raise osv.except_osv(_('Invalid search criterions'), _('The osv_memory field can only be compared with = and != operator.'))
|
||||
value = bool(value) if operator == '=' else not bool(value)
|
||||
all_model_ids = self.search(cr, uid, [], context=context)
|
||||
is_osv_mem = self._is_osv_memory(cr, uid, all_model_ids, 'osv_memory', arg=None, context=context)
|
||||
@@ -429,6 +429,10 @@ class ir_model_data(osv.osv):
|
||||
model_obj = self.pool.get(model)
|
||||
if not context:
|
||||
context = {}
|
||||
|
||||
# records created during module install should result in res.log entries that are already read!
|
||||
context = dict(context, res_log_read=True)
|
||||
|
||||
if xml_id and ('.' in xml_id):
|
||||
assert len(xml_id.split('.'))==2, _("'%s' contains too many dots. XML ids should not contain dots ! These are used to refer to other modules data, as in module.reference_id") % (xml_id)
|
||||
module, xml_id = xml_id.split('.')
|
||||
|
||||
@@ -93,7 +93,7 @@ class base_module_upgrade(osv.osv_memory):
|
||||
if dep_mod.state in ('unknown','uninstalled'):
|
||||
unmet_packages.append(dep_mod.name)
|
||||
if len(unmet_packages):
|
||||
raise osv.except_osv('Unmet dependency !', 'Following modules are uninstalled or unknown. \n\n'+'\n'.join(unmet_packages))
|
||||
raise osv.except_osv(_('Unmet dependency !'), _('Following modules are not installed or unknown: %s') % ('\n\n' + '\n'.join(unmet_packages)))
|
||||
mod_obj.download(cr, uid, ids, context=context)
|
||||
cr.commit()
|
||||
_, pool = pooler.restart_pool(cr.dbname, update_module=True)
|
||||
|
||||
@@ -23,7 +23,6 @@ import math
|
||||
|
||||
from osv import fields,osv
|
||||
import tools
|
||||
import ir
|
||||
import pooler
|
||||
from tools.translate import _
|
||||
|
||||
|
||||
@@ -50,6 +50,14 @@ class res_log(osv.osv):
|
||||
cr.execute('CREATE INDEX %s ON res_log (user_id, read)' %
|
||||
self._index_name)
|
||||
|
||||
def create(self, cr, uid, vals, context=None):
|
||||
create_context = context and dict(context) or {}
|
||||
if 'res_log_read' in create_context:
|
||||
vals['read'] = create_context.pop('res_log_read')
|
||||
if create_context and not vals.get('context'):
|
||||
vals['context'] = create_context
|
||||
return super(res_log, self).create(cr, uid, vals, context=context)
|
||||
|
||||
# TODO: do not return secondary log if same object than in the model (but unlink it)
|
||||
def get(self, cr, uid, context=None):
|
||||
unread_log_ids = self.search(cr, uid,
|
||||
|
||||
@@ -265,7 +265,7 @@ class users(osv.osv):
|
||||
]
|
||||
|
||||
_sql_constraints = [
|
||||
('login_key', 'UNIQUE (login)', _('You can not have two users with the same login !'))
|
||||
('login_key', 'UNIQUE (login)', 'You can not have two users with the same login !')
|
||||
]
|
||||
|
||||
def _get_email_from(self, cr, uid, ids, context=None):
|
||||
|
||||
@@ -394,7 +394,6 @@ class orm_template(object):
|
||||
'res_model': self._name,
|
||||
'secondary': secondary,
|
||||
'res_id': id,
|
||||
'context': context,
|
||||
},
|
||||
context=context
|
||||
)
|
||||
|
||||
@@ -139,7 +139,6 @@ class report_printscreen_list(report_int):
|
||||
_append_node('header-date', str(rml_obj.formatLang(time.strftime("%Y-%m-%d"),date=True))+' ' + str(time.strftime("%H:%M")))
|
||||
l = []
|
||||
t = 0
|
||||
rowcount = 0;
|
||||
strmax = (pageSize[0]-40) * 2.8346
|
||||
temp = []
|
||||
tsum = []
|
||||
|
||||
@@ -204,13 +204,10 @@ class rml_parse(object):
|
||||
return res['datas']
|
||||
else :
|
||||
return ''
|
||||
except Exception,e:
|
||||
except Exception:
|
||||
return ''
|
||||
|
||||
def setLang(self, lang):
|
||||
if not lang or self.default_lang.has_key(lang):
|
||||
if not lang:
|
||||
key = 'en_US'
|
||||
self.localcontext['lang'] = lang
|
||||
self.lang_dict_called = False
|
||||
for obj in self.objects:
|
||||
@@ -519,7 +516,6 @@ class report_sxw(report_rml, preprocess.report):
|
||||
xml_declaration=True)
|
||||
|
||||
rml_dom = etree.XML(rml)
|
||||
body = rml_dom[-1]
|
||||
elements = []
|
||||
key1 = rml_parser.localcontext['name_space']["text"]+"p"
|
||||
key2 = rml_parser.localcontext['name_space']["text"]+"drop-down"
|
||||
|
||||
Reference in New Issue
Block a user