diff options
| author | Christophe Simonis <chs@odoo.com> | 2017-03-01 14:07:15 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2017-03-01 14:07:15 +0100 |
| commit | 5c4744cd1fa177eeed679ff4ba46f90b0bc82005 (patch) | |
| tree | 29bb9696176428214631c3f53837ae14a3407e44 /addons | |
| parent | 1730dca101616135dfdc0073520e92506b52a0b0 (diff) | |
| parent | 5f9f4f4d9dbb8222a894548e11f43c6ea7c2c0d0 (diff) | |
[MERGE] forward port branch 9.0 up to 5f9f4f4d9db
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/l10n_fr_fec/wizard/fec.py | 13 | ||||
| -rw-r--r-- | addons/mrp/mrp.py | 3 | ||||
| -rw-r--r-- | addons/web_editor/static/src/js/backend.js | 7 | ||||
| -rw-r--r-- | addons/website/controllers/main.py | 5 | ||||
| -rw-r--r-- | addons/website_portal_sale/controllers/main.py | 2 |
5 files changed, 21 insertions, 9 deletions
diff --git a/addons/l10n_fr_fec/wizard/fec.py b/addons/l10n_fr_fec/wizard/fec.py index 3acc2e7e644..1b1ddf20e9b 100644 --- a/addons/l10n_fr_fec/wizard/fec.py +++ b/addons/l10n_fr_fec/wizard/fec.py @@ -184,14 +184,17 @@ class AccountFrFec(models.TransientModel): unaffected_earnings_amount = float(unaffected_earnings_results[11].replace(',', '.')) - float(unaffected_earnings_results[12].replace(',', '.')) listrow_amount = current_amount + unaffected_earnings_amount if listrow_amount > 0: - listrow[11] = str(listrow_amount) - listrow[12] = '0.00' + listrow[11] = str(listrow_amount).replace('.', ',') + listrow[12] = '0,00' else: - listrow[11] = '0.00' - listrow[12] = str(listrow_amount) + listrow[11] = '0,00' + listrow[12] = str(-listrow_amount).replace('.', ',') w.writerow([s.encode("utf-8") for s in listrow]) #if the unaffected earnings account wasn't in the selection yet: add it manually - if not unaffected_earnings_line and unaffected_earnings_results and unaffected_earnings_results[11] != '0,00' and unaffected_earnings_results[12] != '0,00': + if (not unaffected_earnings_line + and unaffected_earnings_results + and (unaffected_earnings_results[11] != '0,00' + or unaffected_earnings_results[12] != '0,00')): #search an unaffected earnings account unaffected_earnings_account = self.env['account.account'].search([('user_type_id', '=', self.env.ref('account.data_unaffected_earnings').id)], limit=1) if unaffected_earnings_account: diff --git a/addons/mrp/mrp.py b/addons/mrp/mrp.py index beb1fec3790..868769e6d62 100644 --- a/addons/mrp/mrp.py +++ b/addons/mrp/mrp.py @@ -783,7 +783,8 @@ class mrp_production(osv.osv): proc_obj = self.pool.get("procurement.order") procs = proc_obj.search(cr, uid, [('production_id', 'in', ids)], context=context) if procs: - proc_obj.message_post(cr, uid, procs, body=_('Manufacturing order cancelled.'), context=context) + for proc in procs: + proc_obj.message_post(cr, uid, proc, body=_('Manufacturing order cancelled.'), context=context) proc_obj.write(cr, uid, procs, {'state': 'exception'}, context=context) return True diff --git a/addons/web_editor/static/src/js/backend.js b/addons/web_editor/static/src/js/backend.js index ef0dfe7ed09..611cdb1a1f7 100644 --- a/addons/web_editor/static/src/js/backend.js +++ b/addons/web_editor/static/src/js/backend.js @@ -351,7 +351,12 @@ var FieldTextHtml = widget.extend({ }); }, render_value: function () { - if (this.lang !== this.view.dataset.context.lang || this.$iframe.attr('src').match(/[?&]edit_translations=1/)) { + if (this.$iframe.attr('src').match(/[?&]edit_translations=1/)) { + return; + } + // ONLY HAVE THIS IN 9.0 AND SAAS-11 + var is_editor_onchange = this.get('value') === '<p>on_change_model_and_list</p>'; + if (this.lang !== this.view.dataset.context.lang && !is_editor_onchange) { return; } var value = (this.get('value') || "").replace(/^<p[^>]*>(\s*|<br\/?>)<\/p>$/, ''); diff --git a/addons/website/controllers/main.py b/addons/website/controllers/main.py index 808ac8c5498..93605087f46 100644 --- a/addons/website/controllers/main.py +++ b/addons/website/controllers/main.py @@ -151,9 +151,12 @@ class Website(openerp.addons.web.controllers.main.Home): # rename the -id-page.xml => -id.xml ira.write(cr, uid, last, dict(url="/sitemap-%d.xml" % current_website.id, name="/sitemap-%d.xml" % current_website.id), context=context) else: + # TODO: in master/saas-15, move current_website_id in template directly + pages_with_website = map(lambda p: "%d-%d" % (current_website.id, p), range(1, pages + 1)) + # Sitemaps must be split in several smaller files with a sitemap index content = iuv.render_template(cr, uid, 'website.sitemap_index_xml', dict( - pages=range(1, pages + 1), + pages=pages_with_website, url_root=request.httprequest.url_root, ), context=context) create_sitemap('/sitemap-%d.xml' % current_website.id, content) diff --git a/addons/website_portal_sale/controllers/main.py b/addons/website_portal_sale/controllers/main.py index 275e58b049c..a60408f3f42 100644 --- a/addons/website_portal_sale/controllers/main.py +++ b/addons/website_portal_sale/controllers/main.py @@ -27,7 +27,7 @@ class website_account(website_account): ]) invoices = res_invoices.search([ ('message_partner_ids', 'child_of', [partner.commercial_partner_id.id]), - ('state', 'in', ['open', 'paid', 'cancelled']) + ('state', 'in', ['open', 'paid', 'cancel']) ]) response.qcontext.update({ |
