Wednesday, May 27, 2020
1 change · master
Code cleanup and technical improvements
The SMS sending form has been simplified so phone number values are handled consistently whether entered by a user or filled automatically. This fixes crashes when sending from CRM records without mobile numbers and prevents the send button from moving unexpectedly after correcting an invalid phone number.
Original PR description
Description of the issue/feature this PR addresses: Update classic fields updated in some cases by onchange and/or default methods by fields with store=True, readonly=False. It means their value…
Description of the issue/feature this PR addresses: Update classic fields updated in some cases by onchange and/or default methods by fields with store=True, readonly=False. It means their value comes either from manual user input, either from trigger based computation. Remove onchange and default_get when possible, leading to an unique computation method and clearing fields definition. Also clean some fields definition inconsistencies, notably required fields that should instead be correctly computed or default that have no real meaning. Current behavior before PR: Bug #1: sending an sms from CRM to a lead that doesn't have a mobile number resulted in crash Bug #2: When updating the phone number on the sms composer after that the phone was not valid and going directly to click on send, the send button jumped from it's place. Desired behavior after PR is merged: Fixed Bugs mentionned above. Task [#2229050](https://www.odoo.com/web#cids=1&id=2229050&menu_id=5195&model=project.task&view_type=form) and [#2244192](https://www.odoo.com/web#cids=1&id=2244192&menu_id=&model=project.task&view_type=form) -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr