odoo/addons/website_sale/views/views.xml

184 lines
8.3 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record model="ir.ui.view" id="product_pricelist_view">
<field name="name">product.pricelist.website.form</field>
<field name="model">product.pricelist</field>
<field name="inherit_id" ref="product.product_pricelist_view"/>
<field name="arch" type="xml">
<field name="currency_id" position="before">
<field name="code"/>
</field>
</field>
</record>
<record model="ir.ui.view" id="product_template_form_view">
<field name="name">product.template.product.website.form</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_form_view"/>
<field name="arch" type="xml">
<!-- add state field in header -->
<group name="email_template_and_project" position="before">
<group name="website" string="Website" >
<field name="website_url" invisible="1"/>
<field name="public_categ_ids" widget="many2many_tags" string="Website Categories"/>
<field name="alternative_product_ids" widget="many2many_tags"/>
<field name="accessory_product_ids" widget="many2many_tags"/>
<field name="availability" widget="selection"/>
<field name="availability_warning" attrs="{'invisible': [('availability', '!=', 'warning')]}"/>
<field name="website_style_ids" widget="many2many_tags" groups="base.group_no_one"/>
</group>
</group>
<div name="button_box" position="inside">
<button class="oe_stat_button" name="website_publish_button"
type="object" icon="fa-globe">
<field name="website_published" widget="website_button"/>
</button>
</div>
<xpath expr="//notebook[last()]" position="inside">
<page string="Images" groups="website_sale.group_website_multi_image">
<field name="product_image_ids" mode="kanban" context="{'default_name': name, 'default_product_tmpl_id': active_id}">
<kanban string="Product Images">
<field name="name"/>
<field name="image" />
<templates>
<t t-name="kanban-box">
<div class="oe_kanban_global_click">
<a t-if="!read_only_mode" type="delete" class="fa fa-times pull-right"/>
<div class="o_kanban_image">
<img t-if="record.image.raw_value" t-att-src="'data:image/png;base64,'+record.image.raw_value"/>
</div>
<div class="oe_kanban_details">
<field name="name"/>
</div>
</div>
</t>
</templates>
</kanban>
</field>
</page>
</xpath>
</field>
</record>
<!-- Product attribute -->
<record id="product_attribute_value_view_tree_inherit_website_sale" model="ir.ui.view">
<field name="name">product.attribute.value.view.tree.inherit.website.sale</field>
<field name="model">product.attribute.value</field>
<field name="inherit_id" ref="product.product_attribute_value_view_tree"/>
<field name="arch" type="xml">
<field name="name" position="after">
<field name="html_color"/>
</field>
</field>
</record>
<record id="variants_tree_view" model="ir.ui.view">
<field name="name">variants.template.tree</field>
<field name="model">product.attribute.value</field>
<field name="inherit_id" ref="product.variants_tree_view"/>
<field name="arch" type="xml">
<field name="name" position="after">
<field name="html_color"/>
</field>
</field>
</record>
<record id="attribute_tree_view" model="ir.ui.view">
<field name="name">product.attribute.tree.type</field>
<field name="model">product.attribute</field>
<field name="inherit_id" ref="product.attribute_tree_view"></field>
<field name="arch" type="xml">
<field name="name" position="after">
<field name="type"/>
</field>
</field>
</record>
<!-- Product Public Categories -->
<record id="product_public_category_form_view" model="ir.ui.view">
<field name="name">product.public.category.form</field>
<field name="model">product.public.category</field>
<field name="arch" type="xml">
<form string="Website Public Categories">
<sheet>
<field name="image_medium" widget='image' class="oe_avatar"/>
<div class="oe_left">
<group>
<field name="name"/>
<field name="parent_id"/>
<field name="sequence"/>
</group>
</div>
</sheet>
</form>
</field>
</record>
<record id="product_public_category_tree_view" model="ir.ui.view">
<field name="name">product.public.category.tree</field>
<field name="model">product.public.category</field>
<field name="field_parent" eval="False"/>
<field name="arch" type="xml">
<tree string="Product Public Categories">
<field name="sequence" invisible="1"/>
<field name="display_name"/>
</tree>
</field>
</record>
<record id="product_public_category_action" model="ir.actions.act_window">
<field name="name">Website Product Categories</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">product.public.category</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" eval="False"/>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to define a new category.
</p><p>
Categories are used to browse your products through the
touchscreen interface.
</p>
</field>
</record>
<record id="website_sale_pricelist_form_view" model="ir.ui.view">
<field name="name">website_sale.pricelist.form</field>
<field name="inherit_id" ref="product.product_pricelist_view" />
<field name="model">product.pricelist</field>
<field name="arch" type="xml">
<field name='currency_id' position='after'>
<field name="selectable"/>
<field name="website_id" string='Allow to use on ' placeholder="None website" />
</field>
</field>
</record>
<record id="website_sale_pricelist_tree_view" model="ir.ui.view">
<field name="name">product.pricelist.tree.inherit.product</field>
<field name="model">product.pricelist</field>
<field name="inherit_id" ref="product.product_pricelist_view_tree"/>
<field name="arch" type="xml">
<field name="currency_id" position="after">
<field name="selectable" />
</field>
</field>
</record>
<record model="ir.ui.view" id="view_product_image_form">
<field name="name">product.image.form</field>
<field name="model">product.image</field>
<field name="arch" type="xml">
<form string="Product Images">
<sheet>
<field name="image" widget="image" class="oe_avatar"/>
<div class="oe_title">
<label class="oe_edit_only" for="name" string="Image Name"/>
<h1><field name="name" placeholder="Image Name" required="True"/></h1>
<field name="product_tmpl_id" invisible="1"/>
</div>
</sheet>
</form>
</field>
</record>
</odoo>