231 lines
10 KiB
XML
231 lines
10 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<flectra>
|
|
<record id="product_template_search_view_website" model="ir.ui.view">
|
|
<field name="name">product.template.search.published</field>
|
|
<field name="model">product.template</field>
|
|
<field name="inherit_id" ref="product.product_template_search_view"/>
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//filter[@name='consumable']" position="after">
|
|
<separator/>
|
|
<filter string="Published" name="published" domain="[('website_published', '=', True)]"/>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="product_template_action_website" model="ir.actions.act_window">
|
|
<field name="name">Products</field>
|
|
<field name="res_model">product.template</field>
|
|
<field name="view_type">form</field>
|
|
<field name="view_mode">kanban,tree,form</field>
|
|
<field name="context">{'search_default_published': 1, 'default_website_published': True}</field>
|
|
</record>
|
|
|
|
<record id="product_attribute_line_form" model="ir.ui.view">
|
|
<field name="name">product.attribute.line.form.inherit</field>
|
|
<field name="model">product.attribute.line</field>
|
|
<field name="inherit_id" ref="product.product_attribute_line_form"/>
|
|
<field name="priority" eval="8"/>
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//field[@name='value_ids']/tree/field[@name='name']" position="after">
|
|
<field name="html_color"/>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="product_attribute_view_form" model="ir.ui.view">
|
|
<field name="name">product.attribute.form.inherit</field>
|
|
<field name="model">product.attribute</field>
|
|
<field name="inherit_id" ref="product.product_attribute_view_form"/>
|
|
<field name="priority" eval="8"/>
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//group[@name='main_fields']" position="after">
|
|
<group>
|
|
<field name="type"/>
|
|
</group>
|
|
</xpath>
|
|
<xpath expr="//field[@name='value_ids']/tree/field[@name='name']" position="after">
|
|
<field name="html_color"/>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
|
|
<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="eCommerce Categories"/>
|
|
<field name="alternative_product_ids" widget="many2many_tags"/>
|
|
<field name="accessory_product_ids" widget="many2many_tags"/>
|
|
<field name="website_style_ids" widget="many2many_tags" groups="base.group_no_one"/>
|
|
</group>
|
|
</group>
|
|
<button name="toggle_active" position="before">
|
|
<button class="oe_stat_button" name="website_publish_button"
|
|
type="object" icon="fa-globe" attrs="{'invisible': [('sale_ok','=',False)]}">
|
|
<field name="website_published" widget="website_button"/>
|
|
</button>
|
|
</button>
|
|
<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" widget="handle"/>
|
|
<field name="display_name"/>
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
<record id="product_public_category_action" model="ir.actions.act_window">
|
|
<field name="name">eCommerce 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" options="{'size': [90, 90]}"/>
|
|
<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>
|
|
|
|
</flectra>
|