[MERGE] forward port branch 10.0 up to 23a1bce2a9
This commit is contained in:
@@ -50,7 +50,7 @@
|
|||||||
<td><span t-field="aml.date"/></td>
|
<td><span t-field="aml.date"/></td>
|
||||||
<td><span t-field="aml.account_id.code"/></td>
|
<td><span t-field="aml.account_id.code"/></td>
|
||||||
<td><span t-esc="aml.sudo().partner_id and aml.sudo().partner_id.name and aml.sudo().partner_id.name[:23] or ''"/></td>
|
<td><span t-esc="aml.sudo().partner_id and aml.sudo().partner_id.name and aml.sudo().partner_id.name[:23] or ''"/></td>
|
||||||
<td><span t-esc="aml.name[:35]"/></td>
|
<td><span t-esc="aml.name and aml.name[:35]"/></td>
|
||||||
<td><span t-esc="aml.debit" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></td>
|
<td><span t-esc="aml.debit" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></td>
|
||||||
<td><span t-esc="aml.credit" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></td>
|
<td><span t-esc="aml.credit" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></td>
|
||||||
<td t-if="data['form']['amount_currency'] and aml.amount_currency">
|
<td t-if="data['form']['amount_currency'] and aml.amount_currency">
|
||||||
|
|||||||
@@ -537,7 +537,7 @@ function on_partner_notification (data) {
|
|||||||
}
|
}
|
||||||
remove_channel(channel);
|
remove_channel(channel);
|
||||||
chat_manager.bus.trigger("unsubscribe_from_channel", data.id);
|
chat_manager.bus.trigger("unsubscribe_from_channel", data.id);
|
||||||
web_client.do_notify(_("Unsubscribed"), msg);
|
web_client.do_notify(_t("Unsubscribed"), msg);
|
||||||
}
|
}
|
||||||
} else if (data.type === 'toggle_star') {
|
} else if (data.type === 'toggle_star') {
|
||||||
on_toggle_star_notification(data);
|
on_toggle_star_notification(data);
|
||||||
|
|||||||
@@ -54,6 +54,7 @@ The Dashboard for the Sales Manager will include
|
|||||||
'security/sale_security.xml',
|
'security/sale_security.xml',
|
||||||
'security/ir.model.access.csv',
|
'security/ir.model.access.csv',
|
||||||
'wizard/sale_make_invoice_advance_views.xml',
|
'wizard/sale_make_invoice_advance_views.xml',
|
||||||
|
'views/account_config_settings_views.xml',
|
||||||
'views/sale_views.xml',
|
'views/sale_views.xml',
|
||||||
'views/sales_team_views.xml',
|
'views/sales_team_views.xml',
|
||||||
'views/res_partner_views.xml',
|
'views/res_partner_views.xml',
|
||||||
|
|||||||
@@ -411,7 +411,7 @@ class StockMove(models.Model):
|
|||||||
self.product_uom_qty = 1.0
|
self.product_uom_qty = 1.0
|
||||||
return {'domain': {'product_uom': [('category_id', '=', product.uom_id.category_id.id)]}}
|
return {'domain': {'product_uom': [('category_id', '=', product.uom_id.category_id.id)]}}
|
||||||
|
|
||||||
@api.onchange('date')
|
@api.onchange('date_expected')
|
||||||
def onchange_date(self):
|
def onchange_date(self):
|
||||||
if self.date_expected:
|
if self.date_expected:
|
||||||
self.date = self.date_expected
|
self.date = self.date_expected
|
||||||
|
|||||||
@@ -628,9 +628,9 @@ define([
|
|||||||
}
|
}
|
||||||
|
|
||||||
var anchors = [];
|
var anchors = [];
|
||||||
// ODOO: adding this branch to modify existing anchor
|
// ODOO: adding this branch to modify existing anchor if it fully contains the range
|
||||||
var ancestor_anchor = dom.ancestor(rng.sc, dom.isAnchor);
|
var ancestor_anchor = dom.ancestor(rng.sc, dom.isAnchor);
|
||||||
if(ancestor_anchor) {
|
if(ancestor_anchor && ancestor_anchor === dom.ancestor(rng.ec, dom.isAnchor)) {
|
||||||
anchors.push($(ancestor_anchor).html(linkText).get(0));
|
anchors.push($(ancestor_anchor).html(linkText).get(0));
|
||||||
} else if (isTextChanged) {
|
} else if (isTextChanged) {
|
||||||
// Create a new link when text changed.
|
// Create a new link when text changed.
|
||||||
|
|||||||
@@ -476,7 +476,7 @@ function prettify_html(html) {
|
|||||||
while (i--) space += ' ';
|
while (i--) space += ' ';
|
||||||
return space;
|
return space;
|
||||||
},
|
},
|
||||||
reg = /^<\/?(a|span|font|strong|u|i|strong|b)(\s|>)/i,
|
reg = /^<\/?(a|span|font|u|em|i|strong|b)(\s|>)/i,
|
||||||
inline_level = Infinity,
|
inline_level = Infinity,
|
||||||
tokens = _.compact(_.flatten(_.map(html.split(/</), function (value) {
|
tokens = _.compact(_.flatten(_.map(html.split(/</), function (value) {
|
||||||
value = value.replace(/\s+/g, ' ').split(/>/);
|
value = value.replace(/\s+/g, ' ').split(/>/);
|
||||||
|
|||||||
@@ -320,8 +320,7 @@ var ImageDialog = Widget.extend({
|
|||||||
|
|
||||||
var img = this.images[0];
|
var img = this.images[0];
|
||||||
if (!img) {
|
if (!img) {
|
||||||
var id = this.$(".existing-attachments [data-src]:first").data('id');
|
return this.media;
|
||||||
img = _.find(this.images, function (img) { return img.id === id;});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var media;
|
var media;
|
||||||
@@ -1023,6 +1022,8 @@ var LinkDialog = Dialog.extend({
|
|||||||
if (dom.ancestor(nodes[i], dom.isImg)) {
|
if (dom.ancestor(nodes[i], dom.isImg)) {
|
||||||
this.data.images.push(dom.ancestor(nodes[i], dom.isImg));
|
this.data.images.push(dom.ancestor(nodes[i], dom.isImg));
|
||||||
text += '[IMG]';
|
text += '[IMG]';
|
||||||
|
} else if (!is_link && nodes[i].nodeType === 1) {
|
||||||
|
// just use text nodes from listBetween
|
||||||
} else if (!is_link && i===0) {
|
} else if (!is_link && i===0) {
|
||||||
text += nodes[i].textContent.slice(so, Infinity);
|
text += nodes[i].textContent.slice(so, Infinity);
|
||||||
} else if (!is_link && i===nodes.length-1) {
|
} else if (!is_link && i===nodes.length-1) {
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import os
|
|||||||
import re
|
import re
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
|
import pytz
|
||||||
import werkzeug
|
import werkzeug
|
||||||
import werkzeug.routing
|
import werkzeug.routing
|
||||||
import werkzeug.utils
|
import werkzeug.utils
|
||||||
@@ -204,6 +205,11 @@ class Http(models.AbstractModel):
|
|||||||
context['edit_translations'] = False
|
context['edit_translations'] = False
|
||||||
if not context.get('tz'):
|
if not context.get('tz'):
|
||||||
context['tz'] = request.session.get('geoip', {}).get('time_zone')
|
context['tz'] = request.session.get('geoip', {}).get('time_zone')
|
||||||
|
try:
|
||||||
|
pytz.timezone(context['tz'] or '')
|
||||||
|
except pytz.UnknownTimeZoneError:
|
||||||
|
context.pop('tz')
|
||||||
|
|
||||||
# bind modified context
|
# bind modified context
|
||||||
request.context = context
|
request.context = context
|
||||||
request.website = request.website.with_context(context)
|
request.website = request.website.with_context(context)
|
||||||
|
|||||||
@@ -255,6 +255,6 @@ class WebsiteEventController(http.Controller):
|
|||||||
Attendees._prepare_attendee_values(registration))
|
Attendees._prepare_attendee_values(registration))
|
||||||
|
|
||||||
return request.render("website_event.registration_complete", {
|
return request.render("website_event.registration_complete", {
|
||||||
'attendees': Attendees,
|
'attendees': Attendees.sudo(),
|
||||||
'event': event,
|
'event': event,
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -170,6 +170,45 @@ database
|
|||||||
when creating new databases from the database-management screens, use the
|
when creating new databases from the database-management screens, use the
|
||||||
specified `template database`_. Defaults to ``template1``.
|
specified `template database`_. Defaults to ``template1``.
|
||||||
|
|
||||||
|
.. _reference/cmdline/server/internationalisation:
|
||||||
|
|
||||||
|
Internationalisation
|
||||||
|
--------------------
|
||||||
|
|
||||||
|
Use these options to translate Odoo to another language. See i18n section of
|
||||||
|
the user manual. Option '-d' is mandatory. Option '-l' is mandatory in case
|
||||||
|
of importation
|
||||||
|
|
||||||
|
.. option:: --load-language <languages>
|
||||||
|
|
||||||
|
specifies the languages (separated by commas) for the translations you
|
||||||
|
want to be loaded
|
||||||
|
|
||||||
|
.. option:: -l, --language <language>
|
||||||
|
|
||||||
|
specify the language of the translation file. Use it with --i18n-export
|
||||||
|
or --i18n-import
|
||||||
|
|
||||||
|
.. option:: --i18n-export <filename>
|
||||||
|
|
||||||
|
export all sentences to be translated to a CSV file, a PO file or a TGZ
|
||||||
|
archive and exit.
|
||||||
|
|
||||||
|
.. option:: --i18n-import <filename>
|
||||||
|
|
||||||
|
import a CSV or a PO file with translations and exit. The '-l' option is
|
||||||
|
required.
|
||||||
|
|
||||||
|
.. option:: --i18n-overwrite
|
||||||
|
|
||||||
|
overwrites existing translation terms on updating a module or importing
|
||||||
|
a CSV or a PO file.
|
||||||
|
|
||||||
|
.. option:: --modules
|
||||||
|
|
||||||
|
specify modules to export. Use in combination with --i18n-export
|
||||||
|
|
||||||
|
|
||||||
built-in HTTP
|
built-in HTTP
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
|
|||||||
@@ -151,7 +151,6 @@ class Registry(Mapping):
|
|||||||
""" Delete the registry linked to a given database. """
|
""" Delete the registry linked to a given database. """
|
||||||
with cls._lock:
|
with cls._lock:
|
||||||
if db_name in cls.registries:
|
if db_name in cls.registries:
|
||||||
cls.registries[db_name].clear_caches()
|
|
||||||
del cls.registries[db_name]
|
del cls.registries[db_name]
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
|||||||
@@ -812,7 +812,6 @@ class WorkerCron(Worker):
|
|||||||
|
|
||||||
import odoo.addons.base as base
|
import odoo.addons.base as base
|
||||||
base.ir.ir_cron.ir_cron._acquire_job(db_name)
|
base.ir.ir_cron.ir_cron._acquire_job(db_name)
|
||||||
odoo.modules.registry.Registry.delete(db_name)
|
|
||||||
|
|
||||||
# dont keep cursors in multi database mode
|
# dont keep cursors in multi database mode
|
||||||
if len(db_names) > 1:
|
if len(db_names) > 1:
|
||||||
|
|||||||
Reference in New Issue
Block a user