-
-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] spreadsheet_oca: Show the "Add" button in invoice list
If any module males a primary template from the ones where the button is added, the button wasn't be shown previously. That's because the inheritance and load order works in OWL. The way to fix this is to make this load order deterministic specifying to be loaded after the corresponding template for being taken into account for primary views. This also required to split the templates file into several ones.
- Loading branch information
1 parent
d9822d4
commit bf32eda
Showing
5 changed files
with
61 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
spreadsheet_oca/static/src/spreadsheet/graph_controller.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<templates xml:space="preserve"> | ||
<t t-inherit="web.GraphView.Buttons" t-inherit-mode="extension" owl="1"> | ||
<xpath expr="//button[hasclass('fa-pie-chart')]" position="after"> | ||
<button | ||
class="btn btn-secondary fa fa-table" | ||
t-on-click="onSpreadsheetButtonClicked" | ||
data-tooltip="Add to spreadsheet" | ||
aria-label="Add to spreadsheet" | ||
t-attf-disabled="{{noDataDisplayed ? 'disabled' : false}}" | ||
/> | ||
|
||
</xpath> | ||
</t> | ||
</templates> |
16 changes: 16 additions & 0 deletions
16
spreadsheet_oca/static/src/spreadsheet/list_controller.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<templates xml:space="preserve"> | ||
<t t-inherit="web.ListView.Buttons" t-inherit-mode="extension" owl="1"> | ||
<xpath expr="//button[hasclass('o_list_export_xlsx')]/.." position="after"> | ||
<t t-if="!env.isSmall"> | ||
<button | ||
type="button" | ||
class="btn btn-secondary fa fa-table o_list_export_spreadsheet" | ||
data-tooltip="Add to spreadsheet" | ||
aria-label="Add to spreadesheet" | ||
t-on-click="(ev) => this.onSpreadsheetButtonClicked(ev)" | ||
/> | ||
</t> | ||
</xpath> | ||
</t> | ||
</templates> |
15 changes: 15 additions & 0 deletions
15
spreadsheet_oca/static/src/spreadsheet/pivot_controller.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<templates xml:space="preserve"> | ||
<t t-inherit="web.PivotView.Buttons" t-inherit-mode="extension" owl="1"> | ||
<xpath expr="//button[hasclass('o_pivot_download')]" position="after"> | ||
<div t-att-data-tooltip="getSpreadsheetInsertionTooltip()"> | ||
<button | ||
class="btn btn-secondary fa fa-table" | ||
t-on-click="onSpreadsheetButtonClicked" | ||
aria-label="Add to spreadsheet" | ||
t-att-disabled="disableSpreadsheetInsertion()" | ||
/> | ||
</div> | ||
</xpath> | ||
</t> | ||
</templates> |
This file was deleted.
Oops, something went wrong.