With commit[1], we added `o_text_overflow` classes at several places to avoid
long names going out of the boxes. However, for the name/title fields in the
form views, we should always show the full name.
So this commit replaces `o_text_overflow` class with `text-break` from
name/title fields in the form views to display full string in the read
only mode, but also keep them from going outside of the form view.
Below are the modules affected:
- base
- coupon
- crm
- event
- mass_mailing
- mass_mailing_sms
- project
- sales_team
commit[1] - a0ebb46
task-2889845
closes odoo/odoo#96132
X-original-commit: 4a74c7af6b54bd771f50d3885813f4aae442c9e7
Related: odoo/enterprise#29552
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
148 lines
9.0 KiB
XML
148 lines
9.0 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<record id="loyalty_program_view_form" model="ir.ui.view">
|
|
<field name="name">loyalty.program.view.form</field>
|
|
<field name="model">loyalty.program</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Coupons & Loyalty">
|
|
<header>
|
|
<button name="%(loyalty_generate_wizard_action)d" string="Generate Coupons" class="btn-primary" type="action"
|
|
attrs="{'invisible': [('program_type', '!=', 'coupons')]}"/>
|
|
<button name="%(loyalty_generate_wizard_action)d" string="Generate Gift Cards" class="btn-primary" type="action"
|
|
attrs="{'invisible': [('program_type', '!=', 'gift_card')]}"/>
|
|
<button name="%(loyalty_generate_wizard_action)d" string="Generate eWallet" class="btn-primary" type="action"
|
|
attrs="{'invisible': [('program_type', '!=', 'ewallet')]}" context="{'default_mode': 'selected'}"/>
|
|
</header>
|
|
<sheet>
|
|
<div class="oe_button_box" name="button_box">
|
|
<button class="oe_stat_button" type="action" name="%(loyalty_card_action)d" icon="fa-tags">
|
|
<div class="o_form_field o_stat_info">
|
|
<span class="o_stat_value">
|
|
<field name="coupon_count"/>
|
|
</span>
|
|
<span class="o_stat_text" attrs="{'invisible': [('program_type', '!=', 'coupons')]}">Coupons</span>
|
|
<span class="o_stat_text" attrs="{'invisible': [('program_type', '!=', 'gift_card')]}">Gift Cards</span>
|
|
<span class="o_stat_text" attrs="{'invisible': [('program_type', '!=', 'ewallet')]}">eWallets</span>
|
|
<span class="o_stat_text" attrs="{'invisible': [('program_type', '!=', 'loyalty')]}">Loyalty Cards</span>
|
|
<span class="o_stat_text" attrs="{'invisible': [('program_type', '!=', 'promotion')]}">Promos</span>
|
|
</div>
|
|
</button>
|
|
</div>
|
|
<field name="active" invisible="1"/>
|
|
<div class="oe_title">
|
|
<label for="name" string="Program Name"/>
|
|
<h1>
|
|
<field name="name" class="text-break" placeholder="e.g. 10% discount on laptops"/>
|
|
</h1>
|
|
</div>
|
|
<group>
|
|
<group>
|
|
<label for="program_type"/>
|
|
<div>
|
|
<field name="program_type" widget="selection"/>
|
|
<p class="text-muted" attrs="{'invisible': [('program_type', '!=', 'coupons')]}" colspan="2">
|
|
Generate & share coupon code manually.
|
|
<br/>
|
|
Rewards are provided when the user provides a coupon code in the eCommerce, Point of Sale or regular orders.
|
|
<br/>
|
|
Add triggers for constraints on coupon usage.
|
|
</p>
|
|
<p class="text-muted" attrs="{'invisible': [('program_type', '!=', 'loyalty')]}" colspan="2">
|
|
Once a sale order is validated, the customers get Loyalty Points that can be used in the current order, or accumulated in future orders.
|
|
</p>
|
|
<p class="text-muted" attrs="{'invisible': [('program_type', '!=', 'gift_card')]}" colspan="2">
|
|
Gift Cards are created and sent by email when the customer orders a product defined in your triggers.
|
|
<br/>
|
|
Then, Gift Cards can be used to pay orders.
|
|
</p>
|
|
<p class="text-muted" attrs="{'invisible': [('program_type', '!=', 'promotion')]}" colspan="2">
|
|
Set up triggers based on a promotional code and/or products purchased, that give access to reward on the current order.
|
|
</p>
|
|
<p class="text-muted" attrs="{'invisible': [('program_type', '!=', 'ewallet')]}" colspan="2">
|
|
Personal eWallet are created when the customer orders a product defined in the triggers.
|
|
<br/>
|
|
Then, eWallets are proposed during the checkout, to pay orders.
|
|
</p>
|
|
</div>
|
|
<field name="company_id" groups="base.group_multi_company"/>
|
|
<field name="currency_id"/>
|
|
<field name="currency_symbol" invisible="1"/>
|
|
</group>
|
|
<group>
|
|
<field name="date_to"/>
|
|
<label for="limit_usage"/>
|
|
<span>
|
|
<field name="limit_usage" class="oe_inline"/>
|
|
<span attrs="{'invisible': [('limit_usage', '=', False)]}"> to <field name="max_usage" class="oe_inline"/> usages</span>
|
|
</span>
|
|
<label for="portal_visible" string="Show points"/>
|
|
<span>
|
|
<field name="portal_visible" class="oe_inline"/>
|
|
<span attrs="{'invisible': [('portal_visible', '=', False)]}"> as <field name="portal_point_name" class="oe_inline"/></span>
|
|
</span>
|
|
<field name="applies_on" widget="radio" groups="base.group_no_one"/>
|
|
<field name="trigger" widget="radio" groups="base.group_no_one" attrs="{'invisible': [('applies_on', '!=', 'current')]}"/>
|
|
</group>
|
|
</group>
|
|
|
|
<notebook>
|
|
<page string="Triggers & Rewards" name="rules_rewards">
|
|
<group>
|
|
<group>
|
|
<field name="rule_ids" colspan="2" mode="kanban" nolabel="1" add-label="Add a trigger"
|
|
class="o_loyalty_kanban_inline" widget="loyalty_one2many" context="{'currency_symbol': currency_symbol}"/>
|
|
</group>
|
|
<group>
|
|
<field name="reward_ids" colspan="2" mode="kanban" nolabel="1" add-label="Add a reward"
|
|
class="o_loyalty_kanban_inline" widget="loyalty_one2many" context="{'currency_symbol': currency_symbol}"/>
|
|
</group>
|
|
</group>
|
|
</page>
|
|
<page string="Communications" name="communications" attrs="{'invisible': [('applies_on', '=', 'current')]}">
|
|
<field name="communication_plan_ids" mode="tree"/>
|
|
</page>
|
|
</notebook>
|
|
</sheet>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="loyalty_program_view_tree" model="ir.ui.view">
|
|
<field name="name">loyalty.program.view.tree</field>
|
|
<field name="model">loyalty.program</field>
|
|
<field name="arch" type="xml">
|
|
<tree js_class="loyalty_program_list_view">
|
|
<field name="sequence" widget="handle"/>
|
|
<field name="name"/>
|
|
<field name="program_type"/>
|
|
<field name="active"/>
|
|
<field name="company_id" groups="base.group_multi_company"/>
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="loyalty_program_view_search" model="ir.ui.view">
|
|
<field name="name">loyalty.program.view.search</field>
|
|
<field name="model">loyalty.program</field>
|
|
<field name="arch" type="xml">
|
|
<search>
|
|
<field name="name"/>
|
|
<separator/>
|
|
<filter string="Archived" name="inactive" domain="[('active', '=', False)]"/>
|
|
</search>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="loyalty_program_action" model="ir.actions.act_window">
|
|
<field name="name">Promotions, Gift Card, Loyalty</field>
|
|
<field name="res_model">loyalty.program</field>
|
|
<field name="view_mode">tree,form</field>
|
|
<field name="help" type="html">
|
|
<div class="o_loyalty_not_found container">
|
|
<h1>No loyalty program found.</h1>
|
|
<p class="lead fw-light">Create a new one from scratch, or use one of the templates below.</p>
|
|
</div>
|
|
</field>
|
|
</record>
|
|
</odoo>
|