You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
128 lines
5.5 KiB
128 lines
5.5 KiB
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<data>
|
|
<record id="gift_voucher_pos_form" model="ir.ui.view">
|
|
<field name="name">Gift Voucher</field>
|
|
<field name="model">gift.voucher.pos</field>
|
|
<field name="arch" type="xml">
|
|
<form>
|
|
<sheet>
|
|
<h1><field name="name"/></h1>
|
|
<group>
|
|
<group>
|
|
<field name="voucher_type" widget="radio"/>
|
|
<field name="product_id" attrs="{'invisible': [('voucher_type', 'in', ('category','all'))],
|
|
'required':[('voucher_type', '=', 'product')]}"/>
|
|
<field name="product_categ" attrs="{'invisible': [('voucher_type', 'in', ('product','all'))],
|
|
'required':[('voucher_type', '=', 'category')]}"/>
|
|
</group>
|
|
<group>
|
|
<field name="min_value" />
|
|
<field name="max_value" />
|
|
<field name="expiry_date" />
|
|
</group>
|
|
</group>
|
|
</sheet>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="gift_voucher_pos_tree" model="ir.ui.view">
|
|
<field name="name">Gift Voucher</field>
|
|
<field name="model">gift.voucher.pos</field>
|
|
<field name="arch" type="xml">
|
|
<tree>
|
|
<field name="name" />
|
|
<field name="product_id" />
|
|
<field name="min_value" />
|
|
<field name="max_value" />
|
|
<field name="expiry_date" />
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="gift_coupon_pos_form" model="ir.ui.view">
|
|
<field name="name">Gift Coupon</field>
|
|
<field name="model">gift.coupon.pos</field>
|
|
<field name="arch" type="xml">
|
|
<form>
|
|
<sheet>
|
|
<div class="oe_title">
|
|
<label for="name" string="Name" />
|
|
<h1>
|
|
<field name="name"/>
|
|
</h1>
|
|
</div>
|
|
<group>
|
|
<group>
|
|
<field name="code" />
|
|
<field name="start_date" />
|
|
</group>
|
|
<group>
|
|
<field name="voucher" />
|
|
<field name="end_date" />
|
|
</group>
|
|
</group>
|
|
<group string="Conditions">
|
|
<group>
|
|
<field name="total_avail" />
|
|
</group>
|
|
<group>
|
|
<field name="partner_id" />
|
|
<field name="limit" />
|
|
</group>
|
|
</group>
|
|
<group string="Pricing">
|
|
<group>
|
|
<field name="voucher_val" />
|
|
</group>
|
|
<group>
|
|
<field name="type" />
|
|
</group>
|
|
</group>
|
|
</sheet>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="gift_coupon_pos_tree" model="ir.ui.view">
|
|
<field name="name">Gift Coupon</field>
|
|
<field name="model">gift.coupon.pos</field>
|
|
<field name="arch" type="xml">
|
|
<tree>
|
|
<field name="name" />
|
|
<field name="code" />
|
|
<field name="voucher" />
|
|
<field name="start_date" />
|
|
<field name="end_date" />
|
|
<field name="partner_id" />
|
|
<field name="total_avail" />
|
|
<field name="type" />
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="action_gift_voucher_pos" model="ir.actions.act_window">
|
|
<field name="name">Gift Vouchers</field>
|
|
<field name="res_model">gift.voucher.pos</field>
|
|
<field name="type">ir.actions.act_window</field>
|
|
<field name="view_type">form</field>
|
|
<field name="view_id" ref="gift_voucher_pos_tree"/>
|
|
<field name="view_mode">tree,form</field>
|
|
</record>
|
|
|
|
<record id="action_gift_coupon_pos" model="ir.actions.act_window">
|
|
<field name="name">Generate Gift Coupons</field>
|
|
<field name="res_model">gift.coupon.pos</field>
|
|
<field name="type">ir.actions.act_window</field>
|
|
<field name="view_type">form</field>
|
|
<field name="view_id" ref="gift_coupon_pos_tree"/>
|
|
<field name="view_mode">tree,form</field>
|
|
</record>
|
|
|
|
<menuitem name="Vouchers and Coupons" id="gift_coupon_main" sequence="99"
|
|
parent="point_of_sale.menu_point_root"/>
|
|
<menuitem name="Gift Voucher" id="gift_voucher" action="action_gift_voucher_pos" parent="gift_coupon_main"/>
|
|
<menuitem name="Gift Coupon" id="gift_coupon" action="action_gift_coupon_pos" parent="gift_coupon_main"/>
|
|
</data>
|
|
</odoo>
|