Files
funding-tools/funding_campaign/views/funding_campaign.xml
2024-01-24 09:29:45 +01:00

149 lines
8.4 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<data>
<record id="funding_campaign_view_form" model="ir.ui.view">
<field name="name">funding.campaign.view.form</field>
<field name="model">funding.campaign</field>
<field name="arch" type="xml">
<form string="">
<header>
<button name="action_open_campaign" string="Open campaign" type="object"
attrs="{'invisible':[('state','!=','draft')]}" class="oe_highlight" />
<button name="action_close_campaign" string="Close campaign" type="object"
attrs="{'invisible':[('state','!=','opened')]}" class="oe_highlight" />
<button name="action_draft_campaign" string="Back to Draft" type="object"
attrs="{'invisible':[('state','=','draft')]}" class="oe_stat_button" />
<!-- <button string="New Participant" name="action_crm_lead_new"
type="object" class="oe_highlight" data-hotkey="n" title="Create new
participation" attrs="{'invisible': ['|', ('state', '!=', 'opened'),
('active', '=', False)]}"/> -->
<field name="state" widget="statusbar" nolabel="1"
statusbar_visible="draft,opened,closed" />
</header>
<sheet>
<div class="oe_button_box" name="button_box" groups="base.group_user">
<button
name="%(funding_campaign.act_crm_from_campaign)d"
type="action"
context="{'search_default_expected': True}" class="oe_stat_button"
icon="fa-users" help="Participants for this Campaign">
<field name="nb_participants" widget="statinfo"
string="Participants" />
</button>
<button class="oe_stat_button" type="action"
name="%(funding_campaign.act_sale_order_from_campaign)d"
icon="fa-usd">
<div class="o_field_widget o_stat_info">
<span class="o_stat_value">
<field name="promised_amount" widget="monetary"
options="{'currency_field': 'company_currency'}" />
</span>
<span class="o_stat_text">Promised</span>
</div>
</button>
<button class="oe_stat_button" type="action"
name="%(funding_campaign.act_account_move_from_campaign)d"
icon="fa-usd">
<div class="o_field_widget o_stat_info">
<span class="o_stat_value">
<field name="paid_amount" widget="monetary"
options="{'currency_field': 'company_currency'}" />
</span>
<span class="o_stat_text">Paid</span>
</div>
</button>
</div>
<group>
<field name="name" />
<field name="description" />
<field name="total_wished_amount" widget="monetary" />
<field name="product_id" />
</group>
<notebook>
<page name="steps" string="Campaign Steps">
<field name="campaign_step_ids">
<tree string="Steps" editable="bottom">
<field name="sequence" widget="handle" />
<field name="name" />
<field name="step_amount" />
<field name="state" decoration-info="state == 'unlocked'"
decoration-success="state == 'reached'"
decoration-muted="state == 'locked'" widget="badge" />
</tree>
</field>
</page>
</notebook>
</sheet>
<!-- <div class="oe_chatter">
<field name="message_follower_ids" />
<field name="activity_ids" />
<field name="message_ids" options="{'post_refresh': 'recipients'}" />
</div> -->
</form>
</field>
</record>
<record id="view_funding_campaign_kanban" model="ir.ui.view">
<field name="name">funding.campaign.kanban</field>
<field name="model">funding.campaign</field>
<field name="priority" eval="100" />
<field name="arch" type="xml">
<kanban class="o_kanban_mobile" archivable="false" js_class="crm_kanban" sample="1">
<field name="name" />
<!-- <field name="tag_ids" /> -->
<field name="total_wished_amount" />
<field name="promised_amount" />
<field name="paid_amount" />
<templates>
<t t-name="kanban-box">
<div t-attf-class="oe_kanban_content oe_kanban_global_click">
<div>
<strong class="o_kanban_record_title">
<span>
<field name="name" />
</span>
</strong>
</div>
<!-- <div>
<span class="o_kanban_record_subtitle"><field name="contact_name"/></span>
</div> -->
<!-- <div>
<field name="tag_ids" widget="many2many_tags" options="{'color_field': 'color'}"/>
</div> -->
<!-- <div class="o_kanban_record_bottom">
<div class="oe_kanban_bottom_left"> -->
<div class="o_kanban_record_bottom">
<div>
<div>
<label for="total_wished_amount">
<strong>Wished: </strong>
</label>
<field name="total_wished_amount" />
</div>
<div>
<label for="total_wished_amount">
<strong>Promised: </strong>
</label>
<field name="promised_amount" />
</div>
<div>
<label for="total_wished_amount">
<strong>Paid: </strong>
</label>
<field name="paid_amount" />
</div>
</div>
<!-- <div class="o_kanban_inline_block">
<field name="activity_ids" widget="kanban_activity" />
</div> -->
</div>
</div>
</t>
</templates>
</kanban>
</field>
</record>
</data>
</odoo>