[MERGE] forward port branch 8.0 up to 9d535ee2c7

This commit is contained in:
Christophe Simonis
2017-01-25 12:56:42 +01:00
3 changed files with 11 additions and 2 deletions
+1 -1
View File
@@ -398,7 +398,7 @@ class account_invoice(models.Model):
default_model='account.invoice',
default_res_id=self.id,
default_use_template=bool(template),
default_template_id=template.id,
default_template_id=template and template.id or False,
default_composition_mode='comment',
mark_invoice_as_sent=True,
)
+1 -1
View File
@@ -806,7 +806,7 @@ class mail_message(osv.Model):
def _invalidate_documents(self):
""" Invalidate the cache of the documents followed by ``self``. """
for record in self:
if record.res_id:
if record.model and record.res_id:
self.env[record.model].invalidate_cache(ids=[record.res_id])
def create(self, cr, uid, values, context=None):
+9
View File
@@ -0,0 +1,9 @@
Italy, 2017-01-24
I hereby agree to the terms of the Odoo Individual Contributor License Agreement v1.0.
I declare that I am authorized and able to make this agreement and sign this declaration.
Signed,
Sergio Corato sergiocorato@gmail.com https://github.com/sergiocorato