-
-
Notifications
You must be signed in to change notification settings - Fork 681
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by pedrobaeza
- Loading branch information
Showing
17 changed files
with
662 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
14
sale_order_type_whole_delivered_invoiceability/__manifest__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
} |
3 changes: 3 additions & 0 deletions
3
sale_order_type_whole_delivered_invoiceability/models/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
15 changes: 15 additions & 0 deletions
15
sale_order_type_whole_delivered_invoiceability/models/sale_order.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
12 changes: 12 additions & 0 deletions
12
sale_order_type_whole_delivered_invoiceability/models/sale_order_type.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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." | ||
) |
2 changes: 2 additions & 0 deletions
2
sale_order_type_whole_delivered_invoiceability/readme/CONFIGURE.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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’. |
4 changes: 4 additions & 0 deletions
4
sale_order_type_whole_delivered_invoiceability/readme/CONTRIBUTORS.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
* `Tecnativa <https://www.tecnativa.com>`__: | ||
|
||
* Pedro M. Baeza | ||
* Pilar Vargas |
4 changes: 4 additions & 0 deletions
4
sale_order_type_whole_delivered_invoiceability/readme/DESCRIPTION.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
7 changes: 7 additions & 0 deletions
7
sale_order_type_whole_delivered_invoiceability/readme/USAGE.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
Binary file added
BIN
+9.23 KB
sale_order_type_whole_delivered_invoiceability/static/description/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.