[MERGE] Merge with trunk-cal-jke
Add options allowed to be used in calendar's view. > Some needs to be checked by orm to know if the field is well a valid parameter and well passing > Some needs only to be checked at launch (only added RNG) Imp to not send email from demo data. (Before, we only exclude the mail from test data) > don't send mail to admin@example.com or demo@example.com > Done with ODO bzr revid: jke@openerp.com-20140114160141-g34stpdxdg3qepim
This commit is contained in:
commit
204b279a89
|
@ -411,6 +411,7 @@ class ir_mail_server(osv.osv):
|
|||
email_to = message['To']
|
||||
email_cc = message['Cc']
|
||||
email_bcc = message['Bcc']
|
||||
|
||||
smtp_to_list = filter(None, tools.flatten(map(extract_rfc2822_addresses,[email_to, email_cc, email_bcc])))
|
||||
assert smtp_to_list, "At least one valid recipient address should be specified for outgoing emails (To/Cc/Bcc)"
|
||||
|
||||
|
|
|
@ -647,6 +647,15 @@
|
|||
<rng:optional><rng:attribute name="date_stop" /></rng:optional>
|
||||
<rng:optional><rng:attribute name="day_length" /></rng:optional>
|
||||
<rng:optional><rng:attribute name="date_delay" /></rng:optional>
|
||||
<rng:optional><rng:attribute name="all_day" /></rng:optional>
|
||||
<rng:optional><rng:attribute name="event_open_popup" /></rng:optional>
|
||||
<rng:optional><rng:attribute name="attendee" /></rng:optional>
|
||||
<rng:optional><rng:attribute name="color_is_attendee" /></rng:optional>
|
||||
<rng:optional><rng:attribute name="avatar_model" /></rng:optional>
|
||||
<rng:optional><rng:attribute name="avatar_title" /></rng:optional>
|
||||
<rng:optional><rng:attribute name="use_contacts" /></rng:optional>
|
||||
<rng:optional><rng:attribute name="quick_add" /></rng:optional>
|
||||
<rng:optional><rng:attribute name="display" /></rng:optional>
|
||||
<rng:optional><rng:attribute name="type" /></rng:optional>
|
||||
<rng:optional><rng:attribute name="mode" /></rng:optional>
|
||||
<rng:oneOrMore>
|
||||
|
|
|
@ -59,7 +59,6 @@ def load_module_graph(cr, graph, status=None, perform_checks=True, skip_modules=
|
|||
def load_test(module_name, idref, mode):
|
||||
cr.commit()
|
||||
try:
|
||||
threading.currentThread().testing = True
|
||||
_load_data(cr, module_name, idref, mode, 'test')
|
||||
return True
|
||||
except Exception:
|
||||
|
@ -67,7 +66,6 @@ def load_module_graph(cr, graph, status=None, perform_checks=True, skip_modules=
|
|||
'module %s: an exception occurred in a test', module_name)
|
||||
return False
|
||||
finally:
|
||||
threading.currentThread().testing = False
|
||||
if tools.config.options['test_commit']:
|
||||
cr.commit()
|
||||
else:
|
||||
|
@ -104,12 +102,18 @@ def load_module_graph(cr, graph, status=None, perform_checks=True, skip_modules=
|
|||
init mode.
|
||||
|
||||
"""
|
||||
for filename in _get_files_of_kind(kind):
|
||||
_logger.info("module %s: loading %s", module_name, filename)
|
||||
noupdate = False
|
||||
if kind in ('demo', 'demo_xml') or (filename.endswith('.csv') and kind in ('init', 'init_xml')):
|
||||
noupdate = True
|
||||
tools.convert_file(cr, module_name, filename, idref, mode, noupdate, kind, report)
|
||||
try:
|
||||
if kind in ('demo', 'test'):
|
||||
threading.currentThread().testing = True
|
||||
for filename in _get_files_of_kind(kind):
|
||||
_logger.info("module %s: loading %s", module_name, filename)
|
||||
noupdate = False
|
||||
if kind in ('demo', 'demo_xml') or (filename.endswith('.csv') and kind in ('init', 'init_xml')):
|
||||
noupdate = True
|
||||
tools.convert_file(cr, module_name, filename, idref, mode, noupdate, kind, report)
|
||||
finally:
|
||||
if kind in ('demo', 'test'):
|
||||
threading.currentThread().testing = False
|
||||
|
||||
if status is None:
|
||||
status = {}
|
||||
|
|
|
@ -1009,7 +1009,7 @@ class BaseModel(object):
|
|||
continue
|
||||
sm = f.store
|
||||
if sm is True:
|
||||
sm = {self._name: (lambda self, cr, uid, ids, c={}: ids, None, 10, None)}
|
||||
sm = {self._name: (lambda self, cr, uid, ids, c={}: ids, None, f.priority, None)}
|
||||
for object, aa in sm.items():
|
||||
if len(aa) == 4:
|
||||
(fnct, fields2, order, length) = aa
|
||||
|
@ -1785,7 +1785,7 @@ class BaseModel(object):
|
|||
children = False
|
||||
views = {}
|
||||
for f in node:
|
||||
if f.tag in ('form', 'tree', 'graph', 'kanban'):
|
||||
if f.tag in ('form', 'tree', 'graph', 'kanban', 'calendar'):
|
||||
node.remove(f)
|
||||
ctx = context.copy()
|
||||
ctx['base_model_name'] = self._name
|
||||
|
@ -1829,7 +1829,7 @@ class BaseModel(object):
|
|||
in_tree_view = node.tag == 'tree'
|
||||
|
||||
elif node.tag == 'calendar':
|
||||
for additional_field in ('date_start', 'date_delay', 'date_stop', 'color'):
|
||||
for additional_field in ('date_start', 'date_delay', 'date_stop', 'color', 'all_day','attendee'):
|
||||
if node.get(additional_field):
|
||||
fields[node.get(additional_field)] = {}
|
||||
|
||||
|
@ -2023,7 +2023,7 @@ class BaseModel(object):
|
|||
return False
|
||||
|
||||
view = etree.Element('calendar', string=self._description)
|
||||
etree.SubElement(view, 'field', self._rec_name_fallback(cr, user, context))
|
||||
etree.SubElement(view, 'field', name=self._rec_name_fallback(cr, user, context))
|
||||
|
||||
if self._date_name not in self._columns:
|
||||
date_found = False
|
||||
|
|
Loading…
Reference in New Issue