| 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | <odoo> |
| 3 | |
| 4 | <record id="sale_order_view_form_inherit_sale_loyalty" model="ir.ui.view"> |
| 5 | <field name="name">sale.order.view.form.inherit.sale.loyalty</field> |
| 6 | <field name="model">sale.order</field> |
| 7 | <field name="inherit_id" ref="sale.view_order_form"/> |
| 8 | <field name="priority">10</field> |
| 9 | <field name="arch" type="xml"> |
| 10 | <div name="button_box" position="inside"> |
| 11 | <button |
| 12 | name="action_view_gift_cards" |
| 13 | class="oe_stat_button" |
| 14 | type="object" |
| 15 | icon="fa-gift" |
| 16 | invisible="gift_card_count == 0" |
| 17 | > |
| 18 | <field string="Gift Cards" name="gift_card_count" widget="statinfo"/> |
| 19 | </button> |
| 20 | </div> |
| 21 | <button name="action_open_discount_wizard" position="before"> |
| 22 | <button |
| 23 | string="Coupon Code" |
| 24 | name="%(sale_loyalty.sale_loyalty_coupon_wizard_action)d" |
| 25 | type="action" |
| 26 | class="btn btn-secondary" |
| 27 | invisible="locked or state == 'cancel'" |
| 28 | /> |
| 29 | <button |
| 30 | string="Coupon Code" |
| 31 | name="%(sale_loyalty.sale_loyalty_coupon_wizard_action)d" |
| 32 | type="action" |
| 33 | class="btn btn-secondary" |
| 34 | disabled="1" |
| 35 | invisible="not (locked or state == 'cancel')" |
| 36 | /> |
| 37 | <button |
| 38 | string="Reward" |
| 39 | name="action_open_reward_wizard" |
| 40 | type="object" |
| 41 | class="btn btn-secondary" |
| 42 | help="Update current promotional lines and select new rewards if applicable." |
| 43 | invisible="locked or state == 'cancel'" |
| 44 | /> |
| 45 | <button |
| 46 | string="Reward" |
| 47 | name="action_open_reward_wizard" |
| 48 | type="object" |
| 49 | class="btn btn-secondary" |
| 50 | help="Update current promotional lines and select new rewards if applicable." |
| 51 | disabled="1" |
| 52 | invisible="not (locked or state == 'cancel')" |
| 53 | /> |
| 54 | </button> |
| 55 | <xpath expr="//list//field[@name='product_uom_qty']" position="before"> |
| 56 | <field name="is_reward_line" column_invisible="True"/> |
| 57 | </xpath> |
| 58 | <xpath expr="//list//field[@name='product_uom_qty']" position="attributes"> |
| 59 | <attribute name="readonly" add="is_reward_line" separator=" or "/> |
| 60 | </xpath> |
| 61 | <xpath expr="//list//field[@name='price_unit']" position="attributes"> |
| 62 | <attribute name="readonly" add="is_reward_line" separator=" or "/> |
| 63 | </xpath> |
| 64 | <xpath expr="//list//field[@name='tax_ids']" position="attributes"> |
| 65 | <attribute name="readonly" add="is_reward_line" separator=" or "/> |
| 66 | </xpath> |
| 67 | <group name="note_group" position="after"> |
| 68 | <group class="d-flex flex-row-reverse oe_subtotal_footer border-0"> |
| 69 | <field name="loyalty_data" widget="loyalty_data_field" nolabel="1" readonly="1"/> |
| 70 | </group> |
| 71 | </group> |
| 72 | </field> |
| 73 | </record> |
| 74 | |
| 75 | </odoo> |