flectra/addons/website_sale/views/product_views.xml
Siddharth Bhalgami 5f5020a05d [FIX] Product Brand Kanban Image display Issue
Even image is exist in form view, but still its not coming up in Kanban view!
2018-03-14 15:16:49 +05:30

379 lines
16 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="ribbon_id"/>
<field name="tag_ids" widget="many2many_tags"/>
<field name="brand_id" options="{'no_create': True}"/>
<field name="website_ids" widget="many2many_tags"/>
</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"/>
<field name="website_ids" widget="many2many_tags"/>
</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_ids" string='Allow to use on '
widget="many2many_tags"/>
</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>
<!-- Product Limit Tree View -->
<record id="portfolio_category_tree_view" model="ir.ui.view">
<field name="name">product.view.limit.per.page.tree</field>
<field name="model">product.view.limit</field>
<field name="field_parent" eval="False" />
<field name="arch" type="xml">
<tree string="Product Veiw Limit per Page" editable="bottom">
<field name="sequence" widget="handle"/>
<field name="name"/>
</tree>
</field>
</record>
<!-- Product Limit Action -->
<record id="website_product_limit_action" model="ir.actions.act_window">
<field name="name">Website Products View Limit</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">product.view.limit</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to define a new Product View Limit per Page in Shop.
</p>
</field>
</record>
<!-- Product Ribbon Form View -->
<record id="product_ribbon_form_view" model="ir.ui.view">
<field name="name">Product Ribbon Form View</field>
<field name="model">product.ribbon</field>
<field name="arch" type="xml">
<form string="Product Ribbon">
<sheet>
<group>
<field name="name" />
<field name="ribbon_color_back"/>
<field name="ribbon_color_text"/>
</group>
<div class="alert alert-danger mt16" style="font-size:15px;">
You can add Color Name | Hex Code in Ribbon's Background | Font color field.
</div>
</sheet>
</form>
</field>
</record>
<!-- Product Tags Tree View -->
<record id="product_tag_tree_view" model="ir.ui.view">
<field name="name">Product Tags Tree</field>
<field name="model">product.tags</field>
<field name="field_parent" eval="False" />
<field name="arch" type="xml">
<tree string="Product Tags" editable="bottom">
<field name="sequence" widget="handle"/>
<field name="name"/>
</tree>
</field>
</record>
<!-- Product Brand From View -->
<record id="product_by_brand_form_view" model="ir.ui.view">
<field name="name">product.brand.form</field>
<field name="model">product.brand</field>
<field name="arch" type="xml">
<form string="Product Brands">
<sheet>
<field name="brand_image" widget="image" class="oe_avatar"/>
<div class="oe_title">
<label class="oe_edit_only" for="name" string="Brand Name"/>
<h1><field name="name" placeholder="Brand Name"/></h1>
</div>
</sheet>
</form>
</field>
</record>
<!-- Product Brand Tree View -->
<record id="product_by_brand_tree_view" model="ir.ui.view">
<field name="name">product.brand.tree</field>
<field name="model">product.brand</field>
<field name="field_parent" eval="False" />
<field name="arch" type="xml">
<tree string="Product Brands">
<field name="sequence" widget="handle"/>
<field name="name" />
</tree>
</field>
</record>
<record id="product_brand_kanban_view" model="ir.ui.view">
<field name="name">Product By Brand</field>
<field name="model">product.brand</field>
<field name="arch" type="xml">
<kanban>
<field name="id"/>
<field name="brand_image"/>
<field name="name"/>
<templates>
<t t-name="kanban-box">
<div class="oe_kanban_global_click">
<div class="o_kanban_image">
<img t-att-src="kanban_image('product.brand', 'brand_image', record.id.raw_value)"/>
</div>
<div class="oe_kanban_details">
<strong><field name="name"/></strong>
</div>
</div>
</t>
</templates>
</kanban>
</field>
</record>
<!-- Product Brand Action -->
<record id="product_by_brand_action" model="ir.actions.act_window">
<field name="name">Brands</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">product.brand</field>
<field name="view_type">form</field>
<field name="view_mode">kanban,tree,form</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click here to define a new product brand.
</p>
</field>
</record>
<!-- Product Tags Action -->
<record id="product_tags_action" model="ir.actions.act_window">
<field name="name">Tags</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">product.tags</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click here to define a new product tag.
</p>
</field>
</record>
</flectra>