Skip to content

Commit

Permalink
Merge PR #1792 into 15.0
Browse files Browse the repository at this point in the history
Signed-off-by pedrobaeza
  • Loading branch information
OCA-git-bot committed Sep 9, 2024
2 parents c75f667 + 70ecf99 commit 6f7fcc8
Show file tree
Hide file tree
Showing 17 changed files with 662 additions and 0 deletions.
99 changes: 99 additions & 0 deletions sale_order_type_whole_delivered_invoiceability/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
==============================================
Sale Order Type Whole Delivered Invoiceability
==============================================

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

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

This module extends the functionality of the sale_order_whole_delivered_invoiceability
module by adding the option to prevent the invoicing of sales orders until all material
has been delivered on the sales order types, being propagated from them where they
are used in the sales order.

**Table of contents**

.. contents::
:local:

Configuration
=============

#. Create or modify a sales order type.
#. Activate the option ‘Whole Delivered Invoiceability’.

Usage
=====

To use this module you need to:

#. Create a sales order.
#. Set the above sales order type.
#. Do a partial delivery.

Although it is possible to create an invoice from the order itself, the ‘Create invoice’ button will remain white and the order will not appear in the list of orders to be invoiced, which can be consulted from the ‘To invoice’ menu.

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/account-invoicing/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/account-invoicing/issues/new?body=module:%20sale_order_type_whole_delivered_invoiceability%0Aversion:%2015.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
~~~~~~~

* Tecnativa

Contributors
~~~~~~~~~~~~

* `Tecnativa <https://www.tecnativa.com>`__:

* Pedro M. Baeza
* Pilar Vargas

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/account-invoicing <https://github.com/OCA/account-invoicing/tree/15.0/sale_order_type_whole_delivered_invoiceability>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
3 changes: 3 additions & 0 deletions sale_order_type_whole_delivered_invoiceability/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from . import models
14 changes: 14 additions & 0 deletions sale_order_type_whole_delivered_invoiceability/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright 2024 Tecnativa - Pilar Vargas
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Sale Order Type Whole Delivered Invoiceability",
"version": "15.0.1.0.0",
"category": "Sales Management",
"license": "AGPL-3",
"author": "Tecnativa, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/account-invoicing",
"depends": ["sale_order_type", "sale_order_whole_delivered_invoiceability"],
"data": ["views/sale_order_type_views.xml"],
"installable": True,
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from . import sale_order_type
from . import sale_order
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright 2024 Tecnativa - Pilar Vargas
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, models


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

@api.depends("type_id")
def _compute_whole_delivered_invoiceability(self):
res = super()._compute_whole_delivered_invoiceability()
for record in self:
if record.type_id.whole_delivered_invoiceability:
record.whole_delivered_invoiceability = True
return res
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Copyright 2024 Tecnativa - Pilar Vargas
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import fields, models


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

whole_delivered_invoiceability = fields.Boolean(
help="Prevent invoicing until everything has been delivered."
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#. Create or modify a sales order type.
#. Activate the option ‘Whole Delivered Invoiceability’.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
* `Tecnativa <https://www.tecnativa.com>`__:

* Pedro M. Baeza
* Pilar Vargas
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
This module extends the functionality of the sale_order_whole_delivered_invoiceability
module by adding the option to prevent the invoicing of sales orders until all material
has been delivered on the sales order types, being propagated from them where they
are used in the sales order.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
To use this module you need to:

#. Create a sales order.
#. Set the above sales order type.
#. Do a partial delivery.

Although it is possible to create an invoice from the order itself, the ‘Create invoice’ button will remain white and the order will not appear in the list of orders to be invoiced, which can be consulted from the ‘To invoice’ menu.
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 6f7fcc8

Please sign in to comment.