[MERGE] forward port branch saas-11 up to f081f19fb8

This commit is contained in:
Christophe Simonis
2017-07-18 20:09:37 +02:00
5 changed files with 22 additions and 5 deletions
+6
View File
@@ -1477,6 +1477,12 @@ class AccountPaymentTerm(models.Model):
result.append((last_date, dist))
return result
@api.multi
def unlink(self):
property_recs = self.env['ir.property'].search([('value_reference', 'in', ['account.payment.term,%s'%payment_term.id for payment_term in self])])
property_recs.unlink()
return super(AccountPaymentTerm, self).unlink()
class AccountPaymentTermLine(models.Model):
_name = "account.payment.term.line"
+1 -1
View File
@@ -200,7 +200,7 @@
</p>
<div class="alert alert-info info_icon" role="alert">
<span class="fa fa-lightbulb-o fa-lg"/>
<p>Exchange rates can be automatically updated once a day from <strong>Yahoo Finance</strong> or the <strong>European Central Bank</strong>. You can activate this feature in the bottom of the <a t-att-href="prepare_backend_url('account.action_account_config')">Accounting Settings</a><a t-att-href="prepare_backend_url('account.action_account_config')">accounting settings</a>.</p>
<p>Exchange rates can be automatically updated once a day from <strong>Yahoo Finance</strong> or the <strong>European Central Bank</strong>. You can activate this feature in the bottom of the <a t-att-href="prepare_backend_url('account.action_account_config')">Accounting Settings</a>.</p>
</div>
</t>
<t t-call="web_planner.page">
+3 -4
View File
@@ -55,15 +55,14 @@ class MailMail(models.Model):
self.ensure_one()
body = super(MailMail, self).send_get_mail_body(partner=partner)
links_blacklist = ['/unsubscribe_from_list']
if self.mailing_id and body and self.statistics_ids:
for match in re.findall(URL_REGEX, self.body_html):
href = match[0]
url = match[1]
if not [s for s in links_blacklist if s in href]:
parsed = urlparse.urlparse(url, scheme='http')
if parsed.scheme.startswith('http') and parsed.path.startswith('/r/'):
new_href = href.replace(url, url + '/m/' + str(self.statistics_ids[0].id))
body = body.replace(href, new_href)
+6
View File
@@ -6713,6 +6713,12 @@ msgstr ""
msgid "You should provide a different serial number for each piece"
msgstr ""
#. module: stock
#: code:addons/stock/models/product.py:371
#, python-format
msgid "You still have some active reordering rules on this product. Please archive or delete them first."
msgstr ""
#. module: stock
#: code:addons/stock/models/stock_move.py:226
#, python-format
+6
View File
@@ -364,6 +364,12 @@ class Product(models.Model):
def action_view_routes(self):
return self.mapped('product_tmpl_id').action_view_routes()
@api.multi
def write(self, values):
res = super(Product, self).write(values)
if 'active' in values and not values['active'] and self.mapped('orderpoint_ids').filtered(lambda r: r.active):
raise UserError(_('You still have some active reordering rules on this product. Please archive or delete them first.'))
return res
class ProductTemplate(models.Model):
_inherit = 'product.template'