[MERGE] forward port branch saas-6 up to 09f7916f48
This commit is contained in:
@@ -393,7 +393,7 @@ class AccountInvoice(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,
|
||||
)
|
||||
|
||||
@@ -857,7 +857,7 @@ class Message(models.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])
|
||||
|
||||
@api.model
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user