Automated change made by a lot of RegEx to change all think that is possible to automate. https://getbootstrap.com/docs/5.1/migration Task ID: 2766483 Part-of: odoo/odoo#95450
111 lines
6.2 KiB
XML
111 lines
6.2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<record id="loyalty_rule_view_form" model="ir.ui.view">
|
|
<field name="name">loyalty.rule.view.form</field>
|
|
<field name="model">loyalty.rule</field>
|
|
<field name="arch" type="xml">
|
|
<form class="loyalty-rule-form">
|
|
<sheet>
|
|
<group>
|
|
<group>
|
|
<field name="product_domain" groups="base.group_no_one" widget="domain" options="{'model': 'product.product', 'in_dialog': true}"/>
|
|
<field name="product_ids" widget="many2many_tags"/>
|
|
<field name="product_category_id"/>
|
|
<field name="product_tag_id"/>
|
|
</group>
|
|
<group>
|
|
<label for="reward_point_amount"/>
|
|
<span>
|
|
<field name="reward_point_amount" class="oe_inline"/>
|
|
<field name="reward_point_name" class="oe_inline"/>
|
|
</span>
|
|
<label for="reward_point_mode" string=""/>
|
|
<field name="reward_point_mode" widget="radio" nolabel="1"/>
|
|
</group>
|
|
<group>
|
|
<field name="minimum_qty"/>
|
|
<label for="minimum_amount"/>
|
|
<div class="o_row">
|
|
<field name="minimum_amount" class="oe_inline pe-2"/>
|
|
<span>tax</span>
|
|
<field name="minimum_amount_tax_mode" class="oe_inline"/>
|
|
</div>
|
|
</group>
|
|
<group>
|
|
<field name="mode" widget="radio"/>
|
|
<field name="code"
|
|
attrs="{'invisible': [('mode', '!=', 'with_code')],
|
|
'required': [('mode', '=', 'with_code')]}"/>
|
|
</group>
|
|
</group>
|
|
</sheet>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="loyalty_rule_view_kanban" model="ir.ui.view">
|
|
<field name="name">loyalty.rule.view.kanban</field>
|
|
<field name="model">loyalty.rule</field>
|
|
<field name="arch" type="xml">
|
|
<kanban>
|
|
<field name="program_id"/>
|
|
<field name="company_id"/>
|
|
<field name="currency_id"/>
|
|
<field name="product_domain"/>
|
|
<field name="product_ids"/>
|
|
<field name="product_category_id"/>
|
|
<field name="product_tag_id"/>
|
|
<field name="reward_point_amount"/>
|
|
<field name="reward_point_split"/>
|
|
<field name="reward_point_name"/>
|
|
<field name="reward_point_mode"/>
|
|
<field name="minimum_qty"/>
|
|
<field name="minimum_amount"/>
|
|
<field name="minimum_amount_tax_mode"/>
|
|
<field name="mode"/>
|
|
<field name="code"/>
|
|
<templates>
|
|
<t t-name="kanban-box">
|
|
<div class="oe_kanban_global_click_edit mx-0">
|
|
<t t-if="record.product_domain.raw_value && record.product_domain.raw_value !== '[]'" groups="base.group_no_one">
|
|
<a><i class="fa fa-search fa-fw" title="Product Domain"/> <field name="product_domain"/></a>
|
|
</t>
|
|
<t t-if="record.product_ids.raw_value.length > 0">
|
|
<div class="d-flex"><i class="fa fa-cube fa-fw" title="Products"/> <field name="product_ids" widget="many2many_tags" class="d-inline"/></div>
|
|
</t>
|
|
<t t-if="record.product_category_id.raw_value">
|
|
<a><i class="fa fa-cubes fa-fw" title="Product Categories"/> <field name="product_category_id"/></a>
|
|
<br/>
|
|
</t>
|
|
<t t-if="record.product_tag_id.raw_value">
|
|
<a><i class="fa fa-tags fa-fw" title="Product Tags"/> <field name="product_tag_id"/></a>
|
|
<br/>
|
|
</t>
|
|
<t t-if="record.product_ids.raw_value.length === 0 && !record.product_category_id.raw_value && !record.product_tag_id.raw_value">
|
|
<a><i class="fa fa-cube fa-fw" title="Products"/> All Products</a>
|
|
<br/>
|
|
</t>
|
|
<a>
|
|
<t t-if="record.minimum_qty.raw_value > 1 || record.minimum_amount.raw_value">
|
|
<t t-set="qty" t-value="record.minimum_qty.raw_value"/>
|
|
<t t-set="amt" t-value="record.minimum_amount.raw_value"/>
|
|
<t t-set="tax_mode" t-value="record.minimum_amount_tax_mode.raw_value"/>
|
|
<span>If<t t-if="qty > 1"> minimum <field name="minimum_qty"/> PCE</t>
|
|
<t t-if="amt"><t t-if="qty > 1">and</t> minimum <field name="minimum_amount"/><t t-if="tax_mode === 'excl'"> (tax excluded)</t></t>
|
|
</span>
|
|
<br/>
|
|
</t>
|
|
</a>
|
|
<t t-if="record.code.raw_value">
|
|
<a><i class="fa fa-pencil-square-o fa-fw" title="Code"/>With Code: <field name="code"/></a>
|
|
<br/>
|
|
</t>
|
|
<i class="fa fa-gift fa-fw" title="conditions"/> <span>Reward <field name="reward_point_amount"/> <field name="reward_point_name"/> <field name="reward_point_mode"/></span>
|
|
</div>
|
|
</t>
|
|
</templates>
|
|
</kanban>
|
|
</field>
|
|
</record>
|
|
</odoo>
|