diff --git a/mail_digest/__openerp__.py b/mail_digest/__openerp__.py index 169b9c5d..75f6c7ad 100644 --- a/mail_digest/__openerp__.py +++ b/mail_digest/__openerp__.py @@ -5,7 +5,7 @@ { 'name': 'Mail digest', 'summary': """Basic digest mail handling.""", - 'version': '9.0.1.0.0', + 'version': '9.0.1.0.1', 'license': 'AGPL-3', 'author': 'Camptocamp,Odoo Community Association (OCA)', 'depends': [ diff --git a/mail_digest/models/mail_digest.py b/mail_digest/models/mail_digest.py index 45739bcf..095a0ac7 100644 --- a/mail_digest/models/mail_digest.py +++ b/mail_digest/models/mail_digest.py @@ -94,11 +94,16 @@ class MailDigest(models.Model): # default to company name = self.env.user.company_id.name if 'website' in self.env: + # TODO: shall we make this configurable at digest or global level? + # Maybe you have a website but + # your digest msgs are not related to it at all or partially. + ws = None try: ws = self.env['website'].get_current_website() except RuntimeError: - # RuntimeError: object unbound -> no website request - ws = None + # RuntimeError: object unbound -> no website request. + # Fallback to default website if any. + ws = self.env['website'].search([], limit=1) if ws: name = ws.name return name