Friday, January 24, 2020
2 changes · master
Enhancements to existing features
The sales stock availability popover was reorganized so similar information popups can be created more easily in the future. This is mainly an internal improvement that keeps the current quantity-at-date behavior while making future enhancements faster and more consistent.
Original PR description
Purpose ======= Use an abstract class for the popover widget, so we can create later others similar widgets. How === The child widget inherit from "PopoverAbstract", and can add some attributes - icon: icon displayed in the button - title: title of the popover - trigger: how the popover is triggered - color: class used as color for the button - popoverTemplate: name of the template used for the popover content - hide: if true, the button is invisible - placement: where the popover will spawn Trick ===== The method ``_willRender`` is call before rendering the widget. If you want to implement some logic behind the color, icon, etc... It's the method you search. e.g.: In ``qty_at_date_widget``, the color depends on the ``virtual_available_at_date``. We cannot do that in the ``init`` method, because in the ``one2many`` widget, the widget is created, and then we can change the record... Task #2153126
The company switcher menu now limits long company names and shortens overflowing text with an ellipsis. This helps keep the top menu tidy and usable on smaller screens or when extra debug information is visible.
Original PR description
purpose There is no max width on the company name of the 'switch company menu' of the systray (o_switch_company_menu). On smaller screens, and when in debug mode, it quickly either linebreaks the systray of crops the menu items. task-1985500 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr