mirror of
https://github.com/guohuadeng/app-odoo.git
synced 2025-02-23 04:11:36 +02:00
博客文章背景默认使用元图像
This commit is contained in:
14
app_website_blog_editor/models/res_config_settings.py
Normal file
14
app_website_blog_editor/models/res_config_settings.py
Normal file
@@ -0,0 +1,14 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from odoo import fields, models, _
|
||||
|
||||
|
||||
class ResConfigSettings(models.TransientModel):
|
||||
_inherit = "res.config.settings"
|
||||
|
||||
sync_blog_meta_background_img = fields.Boolean('Use a meta image by default for blog post background', config_parameter='app_website_blog_editor.sync_blog_meta_background_img')
|
||||
|
||||
def set_values(self):
|
||||
res = super().set_values()
|
||||
self.env['ir.config_parameter'].set_param('app_website_blog_editor.sync_blog_meta_background_img', self.sync_blog_meta_background_img)
|
||||
return res
|
||||
Reference in New Issue
Block a user