diff options
Diffstat (limited to 'addons/website/wizard')
| -rw-r--r-- | addons/website/wizard/website_robots.py | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/addons/website/wizard/website_robots.py b/addons/website/wizard/website_robots.py index 7172a3aa6b1..1d68aa4f22a 100644 --- a/addons/website/wizard/website_robots.py +++ b/addons/website/wizard/website_robots.py @@ -7,14 +7,7 @@ class WebsiteRobots(models.TransientModel): _name = "website.robots" _description = "Robots.txt Editor" - content = fields.Text() - - @api.model - def default_get(self, fields): - defaults = super(WebsiteRobots, self).default_get(fields) - if 'content' in fields: - defaults['content'] = self.env['website'].get_current_website().robots_txt - return defaults + 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 |
