Odoo18-Base/addons/sale_loyalty/views/sale_order_views.xml
2025-03-10 10:52:11 +07:00

37 lines
1.7 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="Promotions"
help="Update current promotional lines and select new rewards if applicable."
class="btn btn-secondary"/>
</button>
<xpath expr="//tree//field[@name='product_uom_qty']" position="before">
<field name="is_reward_line" column_invisible="True"/>
</xpath>
<xpath expr="//tree//field[@name='product_uom_qty']" position="attributes">
<attribute name="readonly" add="is_reward_line" separator=" or "/>
</xpath>
<xpath expr="//tree//field[@name='price_unit']" position="attributes">
<attribute name="readonly" add="is_reward_line" separator=" or "/>
</xpath>
<xpath expr="//tree//field[@name='tax_id']" position="attributes">
<attribute name="readonly" add="is_reward_line" separator=" or "/>
</xpath>
</field>
</record>
</odoo>