blob: 1d68aa4f22a3153b6684e68972b3d5869f60f0f6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
# -*- encoding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, fields, models
class WebsiteRobots(models.TransientModel):
_name = "website.robots"
_description = "Robots.txt Editor"
content = fields.Text(default=lambda s: s.env['website'].get_current_website().robots_txt)
def action_save(self):
self.env['website'].get_current_website().robots_txt = self.content
return {'type': 'ir.actions.act_window_close'}
|