diff options
| author | Keyur Gajjar <kga@odoo.com> | 2015-08-20 15:16:03 +0530 |
|---|---|---|
| committer | Jérome Maes <jem@openerp.com> | 2016-04-13 11:20:53 +0200 |
| commit | 30f48eb6b677105c47f67d66a71b1102cafbb558 (patch) | |
| tree | c07109e1a159c812cd7dba403404905a5c92568e /addons/website_mail/models/update.py | |
| parent | d672d8aa867140bec8bd3a3a2f89e22fb9f14364 (diff) | |
[MIG] website_mail: code migration to new api
No functional changes, only rewrite the code with
the api.v8 which more pythonic and smooth.
Diffstat (limited to 'addons/website_mail/models/update.py')
| -rw-r--r-- | addons/website_mail/models/update.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/addons/website_mail/models/update.py b/addons/website_mail/models/update.py index 924d30027c1..5367cb7df93 100644 --- a/addons/website_mail/models/update.py +++ b/addons/website_mail/models/update.py @@ -1,10 +1,14 @@ # -*- coding: utf-8 -*- -from openerp.models import AbstractModel +# Part of Odoo. See LICENSE file for full copyright and licensing details. -class publisher_warranty_contract(AbstractModel): +from odoo import api, models + + +class PublisherWarrantyContract(models.AbstractModel): _inherit = "publisher_warranty.contract" - def _get_message(self, cr, uid): - msg = super(publisher_warranty_contract, self)._get_message(cr, uid) + @api.model + def _get_message(self): + msg = super(PublisherWarrantyContract, self)._get_message() msg['website'] = True return msg |
