[MERGE] forward port of branch 7.0 up to 6c55a4b
This commit is contained in:
commit
cdb48d39ba
|
@ -564,7 +564,7 @@ class EDIMixin(object):
|
||||||
continue
|
continue
|
||||||
field = field_info.column
|
field = field_info.column
|
||||||
# skip function/related fields
|
# skip function/related fields
|
||||||
if isinstance(field, fields.function):
|
if isinstance(field, fields.function) and not field._fnct_inv:
|
||||||
_logger.warning("Unexpected function field value is found in '%s' EDI document: '%s'." % (self._name, field_name))
|
_logger.warning("Unexpected function field value is found in '%s' EDI document: '%s'." % (self._name, field_name))
|
||||||
continue
|
continue
|
||||||
relation_model = field._obj
|
relation_model = field._obj
|
||||||
|
|
|
@ -369,6 +369,16 @@ openerp.mail = function (session) {
|
||||||
this.is_log = false;
|
this.is_log = false;
|
||||||
this.recipients = [];
|
this.recipients = [];
|
||||||
this.recipient_ids = [];
|
this.recipient_ids = [];
|
||||||
|
session.web.bus.on('clear_uncommitted_changes', this, function(e) {
|
||||||
|
if (this.show_composer && !e.isDefaultPrevented()){
|
||||||
|
if (!confirm(_t("You are currently composing a message, your message will be discarded.\n\nAre you sure you want to leave this page ?"))) {
|
||||||
|
e.preventDefault();
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this.on_cancel();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
start: function () {
|
start: function () {
|
||||||
|
|
|
@ -123,6 +123,15 @@ class lang(osv.osv):
|
||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
def _check_grouping(self, cr, uid, ids, context=None):
|
||||||
|
for lang in self.browse(cr, uid, ids, context=context):
|
||||||
|
try:
|
||||||
|
if not all(isinstance(x, int) for x in eval(lang.grouping)):
|
||||||
|
return False
|
||||||
|
except Exception:
|
||||||
|
return False
|
||||||
|
return True
|
||||||
|
|
||||||
def _get_default_date_format(self, cursor, user, context=None):
|
def _get_default_date_format(self, cursor, user, context=None):
|
||||||
return '%m/%d/%Y'
|
return '%m/%d/%Y'
|
||||||
|
|
||||||
|
@ -158,7 +167,8 @@ class lang(osv.osv):
|
||||||
]
|
]
|
||||||
|
|
||||||
_constraints = [
|
_constraints = [
|
||||||
(_check_format, 'Invalid date/time format directive specified. Please refer to the list of allowed directives, displayed when you edit a language.', ['time_format', 'date_format'])
|
(_check_format, 'Invalid date/time format directive specified. Please refer to the list of allowed directives, displayed when you edit a language.', ['time_format', 'date_format']),
|
||||||
|
(_check_grouping, "The Separator Format should be like [,n] where 0 < n :starting from Unit digit.-1 will end the separation. e.g. [3,2,-1] will represent 106500 to be 1,06,500;[1,2,-1] will represent it to be 106,50,0;[3] will represent it as 106,500. Provided ',' as the thousand separator in each case.", ['grouping'])
|
||||||
]
|
]
|
||||||
|
|
||||||
@tools.ormcache(skiparg=3)
|
@tools.ormcache(skiparg=3)
|
||||||
|
|
|
@ -345,6 +345,7 @@ class TinyPoFile(object):
|
||||||
source = unquote(line[6:])
|
source = unquote(line[6:])
|
||||||
line = self.lines.pop(0).strip()
|
line = self.lines.pop(0).strip()
|
||||||
if not source and self.first:
|
if not source and self.first:
|
||||||
|
self.first = False
|
||||||
# if the source is "" and it's the first msgid, it's the special
|
# if the source is "" and it's the first msgid, it's the special
|
||||||
# msgstr with the informations about the traduction and the
|
# msgstr with the informations about the traduction and the
|
||||||
# traductor; we skip it
|
# traductor; we skip it
|
||||||
|
@ -374,8 +375,6 @@ class TinyPoFile(object):
|
||||||
if t == trans_type == 'code': continue
|
if t == trans_type == 'code': continue
|
||||||
self.extra_lines.append((t, n, r, source, trad, comments))
|
self.extra_lines.append((t, n, r, source, trad, comments))
|
||||||
|
|
||||||
self.first = False
|
|
||||||
|
|
||||||
if name is None:
|
if name is None:
|
||||||
if not fuzzy:
|
if not fuzzy:
|
||||||
self.warn('Missing "#:" formated comment at line %d for the following source:\n\t%s',
|
self.warn('Missing "#:" formated comment at line %d for the following source:\n\t%s',
|
||||||
|
|
Loading…
Reference in New Issue