🎉 Initialize module repository
This commit is contained in:
93
views/mvd_tcg_mtg_card_views.xml
Normal file
93
views/mvd_tcg_mtg_card_views.xml
Normal file
@@ -0,0 +1,93 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="mvd_tcg_mtg_card_view_form_scryfall" model="ir.ui.view">
|
||||
<field name="name">mvd.tcg.mtg.card.view.form.scryfall</field>
|
||||
<field name="model">mvd.tcg.card</field>
|
||||
<field name="inherit_id" ref="mvd_tcg_mtg.mvd_tcg_mtg_card_view_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//header" position="inside">
|
||||
<button
|
||||
name="action_mtg_scryfall_refresh_card"
|
||||
string="Refresh from Scryfall"
|
||||
type="object"
|
||||
class="btn-secondary"
|
||||
invisible="not is_mtg_game"
|
||||
groups="mvd_tcg_base.mvd_tcg_base_group_manager,base.group_system"
|
||||
/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='image_1920']" position="replace">
|
||||
<field
|
||||
name="image_1920"
|
||||
widget="image"
|
||||
class="oe_avatar"
|
||||
options="{'convert_to_webp': True, 'preview_image': 'image_512', 'zoom': true, 'zoom_delay': 0, 'size': [0, 260]}"
|
||||
readonly="state == 'validated'"
|
||||
invisible="state == 'validated'"
|
||||
/>
|
||||
<field
|
||||
name="mtg_display_image_1920"
|
||||
widget="image"
|
||||
class="oe_avatar"
|
||||
options="{'convert_to_webp': True, 'preview_image': 'mtg_display_image_512', 'zoom': true, 'zoom_delay': 0, 'size': [0, 260]}"
|
||||
readonly="1"
|
||||
invisible="state != 'validated'"
|
||||
/>
|
||||
</xpath>
|
||||
<xpath expr="//div[@name='button_box']" position="inside">
|
||||
<button
|
||||
name="action_open_mtg_scryfall_last_import_run"
|
||||
type="object"
|
||||
class="oe_stat_button"
|
||||
icon="fa-refresh"
|
||||
invisible="not mtg_scryfall_last_import_run_id"
|
||||
groups="mvd_tcg_base.mvd_tcg_base_group_manager,base.group_system"
|
||||
>
|
||||
<div class="o_stat_info">
|
||||
<span class="o_stat_text">Last Import</span>
|
||||
<span class="o_stat_value">Open</span>
|
||||
</div>
|
||||
</button>
|
||||
</xpath>
|
||||
<xpath expr="//notebook/page[@name='reference_information']" position="after">
|
||||
<page string="Scryfall" name="scryfall_connector" groups="mvd_tcg_base.mvd_tcg_base_group_administrator,base.group_system">
|
||||
<group>
|
||||
<group name="scryfall_identity">
|
||||
<field name="mtg_scryfall_id"/>
|
||||
<field name="mtg_scryfall_uri" widget="url"/>
|
||||
</group>
|
||||
<group name="scryfall_sync">
|
||||
<field name="mtg_scryfall_last_synced_at"/>
|
||||
<field name="mtg_scryfall_last_import_run_id"/>
|
||||
</group>
|
||||
</group>
|
||||
<field name="mtg_scryfall_image_ids" readonly="1">
|
||||
<list string="Localized Images">
|
||||
<field name="language_code"/>
|
||||
</list>
|
||||
</field>
|
||||
</page>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="mvd_tcg_mtg_card_view_kanban_scryfall" model="ir.ui.view">
|
||||
<field name="name">mvd.tcg.mtg.card.view.kanban.scryfall</field>
|
||||
<field name="model">mvd.tcg.card</field>
|
||||
<field name="inherit_id" ref="mvd_tcg_mtg.mvd_tcg_mtg_card_view_kanban"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//kanban/field[@name='image_512']" position="replace">
|
||||
<field name="mtg_display_image_512"/>
|
||||
</xpath>
|
||||
<xpath expr="//kanban//field[@name='image_512']" position="replace">
|
||||
<field
|
||||
name="mtg_display_image_512"
|
||||
widget="image"
|
||||
alt="Magic Card"
|
||||
options="{'img_class': 'w-100 object-fit-contain', 'preview_image': 'mtg_display_image_512'}"
|
||||
class="w-100"
|
||||
invisible="not mtg_display_image_512"
|
||||
/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user