diff --git a/purchase_auto_complete_no_zero/README.rst b/purchase_auto_complete_no_zero/README.rst new file mode 100644 index 00000000000..d3837e0cf9f --- /dev/null +++ b/purchase_auto_complete_no_zero/README.rst @@ -0,0 +1,80 @@ +============================== +Purchase auto complete no zero +============================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:d2c2da7ca283711149cdd1042ae9907d038308cf1e9a1f8a209fff901ae0dc63 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/licence-LGPL--3-blue.png + :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html + :alt: License: LGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fpurchase--workflow-lightgray.png?logo=github + :target: https://github.com/OCA/purchase-workflow/tree/18.0/purchase_auto_complete_no_zero + :alt: OCA/purchase-workflow +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/purchase-workflow-18-0/purchase-workflow-18-0-purchase_auto_complete_no_zero + :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/purchase-workflow&target_branch=18.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module ensures that, when creating a vendor bill from a Purchase +Order, invoice lines are only generated for products that have a real, +pending quantity to be invoiced. + +**Table of contents** + +.. contents:: + :local: + +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 +------- + +* Jarsa + +Contributors +------------ + +- `Jarsa `__: + + - Hector Meraz + +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. + +This module is part of the `OCA/purchase-workflow `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/purchase_auto_complete_no_zero/__init__.py b/purchase_auto_complete_no_zero/__init__.py new file mode 100644 index 00000000000..0650744f6bc --- /dev/null +++ b/purchase_auto_complete_no_zero/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/purchase_auto_complete_no_zero/__manifest__.py b/purchase_auto_complete_no_zero/__manifest__.py new file mode 100644 index 00000000000..b53427a7829 --- /dev/null +++ b/purchase_auto_complete_no_zero/__manifest__.py @@ -0,0 +1,13 @@ +# Copyright 2025 Jarsa +# License LGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +{ + "name": "Purchase auto complete no zero", + "summary": "Avoid creating zero-quantity lines when creating a vendor bill.", + "version": "18.0.1.0.0", + "category": "Purchases", + "website": "https://github.com/OCA/purchase-workflow", + "author": "Jarsa, Odoo Community Association (OCA)", + "license": "LGPL-3", + "depends": ["purchase"], + "installable": True, +} diff --git a/purchase_auto_complete_no_zero/models/__init__.py b/purchase_auto_complete_no_zero/models/__init__.py new file mode 100644 index 00000000000..8e072db8f3e --- /dev/null +++ b/purchase_auto_complete_no_zero/models/__init__.py @@ -0,0 +1 @@ +from . import account_invoice diff --git a/purchase_auto_complete_no_zero/models/account_invoice.py b/purchase_auto_complete_no_zero/models/account_invoice.py new file mode 100644 index 00000000000..a2fc18537b1 --- /dev/null +++ b/purchase_auto_complete_no_zero/models/account_invoice.py @@ -0,0 +1,18 @@ +from odoo import api, models + + +class AccountMove(models.Model): + _inherit = "account.move" + + @api.onchange("purchase_vendor_bill_id", "purchase_id") + def _onchange_purchase_auto_complete(self): + res = super()._onchange_purchase_auto_complete() + + lines_to_keep = self.invoice_line_ids.filtered( + lambda line: line.display_type in ("line_section", "line_note") + or (line.quantity > 0 and line.price_unit > 0) + ) + + self.invoice_line_ids = lines_to_keep + + return res diff --git a/purchase_auto_complete_no_zero/pyproject.toml b/purchase_auto_complete_no_zero/pyproject.toml new file mode 100644 index 00000000000..4231d0cccb3 --- /dev/null +++ b/purchase_auto_complete_no_zero/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/purchase_auto_complete_no_zero/readme/CONTRIBUTORS.md b/purchase_auto_complete_no_zero/readme/CONTRIBUTORS.md new file mode 100644 index 00000000000..053acdd29b0 --- /dev/null +++ b/purchase_auto_complete_no_zero/readme/CONTRIBUTORS.md @@ -0,0 +1,2 @@ +- [Jarsa](https://www.jarsa.com): + - Hector Meraz diff --git a/purchase_auto_complete_no_zero/readme/DESCRIPTION.md b/purchase_auto_complete_no_zero/readme/DESCRIPTION.md new file mode 100644 index 00000000000..bd6daf1ccb1 --- /dev/null +++ b/purchase_auto_complete_no_zero/readme/DESCRIPTION.md @@ -0,0 +1 @@ +This module ensures that, when creating a vendor bill from a Purchase Order, invoice lines are only generated for products that have a real, pending quantity to be invoiced. \ No newline at end of file diff --git a/purchase_auto_complete_no_zero/static/description/index.html b/purchase_auto_complete_no_zero/static/description/index.html new file mode 100644 index 00000000000..2e4728546eb --- /dev/null +++ b/purchase_auto_complete_no_zero/static/description/index.html @@ -0,0 +1,428 @@ + + + + + +Purchase auto complete no zero + + + +
+

Purchase auto complete no zero

+ + +

Beta License: LGPL-3 OCA/purchase-workflow Translate me on Weblate Try me on Runboat

+

This module ensures that, when creating a vendor bill from a Purchase +Order, invoice lines are only generated for products that have a real, +pending quantity to be invoiced.

+

Table of contents

+ +
+

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

+
    +
  • Jarsa
  • +
+
+
+

Contributors

+
    +
  • Jarsa:
      +
    • Hector Meraz
    • +
    +
  • +
+
+
+

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.

+

This module is part of the OCA/purchase-workflow project on GitHub.

+

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

+
+
+
+ + diff --git a/purchase_supplierinfo_currency/README.rst b/purchase_supplierinfo_currency/README.rst index fd038ece519..baf8062b711 100644 --- a/purchase_supplierinfo_currency/README.rst +++ b/purchase_supplierinfo_currency/README.rst @@ -58,7 +58,7 @@ Authors Contributors ------------ -- Alan Ramos +- Alan Ramos Maintainers ----------- diff --git a/purchase_supplierinfo_currency/static/description/index.html b/purchase_supplierinfo_currency/static/description/index.html index bd961f281c2..a656a810207 100644 --- a/purchase_supplierinfo_currency/static/description/index.html +++ b/purchase_supplierinfo_currency/static/description/index.html @@ -8,10 +8,11 @@ /* :Author: David Goodger (goodger@python.org) -:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $ +:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $ :Copyright: This stylesheet has been placed in the public domain. Default cascading style sheet for the HTML output of Docutils. +Despite the name, some widely supported CSS2 features are used. See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to customize this style sheet. @@ -274,7 +275,7 @@ margin-left: 2em ; margin-right: 2em } -pre.code .ln { color: grey; } /* line numbers */ +pre.code .ln { color: gray; } /* line numbers */ pre.code, code { background-color: #eeeeee } pre.code .comment, code .comment { color: #5C6576 } pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold } @@ -300,7 +301,7 @@ span.pre { white-space: pre } -span.problematic { +span.problematic, pre.problematic { color: red } span.section-subtitle { @@ -409,7 +410,9 @@

Contributors

Maintainers

This module is maintained by the OCA.

-Odoo Community Association + +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.