Repository
OCA/website · module folder · Try on Runboat
Module version
1.0.0
Category
Website
Folder size
0.1 MB
License
LGPL-3
Application
No
Auto-installable
No
Website
https://github.com/OCA/website
Last tracking update
2026-08-11 11:13:01
Authors
Odoo Community Association (OCA), Cetmix OÜ
Maintainers
Odoo Community Association (OCA), Cetmix OÜ
Committers
Weblate, OCA-git-bot, oca-ci, Omar Diaz
Odoo dependencies
Python dependencies
geoip2
System dependencies
None
Required by
None
Description
This module allows you to track how many times product-related documents
are downloaded from the Odoo website.

Main features:

- Automatic logging of the number of downloads for documents attached to products.
- View download statistics per product.

Code Analysis

Views touched (3)
XML IDNameModelTypeStatus
product_document_form_inherit product.document.form.inherit.download_counter product.document form Inherits website_sale.product_document_form
product_document_kanban_inherit product.document.kanban.inherit.download_counter product.document kanban Inherits website_sale.product_document_kanban
product_documents_custom product_documents_custom ir.ui.view qweb Inherits website_sale.product
HTTP endpoints (1)
Route(s)HandlerAuthTypeMethodsFlags
/shop/<model("product.template"):product_template>/document/<int:document_id>/count ProductDocumentDownloadCounterController.product_document_with_counter public http ALL sudo website
Models touched (1)

New fields (2)
  • download_count Integer
    copy=False default=0 help='Number of times this document has been downloaded' readonly=True
  • download_count_enabled Boolean
    copy=False help='Enable download counting for this document when published on website'
Public methods (1)
  • increment_download_count(self)
    Increment the download count for a specific product document. Caller must ensure appropriate permissions (e.g. via sudo()).