Saturday, October 2, 2021
2 changes · master
Miscellaneous changes
Given that we have a viewport of 320px and, to simplify the explanation, we discard the height of the `<header>` (aka. the top navbar). Since the refactoring of Discuss [1], a global rule was added to the '.o_action_manager' to allow the flex to shrink the discussion's list in Discuss on Mobile. But this rule change the box sizing of '.o_action_manager' as now it takes the minimum size (e.g. before 3000px became now 320px +/- the height of the viewport). Therefore a limit for the sti
Original PR description
Given that we have a viewport of 320px and, to simplify the explanation, we discard the height of the `<header>` (aka. the top navbar). Since the refactoring of Discuss [1], a global rule was added…
Given that we have a viewport of 320px and, to simplify the explanation, we discard the height of the `<header>` (aka. the top navbar). Since the refactoring of Discuss [1], a global rule was added to the '.o_action_manager' to allow the flex to shrink the discussion's list in Discuss on Mobile. But this rule change the box sizing of '.o_action_manager' as now it takes the minimum size (e.g. before 3000px became now 320px +/- the height of the viewport). Therefore a limit for the sticky-scroll behaviour of control panel is set at the end of the height of the element. Then when the viewport goes outside this limit the sticky doesn't work anymore until the viewport returns before this limit. (e.g. <= 320px ok, > 320px ko). The fix is to change the flex basis of the '.o_Discuss_notificationList' to be 0 which avoids to alter the global '.o_action_manager' and scopes rules to Discuss' specific classes. DOM before this commit: ``` ┌───────────────────────────────────────────────────────┐ │ '.o_action_manager' ▲ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ELEMENT HEIGHT │ │ │ = 'VIEWPORT' │ │ │ 320px │ │ │ ┌────────────────────────────────────────────────┐ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Control Panel │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ └────────────────────────────────────────────────┘ ▼ │ │ - - - - - - - - LIMIT OF STICKY ELEMENT - - - - - - - │ <- 320px │ ▲ │ │ │ │ │ OVERFLOW │ │ │ VISIBLE │ │ │ │ │ │ ▼ │ └───────────────────────────────────────────────────────┘ ``` DOM after this commit: ``` ┌───────────────────────────────────────────────────────┐ │ '.o_action_manager' ▲ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ELEMENT HEIGHT │ │ <- 320px │ >= 'VIEWPORT' │ │ │ 3000px │ │ │ ┌────────────────────────────────────────────────┐ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Control Panel │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ └────────────────────────────────────────────────┘ ▼ │ └───────────────────────────────────────────────────────┘ ``` Steps to reproduce: * Open Odoo on Mobile * Go to a Kanban view with list height at least twice the screen height * Scroll to the end of the page (the control panel is hidden) * Scroll a bit upper => BUG the control panel is not visible until we scroll in the 'box' of the '.o_action_manager' Note this behaviour is maybe related to an issue from CSS3 [2] from MDN [3] Ref: [1] 3fea5b2 [2] Issue 865 on https://github.com/w3c/csswg-drafts [3] https://developer.mozilla.org/en-US/docs/Web/CSS/position -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#77599 Forward-Port-Of: odoo/odoo#77513
Steps to reproduce: - Go to Accounting -> Accounting -> Journal Items - Group by journal and save the filter - Go to Accounting -> Configuration -> Financial Reports - Select Profit and Loss, add the newly created filter to "Applicable filters" - Select a journal, for example "Vendor bills" and archive it - Go To Accounting -> Reporting -> Profit and Loss and apply the custom filter Issue Got a traceback -> keyError 3 Solution Check if the key exists when looping in sor
Original PR description
Steps to reproduce: - Go to Accounting -> Accounting -> Journal Items - Group by journal and save the filter - Go to Accounting -> Configuration -> Financial Reports - Select Profit and Loss, add the newly created filter to "Applicable filters" - Select a journal, for example "Vendor bills" and archive it - Go To Accounting -> Reporting -> Profit and Loss and apply the custom filter Issue Got a traceback -> keyError 3 Solution Check if the key exists when looping in sorting_map opw-2635597 Forward-Port-Of: odoo/enterprise#21357