Files
odoo_source/addons/coupon/wizard/coupon_generate_views.xml
T
Sunil Shrimali 424f7e96cb [IMP] coupon: adapt the changes from domain widget
The domain field widget is now adapted to set visible overflow on modal if it
iss inline. With that changes, the custom controller for coupon generator is
not needed anymore.

With this commit, we remove the code related to custom controller
of coupon generator that used to set visible overflow on the modal.

Task ID-2480625
COM odoo/odoo#68586
2021-04-21 07:49:42 +00:00

40 lines
2.2 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="coupon_generate_view_form" model="ir.ui.view">
<field name="name">coupon.generate.wizard.form</field>
<field name="model">coupon.generate.wizard</field>
<field name="arch" type="xml">
<form string="Generate Coupons">
<group>
<field name="has_partner_email" invisible="1"/>
<field name="generation_type" widget="radio"/>
<field name="partners_domain" attrs="{'invisible': [('generation_type', '!=', 'nbr_customer')]}" widget="domain" options="{'model': 'res.partner'}"/>
<field name="nbr_coupons" attrs="{'invisible': [('generation_type', '!=', 'nbr_coupon')]}"/>
<field name="template_id"
options="{'no_create': True, 'no_edit': True}"
context="{'default_model': 'coupon.coupon'}"
attrs="{'invisible': [('generation_type', '!=', 'nbr_customer')]}" />
<div class="text-muted" attrs="{'invisible': [('generation_type', '!=', 'nbr_customer')]}">
Specify a mail template to send the generated coupons as email.
</div>
</group>
<div role="alert" class="alert alert-warning" attrs="{'invisible': ['|', ('generation_type', '!=', 'nbr_customer'), ('has_partner_email', '=', True)]}">
Some selected customers do not have an email address and will not receive the coupon.
</div>
<footer>
<button name="generate_coupon" type="object" string="Generate" class="oe_highlight"/>
<button special="cancel" string="Cancel"/>
</footer>
</form>
</field>
</record>
<record id="coupon_generate_action" model="ir.actions.act_window">
<field name="name">Number of Coupons To Generate</field>
<field name="res_model">coupon.generate.wizard</field>
<field name="view_mode">form</field>
<field name="target">new</field>
<field name="view_id" ref="coupon_generate_view_form"/>
</record>
</odoo>