Removed group wrappers around prompt fields. Using label + field pattern directly inside the page so prompts span the full available width. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
222 lines
12 KiB
XML
222 lines
12 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
|
|
<!-- ===== Tree View ===== -->
|
|
<record id="woo_instance_view_tree" model="ir.ui.view">
|
|
<field name="name">woo.instance.tree</field>
|
|
<field name="model">woo.instance</field>
|
|
<field name="arch" type="xml">
|
|
<list>
|
|
<field name="name"/>
|
|
<field name="url"/>
|
|
<field name="company_id" groups="base.group_multi_company"/>
|
|
<field name="last_sync"/>
|
|
<field name="state" widget="badge"
|
|
decoration-success="state == 'connected'"
|
|
decoration-warning="state == 'draft'"
|
|
decoration-danger="state == 'error'"/>
|
|
</list>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- ===== Form View ===== -->
|
|
<record id="woo_instance_view_form" model="ir.ui.view">
|
|
<field name="name">woo.instance.form</field>
|
|
<field name="model">woo.instance</field>
|
|
<field name="arch" type="xml">
|
|
<form>
|
|
<header>
|
|
<button name="action_test_connection" type="object"
|
|
string="Test Connection" class="oe_highlight"/>
|
|
<button name="action_generate_api_key" type="object"
|
|
string="Generate API Key"/>
|
|
<field name="state" widget="statusbar"
|
|
statusbar_visible="draft,connected"/>
|
|
</header>
|
|
<sheet>
|
|
<div class="oe_button_box" name="button_box">
|
|
<button class="oe_stat_button" icon="fa-link" type="object"
|
|
name="action_view_product_maps">
|
|
<field name="mapped_count" widget="statinfo"
|
|
string="Mapped"/>
|
|
</button>
|
|
<button class="oe_stat_button" icon="fa-chain-broken" type="object"
|
|
name="action_view_product_maps">
|
|
<field name="unmapped_count" widget="statinfo"
|
|
string="Unmapped"/>
|
|
</button>
|
|
<button class="oe_stat_button" icon="fa-exclamation-triangle" type="object"
|
|
name="action_view_sync_errors">
|
|
<field name="error_count" widget="statinfo"
|
|
string="Errors (24h)"/>
|
|
</button>
|
|
</div>
|
|
<div class="oe_title">
|
|
<h1><field name="name" placeholder="Instance Name"/></h1>
|
|
</div>
|
|
<group>
|
|
<group string="Connection">
|
|
<field name="url" placeholder="https://store.example.com"/>
|
|
<field name="consumer_key" password="True"/>
|
|
<field name="consumer_secret" password="True"/>
|
|
<field name="webhook_secret" password="True"/>
|
|
<field name="wc_api_version"/>
|
|
<field name="odoo_api_key" readonly="1" widget="CopyClipboardChar"/>
|
|
</group>
|
|
<group string="Company">
|
|
<field name="company_id" groups="base.group_multi_company"/>
|
|
<field name="last_sync"/>
|
|
</group>
|
|
</group>
|
|
<notebook>
|
|
<page string="Sync Settings" name="sync_settings">
|
|
<group>
|
|
<group>
|
|
<field name="sync_interval"/>
|
|
<field name="default_warehouse_id"/>
|
|
</group>
|
|
<group>
|
|
<field name="sync_products"/>
|
|
<field name="sync_orders"/>
|
|
<field name="sync_invoices"/>
|
|
<field name="sync_inventory"/>
|
|
<field name="sync_customers"/>
|
|
</group>
|
|
</group>
|
|
</page>
|
|
<page string="Notifications" name="notifications">
|
|
<group>
|
|
<field name="notify_on_failure"/>
|
|
<field name="notify_user_ids" widget="many2many_tags"
|
|
invisible="not notify_on_failure"/>
|
|
</group>
|
|
</page>
|
|
<page string="Product Mappings" name="product_maps">
|
|
<field name="product_map_ids">
|
|
<list editable="bottom">
|
|
<field name="product_id"/>
|
|
<field name="woo_product_name"/>
|
|
<field name="woo_sku"/>
|
|
<field name="woo_product_type"/>
|
|
<field name="sync_price"/>
|
|
<field name="sync_inventory"/>
|
|
<field name="last_synced"/>
|
|
<field name="state" widget="badge"
|
|
decoration-success="state == 'mapped'"
|
|
decoration-warning="state == 'conflict'"
|
|
decoration-danger="state == 'error'"/>
|
|
</list>
|
|
</field>
|
|
</page>
|
|
<page string="Orders" name="orders">
|
|
<field name="order_ids">
|
|
<list>
|
|
<field name="woo_order_number"/>
|
|
<field name="sale_order_id"/>
|
|
<field name="woo_status"/>
|
|
<field name="state" widget="badge"/>
|
|
</list>
|
|
</field>
|
|
</page>
|
|
<page string="Sync Log" name="sync_log">
|
|
<field name="sync_log_ids" readonly="1">
|
|
<list>
|
|
<field name="create_date"/>
|
|
<field name="sync_type"/>
|
|
<field name="direction"/>
|
|
<field name="record_ref"/>
|
|
<field name="state" widget="badge"
|
|
decoration-success="state == 'success'"
|
|
decoration-danger="state == 'failed'"
|
|
decoration-warning="state == 'conflict'"/>
|
|
<field name="message"/>
|
|
</list>
|
|
</field>
|
|
</page>
|
|
<page string="Category Mapping" name="category_mapping">
|
|
<div class="mb-2">
|
|
<button name="action_fetch_wc_categories" type="object"
|
|
string="Fetch WC Categories" class="btn btn-primary"/>
|
|
</div>
|
|
<field name="category_map_ids">
|
|
<list editable="bottom">
|
|
<field name="odoo_category_id" string="Odoo Category"/>
|
|
<field name="woo_category_name" string="WC Category Name" readonly="1"/>
|
|
<field name="woo_category_slug" string="WC Category Slug" readonly="1"/>
|
|
<field name="woo_category_id" string="WC ID" readonly="1"/>
|
|
</list>
|
|
</field>
|
|
</page>
|
|
<page string="AI Settings" name="ai_settings">
|
|
<group string="AI Provider">
|
|
<group>
|
|
<field name="ai_provider"/>
|
|
<field name="ai_api_key" password="True"/>
|
|
<field name="ai_model"/>
|
|
</group>
|
|
<group string="GPS Coordinates">
|
|
<field name="geo_lat"/>
|
|
<field name="geo_lng"/>
|
|
<field name="geo_company_name"/>
|
|
<field name="geo_company_address"/>
|
|
<field name="geo_company_phone"/>
|
|
</group>
|
|
</group>
|
|
<separator string="AI Prompts"/>
|
|
<label for="prompt_product_title" string="Product Title Prompt"/>
|
|
<field name="prompt_product_title" nolabel="1" widget="text" placeholder="Prompt for generating product titles..."/>
|
|
<label for="prompt_short_description" string="Short Description Prompt"/>
|
|
<field name="prompt_short_description" nolabel="1" widget="text" placeholder="Prompt for generating short descriptions..."/>
|
|
<label for="prompt_long_description" string="Long Description Prompt"/>
|
|
<field name="prompt_long_description" nolabel="1" widget="text" placeholder="Prompt for generating long descriptions..."/>
|
|
<label for="prompt_meta_title" string="Meta Title Prompt"/>
|
|
<field name="prompt_meta_title" nolabel="1" widget="text" placeholder="Prompt for generating SEO meta titles..."/>
|
|
<label for="prompt_meta_description" string="Meta Description Prompt"/>
|
|
<field name="prompt_meta_description" nolabel="1" widget="text" placeholder="Prompt for generating SEO meta descriptions..."/>
|
|
<label for="prompt_image_alt" string="Image Alt Text Prompt"/>
|
|
<field name="prompt_image_alt" nolabel="1" widget="text" placeholder="Prompt for generating image alt text..."/>
|
|
<label for="prompt_image_caption" string="Image Caption Prompt"/>
|
|
<field name="prompt_image_caption" nolabel="1" widget="text" placeholder="Prompt for generating image captions..."/>
|
|
<label for="prompt_keywords" string="Keywords Prompt"/>
|
|
<field name="prompt_keywords" nolabel="1" widget="text" placeholder="Prompt for generating SEO keywords..."/>
|
|
</page>
|
|
</notebook>
|
|
</sheet>
|
|
<chatter/>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- ===== Search View ===== -->
|
|
<record id="woo_instance_view_search" model="ir.ui.view">
|
|
<field name="name">woo.instance.search</field>
|
|
<field name="model">woo.instance</field>
|
|
<field name="arch" type="xml">
|
|
<search>
|
|
<field name="name"/>
|
|
<field name="url"/>
|
|
<filter name="connected" string="Connected"
|
|
domain="[('state', '=', 'connected')]"/>
|
|
<filter name="draft" string="Draft"
|
|
domain="[('state', '=', 'draft')]"/>
|
|
<filter name="error" string="Error"
|
|
domain="[('state', '=', 'error')]"/>
|
|
<separator/>
|
|
<filter name="group_state" string="State"
|
|
context="{'group_by': 'state'}"/>
|
|
<filter name="group_company" string="Company"
|
|
context="{'group_by': 'company_id'}"/>
|
|
</search>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- ===== Action ===== -->
|
|
<record id="action_woo_instance" model="ir.actions.act_window">
|
|
<field name="name">WooCommerce Instances</field>
|
|
<field name="res_model">woo.instance</field>
|
|
<field name="view_mode">list,form</field>
|
|
<field name="search_view_id" ref="woo_instance_view_search"/>
|
|
</record>
|
|
|
|
</odoo>
|