6 changed files with 163 additions and 150 deletions
@ -1,43 +1,41 @@ |
|||||
<?xml version="1.0" encoding="utf-8"?> |
<?xml version="1.0" encoding="utf-8"?> |
||||
<odoo> |
<odoo> |
||||
<data> |
<!-- form view for the model dalle.image.suggestion--> |
||||
<record id="dalle_image_suggestion_form_view" model="ir.ui.view"> |
<record id="dalle_image_suggestion_form_view" model="ir.ui.view"> |
||||
<field name="name">dalle.image.suggestion.form.view</field> |
<field name="name">dalle.image.suggestion.form.view</field> |
||||
<field name="model">dalle.image.suggestion</field> |
<field name="model">dalle.image.suggestion</field> |
||||
<field name="arch" type="xml"> |
<field name="arch" type="xml"> |
||||
<form string="Dall-E Image Suggestion"> |
<form string="Dall-E Image Suggestion"> |
||||
<header> |
<header> |
||||
<button name="action_make_as_product_image" type="object" |
<button name="action_make_as_product_image" type="object" |
||||
string="Make as Product Image"/> |
string="Make as Product Image"/> |
||||
</header> |
</header> |
||||
<sheet> |
<sheet> |
||||
<div class="oe_title"> |
<div class="oe_title"> |
||||
<label for="product_tmpl_id"/> |
<label for="product_tmpl_id"/> |
||||
<h1> |
<h1> |
||||
<field name="product_tmpl_id" |
<field name="product_tmpl_id" |
||||
placeholder="Title"/> |
placeholder="Title"/> |
||||
</h1> |
</h1> |
||||
</div> |
</div> |
||||
|
<group> |
||||
<group> |
<group> |
||||
<group> |
<field name="product_image" widget="image"/> |
||||
<field name="product_image" widget="image"/> |
|
||||
</group> |
|
||||
</group> |
</group> |
||||
</sheet> |
</group> |
||||
</form> |
</sheet> |
||||
</field> |
</form> |
||||
</record> |
</field> |
||||
<record id="dalle_image_suggestion_tree_view" model="ir.ui.view"> |
</record> |
||||
<field name="name"> |
<!-- tree view for the model dalle.image.suggestion--> |
||||
openai_product_images.dalle_image_suggestion.tree |
<record id="dalle_image_suggestion_tree_view" model="ir.ui.view"> |
||||
</field> |
<field name="name">dalle_image_suggestion.view.tree</field> |
||||
<field name="model">dalle.image.suggestion</field> |
<field name="model">dalle.image.suggestion</field> |
||||
<field name="arch" type="xml"> |
<field name="arch" type="xml"> |
||||
<tree string="Dall-E Image Suggestion"> |
<tree string="Dall-E Image Suggestion"> |
||||
<field name="product_tmpl_id"/> |
<field name="product_tmpl_id"/> |
||||
<field name="product_image" widget="image"/> |
<field name="product_image" widget="image"/> |
||||
</tree> |
</tree> |
||||
</field> |
</field> |
||||
</record> |
</record> |
||||
</data> |
</odoo> |
||||
</odoo> |
|
||||
|
@ -1,28 +1,29 @@ |
|||||
<?xml version="1.0" encoding="utf-8"?> |
<?xml version="1.0" encoding="utf-8"?> |
||||
<odoo> |
<odoo> |
||||
<data> |
<!-- Added a server action in the model product template--> |
||||
<record id="action_product_template_dalle" model="ir.actions.server"> |
<record id="action_product_template_dalle" model="ir.actions.server"> |
||||
<field name="name">Generate Image Using Dall-E</field> |
<field name="name">Generate Image Using Dall-E</field> |
||||
<field name="model_id" ref="product.model_product_template"/> |
<field name="model_id" ref="product.model_product_template"/> |
||||
<field name="binding_model_id" |
<field name="binding_model_id" |
||||
ref="product.model_product_template"/> |
ref="product.model_product_template"/> |
||||
<field name="binding_view_types">list,form</field> |
<field name="binding_view_types">tree,form</field> |
||||
<field name="state">code</field> |
<field name="state">code</field> |
||||
<field name="code">action =records.action_open_image_prompt_wizard() |
<field name="code">action =records.action_open_image_prompt_wizard() |
||||
</field> |
</field> |
||||
</record> |
</record> |
||||
<record id="num_product" model="ir.ui.view"> |
|
||||
<field name="inherit_id" |
<!--Added smart button in the product.template form--> |
||||
ref="product.product_template_only_form_view"/> |
<record id="product_template_only_form_view" model="ir.ui.view"> |
||||
<field name="model">product.template</field> |
<field name="name">product.template.view.form.inherit.openai.product.images</field> |
||||
<field name="arch" type="xml"> |
<field name="inherit_id" ref="product.product_template_only_form_view"/> |
||||
<div name="button_box" position="inside"> |
<field name="model">product.template</field> |
||||
<button name="get_dall_e_image" type="object" |
<field name="arch" type="xml"> |
||||
class="oe_stat_button" icon="fa-id-card-o" |
<div name="button_box" position="inside"> |
||||
string="Dall E Image"> |
<button name="get_dall_e_image" type="object" |
||||
</button> |
class="oe_stat_button" icon="fa-id-card-o" |
||||
</div> |
string="Dall E Image"> |
||||
</field> |
</button> |
||||
</record> |
</div> |
||||
</data> |
</field> |
||||
</odoo> |
</record> |
||||
|
</odoo> |
||||
|
@ -1,29 +1,29 @@ |
|||||
<?xml version="1.0" encoding="utf-8"?> |
<?xml version="1.0" encoding="utf-8"?> |
||||
<odoo> |
<odoo> |
||||
<data> |
<!--form view for the model image.suggestion--> |
||||
<record id="image_suggestion_form_view" model="ir.ui.view"> |
<record id="image_suggestion_view_form" model="ir.ui.view"> |
||||
<field name="name">image.suggestion.form.view</field> |
<field name="name">image.suggestion.view.form</field> |
||||
<field name="model">image.suggestion</field> |
<field name="model">image.suggestion</field> |
||||
<field name="arch" type="xml"> |
<field name="arch" type="xml"> |
||||
<form string="Image Suggestion"> |
<form string="Image Suggestion"> |
||||
<sheet> |
<sheet> |
||||
|
<group> |
||||
<group> |
<group> |
||||
<group> |
<field name="product_tmpl_id"/> |
||||
<field name="product_tmpl_id"/> |
<field name="image_prompt"/> |
||||
<field name="image_prompt"/> |
<field name="num_image"/> |
||||
<field name="num_image"/> |
<field name="size_image"/> |
||||
<field name="size_image"/> |
<field name="quality"/> |
||||
</group> |
|
||||
</group> |
</group> |
||||
<footer> |
</group> |
||||
<button name="action_search" type="object" |
<footer> |
||||
string="Search" class="btn-primary"/> |
<button name="action_search" type="object" |
||||
<button string="Cancel" special="cancel" |
string="Search" class="btn-primary"/> |
||||
data-hotkey="z"/> |
<button string="Cancel" special="cancel" |
||||
</footer> |
data-hotkey="z"/> |
||||
</sheet> |
</footer> |
||||
</form> |
</sheet> |
||||
</field> |
</form> |
||||
</record> |
</field> |
||||
</data> |
</record> |
||||
</odoo> |
</odoo> |
||||
|
Loading…
Reference in new issue