diff --git a/product_pricelist_brand_direct_print/README.rst b/product_pricelist_brand_direct_print/README.rst new file mode 100644 index 000000000..b98a8f1f1 --- /dev/null +++ b/product_pricelist_brand_direct_print/README.rst @@ -0,0 +1,175 @@ +==================================== +Product Pricelist Brand Direct Print +==================================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:dbb3a29e499c06d4760eb99e07f64182b28014250307febd35d1a1207d9a377a + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png + :target: https://odoo-community.org/page/development-status + :alt: Alpha +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fbrand-lightgray.png?logo=github + :target: https://github.com/OCA/brand/tree/18.0/product_pricelist_brand_direct_print + :alt: OCA/brand +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/brand-18-0/brand-18-0-product_pricelist_brand_direct_print + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/brand&target_branch=18.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module adds brand selection to the product_pricelist_direct_print +wizard. Allowing you to generate branded pricelist PDFs. + +.. IMPORTANT:: + This is an alpha version, the data model and design can change at any time without warning. + Only for development or testing purpose, do not use in production. + `More details on development status `_ + +**Table of contents** + +.. contents:: + :local: + +Use Cases / Context +=================== + +This module was developed because (sub)contractors wanted to sent +branded pricelists to their clients. + +It will be useful for you if your business provides (sub)contracted +services under different brands. + +If you need this module for those reasons, these might interest you too: + +- brand_report_qweb_pdf_watermark + +Installation +============ + +To install this module, you need to: + +1. Place the ``product_pricelist_brand_print`` module in your Odoo + addons path. +2. Install the ``product_pricelist_brand_print`` module in Odoo. + +Usage +===== + +To use this module, you need to: + +1. **Access the Pricelist Printing Wizard:** + + - Navigate to the area in Odoo where you typically generate product + pricelists (e.g., Sales > Products > Print Price List). + - Initiate the process to print a pricelist. This will usually open + a wizard or dialog provided by the + ``product_pricelist_direct_print`` module. + +2. **Select a Brand (Optional):** + + - In the pricelist printing wizard, you will now see a new field + labeled "Brand". + - If you want to include brand information in the generated PDF, + select the desired brand from the dropdown menu. + - If you leave this field empty, the report will be generated using + the standard layout. + +3. **Configure Other Print Options:** + + - Set any other options available in the wizard, such as which + information to include (e.g., cost price, Sales Description), + which products to include, etc. + +4. **Generate the PDF:** + + - Click the "Print" button to create the pricelist report. + +Output +------ + +- **With a Selected Brand:** If you selected a brand, the generated PDF + will include brand-specific information, such as the brand's logo, + name, and any other details configured in the + ``brand_external_report_layout`` module. +- **Without a Selected Brand:** If you did not select a brand, the PDF + will be generated using the standard layout defined in the company + settings. + +Known issues / Roadmap +====================== + +- Send branded e-mails from pricelist wizard. + +Changelog +========= + +18.0.1.0.0 (2025-04-02) +----------------------- + +- [ADD] First Release of module. + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +------- + +* O.B.S. Solutions + +Contributors +------------ + +- bosd + +Other credits +------------- + +The development of this module has been financially supported by: + +- OBS Solutions B.V. + +Maintainers +----------- + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +.. |maintainer-bosd| image:: https://github.com/bosd.png?size=40px + :target: https://github.com/bosd + :alt: bosd + +Current `maintainer `__: + +|maintainer-bosd| + +This module is part of the `OCA/brand `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/product_pricelist_brand_direct_print/__init__.py b/product_pricelist_brand_direct_print/__init__.py new file mode 100644 index 000000000..8b31d3971 --- /dev/null +++ b/product_pricelist_brand_direct_print/__init__.py @@ -0,0 +1,2 @@ +from . import reports +from . import wizards diff --git a/product_pricelist_brand_direct_print/__manifest__.py b/product_pricelist_brand_direct_print/__manifest__.py new file mode 100644 index 000000000..524849546 --- /dev/null +++ b/product_pricelist_brand_direct_print/__manifest__.py @@ -0,0 +1,33 @@ +# Copyright 2025 OBS Solutions B.V. +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl-3.0) + +{ + "name": "Product Pricelist Brand Direct Print", + "summary": "This module adds brand selection to the " + "product_pricelist_direct_print wizard." + "Allowing you to generate branded pricelist PDFs.", + "version": "18.0.1.0.0", + "development_status": "Alpha", + "category": "Sales", + "website": "https://github.com/OCA/brand", + "author": "O.B.S. Solutions, Odoo Community Association (OCA)", + "maintainers": ["bosd"], + "license": "AGPL-3", + "application": False, + "installable": True, + "preloadable": True, + "auto_install": False, + "external_dependencies": { + "python": [], + "bin": [], + }, + "depends": [ + "product_pricelist_direct_print", + "brand", + "brand_external_report_layout", + ], + "data": [ + "wizards/product_pricelist_print_view.xml", + "reports/report_product_pricelist.xml", + ], +} diff --git a/product_pricelist_brand_direct_print/i18n/.empty b/product_pricelist_brand_direct_print/i18n/.empty new file mode 100644 index 000000000..e69de29bb diff --git a/product_pricelist_brand_direct_print/pyproject.toml b/product_pricelist_brand_direct_print/pyproject.toml new file mode 100644 index 000000000..4231d0ccc --- /dev/null +++ b/product_pricelist_brand_direct_print/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/product_pricelist_brand_direct_print/readme/CONTEXT.md b/product_pricelist_brand_direct_print/readme/CONTEXT.md new file mode 100644 index 000000000..d6a0e8f36 --- /dev/null +++ b/product_pricelist_brand_direct_print/readme/CONTEXT.md @@ -0,0 +1,8 @@ + +This module was developed because (sub)contractors wanted to sent branded pricelists to their clients. + +It will be useful for you if your business provides (sub)contracted services under different brands. + +If you need this module for those reasons, these might interest you too: + +- brand_report_qweb_pdf_watermark diff --git a/product_pricelist_brand_direct_print/readme/CONTRIBUTORS.md b/product_pricelist_brand_direct_print/readme/CONTRIBUTORS.md new file mode 100644 index 000000000..94d0e537e --- /dev/null +++ b/product_pricelist_brand_direct_print/readme/CONTRIBUTORS.md @@ -0,0 +1,2 @@ + +- bosd \ diff --git a/product_pricelist_brand_direct_print/readme/CREDITS.md b/product_pricelist_brand_direct_print/readme/CREDITS.md new file mode 100644 index 000000000..ded0986d1 --- /dev/null +++ b/product_pricelist_brand_direct_print/readme/CREDITS.md @@ -0,0 +1,4 @@ + +The development of this module has been financially supported by: + +- OBS Solutions B.V. diff --git a/product_pricelist_brand_direct_print/readme/DESCRIPTION.md b/product_pricelist_brand_direct_print/readme/DESCRIPTION.md new file mode 100644 index 000000000..d580d301c --- /dev/null +++ b/product_pricelist_brand_direct_print/readme/DESCRIPTION.md @@ -0,0 +1,2 @@ +This module adds brand selection to the product_pricelist_direct_print wizard. Allowing you to generate branded pricelist PDFs. + diff --git a/product_pricelist_brand_direct_print/readme/HISTORY.md b/product_pricelist_brand_direct_print/readme/HISTORY.md new file mode 100644 index 000000000..c3fa5534a --- /dev/null +++ b/product_pricelist_brand_direct_print/readme/HISTORY.md @@ -0,0 +1,3 @@ +## 18.0.1.0.0 (2025-04-02) + +- [ADD] First Release of module. diff --git a/product_pricelist_brand_direct_print/readme/INSTALL.md b/product_pricelist_brand_direct_print/readme/INSTALL.md new file mode 100644 index 000000000..f09ecd8be --- /dev/null +++ b/product_pricelist_brand_direct_print/readme/INSTALL.md @@ -0,0 +1,5 @@ + +To install this module, you need to: + +1. Place the `product_pricelist_brand_print` module in your Odoo addons path. +2. Install the `product_pricelist_brand_print` module in Odoo. diff --git a/product_pricelist_brand_direct_print/readme/ROADMAP.md b/product_pricelist_brand_direct_print/readme/ROADMAP.md new file mode 100644 index 000000000..c191352de --- /dev/null +++ b/product_pricelist_brand_direct_print/readme/ROADMAP.md @@ -0,0 +1,2 @@ + +- Send branded e-mails from pricelist wizard. diff --git a/product_pricelist_brand_direct_print/readme/USAGE.md b/product_pricelist_brand_direct_print/readme/USAGE.md new file mode 100644 index 000000000..286fc858a --- /dev/null +++ b/product_pricelist_brand_direct_print/readme/USAGE.md @@ -0,0 +1,22 @@ + +To use this module, you need to: + +1. **Access the Pricelist Printing Wizard:** + * Navigate to the area in Odoo where you typically generate product pricelists (e.g., Sales > Products > Print Price List). + * Initiate the process to print a pricelist. This will usually open a wizard or dialog provided by the `product_pricelist_direct_print` module. + +2. **Select a Brand (Optional):** + * In the pricelist printing wizard, you will now see a new field labeled "Brand". + * If you want to include brand information in the generated PDF, select the desired brand from the dropdown menu. + * If you leave this field empty, the report will be generated using the standard layout. + +3. **Configure Other Print Options:** + * Set any other options available in the wizard, such as which information to include (e.g., cost price, Sales Description), which products to include, etc. + +4. **Generate the PDF:** + * Click the "Print" button to create the pricelist report. + +## Output + +* **With a Selected Brand:** If you selected a brand, the generated PDF will include brand-specific information, such as the brand's logo, name, and any other details configured in the `brand_external_report_layout` module. +* **Without a Selected Brand:** If you did not select a brand, the PDF will be generated using the standard layout defined in the company settings. diff --git a/product_pricelist_brand_direct_print/reports/report_product_pricelist.xml b/product_pricelist_brand_direct_print/reports/report_product_pricelist.xml new file mode 100644 index 000000000..9a3ccdc1b --- /dev/null +++ b/product_pricelist_brand_direct_print/reports/report_product_pricelist.xml @@ -0,0 +1,15 @@ + + + product.pricelist.print.brand.report + product.pricelist.print + + + + + + + + diff --git a/product_pricelist_brand_direct_print/static/description/icon.png b/product_pricelist_brand_direct_print/static/description/icon.png new file mode 100644 index 000000000..3a0328b51 Binary files /dev/null and b/product_pricelist_brand_direct_print/static/description/icon.png differ diff --git a/product_pricelist_brand_direct_print/static/description/index.html b/product_pricelist_brand_direct_print/static/description/index.html new file mode 100644 index 000000000..7d0ade061 --- /dev/null +++ b/product_pricelist_brand_direct_print/static/description/index.html @@ -0,0 +1,531 @@ + + + + + +Product Pricelist Brand Direct Print + + + +
+

Product Pricelist Brand Direct Print

+ + +

Alpha License: AGPL-3 OCA/brand Translate me on Weblate Try me on Runboat

+

This module adds brand selection to the product_pricelist_direct_print +wizard. Allowing you to generate branded pricelist PDFs.

+
+

Important

+

This is an alpha version, the data model and design can change at any time without warning. +Only for development or testing purpose, do not use in production. +More details on development status

+
+

Table of contents

+ +
+

Use Cases / Context

+

This module was developed because (sub)contractors wanted to sent +branded pricelists to their clients.

+

It will be useful for you if your business provides (sub)contracted +services under different brands.

+

If you need this module for those reasons, these might interest you too:

+
    +
  • brand_report_qweb_pdf_watermark
  • +
+
+
+

Installation

+

To install this module, you need to:

+
    +
  1. Place the product_pricelist_brand_print module in your Odoo +addons path.
  2. +
  3. Install the product_pricelist_brand_print module in Odoo.
  4. +
+
+
+

Usage

+

To use this module, you need to:

+
    +
  1. Access the Pricelist Printing Wizard:
      +
    • Navigate to the area in Odoo where you typically generate product +pricelists (e.g., Sales > Products > Print Price List).
    • +
    • Initiate the process to print a pricelist. This will usually open +a wizard or dialog provided by the +product_pricelist_direct_print module.
    • +
    +
  2. +
  3. Select a Brand (Optional):
      +
    • In the pricelist printing wizard, you will now see a new field +labeled “Brand”.
    • +
    • If you want to include brand information in the generated PDF, +select the desired brand from the dropdown menu.
    • +
    • If you leave this field empty, the report will be generated using +the standard layout.
    • +
    +
  4. +
  5. Configure Other Print Options:
      +
    • Set any other options available in the wizard, such as which +information to include (e.g., cost price, Sales Description), +which products to include, etc.
    • +
    +
  6. +
  7. Generate the PDF:
      +
    • Click the “Print” button to create the pricelist report.
    • +
    +
  8. +
+
+

Output

+
    +
  • With a Selected Brand: If you selected a brand, the generated PDF +will include brand-specific information, such as the brand’s logo, +name, and any other details configured in the +brand_external_report_layout module.
  • +
  • Without a Selected Brand: If you did not select a brand, the PDF +will be generated using the standard layout defined in the company +settings.
  • +
+
+
+
+

Known issues / Roadmap

+
    +
  • Send branded e-mails from pricelist wizard.
  • +
+
+
+

Changelog

+
+

18.0.1.0.0 (2025-04-02)

+
    +
  • [ADD] First Release of module.
  • +
+
+
+
+

Bug Tracker

+

Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • O.B.S. Solutions
  • +
+
+ +
+

Other credits

+

The development of this module has been financially supported by:

+
    +
  • OBS Solutions B.V.
  • +
+
+
+

Maintainers

+

This module is maintained by the OCA.

+ +Odoo Community Association + +

OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use.

+

Current maintainer:

+

bosd

+

This module is part of the OCA/brand project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/product_pricelist_brand_direct_print/tests/__init__.py b/product_pricelist_brand_direct_print/tests/__init__.py new file mode 100644 index 000000000..85f687f7a --- /dev/null +++ b/product_pricelist_brand_direct_print/tests/__init__.py @@ -0,0 +1 @@ +from . import test_pricelist_print diff --git a/product_pricelist_brand_direct_print/tests/test_pricelist_print.py b/product_pricelist_brand_direct_print/tests/test_pricelist_print.py new file mode 100644 index 000000000..b3cca80d9 --- /dev/null +++ b/product_pricelist_brand_direct_print/tests/test_pricelist_print.py @@ -0,0 +1,32 @@ +from odoo import fields +from odoo.tests.common import TransactionCase + + +class TestProductPricelistBrandPrint(TransactionCase): + def setUp(self): + super().setUp() + # Create a test pricelist + self.pricelist = self.env["product.pricelist"].create( + { + "name": "Test Pricelist", + } + ) + # Create a pricelist print wizard + self.pricelist_print = self.env["product.pricelist.print"].create( + { + "pricelist_id": self.pricelist.id, + "date": fields.Date.today(), + } + ) + + def test_brand_id_field_exists(self): + self.assertTrue( + "brand_id" in self.pricelist_print, "Wizard should have brand_id field" + ) + + def test_brand_id_field_type(self): + field = self.env["product.pricelist.print"]._fields["brand_id"] + self.assertEqual(field.type, "many2one", "brand_id should be a Many2one field") + self.assertEqual( + field.comodel_name, "res.brand", "brand_id should relate to res.brand model" + ) diff --git a/product_pricelist_brand_direct_print/wizards/__init__.py b/product_pricelist_brand_direct_print/wizards/__init__.py new file mode 100644 index 000000000..dfc9a481f --- /dev/null +++ b/product_pricelist_brand_direct_print/wizards/__init__.py @@ -0,0 +1 @@ +from . import product_pricelist_print diff --git a/product_pricelist_brand_direct_print/wizards/product_pricelist_print.py b/product_pricelist_brand_direct_print/wizards/product_pricelist_print.py new file mode 100644 index 000000000..10a56fab4 --- /dev/null +++ b/product_pricelist_brand_direct_print/wizards/product_pricelist_print.py @@ -0,0 +1,6 @@ +from odoo import models + + +class ProductPricelistPrint(models.TransientModel): + _name = "product.pricelist.print" + _inherit = ["product.pricelist.print", "res.brand.mixin"] diff --git a/product_pricelist_brand_direct_print/wizards/product_pricelist_print_view.xml b/product_pricelist_brand_direct_print/wizards/product_pricelist_print_view.xml new file mode 100644 index 000000000..83d58843f --- /dev/null +++ b/product_pricelist_brand_direct_print/wizards/product_pricelist_print_view.xml @@ -0,0 +1,16 @@ + + + + product.pricelist.print.brand.form + product.pricelist.print + + + + + + + + diff --git a/test-requirements.txt b/test-requirements.txt new file mode 100644 index 000000000..4493201d7 --- /dev/null +++ b/test-requirements.txt @@ -0,0 +1,2 @@ +odoo-addon-brand-external-report-layout @ git+https://github.com/OCA/brand.git@refs/pull/224/head#subdirectory=brand_external_report_layout +odoo-addon-brand @ git+https://github.com/OCA/brand.git@refs/pull/255/head#subdirectory=brand