Skip to content
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
106 changes: 106 additions & 0 deletions sale_force_whole_invoiceability/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
===============================
Sale Force Whole Invoiceability
===============================

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

.. |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/17.0/sale_force_whole_invoiceability
: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-17-0/sale-workflow-17-0-sale_force_whole_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/sale-workflow&target_branch=17.0
:alt: Try me on Runboat

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

This module allows to the sale managers to force all the lines to
invoice independently of the invoice policy and the delivered quantities
of the products.

**Table of contents**

.. contents::
:local:

Usage
=====

To use this module, you need to:

1. Make a sale order with products with a delivered quantities invoice
policy.
2. Confirm the order.
3. If you try to invoice the order, you can't as the quantities aren't
delivered.
4. But if you are a Sales Manager, you have a new button *Force Invoice
Policy*
5. Once clicked, you can invoice all the lines as if they were already
delivered.

Known issues / Roadmap
======================

- Modifiying the original demand after the forcing could lead to
misscalculations.

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_force_whole_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>`__:

- David Vidal

- `Sygel <https://www.sygel.es>`__:

- Valentín Vinagre
- Roger Sans

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/17.0/sale_force_whole_invoiceability>`_ 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_force_whole_invoiceability/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
13 changes: 13 additions & 0 deletions sale_force_whole_invoiceability/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright 2021 Tecnativa - David Vidal
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": "Sale Force Whole Invoiceability",
"version": "18.0.1.0.0",
"category": "Sales",
"author": "Tecnativa," "Odoo Community Association (OCA)",
"website": "https://github.com/OCA/sale-workflow",
"license": "AGPL-3",
"depends": ["sale"],
"data": ["views/sale_order_views.xml"],
"installable": True,
}
57 changes: 57 additions & 0 deletions sale_force_whole_invoiceability/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * sale_force_whole_invoiceability
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-02-05 16:06+0000\n"
"PO-Revision-Date: 2023-07-25 11:09+0000\n"
"Last-Translator: Ivorra78 <[email protected]>\n"
"Language-Team: \n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.17\n"

#. module: sale_force_whole_invoiceability
#: model_terms:ir.ui.view,arch_db:sale_force_whole_invoiceability.view_order_form
msgid "Force Invoice Policy"
msgstr "Forzar Política de Facturación"

#. module: sale_force_whole_invoiceability
#. odoo-python
#: code:addons/sale_force_whole_invoiceability/models/sale_order.py:0
#, python-format
msgid "Only Sales Managers are allowed to force the lines to invoice"
msgstr ""
"Solo los Responsables de Ventas tienen permiso para forzar las líneas a "
"facturar"

#. module: sale_force_whole_invoiceability
#: model:ir.model,name:sale_force_whole_invoiceability.model_sale_order
msgid "Sales Order"
msgstr "Órdenes de venta"

#. module: sale_force_whole_invoiceability
#. odoo-python
#: code:addons/sale_force_whole_invoiceability/models/sale_order.py:0
#, python-format
msgid ""
"You can't perform this action once the order has been invoiced once already"
msgstr ""
"No puedes ejecutar esta acción una vez que el pedido ya ha sido facturado "
"una vez"

#. module: sale_force_whole_invoiceability
#. odoo-python
#: code:addons/sale_force_whole_invoiceability/models/sale_order.py:0
#, python-format
msgid "You can't perform this action over a sale order in this state"
msgstr "No puedes ejecutar esta acción sobre una venta que está en este estado"

#~ msgid "Sale Order"
#~ msgstr "Pedido de venta"
53 changes: 53 additions & 0 deletions sale_force_whole_invoiceability/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * sale_force_whole_invoiceability
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 17.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2024-07-30 08:58+0000\n"
"Last-Translator: mymage <[email protected]>\n"
"Language-Team: none\n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 5.6.2\n"

#. module: sale_force_whole_invoiceability
#: model_terms:ir.ui.view,arch_db:sale_force_whole_invoiceability.view_order_form
msgid "Force Invoice Policy"
msgstr "Forza politica fattura"

#. module: sale_force_whole_invoiceability
#. odoo-python
#: code:addons/sale_force_whole_invoiceability/models/sale_order.py:0
#, python-format
msgid "Only Sales Managers are allowed to force the lines to invoice"
msgstr ""
"Solo i responsabili vendite sono autorizzati a forzare le righe da fatturare"

#. module: sale_force_whole_invoiceability
#: model:ir.model,name:sale_force_whole_invoiceability.model_sale_order
msgid "Sales Order"
msgstr "Ordine di vendita"

#. module: sale_force_whole_invoiceability
#. odoo-python
#: code:addons/sale_force_whole_invoiceability/models/sale_order.py:0
#, python-format
msgid ""
"You can't perform this action once the order has been invoiced once already"
msgstr ""
"Non si può eseguire questa azione una volta che l'ordine è stato già "
"fatturato"

#. module: sale_force_whole_invoiceability
#. odoo-python
#: code:addons/sale_force_whole_invoiceability/models/sale_order.py:0
#, python-format
msgid "You can't perform this action over a sale order in this state"
msgstr ""
"Non si può eseguire questa azione su un ordine di vendita in questo stato"
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * sale_force_whole_invoiceability
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 17.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_force_whole_invoiceability
#: model_terms:ir.ui.view,arch_db:sale_force_whole_invoiceability.view_order_form
msgid "Force Invoice Policy"
msgstr ""

#. module: sale_force_whole_invoiceability
#. odoo-python
#: code:addons/sale_force_whole_invoiceability/models/sale_order.py:0
#, python-format
msgid "Only Sales Managers are allowed to force the lines to invoice"
msgstr ""

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

#. module: sale_force_whole_invoiceability
#. odoo-python
#: code:addons/sale_force_whole_invoiceability/models/sale_order.py:0
#, python-format
msgid ""
"You can't perform this action once the order has been invoiced once already"
msgstr ""

#. module: sale_force_whole_invoiceability
#. odoo-python
#: code:addons/sale_force_whole_invoiceability/models/sale_order.py:0
#, python-format
msgid "You can't perform this action over a sale order in this state"
msgstr ""
1 change: 1 addition & 0 deletions sale_force_whole_invoiceability/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import sale_order
31 changes: 31 additions & 0 deletions sale_force_whole_invoiceability/models/sale_order.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Copyright 2021 Tecnativa - David Vidal
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import models
from odoo.exceptions import UserError


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

def force_lines_to_invoice_policy_order(self):
"""Wrapper to launch the private method from UI"""
if not self.env.user.has_group("sales_team.group_sale_manager"):
raise UserError(
self.env._(
"Only Sales Managers are allowed to force the lines to invoice"
)
)
if self.state != "sale":
raise UserError(
self.env._(
"You can't perform this action over a sale order in this state"
)
)
if self.invoice_count:
raise UserError(
self.env._(
"You can't perform this action once the order has been "
"invoiced once already"
)
)
self._force_lines_to_invoice_policy_order()
3 changes: 3 additions & 0 deletions sale_force_whole_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"
6 changes: 6 additions & 0 deletions sale_force_whole_invoiceability/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
- [Tecnativa](https://www.tecnativa.com):
- David Vidal

- [Sygel](https://www.sygel.es):
- Valentín Vinagre
- Roger Sans
3 changes: 3 additions & 0 deletions sale_force_whole_invoiceability/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
This module allows to the sale managers to force all the lines to
invoice independently of the invoice policy and the delivered quantities
of the products.
2 changes: 2 additions & 0 deletions sale_force_whole_invoiceability/readme/ROADMAP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Modifiying the original demand after the forcing could lead to
misscalculations.
11 changes: 11 additions & 0 deletions sale_force_whole_invoiceability/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
To use this module, you need to:

1. Make a sale order with products with a delivered quantities invoice
policy.
2. Confirm the order.
3. If you try to invoice the order, you can't as the quantities aren't
delivered.
4. But if you are a Sales Manager, you have a new button *Force Invoice
Policy*
5. Once clicked, you can invoice all the lines as if they were already
delivered.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading