update editor 可以直接切换代码模式

This commit is contained in:
Ivan Office
2023-10-03 04:19:34 +08:00
parent 63ecaa4a3a
commit 51a5c1ce09
3 changed files with 4 additions and 5 deletions

View File

@@ -34,7 +34,6 @@
</xpath>
<xpath expr="//field[@name='is_seo_optimized']" position="before">
<button name="action_post_debug_view" type="object" title="Settings" icon="fa-bug fa-lg" groups="base.group_no_one"/>
<button name="action_post_code_view" type="object" title="Source Code" icon="fa-code fa-lg" groups="base.group_no_one"/>
</xpath>
</field>
</record>
@@ -47,7 +46,7 @@
<xpath expr="//page[@name='seo']" position="after">
<page name="post_content" string="Content">
<field name="content" widget="html" nolabel="1" class="oe-bordered-editor"
options="{'style-inline': true, 'codeview': true, 'dynamic_placeholder': true}"/>
options="{'sandboxedPreview': true, 'codeview': true, 'dynamic_placeholder': true}"/>
</page>
</xpath>
<xpath expr="//field[@name='visits']" position="attributes">

View File

@@ -25,7 +25,6 @@
</xpath>
<xpath expr="//field[@name='is_seo_optimized']" position="before">
<button name="action_page_debug_view" position="move"/>
<button name="action_page_code_view" type="object" title="Source Code" icon="fa-code fa-lg" groups="base.group_no_one"/>
<button name="action_page_form_view" type="object" title="Properties Set" icon="fa-file-text-o fa-lg" groups="base.group_no_one"/>
</xpath>
</field>
@@ -64,6 +63,7 @@
<field name="arch" type="xml">
<xpath expr="//field[@name='arch_base']" position="attributes">
<attribute name="widget">html</attribute>
<attribute name="options">{'sandboxedPreview': true}</attribute>
</xpath>
</field>
</record>

View File

@@ -9,7 +9,6 @@
<field name="arch" type="xml">
<xpath expr="//field[@name='is_seo_optimized']" position="before">
<button name="action_product_debug_view" type="object" title="Content Set" icon="fa-bug fa-lg" groups="base.group_no_one"/>
<button name="action_product_code_view" type="object" title="Source Code" icon="fa-code fa-lg" groups="base.group_no_one"/>
</xpath>
<xpath expr="//field[@name='website_url']" position="attributes">
<attribute name="optional">hide</attribute>
@@ -55,7 +54,7 @@
</xpath>
</field>
</record>
<!--可以停用此form-->
<record id="app_product_template_form_view_code" model="ir.ui.view">
<field name="name">app.product.template.website.code</field>
<field name="model">product.template</field>
@@ -113,6 +112,7 @@
<field name="arch" type="xml">
<xpath expr="//field[@name='website_description']" position="attributes">
<attribute name="widget">html</attribute>
<attribute name="options">{'sandboxedPreview': true}</attribute>
</xpath>
</field>
</record>