-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Karthi] | Fixed | Refactor. Row Number module alignment issue fixed …
…and sale order line repected product name removed (#145)
- Loading branch information
1 parent
c4e1087
commit a9a38d1
Showing
38 changed files
with
865 additions
and
1 deletion.
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
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 @@ | ||
Custom List View V16 | ||
==================== | ||
|
||
This module will helps to show row number, fixed header, duplicate record and highlight selected record in list view | ||
|
||
|
||
Credits | ||
======= | ||
Cybrosys Techno Solutions | ||
|
||
Author | ||
------ | ||
* Cybrosys Techno Solutions <odoo@cybrosys.com> | ||
Aiswarya J P @ Cybro V15 | ||
Rosmy John @ Cybro V16 |
Empty file.
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,29 @@ | ||
|
||
|
||
{ | ||
'name': 'BR Custom List View', | ||
'version': '16.0.1.0.1', | ||
'summary': 'Helps to Show Row Number, Fixed Header, Duplicate Record and Highlight Selected Record in List View', | ||
'description': 'Helps to Show Row Number, Fixed Header, Duplicate Record and Highlight Selected Record in List View', | ||
'category': 'Tools', | ||
'author': 'Banibro IT Solutions Pvt Ltd.', | ||
'company': 'Banibro IT Solutions Pvt Ltd.', | ||
'website': 'https://banibro.com', | ||
'license': 'AGPL-3', | ||
'email': "support@banibro.com", | ||
'images': ['static/description/banner.png', | ||
'static/description/icon.png',], | ||
'depends': ['base'], | ||
'assets': { | ||
'web.assets_backend': [ | ||
'br_custom_list_view/static/src/js/duplicate_record.js', | ||
'br_custom_list_view/static/src/js/record_highlight.js', | ||
'br_custom_list_view/static/src/css/sticky_header.css', | ||
'br_custom_list_view/static/src/css/highlight.css', | ||
'br_custom_list_view/static/src/xml/record_highlight.xml' | ||
], | ||
}, | ||
'installable': True, | ||
'auto_install': False, | ||
'application': False, | ||
} |
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,5 @@ | ||
## Module <custom_list_view> | ||
|
||
#### 14.02.2023 | ||
#### Version 16.0.1.0.0 | ||
#### ADD Initial Commit for custom_list_view |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+11.6 MB
community_modules/br_custom_list_view/static/description/banner_interview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
357 changes: 357 additions & 0 deletions
357
community_modules/br_custom_list_view/static/description/index.html
Large diffs are not rendered by default.
Oops, something went wrong.
357 changes: 357 additions & 0 deletions
357
community_modules/br_custom_list_view/static/description/index.html.bak
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file added
BIN
+33.4 KB
community_modules/br_custom_list_view/static/description/industries/POS.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+48.5 KB
community_modules/br_custom_list_view/static/description/industries/Thumbs.db
Binary file not shown.
Binary file added
BIN
+58.2 KB
community_modules/br_custom_list_view/static/description/industries/automobile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+47.7 KB
...nity_modules/br_custom_list_view/static/description/industries/construction.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+67.3 KB
community_modules/br_custom_list_view/static/description/industries/education.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+89.8 KB
...modules/br_custom_list_view/static/description/industries/health and safety.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+59.7 KB
...ity_modules/br_custom_list_view/static/description/industries/hr management.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+64.7 KB
...ity_modules/br_custom_list_view/static/description/industries/manufacturing.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+87 KB
...dules/br_custom_list_view/static/description/industries/property management.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+64.3 KB
community_modules/br_custom_list_view/static/description/industries/service.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+101 KB
community_modules/br_custom_list_view/static/description/industries/trading.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+20.3 KB
community_modules/br_custom_list_view/static/description/service/Consulting.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+28.1 KB
community_modules/br_custom_list_view/static/description/service/Customization.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+23.5 KB
community_modules/br_custom_list_view/static/description/service/Hire.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+27.1 KB
community_modules/br_custom_list_view/static/description/service/Installation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+46.5 KB
community_modules/br_custom_list_view/static/description/service/Thumbs.db
Binary file not shown.
Binary file added
BIN
+29.5 KB
...unity_modules/br_custom_list_view/static/description/service/implementation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+26.3 KB
community_modules/br_custom_list_view/static/description/service/integration.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+25.8 KB
community_modules/br_custom_list_view/static/description/service/migration.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+22.3 KB
community_modules/br_custom_list_view/static/description/service/support.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions
8
community_modules/br_custom_list_view/static/src/css/highlight.css
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,8 @@ | ||
|
||
.o_list_renderer tr.o_data_row.selected_record td{ | ||
background-color: #7c7aad; | ||
color:#ffffff | ||
} | ||
th[data-name="sequence"] { | ||
width: 33px !important; | ||
} |
11 changes: 11 additions & 0 deletions
11
community_modules/br_custom_list_view/static/src/css/sticky_header.css
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,11 @@ | ||
.o_list_renderer .o_list_table thead { | ||
position: sticky; | ||
top: 0; | ||
z-index : 10; | ||
} | ||
.o_list_renderer{ | ||
height : 100%; | ||
} | ||
.o_list_renderer .table thead{ | ||
z-index: 1; | ||
} |
30 changes: 30 additions & 0 deletions
30
community_modules/br_custom_list_view/static/src/js/duplicate_record.js
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,30 @@ | ||
/** @odoo-module */ | ||
import { patch } from "@web/core/utils/patch"; | ||
import { ListController } from '@web/views/list/list_controller'; | ||
|
||
const { Component, onWillStart, useSubEnv, useEffect, useRef } = owl; | ||
|
||
patch(ListController.prototype, "getActionMenuItems", { | ||
async _onDuplicateSelectedRecords() { | ||
for (var record in this.model.root.records) { | ||
if (this.model.root.records[record].selected) { | ||
await this.model.root.records[record].duplicate(); | ||
} | ||
} | ||
window.location.reload(); | ||
}, | ||
|
||
getActionMenuItems() { | ||
const actionMenuItems = this._super.apply(this, arguments); | ||
var self = this; | ||
if (actionMenuItems) { | ||
actionMenuItems.other.splice(1, 0, { | ||
description: this.env._t("Duplicate"), | ||
callback: (x) => { | ||
this._onDuplicateSelectedRecords(); | ||
} | ||
}); | ||
} | ||
return actionMenuItems; | ||
} | ||
}); |
29 changes: 29 additions & 0 deletions
29
community_modules/br_custom_list_view/static/src/js/record_highlight.js
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,29 @@ | ||
/** @odoo-module **/ | ||
import { session } from "@web/session"; | ||
import { ListRenderer } from "@web/views/list/list_renderer"; | ||
import { patch } from "@web/core/utils/patch"; | ||
import { browser } from "@web/core/browser/browser"; | ||
import { useService } from "@web/core/utils/hooks"; | ||
const {onMounted} = owl; | ||
|
||
patch(ListRenderer.prototype, 'br_custom_list_view/static/src/js/record_highlight.js', { | ||
setup(){ | ||
this._super(...arguments) | ||
onMounted(() => { | ||
var list = $('.o_section_and_note_list_view thead').find('tr') | ||
var elem ='<th style="min-width: 33px; width: 67px;">Sl No</th>' | ||
list.prepend(elem) | ||
}); | ||
}, | ||
|
||
toggleRecordSelection(record) { | ||
var self = this; | ||
this._super.apply(this, arguments); | ||
var selectedRecord = $(event.target).closest('tr') | ||
if($(event.target).prop('checked')){ | ||
selectedRecord.addClass('selected_record'); | ||
} else { | ||
selectedRecord.removeClass('selected_record') | ||
} | ||
} | ||
}) |
23 changes: 23 additions & 0 deletions
23
community_modules/br_custom_list_view/static/src/xml/record_highlight.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,23 @@ | ||
<templates id="template" xml:space="preserve"> | ||
<t t-name="br_custom_list_view.ListRenderer" t-inherit="web.ListRenderer" t-inherit-mode="extension" owl="1"> | ||
<xpath expr="//table/thead/tr/th[@t-if='hasSelectors']" position="before"> | ||
<th>Sl No</th> | ||
</xpath> | ||
</t> | ||
<t t-name="br_custom_list_view.add_number" t-inherit="web.ListRenderer.Rows" t-inherit-mode="extension" owl="1"> | ||
<xpath expr="//t[@t-foreach='list.records']" position="before"> | ||
<t t-set="RowNumber" t-value="1" /> | ||
</xpath> | ||
<xpath expr="//t[@t-call='{{ constructor.recordRowTemplate }}']" position="after"> | ||
<t t-set="RowNumber" t-value="RowNumber+1" /> | ||
</xpath> | ||
</t> | ||
|
||
<t t-name="rowno_in_tree.ListRenderer.RecordRowNumber" t-inherit="web.ListRenderer.RecordRow" t-inherit-mode="extension" owl="1"> | ||
<xpath expr="//td[@class='o_list_record_selector']" position="before"> | ||
<td tabindex="-1"> | ||
<span t-esc="RowNumber" /> | ||
</td> | ||
</xpath> | ||
</t> | ||
</templates> |