diff --git a/README.md b/README.md index 3defc51ca..5fe302cf8 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 000000000..1b9adce61 --- /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 000000000..40272379f --- /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 000000000..2404f726f --- /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 000000000..7b58302d7 --- /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 000000000..4dfae6910 --- /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 000000000..df6062983 --- /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 000000000..7f5d36b4f Binary files /dev/null and b/deltatech_line_counter/static/description/icon.png differ diff --git a/deltatech_line_counter/static/description/icon.svg b/deltatech_line_counter/static/description/icon.svg new file mode 100644 index 000000000..5e3402797 --- /dev/null +++ b/deltatech_line_counter/static/description/icon.svg @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/deltatech_line_counter/static/description/index.html b/deltatech_line_counter/static/description/index.html new file mode 100644 index 000000000..fad039e01 --- /dev/null +++ b/deltatech_line_counter/static/description/index.html @@ -0,0 +1,406 @@ + + + + + +Deltatech Line Counter + + + +
+

Deltatech Line Counter

+ + +

Mature dhongu/deltatech

+
+

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

+
+
+

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

+

Current maintainer:

+

VoicuStefan2001

+

This module is part of the dhongu/deltatech project on GitHub.

+

You are welcome to contribute.

+
+
+
+ + diff --git a/deltatech_line_counter/static/description/main_screenshot.png b/deltatech_line_counter/static/description/main_screenshot.png new file mode 100644 index 000000000..4292c6786 Binary files /dev/null and b/deltatech_line_counter/static/description/main_screenshot.png differ diff --git a/deltatech_line_counter/tests/__init__.py b/deltatech_line_counter/tests/__init__.py new file mode 100644 index 000000000..0c5f88a8f --- /dev/null +++ b/deltatech_line_counter/tests/__init__.py @@ -0,0 +1 @@ +from . import test_line_counter diff --git a/deltatech_line_counter/tests/test_line_counter.py b/deltatech_line_counter/tests/test_line_counter.py new file mode 100644 index 000000000..fe3cce4b0 --- /dev/null +++ b/deltatech_line_counter/tests/test_line_counter.py @@ -0,0 +1,19 @@ +# © 2026 Deltatech +# See README.rst file on addons root folder for license details + +from odoo.tests.common import TransactionCase, tagged + + +@tagged("post_install", "-at_install") +class TestLineCounter(TransactionCase): + @classmethod + def setUpClass(cls): + super().setUpClass() + cls.module = cls.env["ir.module.module"].search([("name", "=", "deltatech_line_counter")], limit=1) + + def test_line_counter_wizard(self): + wizard = self.env["line.counter.wizard"].create({"module_ids": [(6, 0, self.module.ids)]}) + wizard.action_count_lines() + self.assertTrue(wizard.result) + self.assertIn("deltatech_line_counter", wizard.result) + self.assertIn("Total", wizard.result) diff --git a/deltatech_line_counter/wizard/__init__.py b/deltatech_line_counter/wizard/__init__.py new file mode 100644 index 000000000..fb0918de2 --- /dev/null +++ b/deltatech_line_counter/wizard/__init__.py @@ -0,0 +1 @@ +from . import line_counter_wizard diff --git a/deltatech_line_counter/wizard/line_counter_wizard.py b/deltatech_line_counter/wizard/line_counter_wizard.py new file mode 100644 index 000000000..1f5d35f30 --- /dev/null +++ b/deltatech_line_counter/wizard/line_counter_wizard.py @@ -0,0 +1,47 @@ +import os + +from odoo import fields, models, modules + + +class LineCounterWizard(models.TransientModel): + _name = "line.counter.wizard" + _description = "Module Line Counter Wizard" + + module_ids = fields.Many2many("ir.module.module", string="Modules", domain=[("state", "=", "installed")]) + result = fields.Html(string="Result", readonly=True) + + def action_count_lines(self): + total_lines = 0 + result_html = '' + + for module in self.module_ids: + module_path = modules.get_module_path(module.name) + if not module_path: + continue + + module_lines = 0 + for root, dirs, files in os.walk(module_path): + if "tests" in dirs: + dirs.remove("tests") + for file in files: + if file.endswith((".py", ".xml", ".js", ".css", ".scss")): + file_path = os.path.join(root, file) + try: + with open(file_path, encoding="utf-8") as f: + module_lines += sum(1 for line in f if line.strip()) + except Exception: + continue + + result_html += f"" + total_lines += module_lines + + result_html += f"
ModuleLines
{module.shortdesc} ({module.name}){module_lines}
Total{total_lines}
" + self.result = result_html + + return { + "type": "ir.actions.act_window", + "res_model": "line.counter.wizard", + "view_mode": "form", + "res_id": self.id, + "target": "new", + } diff --git a/deltatech_line_counter/wizard/line_counter_wizard_view.xml b/deltatech_line_counter/wizard/line_counter_wizard_view.xml new file mode 100644 index 000000000..126aeadd0 --- /dev/null +++ b/deltatech_line_counter/wizard/line_counter_wizard_view.xml @@ -0,0 +1,34 @@ + + + + line.counter.wizard.form + line.counter.wizard + +
+ + + + +
+
+ +
+
+ + + Line Counter + line.counter.wizard + form + new + + + +
diff --git a/deltatech_website_product_placeholder/README.rst b/deltatech_website_product_placeholder/README.rst index e69de29bb..5a8a68671 100644 --- a/deltatech_website_product_placeholder/README.rst +++ b/deltatech_website_product_placeholder/README.rst @@ -0,0 +1,71 @@ +===================================== +Deltatech Website Product Placeholder +===================================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:8959cc0538558543fee4a08d14b4364a08621fe2ed216056d7abe4047a0293a9 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png + :target: https://odoo-community.org/page/development-status + :alt: Production/Stable +.. |badge2| image:: https://img.shields.io/badge/github-dhongu%2Fdeltatech-lightgray.png?logo=github + :target: https://github.com/dhongu/deltatech/tree/18.0/deltatech_website_product_placeholder + :alt: dhongu/deltatech + +|badge1| |badge2| + +This module allows you to configure a custom placeholder image for +products that do not have an image set. Optimizes website performance by +serving a single static or configurable URL for all products without +images, which improves browser and CDN caching. + +Key features: + +- Configurable placeholder image per website. +- Fallback to a default static image if no custom image is configured. +- Optimized QWeb image field converter to use the placeholder URL + directly in HTML. +- Improved SEO and page load speed by avoiding dynamic image generation + for missing images. + +**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 +* Deltatech + +Maintainers +----------- + +.. |maintainer-dhongu| image:: https://github.com/dhongu.png?size=40px + :target: https://github.com/dhongu + :alt: dhongu + +Current maintainer: + +|maintainer-dhongu| + +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_website_product_placeholder/static/description/index.html b/deltatech_website_product_placeholder/static/description/index.html index a66b63d9f..552ce5e36 100644 --- a/deltatech_website_product_placeholder/static/description/index.html +++ b/deltatech_website_product_placeholder/static/description/index.html @@ -3,7 +3,7 @@ -eCommerce Sale Order status +Deltatech Website Product Placeholder -
-

eCommerce Sale Order status

+
+

Deltatech Website Product Placeholder

-

Mature dhongu/deltatech

+

Production/Stable dhongu/deltatech

+

This module allows you to configure a custom placeholder image for +products that do not have an image set. Optimizes website performance by +serving a single static or configurable URL for all products without +images, which improves browser and CDN caching.

+

Key features:

    -
  • Features:
      -
    • Additional filters sales orders by status
    • +
    • Configurable placeholder image per website.
    • +
    • Fallback to a default static image if no custom image is configured.
    • +
    • Optimized QWeb image field converter to use the placeholder URL +directly in HTML.
    • +
    • Improved SEO and page load speed by avoiding dynamic image generation +for missing images.
    -
  • -
-

Etape

-
-
    -
  • Plasată - comanda este plasată pe website de client
  • -
  • În procesare – comanda introdusă de operator
  • -
  • Așteaptă disponibilitate - nu sunt disponibile toate produsele
  • -
  • Amânată - livrarea a fost amânată
  • -
  • De livrat - produsele sunt disponibile și se poate face -livrarea
  • -
  • În livrare – produsele au fost predate la curier
  • -
  • Livrată - produsele au ajuns la client
  • -
  • Anulată - comanda de vânzare a fost anulată
  • -
  • Returnată - comanda a fost returnată de către client
  • -
-

Table of contents

    @@ -414,14 +406,14 @@

    Credits

    Authors

    • Terrabit
    • -
    • Dorin Hongu
    • +
    • Deltatech

Maintainers

Current maintainer:

dhongu

-

This module is part of the dhongu/deltatech project on GitHub.

+

This module is part of the dhongu/deltatech project on GitHub.

You are welcome to contribute.