Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0][FIX] spreadsheet_oca: Show the "Add" button in invoice list #46

Merged
merged 1 commit into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion spreadsheet_oca/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,26 @@
"assets": {
"web.assets_backend": [
"spreadsheet_oca/static/src/spreadsheet/spreadsheet.scss",
"spreadsheet_oca/static/src/spreadsheet/spreadsheet.xml",
"spreadsheet_oca/static/src/spreadsheet/spreadsheet_action.esm.js",
"spreadsheet_oca/static/src/spreadsheet/pivot_controller.esm.js",
"spreadsheet_oca/static/src/spreadsheet/graph_controller.esm.js",
"spreadsheet_oca/static/src/spreadsheet/list_controller.esm.js",
"spreadsheet_oca/static/src/spreadsheet/list_renderer.esm.js",
(
"after",
"web/static/src/views/graph/graph_controller.xml",
"spreadsheet_oca/static/src/spreadsheet/graph_controller.xml",
),
(
"after",
"web/static/src/views/list/list_controller.xml",
"spreadsheet_oca/static/src/spreadsheet/list_controller.xml",
),
(
"after",
"web/static/src/views/pivot/pivot_controller.xml",
"spreadsheet_oca/static/src/spreadsheet/pivot_controller.xml",
),
],
"spreadsheet.o_spreadsheet": [
"spreadsheet_oca/static/src/spreadsheet/bundle/spreadsheet.xml",
Expand Down
15 changes: 15 additions & 0 deletions spreadsheet_oca/static/src/spreadsheet/graph_controller.xml
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 spreadsheet_oca/static/src/spreadsheet/list_controller.xml
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 spreadsheet_oca/static/src/spreadsheet/pivot_controller.xml
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>
45 changes: 0 additions & 45 deletions spreadsheet_oca/static/src/spreadsheet/spreadsheet.xml

This file was deleted.

Loading