Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[17.0][MIG] sale_order_type_whole_delivered_invoiceability: Migration to version 17.0 #1878

Open
wants to merge 5 commits into
base: 17.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
103 changes: 103 additions & 0 deletions sale_order_type_whole_delivered_invoiceability/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
==============================================
Sale Order Type Whole Delivered Invoiceability
==============================================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:5fd6d7c405509791b87a940bcf8a15a660daea5e2a41501ec03c63a6ffd71ae8
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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/17.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-17-0/account-invoicing-17-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=17.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
=============

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

Usage
=====

To use this module you need to:

1. Create a sales order.
2. Set the above sales order type.
3. 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:%2017.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/17.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": "17.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,34 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * sale_order_type_whole_delivered_invoiceability
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 15.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: sale_order_type_whole_delivered_invoiceability
#: model:ir.model.fields,help:sale_order_type_whole_delivered_invoiceability.field_sale_order_type__whole_delivered_invoiceability
msgid "Prevent invoicing until everything has been delivered."
msgstr ""

#. module: sale_order_type_whole_delivered_invoiceability
#: model:ir.model,name:sale_order_type_whole_delivered_invoiceability.model_sale_order
msgid "Sales Order"
msgstr ""

#. module: sale_order_type_whole_delivered_invoiceability
#: model:ir.model,name:sale_order_type_whole_delivered_invoiceability.model_sale_order_type
msgid "Type of sale order"
msgstr ""

#. module: sale_order_type_whole_delivered_invoiceability
#: model:ir.model.fields,field_description:sale_order_type_whole_delivered_invoiceability.field_sale_order_type__whole_delivered_invoiceability
msgid "Whole Delivered Invoiceability"
msgstr ""
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."
)
3 changes: 3 additions & 0 deletions sale_order_type_whole_delivered_invoiceability/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
1. Create or modify a sales order type.
2. Activate the option ‘Whole Delivered Invoiceability’.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- [Tecnativa](https://www.tecnativa.com):
- Pedro M. Baeza
- Pilar Vargas
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
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.
10 changes: 10 additions & 0 deletions sale_order_type_whole_delivered_invoiceability/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
To use this module you need to:

1. Create a sales order.
2. Set the above sales order type.
3. 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
Loading