mirror of
https://github.com/guohuadeng/app-odoo.git
synced 2025-02-23 04:11:36 +02:00
update multi website
This commit is contained in:
16
app_website_blog_editor/models/ir_ui_view.py
Normal file
16
app_website_blog_editor/models/ir_ui_view.py
Normal file
@@ -0,0 +1,16 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from odoo import api, fields, models
|
||||
|
||||
|
||||
class IrUiView(models.Model):
|
||||
_inherit = 'ir.ui.view'
|
||||
|
||||
def write(self, vals):
|
||||
# 处理强制全局, Create时不管
|
||||
for view in self:
|
||||
if len(view.page_ids) == 1:
|
||||
page = view.page_ids[0]
|
||||
if page.is_force_all:
|
||||
self = self.with_context(no_cow=1)
|
||||
return super(IrUiView, self).write(vals)
|
||||
Reference in New Issue
Block a user