From 109eb755f288a86ef291dcfc2ffbbbcd4f5932c3 Mon Sep 17 00:00:00 2001 From: Nicolas Lempereur Date: Tue, 22 Sep 2015 17:17:43 +0200 Subject: [PATCH 01/47] [FIX] web: propagate context for pivot view fields On the "+" in the pivot views to group by given fields, these field were not translated in the user choosen language. closes #8656 opw-649918 --- addons/web/static/src/js/view_pivot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web/static/src/js/view_pivot.js b/addons/web/static/src/js/view_pivot.js index 0d39661fca8..8dbfb3360e1 100644 --- a/addons/web/static/src/js/view_pivot.js +++ b/addons/web/static/src/js/view_pivot.js @@ -63,7 +63,7 @@ instance.web.PivotView = instance.web.View.extend({ var self = this; this.$table_container = this.$('.o-pivot-table'); - var load_fields = this.model.call('fields_get', []) + var load_fields = this.model.call('fields_get', [], {context: this.dataset.get_context()}) .then(this.prepare_fields.bind(this)); return $.when(this._super(), load_fields).then(this.render_buttons.bind(this)).then(function(){ From 9047db401dbdb7c849db9bd172af3a8f7611a931 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Thu, 24 Sep 2015 12:18:44 +0200 Subject: [PATCH 02/47] [FIX] inter_company_rules: use correct sequence and warehouse With: - Two companies 'Company A' & 'Company B' - Sequences for SO & PO for each company - `so_from_po` & `po_from_so` set to True for both companies When: - Company A created a PO with Company B as supplier, and validated it, - A SO was created for Company B, but with the sequence of Company A - And the warehouse of company A - Potentially, any fields that are company dependent (e.g. pricelist) used Company A - Company A created a SO with Company B as customer, and validated it, - A PO was created for company B, but with the sequence of Company A - Potentially, any fields that are company dependent (e.g. pricelist) used Company A This revision now ensure to force the right company for sequences and properties field. opw-649378 --- addons/inter_company_rules/models/purchase_order.py | 5 +++++ addons/inter_company_rules/models/sale_order.py | 1 + 2 files changed, 6 insertions(+) diff --git a/addons/inter_company_rules/models/purchase_order.py b/addons/inter_company_rules/models/purchase_order.py index b59592a2a1d..24151ec4117 100644 --- a/addons/inter_company_rules/models/purchase_order.py +++ b/addons/inter_company_rules/models/purchase_order.py @@ -30,6 +30,7 @@ class purchase_order(models.Model): :param company : the company of the created PO :rtype company : res.company record """ + self = self.with_context(force_company=company.id) SaleOrder = self.env['sale.order'] company_partner = self.company_id.partner_id @@ -75,9 +76,13 @@ class purchase_order(models.Model): :rtype direct_delivery_address : res.partner record """ partner_addr = partner.sudo().address_get(['default', 'invoice', 'delivery', 'contact']) + warehouse = company.warehouse_id and company.warehouse_id.company_id.id == company.id and company.warehouse_id or False + if not warehouse: + raise Warning(_('Configure correct warehouse for company(%s) from Menu: Settings/companies/companies' % (company.name))) return { 'name': self.env['ir.sequence'].sudo().next_by_code('sale.order') or '/', 'company_id': company.id, + 'warehouse_id': warehouse.id, 'client_order_ref': name, 'partner_id': partner.id, 'pricelist_id': partner.property_product_pricelist.id, diff --git a/addons/inter_company_rules/models/sale_order.py b/addons/inter_company_rules/models/sale_order.py index a8070e270ad..473dea16b0c 100644 --- a/addons/inter_company_rules/models/sale_order.py +++ b/addons/inter_company_rules/models/sale_order.py @@ -31,6 +31,7 @@ class sale_order(models.Model): :param company : the company of the created PO :rtype company : res.company record """ + self = self.with_context(force_company=company.id) PurchaseOrder = self.env['purchase.order'] company_partner = self.company_id and self.company_id.partner_id or False if not company or not company_partner.id: From ddd2a3e97c4c7dea1273a1b97f55b0d1ce3dbdef Mon Sep 17 00:00:00 2001 From: Goffin Simon Date: Wed, 23 Sep 2015 21:21:49 +0200 Subject: [PATCH 03/47] [FIX] account: prepare_move_lines_for_reconciliation_widget In the case where target_currency == company_currency, the actual_debit or the actual_credit must be equal to the amount_residual defined on the account.move.line and expressed in the currency of the company. The actual_debit/actual_credit must take into account the possible partial reconciliations and this is done by the residual amount. opw:648744 --- addons/account/account_move_line.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py index cd744fce26d..b5ee20e2a9f 100644 --- a/addons/account/account_move_line.py +++ b/addons/account/account_move_line.py @@ -836,9 +836,9 @@ class account_move_line(osv.osv): ret_line['credit_currency'] = actual_credit ret_line['debit_currency'] = actual_debit if target_currency == company_currency: - actual_debit = debit - actual_credit = credit - total_amount = debit or credit + actual_debit = debit > 0 and amount or 0.0 + actual_credit = credit > 0 and amount or 0.0 + total_amount = abs(debit - credit) else: ctx = context.copy() ctx.update({'date': line.date}) From f0b8e523209d1e1a5186a97fc659f07b77ed630a Mon Sep 17 00:00:00 2001 From: yannprada Date: Tue, 22 Sep 2015 16:04:30 +0200 Subject: [PATCH 04/47] [FIX] doc: typo --- doc/reference/orm.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/reference/orm.rst b/doc/reference/orm.rst index 5fbd7a59977..62ef4a3d018 100644 --- a/doc/reference/orm.rst +++ b/doc/reference/orm.rst @@ -249,7 +249,7 @@ Common ORM methods `:: >>> self.browse([7, 18, 12]) - res.partner(7, 18, 12]) + res.partner(7, 18, 12) :meth:`~openerp.models.Model.exists` Returns a new recordset containing only the records which exist in the From 3e70b26f25f1d3f2df891cab22acd563ab9e97cc Mon Sep 17 00:00:00 2001 From: Nicolas Lempereur Date: Wed, 16 Sep 2015 14:05:31 +0200 Subject: [PATCH 05/47] [FIX] website_mail: outlook and image size Office Outlook doesn't take into account the [style] attribute, and it doesn't manage width/height in percent value. This commit set width/heigth attribute in pixels and also always set the width/height in style attribute (keeping them in the original unit and setting them to auto if not present). Thus if the mail application doesn't support the style attribute, the pixels fixed size are used, else the original size is used. closes #8566 opw-648463 --- .../static/src/js/website_email_designer.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/addons/website_mail/static/src/js/website_email_designer.js b/addons/website_mail/static/src/js/website_email_designer.js index 523cc823ab8..bf5f579167b 100644 --- a/addons/website_mail/static/src/js/website_email_designer.js +++ b/addons/website_mail/static/src/js/website_email_designer.js @@ -303,6 +303,8 @@ setTimeout(function () { self.img_to_font(); self.style_to_class(); + // fix outlook image rendering bug + $("#wrapwrap .o_editable:first").find('img[style*="width"], img[style*="height"]').removeAttr('height width'); }); }, @@ -317,6 +319,14 @@ var theme = ($("#o_left_bar .o_panel_body > div:not(.hidden)").attr("class") || "").replace(/^\s*|\s*o_mail_block[^\s]+\s*|\s*oe_snippet\s*|\s*ui-draggable\s*|\s*$/g, ''); var $theme = $("#wrapwrap .o_editable:first [data-snippet-theme]").removeAttr("data-snippet-theme").removeData("snippet-theme"); $editable.children().first().attr("data-snippet-theme", theme); + // fix outlook image rendering bug + _.each(['width', 'height'], function(attribute) { + $editable.find('img[style*="width"], img[style*="height"]').attr(attribute, function(){ + return $(this)[attribute]() + }).css(attribute, function(){ + return $(this).get(0).style[attribute] || 'auto'; + }); + }); }, // convert font awsome into image font_to_img: function () { From 09e9102605328385ba0a175d2f999358a4aea3b1 Mon Sep 17 00:00:00 2001 From: Nicolas Lempereur Date: Fri, 18 Sep 2015 09:07:39 +0200 Subject: [PATCH 06/47] [FIX] mass_mailing: outlook.com need absolute url The `` tag isn't handled by outlook.com, thus all relative link to image fail to be shown. This fix treat the most common case by using absolute url instead of relative url. related to opw-648463 --- addons/mass_mailing/models/mail_mail.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/addons/mass_mailing/models/mail_mail.py b/addons/mass_mailing/models/mail_mail.py index 94cb8b0794b..99aca1321a7 100644 --- a/addons/mass_mailing/models/mail_mail.py +++ b/addons/mass_mailing/models/mail_mail.py @@ -19,6 +19,7 @@ # ############################################################################## +import re import urlparse import werkzeug.urls @@ -78,6 +79,10 @@ class MailMail(osv.Model): domain = self.pool.get("ir.config_parameter").get_param(cr, uid, "web.base.url", context=context) base = "" % domain body = tools.append_content_to_html(base, body, plaintext=False, container_tag='div') + # resolve relative image url to absolute for outlook.com + def _sub_relative2absolute(match): + return match.group(1) + urlparse.urljoin(domain, match.group(2)) + '"' + body = re.sub('(]*\ssrc=")(/[^/][^"]+)"', _sub_relative2absolute, body) # generate tracking URL if mail.statistics_ids: From 273114204f4653096ec8fcea15f33642f7c733ba Mon Sep 17 00:00:00 2001 From: Laetitia Gangloff Date: Thu, 11 Dec 2014 15:26:23 +0100 Subject: [PATCH 07/47] [FIX] note: `Use fancy note` was re-checked on update Set security group as not updatable. To be able to not use fancy note Closes #4178 --- addons/note/security/note_security.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/note/security/note_security.xml b/addons/note/security/note_security.xml index 8fedb29ea2e..c4933e89dbb 100644 --- a/addons/note/security/note_security.xml +++ b/addons/note/security/note_security.xml @@ -1,6 +1,6 @@ - + Notes / Fancy mode From d24ff706a9194fe33c9f98aca0c0424486b661cf Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Thu, 24 Sep 2015 17:23:16 +0200 Subject: [PATCH 08/47] [FIX] account_followup: check_description constraint must take into account the translation When adding a `%` in the followup letter content, the constraint checking there is no syntax error is supposed to raise a warning, telling '%' must be set as `%%` when you want to display this percentage char. This constraint did not take into account the translation, so when being in another language (e.g. French), and adding a `%`, the warning was not raised, while it should have been. Closes #8680 --- addons/account_followup/account_followup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/account_followup/account_followup.py b/addons/account_followup/account_followup.py index 27caab704e2..b6b1647cfa9 100644 --- a/addons/account_followup/account_followup.py +++ b/addons/account_followup/account_followup.py @@ -82,7 +82,8 @@ Best Regards, def _check_description(self, cr, uid, ids, context=None): - for line in self.browse(cr, uid, ids, context=context): + lang = self.pool['res.users'].browse(cr, uid, uid, context=context).lang + for line in self.browse(cr, uid, ids, context=dict(context or {}, lang=lang)): if line.description: try: line.description % {'partner_name': '', 'date':'', 'user_signature': '', 'company_name': ''} From 34f79f3de7578619951c7bcba485b5c3c1d9cce0 Mon Sep 17 00:00:00 2001 From: Laetitia Gangloff Date: Thu, 24 Sep 2015 17:57:40 +0200 Subject: [PATCH 09/47] [FIX] purchase_double_validation: do not update limit on module update In the module `purchase_double_validation`, you can change the limit to require a second approval in the purchase settings. If the module was updated, the limit was re-set to its default value. Closes #4183 --- .../purchase_double_validation_workflow.xml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/addons/purchase_double_validation/purchase_double_validation_workflow.xml b/addons/purchase_double_validation/purchase_double_validation_workflow.xml index 673063ff049..9c9cd7c9359 100644 --- a/addons/purchase_double_validation/purchase_double_validation_workflow.xml +++ b/addons/purchase_double_validation/purchase_double_validation_workflow.xml @@ -23,7 +23,6 @@ - amount_untaxed >= 5000 purchase_approve @@ -31,7 +30,6 @@ - amount_untaxed < 5000 @@ -40,4 +38,12 @@ + + + amount_untaxed >= 5000 + + + amount_untaxed < 5000 + + From be33912a2580779d747c504e16580065e496c884 Mon Sep 17 00:00:00 2001 From: Pierre Verkest Date: Thu, 24 Sep 2015 18:05:23 +0200 Subject: [PATCH 10/47] [FIX] report_webkit: get webkit path as SUPERUSER_ID `ir.config_parameter` is readable by employees only. It could happen to print a webkit report as a portal / public user. Closes #4181 --- addons/report_webkit/webkit_report.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/report_webkit/webkit_report.py b/addons/report_webkit/webkit_report.py index cccaec76bc3..ab2ae27e4e6 100644 --- a/addons/report_webkit/webkit_report.py +++ b/addons/report_webkit/webkit_report.py @@ -48,6 +48,7 @@ from openerp import pooler from report_helper import WebKitHelper from openerp.report.report_sxw import * from openerp import addons +from openerp import SUPERUSER_ID from openerp import tools from openerp.tools.translate import _ from openerp.osv.osv import except_osv @@ -76,7 +77,7 @@ class WebKitParser(report_sxw): def get_lib(self, cursor, uid): """Return the lib wkhtml path""" proxy = self.pool.get('ir.config_parameter') - webkit_path = proxy.get_param(cursor, uid, 'webkit_path') + webkit_path = proxy.get_param(cursor, SUPERUSER_ID, 'webkit_path') if not webkit_path: try: From 8cb1889baf5737458b1d977c948a9e3f8134c4fd Mon Sep 17 00:00:00 2001 From: Nicolas Lempereur Date: Thu, 24 Sep 2015 14:15:13 +0200 Subject: [PATCH 11/47] [FIX] web: propagate context for graph view fields The fields loaded for the graph view used for measure and legend were not translated. opw-649918 --- addons/web/static/src/js/view_graph.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web/static/src/js/view_graph.js b/addons/web/static/src/js/view_graph.js index d5c6bbad69a..2179974a2cd 100644 --- a/addons/web/static/src/js/view_graph.js +++ b/addons/web/static/src/js/view_graph.js @@ -29,7 +29,7 @@ instance.web.GraphView = instance.web.View.extend({ this.widget = undefined; }, start: function () { - var load_fields = this.model.call('fields_get', []) + var load_fields = this.model.call('fields_get', [], {context: this.dataset.get_context()}) .then(this.prepare_fields.bind(this)); return $.when(this._super(), load_fields).then(this.render_buttons.bind(this)); From 5f0d90d807239676f9b19a1ae6996da3023fdf39 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Fri, 25 Sep 2015 11:25:30 +0200 Subject: [PATCH 12/47] [FIX] purchase, inter_company_rules: correct picking type This revision is related to 9047db401dbdb7c849db9bd172af3a8f7611a931. With the same environment and use case than the above revision, the Purchase order picking type was not set using the correct company, it always used the user current company, instead of forcing the company to the company for which the PO is created. Besides, there is an onchange on the picking type `onchange_picking_type_id`, which sets values that are important for the continuation of the flow. opw-649378 --- addons/inter_company_rules/models/sale_order.py | 12 +++++++++--- addons/purchase/purchase.py | 1 + 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/addons/inter_company_rules/models/sale_order.py b/addons/inter_company_rules/models/sale_order.py index 473dea16b0c..64542b7a95a 100644 --- a/addons/inter_company_rules/models/sale_order.py +++ b/addons/inter_company_rules/models/sale_order.py @@ -31,7 +31,7 @@ class sale_order(models.Model): :param company : the company of the created PO :rtype company : res.company record """ - self = self.with_context(force_company=company.id) + self = self.with_context(force_company=company.id, company_id=company.id) PurchaseOrder = self.env['purchase.order'] company_partner = self.company_id and self.company_id.partner_id or False if not company or not company_partner.id: @@ -75,15 +75,18 @@ class sale_order(models.Model): :rtype company : res.company record """ # find location and warehouse, pick warehouse from company object + PurchaseOrder = self.env['purchase.order'] warehouse = company.warehouse_id and company.warehouse_id.company_id.id == company.id and company.warehouse_id or False if not warehouse: raise Warning(_('Configure correct warehouse for company(%s) from Menu: Settings/companies/companies' % (company.name))) - - return { + intercompany_uid = company.intercompany_user_id.id + picking_type_id = PurchaseOrder.sudo(intercompany_uid)._get_picking_in() + res = { 'name': self.env['ir.sequence'].sudo().next_by_code('purchase.order'), 'origin': self.name, 'partner_id': company_partner.id, 'location_id': warehouse.lot_stock_id.id, + 'picking_type_id': picking_type_id, 'pricelist_id': company_partner.property_product_pricelist_purchase.id, 'date_order': self.date_order, 'company_id': company.id, @@ -94,6 +97,9 @@ class sale_order(models.Model): 'partner_ref': self.name, 'dest_address_id': self.partner_shipping_id and self.partner_shipping_id.id or False, } + picking_values = PurchaseOrder.sudo(intercompany_uid).onchange_picking_type_id(picking_type_id).get('value', {}) + res.update(picking_values) + return res @api.model def _prepare_purchase_order_line_data(self, so_line, date_order, purchase_id, company): diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py index 4ce14d225a2..63825911a9f 100644 --- a/addons/purchase/purchase.py +++ b/addons/purchase/purchase.py @@ -168,6 +168,7 @@ class purchase_order(osv.osv): type_obj = self.pool.get('stock.picking.type') user_obj = self.pool.get('res.users') company_id = user_obj.browse(cr, uid, uid, context=context).company_id.id + company_id = context.get('company_id') or company_id types = type_obj.search(cr, uid, [('code', '=', 'incoming'), ('warehouse_id.company_id', '=', company_id)], context=context) if not types: types = type_obj.search(cr, uid, [('code', '=', 'incoming'), ('warehouse_id', '=', False)], context=context) From fc11b58239f4097be907be3ad41b1c0757b00e7a Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Fri, 12 Dec 2014 12:21:35 +0100 Subject: [PATCH 13/47] [FIX] stock: service lines duplication when grouping DO invoices This is possible that changes happen during the loop in the multiple pickings: an update in a picking could update another picking. The browse must therefore be done inside the loop to update the pickings with the latest changes. Fixes #4201 --- addons/stock/stock.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index 276e24b4e2d..7fa2f4e92a2 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -1132,7 +1132,9 @@ class stock_picking(osv.osv): invoices_group = {} res = {} inv_type = type - for picking in self.browse(cr, uid, ids, context=context): + for picking_id in ids: + # The browse inside the loop is done on purpose, as a change in the pickings during the loop is possible + picking = self.browse(cr, uid, picking_id, context=context) if picking.invoice_state != '2binvoiced': continue partner = self._get_partner_to_invoice(cr, uid, picking, context=context) From 117b636d3fdcc32b1e430d41d245a7d8237ca87f Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Fri, 25 Sep 2015 14:43:00 +0200 Subject: [PATCH 14/47] [FIX] mail: catch database errors when sending mails --- addons/mail/mail_mail.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/addons/mail/mail_mail.py b/addons/mail/mail_mail.py index 19852e1b182..aa02654ef58 100644 --- a/addons/mail/mail_mail.py +++ b/addons/mail/mail_mail.py @@ -26,6 +26,8 @@ from email.utils import formataddr from urllib import urlencode from urlparse import urljoin +import psycopg2 + from openerp import tools from openerp import SUPERUSER_ID from openerp.osv import fields, osv @@ -338,6 +340,12 @@ class mail_mail(osv.Model): # prevent catching transient MemoryErrors, bubble up to notify user or abort cron job # instead of marking the mail as failed raise + except psycopg2.Error: + # If an error with the database occurs, chances are that the cursor is unusable. + # This will lead to an `psycopg2.InternalError` being raised when trying to write + # `state`, shadowing the original exception and forbid a retry on concurrent + # update. Let's bubble it. + raise except Exception: _logger.exception('failed sending mail.mail %s', mail.id) mail.write({'state': 'exception'}) From f411fef90cfb1a776e18d0ebcdb8c4c0ac3ef555 Mon Sep 17 00:00:00 2001 From: Jeremy Kersten Date: Wed, 23 Sep 2015 12:58:36 +0200 Subject: [PATCH 15/47] [FIX] ir_ui_view: fix case where arch_fs is empty if arch_fs had no content, finditer with none was crashing. Use re.sub now, since it's the purpose of _resolve_external_ids function. --- openerp/addons/base/ir/ir_ui_view.py | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/openerp/addons/base/ir/ir_ui_view.py b/openerp/addons/base/ir/ir_ui_view.py index da14b2ef65f..d19e3e7dae2 100644 --- a/openerp/addons/base/ir/ir_ui_view.py +++ b/openerp/addons/base/ir/ir_ui_view.py @@ -154,21 +154,14 @@ class view(osv.osv): result.update(map(itemgetter('res_id', 'id'), data_ids)) return result - def _convert(self, cr, uid, s, view): - matches = re.finditer('[^%]%\((.*?)\)[ds]', s) - done = [] - for m in matches: - found = m.group()[1:] - if found in done: - continue - done.append(found) - xmlid = m.groups()[0] + def _resolve_external_ids(self, cr, uid, view, arch_fs): + def replacer(m): + xmlid = m.group('xmlid') if '.' not in xmlid: mod = view.get_external_id(cr, uid).get(view.id).split('.')[0] xmlid = '%s.%s' % (mod, xmlid) - res = self.pool['ir.model.data'].xmlid_to_res_id(cr, uid, xmlid) - s = s.replace(found, str(res)) - return s + return m.group('prefix') + str(self.pool['ir.model.data'].xmlid_to_res_id(cr, uid, xmlid)) + return re.sub('(?P[^%])%\((?P.*?)\)[ds]', replacer, arch_fs) def _arch_get(self, cr, uid, ids, name, arg, context=None): result = {} @@ -180,7 +173,7 @@ class view(osv.osv): fullpath = get_resource_path(*view.arch_fs.split('/')) arch_fs = get_view_arch_from_file(fullpath, view.xml_id) # replace %(xml_id)s, %(xml_id)d, %%(xml_id)s, %%(xml_id)d by the res_id - arch_fs = self._convert(cr, uid, arch_fs, view) + arch_fs = arch_fs and self._resolve_external_ids(cr, uid, view, arch_fs) result[view.id] = arch_fs or view.arch_db return result From d8f5b28554a0820d32952b3898823c4ba95436cc Mon Sep 17 00:00:00 2001 From: Jeremy Kersten Date: Fri, 25 Sep 2015 15:14:31 +0200 Subject: [PATCH 16/47] [FIX] website: translation - don't crash if translation is empty Avoid 'Uncaught TypeError: t.value.trim is not a function' When t.value is empty / false, trim crash and so it's impossible for end user to make translation. --- addons/website/static/src/js/website.translator.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/website/static/src/js/website.translator.js b/addons/website/static/src/js/website.translator.js index 2389fef860d..aa9e8de6d56 100644 --- a/addons/website/static/src/js/website.translator.js +++ b/addons/website/static/src/js/website.translator.js @@ -135,7 +135,7 @@ node.setAttribute('data-oe-translation-view-id', view_id); var content = $(node).text().trim(); var trans = this.translations.filter(function (t) { - return t.res_id === view_id && t.value.trim() === content; + return t.res_id === view_id && t.value && t.value.trim() === content; }); if (trans.length) { node.setAttribute('data-oe-translation-id', trans[0].id); From fe3e91d1ff9534c2bbd131fbaec39ff2d2db6248 Mon Sep 17 00:00:00 2001 From: Jeremy Kersten Date: Fri, 25 Sep 2015 16:37:25 +0200 Subject: [PATCH 17/47] [FIX] website: fix footer Inconsistency between col-md and col-lg (offset) Add auto word wrap to avoid that text override next column --- .../static/src/css/analytic.css | 3 +-- addons/website/static/src/css/common.css | 0 addons/website/static/src/css/website.css | 11 ++++++----- addons/website/static/src/css/website.sass | 11 +++++++---- addons/website/views/website_templates.xml | 6 +++--- 5 files changed, 17 insertions(+), 14 deletions(-) create mode 100644 addons/website/static/src/css/common.css diff --git a/addons/account_analytic_analysis/static/src/css/analytic.css b/addons/account_analytic_analysis/static/src/css/analytic.css index ccf14aa202c..6a11ca21597 100644 --- a/addons/account_analytic_analysis/static/src/css/analytic.css +++ b/addons/account_analytic_analysis/static/src/css/analytic.css @@ -1,4 +1,3 @@ -@charset "utf-8"; .openerp .oe_form table.oe_form_analytic_account tr { height: 28px; } @@ -14,7 +13,7 @@ padding-left: 7px; } .openerp .oe_form table.oe_form_analytic_account th { - text-align: right; + text-align: right; } .openerp .oe_form table.oe_form_analytic_account .oe_timesheet_grey { background-color: #eeeeee; diff --git a/addons/website/static/src/css/common.css b/addons/website/static/src/css/common.css new file mode 100644 index 00000000000..e69de29bb2d diff --git a/addons/website/static/src/css/website.css b/addons/website/static/src/css/website.css index c0043c945a5..619638ad254 100644 --- a/addons/website/static/src/css/website.css +++ b/addons/website/static/src/css/website.css @@ -214,7 +214,7 @@ li > p { } font[style*='background'], font[class*='bg-'] { - padding: 0 2px + padding: 0 2px; } .o_ul_toggle_self, .o_ul_toggle_next { @@ -287,7 +287,7 @@ td { font-size: 120%; } -.jumbotron.para_large p{ +.jumbotron.para_large p { font-size: 150%; } @@ -355,9 +355,7 @@ body > nav.navbar { padding-top: 34px; } } - /* ----- BOOTSTRAP FIX ----- */ - @-moz-document url-prefix() { .table .img-responsive { width: 100%; @@ -988,4 +986,7 @@ div.carousel .item.text_only .container > .carousel-image { margin-right: 0 !important; } -/*# sourceMappingURL=website.css.map */ +/* ---- footer style ---- {{{ */ +#footer div.row { + word-wrap: break-word; +} diff --git a/addons/website/static/src/css/website.sass b/addons/website/static/src/css/website.sass index a53e5254708..4d2ee2fded2 100644 --- a/addons/website/static/src/css/website.sass +++ b/addons/website/static/src/css/website.sass @@ -191,9 +191,8 @@ td .para_large font-size: 120% -.jumbotron.para_large p{ - font-size: 150%; -} +.jumbotron.para_large p + font-size: 150% .readable font-size: 120% @@ -245,7 +244,7 @@ body > nav.navbar width: 100% position: absolute z-index: 10000 -@media (max-min: 767px) +@media (min-width: 767px) nav.navbar + #wrapwrap padding-top: 34px @@ -785,3 +784,7 @@ div.carousel font-size: 13px .navbar-nav.navbar-right:last-child margin-right: 0 !important + +/* ---- footer style ---- {{{ */ +#footer div.row + word-wrap: break-word diff --git a/addons/website/views/website_templates.xml b/addons/website/views/website_templates.xml index 6fc55be8e96..c223a40ff50 100644 --- a/addons/website/views/website_templates.xml +++ b/addons/website/views/website_templates.xml @@ -369,13 +369,13 @@