Commit a5090ac
bosd
[FIX] contract: portal contract page crashes on sale-order JS interaction
Opening a contract in the portal raised a client-side TypeError:
can't access property "dataset", this.el.querySelector(...) is null
at SaleUpdateLineButton.setup()
The portal_contract_page template used the wrapper class
"o_portal_sale_sidebar", which is the binding selector for the sale and
sale_management frontend interactions (SaleSidebar, SaleUpdateLineButton,
PortalPrepayment). SaleUpdateLineButton.setup() runs
`this.el.querySelector("table#sales_order_table").dataset`, which is null
on a contract page (no sale-order table) -> the whole interaction bundle
throws and the page errors.
The contract portal page needs no JS interaction, so switch to the neutral
"o_portal_sidebar" class. Layout is pure bootstrap grid and is unaffected.
Introduced by the portal contract page redesign (bbf9fa8).1 parent e4057d6 commit a5090ac
2 files changed
Lines changed: 12 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
97 | 107 | | |
98 | 108 | | |
99 | 109 | | |
| |||
0 commit comments