Tuesday, September 6, 2016
1 change · master
Resolved issues and error corrections
Links to business records shared in chatter now open with the correct form view, such as the right invoice type instead of always showing the vendor invoice layout. The update also preserves expected behavior when clicking followers, so users continue to open partner records directly from the followers list.
Original PR description
There already is a redirect implementation in the chat_manager however the former has the advantage of calling get_formview_id which closely matches the on_redirect implementation in chatter.js, to…
There already is a redirect implementation in the chat_manager however the former has the advantage of calling get_formview_id which closely matches the on_redirect implementation in chatter.js, to ensure that the view is correct. This fixes a faulty behaviour when some models are referenced from chatter message using data attribute data-oe-model and data-oe-id. For example, linking invoices in the chatter would always open them with the 'vendor invoice' view; from this revision on the correct view will be used (assuming get_formview_id is implemented on the model). The default behaviour of the chat_manager when a user clicks on a partner record is to open a channel if the partner has a user then return a callback passed as a parameter (usually to open the channel as a popup or in the discuss app). To keep the old behaviour of the chatter followers list widget (i.e. open the partner form when clicking on a follower), a small change has to be made on the redirect implementation: when no callback is provided, do not create the channel (instead a returning an empty callback).