Bug === If we 1. Open a lead with an email but without partner 2. Set a partner without email on the lead 3. The warning "The email will be propagated" is visible 4. When saving the form, the email is not propagated even if the warning message was visible Solution ======== The reason is that, as the email was not changed, the inverse method of this field was not called and so the email was not propagated. The best solution would be to use "force_save" on those fields. But this feature only works on readonly fields. So, we simulate a real "force_save" on the email / phone, directly in JS. That way the inverse will be called, and if necessary, the email / phone will be propagated. Task-2704904 closes odoo/odoo#84618 X-original-commit: 1d548c7eadcd25b97856c4769759358f86e00640 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com> Co-authored-by: flch-odoo <flch@odoo.com>
24 lines
1.3 KiB
XML
24 lines
1.3 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<template id="assets_backend" name="CRM assets backend" inherit_id="web.assets_backend">
|
|
<xpath expr="." position="inside">
|
|
<script type="text/javascript" src="/crm/static/src/js/crm_form.js"/>
|
|
<script type="text/javascript" src="/crm/static/src/js/crm_kanban.js"/>
|
|
<script type="text/javascript" src="/crm/static/src/js/systray_activity_menu.js"/>
|
|
<script type="text/javascript" src="/crm/static/src/js/tours/crm.js"></script>
|
|
</xpath>
|
|
</template>
|
|
<template id="assets_tests" name="CRM Assets Tests" inherit_id="web.assets_tests">
|
|
<xpath expr="." position="inside">
|
|
<script type="text/javascript" src="/crm/static/tests/tours/crm_rainbowman.js"></script>
|
|
<script type="text/javascript" src="/crm/static/tests/tours/crm_email_and_phone_propagation.js"></script>
|
|
</xpath>
|
|
</template>
|
|
<template id="qunit_suite" name="crm tests" inherit_id="web.qunit_suite_tests">
|
|
<xpath expr="." position="inside">
|
|
<script type="text/javascript" src="/crm/static/tests/mock_server.js"></script>
|
|
<script type="text/javascript" src="/crm/static/tests/crm_rainbowman_tests.js"></script>
|
|
</xpath>
|
|
</template>
|
|
</odoo>
|