Skip to content

Commit

Permalink
[ADD] sale_invoice_split_payment: Add module
Browse files Browse the repository at this point in the history
  • Loading branch information
luisDIXMIT committed Feb 11, 2025
1 parent 2c04057 commit 2bd9e5f
Show file tree
Hide file tree
Showing 14 changed files with 729 additions and 0 deletions.
107 changes: 107 additions & 0 deletions sale_invoice_split_payment/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
==========================
Sale Invoice Split Payment
==========================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:18638e065d302d088c58f6753cdb0960606c370d9a18bc96459c9f70227eea6b
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |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-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%2Fsale--workflow-lightgray.png?logo=github
:target: https://github.com/OCA/sale-workflow/tree/16.0/sale_invoice_split_payment
:alt: OCA/sale-workflow
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-sale_invoice_split_payment
: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/sale-workflow&target_branch=16.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module takes payment terms into account when invoicing. In this
way, two invoices with the same data but different payment terms will be
invoiced separately.

**Table of contents**

.. contents::
:local:

Usage
=====

To use this module, you need to:

- Go to Sales > Orders > Quotations

- Create a quotation. Set a customer, a product and a payment term.

- Confirm the quotation.

- Create a second quotation with the same data as above and set a
different payment term.

- Confirm the second quotation.

- Go back to the Quotations list view and select the two newly created
sales orders.

- Click on the Action button and select Create Invoices.

- In the wizard click on Create and View Invoice.

- Even though both quotations have almost the same data, the invoicing
has been split into two invoices because they have different payment
terms.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/sale-workflow/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 <https://github.com/OCA/sale-workflow/issues/new?body=module:%20sale_invoice_split_payment%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

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

Credits
=======

Authors
-------

* Dixmit

Contributors
------------

- `Dixmit <https://www.dixmit.com>`__:

- Luis Rodríguez

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/sale-workflow <https://github.com/OCA/sale-workflow/tree/16.0/sale_invoice_split_payment>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions sale_invoice_split_payment/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
16 changes: 16 additions & 0 deletions sale_invoice_split_payment/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copyright 2025 Dixmit
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

{
"name": "Sale Invoice Split Payment",
"summary": """Split by payment term generated invoices from sale orders""",
"version": "16.0.1.0.0",
"license": "AGPL-3",
"author": "Dixmit,Odoo Community Association (OCA)",
"website": "https://github.com/OCA/sale-workflow",
"depends": [
"sale",
],
"data": [],
"demo": [],
}
1 change: 1 addition & 0 deletions sale_invoice_split_payment/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import sale_order
15 changes: 15 additions & 0 deletions sale_invoice_split_payment/models/sale_order.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright 2025 Dixmit
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import models


class SaleOrder(models.Model):
_inherit = "sale.order"

def _get_invoice_grouping_keys(self):
res = super()._get_invoice_grouping_keys()
if "invoice_payment_term_id" not in res:
res.append("invoice_payment_term_id")

return res
2 changes: 2 additions & 0 deletions sale_invoice_split_payment/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- [Dixmit](https://www.dixmit.com):
- Luis Rodríguez
1 change: 1 addition & 0 deletions sale_invoice_split_payment/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This module takes payment terms into account when invoicing. In this way, two invoices with the same data but different payment terms will be invoiced separately.
19 changes: 19 additions & 0 deletions sale_invoice_split_payment/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
To use this module, you need to:

- Go to Sales > Orders > Quotations

- Create a quotation. Set a customer, a product and a payment term.

- Confirm the quotation.

- Create a second quotation with the same data as above and set a different payment term.

- Confirm the second quotation.

- Go back to the Quotations list view and select the two newly created sales orders.

- Click on the Action button and select Create Invoices.

- In the wizard click on Create and View Invoice.

- Even though both quotations have almost the same data, the invoicing has been split into two invoices because they have different payment terms.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 2bd9e5f

Please sign in to comment.