Odoo18-Base/addons/sale_loyalty/views/sale_order_views.xml
2025-01-06 10:57:38 +07:00

42 lines
2.0 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="sale_order_view_form_inherit_sale_loyalty" model="ir.ui.view">
<field name="name">sale.order.view.form.inherit.sale.loyalty</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_order_form"/>
<field name="priority">10</field>
<field name="arch" type="xml">
<button name="action_open_discount_wizard" position="before">
<button name="%(sale_loyalty.sale_loyalty_coupon_wizard_action)d"
type="action"
string="Coupon Code"
class="btn btn-secondary"/>
<button name="action_open_reward_wizard"
type="object"
string="Reward"
help="Update current promotional lines and select new rewards if applicable."
class="btn btn-secondary"/>
</button>
<xpath expr="//list//field[@name='product_uom_qty']" position="before">
<field name="is_reward_line" column_invisible="True"/>
</xpath>
<xpath expr="//list//field[@name='product_uom_qty']" position="attributes">
<attribute name="readonly" add="is_reward_line" separator=" or "/>
</xpath>
<xpath expr="//list//field[@name='price_unit']" position="attributes">
<attribute name="readonly" add="is_reward_line" separator=" or "/>
</xpath>
<xpath expr="//list//field[@name='tax_id']" position="attributes">
<attribute name="readonly" add="is_reward_line" separator=" or "/>
</xpath>
<group name="note_group" position="after">
<group class="d-flex flex-row-reverse oe_subtotal_footer border-0">
<field name="loyalty_data" widget="loyalty_data_field" nolabel="1" readonly="1"/>
</group>
</group>
</field>
</record>
</odoo>