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.
 
 
 
 
 

50 lines
2.7 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_image_suggestion_form_view" model="ir.ui.view">
<field name="name">product.template.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"/>
<button name="action_search_image" class="oe_stat_button"
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, 'default_product_tmpl_id': active_id}">
<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="'data:image/png;base64,'+record.image.raw_value"/>
</div>
<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>
</t>
</templates>
</kanban>
</field>
</page>
</xpath>
</field>
</record>
</odoo>