You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
1.4 KiB
31 lines
1.4 KiB
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<!-- Adding button in product template for website publish -->
|
|
<record id="product_template_form_view" model="ir.ui.view">
|
|
<field name="name">
|
|
product.template.view.form.inherit.website.product.publish
|
|
</field>
|
|
<field name="model">product.template</field>
|
|
<field name="inherit_id" ref="website_sale.product_template_form_view"/>
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//field[@name='is_published']" position="after">
|
|
<button name="action_published" type="object"
|
|
string="Publish" invisible="is_published ==True"
|
|
sequence="10">
|
|
<i class="fa fa-fw o_button_icon fa-globe text-success"/>
|
|
<div class="o_stat_info">
|
|
<span class="o_stat_text">Publish</span>
|
|
</div>
|
|
</button>
|
|
<button name="action_unpublished" type="object"
|
|
invisible="is_published ==False"
|
|
sequence="10">
|
|
<i class="fa fa-fw o_button_icon fa-globe text-danger"/>
|
|
<div class="o_stat_info">
|
|
<span class="o_stat_text">Unpublish</span>
|
|
</div>
|
|
</button>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
</odoo>
|
|
|