Skip to content
Snippets Groups Projects
Commit 7533728c authored by Ivan Yelizariev's avatar Ivan Yelizariev
Browse files

[FIX] coupon: fix onchange method for domain field


Field `has_partner_email` depends on `partners_domain` field, which uses domain
widget. The domain widget may generate broken value.
This commit fixes it by checking that value in the onchange method.

STEPS:

1) go to coupon programs
2) click generate coupon
3) select <Number of Selected Customers>
4) click on domain field, and click the arrow back (nothing is in the domain)
5) if you click on the scrollbar, error appears (the same for any other click
that triggers onchange)

Alternative solution could be fixing the domain widget. But this looks as an
overkill for v14 for few reasons. First, the js client was heavily updated in v15+.
Second, the problem is quite specific for this module and v16 has not such usage
examples in standard modules.

opw-3062969

closes odoo/odoo#107764

X-original-commit: 1f6d84e3
Signed-off-by: default avatarWilliam Braeckman (wbr) <wbr@odoo.com>
parent 08dabc19
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment