Files
odoo_source/addons/mail/models/ir_autovacuum.py
T
Raphael Collet 4ddc323139 [FIX] base: fix and complete migration of base/ir
- add or fix decorators on methods
- fix most compute methods (wrong dependencies)
- revert changes in `eval_context` of `ir.actions`
- various code simplifications and improvements
- migrate methods that were not
- ir_qweb: modify `QWebContext` to take an environment instead of `cr`, `uid`, `context`
- ir_qweb: convert `AssetsBundle` to use new API `env`
- ir_ui_view: use decorator `multi` on method `read_combined`
- ir_ui_view: ensure that method `render` is never called with an xml_id
- ir_ui_view: factor out part of the `ormcache` key of method `_read_template`
2016-03-21 13:46:44 +01:00

12 lines
395 B
Python

# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from openerp import models
class AutoVacuum(models.AbstractModel):
_inherit = 'ir.autovacuum'
def power_on(self, cr, uid, *args, **kwargs):
self.pool['mail.thread']._garbage_collect_attachments(cr, uid)
return super(AutoVacuum, self).power_on(cr, uid, *args, **kwargs)