From ef83fdf08ad4471a96dc52c9f8dfb1c6aecd8a76 Mon Sep 17 00:00:00 2001 From: VoicuStefan2001 Date: Fri, 15 May 2026 10:45:58 +0300 Subject: [PATCH] [18][ADD] deltatech_line_counter --- README.md | 10 +- deltatech_line_counter/README.rst | 65 +++ deltatech_line_counter/__init__.py | 1 + deltatech_line_counter/__manifest__.py | 18 + deltatech_line_counter/pyproject.toml | 8 + deltatech_line_counter/readme/DESCRIPTION.md | 6 + .../security/ir.model.access.csv | 2 + .../static/description/icon.png | Bin 0 -> 8227 bytes .../static/description/icon.svg | 36 ++ .../static/description/index.html | 406 ++++++++++++++++++ .../static/description/main_screenshot.png | Bin 0 -> 13007 bytes deltatech_line_counter/tests/__init__.py | 1 + .../tests/test_line_counter.py | 19 + deltatech_line_counter/wizard/__init__.py | 1 + .../wizard/line_counter_wizard.py | 47 ++ .../wizard/line_counter_wizard_view.xml | 34 ++ .../README.rst | 71 +++ .../static/description/index.html | 44 +- 18 files changed, 739 insertions(+), 30 deletions(-) create mode 100644 deltatech_line_counter/README.rst create mode 100644 deltatech_line_counter/__init__.py create mode 100644 deltatech_line_counter/__manifest__.py create mode 100644 deltatech_line_counter/pyproject.toml create mode 100644 deltatech_line_counter/readme/DESCRIPTION.md create mode 100644 deltatech_line_counter/security/ir.model.access.csv create mode 100644 deltatech_line_counter/static/description/icon.png create mode 100644 deltatech_line_counter/static/description/icon.svg create mode 100644 deltatech_line_counter/static/description/index.html create mode 100644 deltatech_line_counter/static/description/main_screenshot.png create mode 100644 deltatech_line_counter/tests/__init__.py create mode 100644 deltatech_line_counter/tests/test_line_counter.py create mode 100644 deltatech_line_counter/wizard/__init__.py create mode 100644 deltatech_line_counter/wizard/line_counter_wizard.py create mode 100644 deltatech_line_counter/wizard/line_counter_wizard_view.xml diff --git a/README.md b/README.md index 3defc51ca2..5fe302cf80 100644 --- a/README.md +++ b/README.md @@ -72,6 +72,7 @@ addon | version | maintainers | summary [deltatech_invoice_weight](deltatech_invoice_weight/) | 18.0.1.0.2 | dhongu | Invoice Weight [deltatech_kit_price](deltatech_kit_price/) | 18.0.0.0.2 | danila12 | Compute product cost price in sale order line based on kit [deltatech_ledger](deltatech_ledger/) | 18.0.0.0.1 | VoicuStefan2001 | Deltatech Ledger +[deltatech_line_counter](deltatech_line_counter/) | 18.0.1.0.0 | VoicuStefan2001 | Count lines of code in selected modules [deltatech_list_view](deltatech_list_view/) | 18.0.1.0.1 | dhongu | List View Select Text [deltatech_logistic_docs](deltatech_logistic_docs/) | 18.0.1.0.3 | dhongu | Logistic Documents [deltatech_lot](deltatech_lot/) | 18.0.1.0.3 | dhongu | Generate/Select lot @@ -172,7 +173,7 @@ addon | version | maintainers | summary [deltatech_sale_multiple_website](deltatech_sale_multiple_website/) | 18.0.1.0.3 | dhongu | Quantity multiple on website [deltatech_sale_pallet](deltatech_sale_pallet/) | 18.0.1.0.8 | dhongu | Sale pallet [deltatech_sale_pallet_website](deltatech_sale_pallet_website/) | 18.0.1.0.2 | dhongu | Sale pallet -[deltatech_sale_payment](deltatech_sale_payment/) | 18.0.1.1.1 | dhongu | Payment button in sale order +[deltatech_sale_payment](deltatech_sale_payment/) | 18.0.1.1.2 | dhongu | Payment button in sale order [deltatech_sale_phone](deltatech_sale_phone/) | 18.0.1.0.2 | dhongu | Show partner phone in sale order [deltatech_sale_picking_status](deltatech_sale_picking_status/) | 18.0.1.0.1 | danila12 | Get sale order status from pickings [deltatech_sale_purchase](deltatech_sale_purchase/) | 18.0.1.0.1 | dhongu | Sale Purchase @@ -228,22 +229,23 @@ addon | version | maintainers | summary [deltatech_website_phone_validation](deltatech_website_phone_validation/) | 18.0.1.0.0 | dhongu | Phone Validation [deltatech_website_price_without_tax](deltatech_website_price_without_tax/) | 18.0.1.0.2 | dhongu | Display Product Price Without Tax [deltatech_website_product_code](deltatech_website_product_code/) | 18.0.1.0.1 | dhongu | Display product by code in eCommerce +[deltatech_website_product_placeholder](deltatech_website_product_placeholder/) | 18.0.1.0.0 | dhongu | Serve placeholder image for products without images [deltatech_website_product_url_image](deltatech_website_product_url_image/) | 18.0.1.0.1 | dhongu | Load image for product from URL [deltatech_website_sale_attribute_filter](deltatech_website_sale_attribute_filter/) | 18.0.0.0.0 | VoicuStefan2001 | Filter attribute values based on displayed products [deltatech_website_sale_attributes](deltatech_website_sale_attributes/) | 18.0.1.0.2 | dhongu | Attribute values for products displayed -[deltatech_website_sale_cost_price](deltatech_website_sale_cost_price/) | 18.0.1.0.0 | VoicuStefan2001 | Prevent adding to cart if price is lower than cost price +[deltatech_website_sale_cost_price](deltatech_website_sale_cost_price/) | 18.0.1.0.1 | VoicuStefan2001 | Prevent adding to cart if price is lower than cost price [deltatech_website_sale_portal](deltatech_website_sale_portal/) | 18.0.1.0.0 | dhongu | eCommerce Portal extension [deltatech_website_sale_sort](deltatech_website_sale_sort/) | 18.0.1.0.1 | dhongu | Additional sorting criteria [deltatech_website_sale_status](deltatech_website_sale_status/) | 18.0.2.0.3 | dhongu | Additional filters sales orders by status [deltatech_website_sale_wishlist](deltatech_website_sale_wishlist/) | 18.0.1.0.2 | dhongu | eCommerce wishlist [deltatech_website_short_description](deltatech_website_short_description/) | 18.0.1.0.3 | dhongu | eCommerce short description [deltatech_website_snippet_attribute_filter](deltatech_website_snippet_attribute_filter/) | 18.0.1.0.4 | dhongu | eCommerce Attribute Values Filter Snippet -[deltatech_website_stock_availability](deltatech_website_stock_availability/) | 18.0.1.0.6 | dhongu | eCommerce Stock Availability and lead time +[deltatech_website_stock_availability](deltatech_website_stock_availability/) | 18.0.1.0.7 | dhongu | eCommerce Stock Availability and lead time [deltatech_website_texture_attributes](deltatech_website_texture_attributes/) | 18.0.1.0.0 | dhongu | Attribute with image for texture [deltatech_website_vat_validation](deltatech_website_vat_validation/) | 18.0.0.0.0 | dhongu | VAT Validation [deltatech_website_warehouse_stock](deltatech_website_warehouse_stock/) | 18.0.0.0.2 | VoicuStefan2001 | eCommerce Warehouse Stock [deltatech_widget_fontawesome](deltatech_widget_fontawesome/) | 18.0.1.0.0 | dhongu | Font Awesome Widget -[deltatech_widget_many2one_badge](deltatech_widget_many2one_badge/) | 18.0.1.0.0 | dhongu | Many2one field widget displayed as colored badge, similar to many2many_tags +[deltatech_widget_many2one_badge](deltatech_widget_many2one_badge/) | 18.0.1.0.1 | dhongu | Many2one field widget displayed as colored badge, similar to many2many_tags [//]: # (end addons) diff --git a/deltatech_line_counter/README.rst b/deltatech_line_counter/README.rst new file mode 100644 index 0000000000..1b9adce61f --- /dev/null +++ b/deltatech_line_counter/README.rst @@ -0,0 +1,65 @@ +====================== +Deltatech Line Counter +====================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:c83d72de5d5f6a13bc512a92a1615e2ca695b8f03c3a88b5cfc585019eda1a38 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Mature-brightgreen.png + :target: https://odoo-community.org/page/development-status + :alt: Mature +.. |badge2| image:: https://img.shields.io/badge/github-dhongu%2Fdeltatech-lightgray.png?logo=github + :target: https://github.com/dhongu/deltatech/tree/18.0/deltatech_line_counter + :alt: dhongu/deltatech + +|badge1| |badge2| + +Module Line Counter +=================== + +This module adds a wizard to count lines of code in selected Odoo +modules. It provides a quick way to estimate the size and complexity of +modules by counting lines in ``.py``, ``.xml``, ``.js``, ``.css``, and +``.scss`` files. Tests are excluded from the count. + +**Table of contents** + +.. contents:: + :local: + +Bug Tracker +=========== + +Bugs are tracked on `Terrabit Issues `_. +In case of trouble, please check there if your issue has already been reported. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +------- + +* Terrabit +* Voicu Stefan + +Maintainers +----------- + +.. |maintainer-VoicuStefan2001| image:: https://github.com/VoicuStefan2001.png?size=40px + :target: https://github.com/VoicuStefan2001 + :alt: VoicuStefan2001 + +Current maintainer: + +|maintainer-VoicuStefan2001| + +This module is part of the `dhongu/deltatech `_ project on GitHub. + +You are welcome to contribute. \ No newline at end of file diff --git a/deltatech_line_counter/__init__.py b/deltatech_line_counter/__init__.py new file mode 100644 index 0000000000..40272379f7 --- /dev/null +++ b/deltatech_line_counter/__init__.py @@ -0,0 +1 @@ +from . import wizard diff --git a/deltatech_line_counter/__manifest__.py b/deltatech_line_counter/__manifest__.py new file mode 100644 index 0000000000..2404f726f3 --- /dev/null +++ b/deltatech_line_counter/__manifest__.py @@ -0,0 +1,18 @@ +{ + "name": "Deltatech Line Counter", + "version": "18.0.1.0.0", + "category": "Extra Tools", + "summary": "Count lines of code in selected modules", + "author": "Terrabit, Voicu Stefan", + "website": "https://www.terrabit.ro", + "depends": ["base"], + "data": [ + "security/ir.model.access.csv", + "wizard/line_counter_wizard_view.xml", + ], + "installable": True, + "images": ["static/description/main_screenshot.png"], + "development_status": "Mature", + "maintainers": ["VoicuStefan2001"], + "license": "OPL-1", +} diff --git a/deltatech_line_counter/pyproject.toml b/deltatech_line_counter/pyproject.toml new file mode 100644 index 0000000000..7b58302d76 --- /dev/null +++ b/deltatech_line_counter/pyproject.toml @@ -0,0 +1,8 @@ +[build-system] +requires = [ + "whool", +] +build-backend = "whool.buildapi" + +[project] +name = "odoo-addon-deltatech-line-counter" diff --git a/deltatech_line_counter/readme/DESCRIPTION.md b/deltatech_line_counter/readme/DESCRIPTION.md new file mode 100644 index 0000000000..4dfae69104 --- /dev/null +++ b/deltatech_line_counter/readme/DESCRIPTION.md @@ -0,0 +1,6 @@ +Module Line Counter +=================== + +This module adds a wizard to count lines of code in selected Odoo modules. +It provides a quick way to estimate the size and complexity of modules by counting lines in `.py`, `.xml`, `.js`, `.css`, and `.scss` files. +Tests are excluded from the count. diff --git a/deltatech_line_counter/security/ir.model.access.csv b/deltatech_line_counter/security/ir.model.access.csv new file mode 100644 index 0000000000..df60629835 --- /dev/null +++ b/deltatech_line_counter/security/ir.model.access.csv @@ -0,0 +1,2 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_line_counter_wizard,line_counter_wizard,model_line_counter_wizard,base.group_system,1,1,1,1 diff --git a/deltatech_line_counter/static/description/icon.png b/deltatech_line_counter/static/description/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..7f5d36b4fdc409ac9e6cc3927f77f4b66b0ede37 GIT binary patch literal 8227 zcmZvBcRZE<`~T}c$FW8Bs3>F=GP6(1o{^Q6tf;ICDUNob$S$H1h0KhMoRYFan}m~* zk$Ebd9DHB*ae7z3-{%kGai9CXUe|g)ujhT8%a-N_9IV2u000gn!`*w~-xc(SnGych zWdjcW-eD8!GMNz)%IkfSI1+aK^Kek}Jtz6eHwweoovxbU7Cw39c z%4Bl#**4lp-#L3|C-ZLQS2ipxd|b?2viAk9j4_@&cMf@N1FR%YziwN6HPxQWSNzLM zV6t}l+sJ&^vUg~5M!!XVZ(2x_#dU7Jq-#8}Kl;<|x3zbybf0`*jo^xI_qq;v<{ zy^bRL_kMa*`zXC}JTc%(lxL%-`DGbQ@)cgpYfYSf^5_sYdJmbfC;j}zj50C1T;3++ z390R4vzn5HRBO}cUHV@~J%rOIJ2P5 z;#=j!43*P8Xz{0g-0bP$L&|OfP1Aye$2i>5L1W`5E>^bf?1`8>DlcFKI1+^k@5$?( z-Tup6&E0vnVMjihbN+Jk25C)yk$n+5z$(}Lw0B@&;9jRNjkmXfC6ESvLLg&fKHJs$ zN{N+`JBwfZ)R?i~r@~dUGyw>)fs16PB-4#efrLa&1PB5=bXu)(yj%3{)XOPUJ;alt5Oqys>0{6b!Li&j;n7x#PZH6X)R2@WeEQe`fpdGET|lzP z7@uFZ)X0)2W*afwB(}CS%s}c!8AIsJw+Cl;VExCoD3NcTC*EX>seP^Aaj(0;&Q$Fi z&&>wLqV`B%a3Rv+*!m;^XI7DS@@2eVJr#Oo?CbrphRkA*^AN90I#X2cpzk*JXE{{Ex_ zrjr4EjxQoic1}zHUZ%