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.
66 lines
3.4 KiB
66 lines
3.4 KiB
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<!-- New page added in product template form view to search image and download it-->
|
|
<record id="product_template_only_form_view"
|
|
model="ir.ui.view">
|
|
<field name="name">
|
|
product.template.view.form.inherit.product.image.suggestion
|
|
</field>
|
|
<field name="model">product.template</field>
|
|
<field name="inherit_id"
|
|
ref="product.product_template_only_form_view"/>
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//notebook[last()]" position="inside">
|
|
<page string="Image Suggestion">
|
|
<group>
|
|
<group>
|
|
<group>
|
|
<field name="image_limit"/>
|
|
<field name="resize_image"/>
|
|
</group>
|
|
</group>
|
|
<group>
|
|
<field name="search_field"
|
|
placeholder="Search Here.." nolabel="1"
|
|
style="width:150px"/>
|
|
<button class="oe_stat_button"
|
|
name="action_search_image"
|
|
type="object" icon="fa-search">
|
|
</button>
|
|
</group>
|
|
</group>
|
|
<!-- Kanban view to show the images downloaded–>-->
|
|
<field name="search_image_ids" mode="kanban"
|
|
context="{'default_name': name}">
|
|
<kanban string="Suggested Images">
|
|
<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="kanban_image('product.image.suggestion', 'image', record.id.raw_value)"
|
|
alt="Product"
|
|
class="o_image_64_contain"/>
|
|
</div>
|
|
<div style="margin-left:160px;">
|
|
<button name="action_set_image"
|
|
string="Set_Image"
|
|
class="btn btn-primary oe_stat_button pull-right"
|
|
style="height:30px;width:80px"
|
|
type="object">Set Image
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</t>
|
|
</templates>
|
|
</kanban>
|
|
</field>
|
|
</page>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
</odoo>
|
|
|