Initial commit: Odoo 18.0-20251222 extra-addons
Some checks failed
pre-commit / pre-commit (push) Has been cancelled
tests / Detect unreleased dependencies (push) Has been cancelled
tests / test with OCB (push) Has been cancelled
tests / test with Odoo (push) Has been cancelled

This commit is contained in:
tocmo0nlord
2026-03-13 20:43:25 +00:00
parent 36e847a7df
commit adbe430761
9472 changed files with 1265727 additions and 0 deletions

101
sale_invoice_blocking/README.rst Executable file
View File

@@ -0,0 +1,101 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association
=====================
Sale Invoice Blocking
=====================
..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:ebe242f955f0b304048603bf5dea6f5e2c98970eabe2d8ff9cfe7de291974a87
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |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/license-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/18.0/sale_invoice_blocking
: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-18-0/sale-workflow-18-0-sale_invoice_blocking
: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=18.0
:alt: Try me on Runboat
|badge1| |badge2| |badge3| |badge4| |badge5|
This module extends the functionality of sales to allow you to block the
creation of invoices from a sales order and give a reason.
**Table of contents**
.. contents::
:local:
Configuration
=============
To configure this module, you need to:
1. Go to 'Sales > Configuration > Sales Orders > Invoicing block
reasons'.
2. Create the different reasons that can lead to block the invoices of a
sales order.
Usage
=====
To use this module, you need to:
1. Create a new sale order and provide a 'Blocking for invoicing'.
2. When you try to create Regular Invoice if an invoicing blocking
reason is set on the sale order. It will show blocking reasons.
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_blocking%0Aversion:%2018.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
-------
* Camptocamp
Contributors
------------
- Damien Crier <damien.crier@camptocamp.com>
- Dhara Solanki <dhara.solanki@initos.com>
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/18.0/sale_invoice_blocking>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

View File

@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from . import models

View File

@@ -0,0 +1,21 @@
# Copyright 2021 Camptocamp SA
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": "Sale Invoice Blocking",
"summary": "Allow you to block the creation of invoices from a sale order.",
"version": "18.0.1.0.0",
"author": "Camptocamp, " "Odoo Community Association (OCA)",
"website": "https://github.com/OCA/sale-workflow",
"category": "Sales",
"depends": ["sale", "sales_team"],
"data": [
"security/ir.model.access.csv",
"views/sale_invoice_blocking_reason_view.xml",
"views/sale_order.xml",
"views/menus.xml",
],
"license": "AGPL-3",
"installable": True,
"application": False,
}

View File

@@ -0,0 +1,98 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * sale_invoice_blocking
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2021-11-22 10:36+0000\n"
"Last-Translator: jabelchi <jabelchi@gmail.com>\n"
"Language-Team: none\n"
"Language: ca\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.3.2\n"
#. module: sale_invoice_blocking
#: code:addons/sale_invoice_blocking/models/sale_order.py:0
#, python-format
msgid ""
"\n"
"- You may have an invoice blocking reason on the sale order\n"
" "
msgstr ""
"\n"
"- Cal que tingueu un motiu de bloqueig a la comanda de venda\n"
" "
#. module: sale_invoice_blocking
#: model:ir.model.fields,field_description:sale_invoice_blocking.field_sale_order__invoice_blocking_reason_id
msgid "Blocking for invoicing"
msgstr "Bloqueig de facturació"
#. module: sale_invoice_blocking
#: model:ir.model.fields,field_description:sale_invoice_blocking.field_invoice_blocking_reason__create_uid
msgid "Created by"
msgstr "Creat per"
#. module: sale_invoice_blocking
#: model:ir.model.fields,field_description:sale_invoice_blocking.field_invoice_blocking_reason__create_date
msgid "Created on"
msgstr "Creat el"
#. module: sale_invoice_blocking
#: model:ir.model.fields,field_description:sale_invoice_blocking.field_invoice_blocking_reason__display_name
#: model:ir.model.fields,field_description:sale_invoice_blocking.field_sale_order__display_name
msgid "Display Name"
msgstr "Nom a mostrar"
#. module: sale_invoice_blocking
#: model:ir.model.fields,field_description:sale_invoice_blocking.field_invoice_blocking_reason__id
#: model:ir.model.fields,field_description:sale_invoice_blocking.field_sale_order__id
msgid "ID"
msgstr "ID"
#. module: sale_invoice_blocking
#: model:ir.actions.act_window,name:sale_invoice_blocking.invoice_blocking_reason_action
#: model:ir.ui.menu,name:sale_invoice_blocking.menu_invoice_blocking_reason
msgid "Invoicing block reasons"
msgstr "Motius de bloqueig de facturació"
#. module: sale_invoice_blocking
#: model:ir.model.fields,field_description:sale_invoice_blocking.field_invoice_blocking_reason____last_update
#: model:ir.model.fields,field_description:sale_invoice_blocking.field_sale_order____last_update
msgid "Last Modified on"
msgstr "Darrera modificació el"
#. module: sale_invoice_blocking
#: model:ir.model.fields,field_description:sale_invoice_blocking.field_invoice_blocking_reason__write_uid
msgid "Last Updated by"
msgstr "Darrera actualització per"
#. module: sale_invoice_blocking
#: model:ir.model.fields,field_description:sale_invoice_blocking.field_invoice_blocking_reason__write_date
msgid "Last Updated on"
msgstr "Darrera actualització el"
#. module: sale_invoice_blocking
#: model:ir.model.fields,field_description:sale_invoice_blocking.field_invoice_blocking_reason__name
msgid "Reason"
msgstr "Motiu"
#. module: sale_invoice_blocking
#: model:ir.model,name:sale_invoice_blocking.model_invoice_blocking_reason
msgid "Sale invoice blocking reason"
msgstr "Motiu de bloqueig de facturació"
#. module: sale_invoice_blocking
#: model:ir.model,name:sale_invoice_blocking.model_sale_order
msgid "Sales Order"
msgstr "Comanda de venda"
#. module: sale_invoice_blocking
#: model:ir.model.constraint,message:sale_invoice_blocking.constraint_invoice_blocking_reason_name_uniq
msgid "You cannot have two invoice blocking reasons with the same name."
msgstr "No podeu tenir dos motius de bloqueig amb el mateix nom."

View File

@@ -0,0 +1,98 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * sale_invoice_blocking
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2021-11-22 10:36+0000\n"
"Last-Translator: jabelchi <jabelchi@gmail.com>\n"
"Language-Team: none\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.3.2\n"
#. module: sale_invoice_blocking
#: code:addons/sale_invoice_blocking/models/sale_order.py:0
#, python-format
msgid ""
"\n"
"- You may have an invoice blocking reason on the sale order\n"
" "
msgstr ""
"\n"
"- Debe tener un motivo de bloqueo en el pedido de venta\n"
" "
#. module: sale_invoice_blocking
#: model:ir.model.fields,field_description:sale_invoice_blocking.field_sale_order__invoice_blocking_reason_id
msgid "Blocking for invoicing"
msgstr "Bloqueo de facturación"
#. module: sale_invoice_blocking
#: model:ir.model.fields,field_description:sale_invoice_blocking.field_invoice_blocking_reason__create_uid
msgid "Created by"
msgstr "Creado por"
#. module: sale_invoice_blocking
#: model:ir.model.fields,field_description:sale_invoice_blocking.field_invoice_blocking_reason__create_date
msgid "Created on"
msgstr "Creado el"
#. module: sale_invoice_blocking
#: model:ir.model.fields,field_description:sale_invoice_blocking.field_invoice_blocking_reason__display_name
#: model:ir.model.fields,field_description:sale_invoice_blocking.field_sale_order__display_name
msgid "Display Name"
msgstr "Nombre a mostrar"
#. module: sale_invoice_blocking
#: model:ir.model.fields,field_description:sale_invoice_blocking.field_invoice_blocking_reason__id
#: model:ir.model.fields,field_description:sale_invoice_blocking.field_sale_order__id
msgid "ID"
msgstr "ID"
#. module: sale_invoice_blocking
#: model:ir.actions.act_window,name:sale_invoice_blocking.invoice_blocking_reason_action
#: model:ir.ui.menu,name:sale_invoice_blocking.menu_invoice_blocking_reason
msgid "Invoicing block reasons"
msgstr "Motivos de bloqueo de facturación"
#. module: sale_invoice_blocking
#: model:ir.model.fields,field_description:sale_invoice_blocking.field_invoice_blocking_reason____last_update
#: model:ir.model.fields,field_description:sale_invoice_blocking.field_sale_order____last_update
msgid "Last Modified on"
msgstr "Última modificación el"
#. module: sale_invoice_blocking
#: model:ir.model.fields,field_description:sale_invoice_blocking.field_invoice_blocking_reason__write_uid
msgid "Last Updated by"
msgstr "Última actualización por"
#. module: sale_invoice_blocking
#: model:ir.model.fields,field_description:sale_invoice_blocking.field_invoice_blocking_reason__write_date
msgid "Last Updated on"
msgstr "Última actualización el"
#. module: sale_invoice_blocking
#: model:ir.model.fields,field_description:sale_invoice_blocking.field_invoice_blocking_reason__name
msgid "Reason"
msgstr "Motivo"
#. module: sale_invoice_blocking
#: model:ir.model,name:sale_invoice_blocking.model_invoice_blocking_reason
msgid "Sale invoice blocking reason"
msgstr "Motivo de bloqueo de facturación"
#. module: sale_invoice_blocking
#: model:ir.model,name:sale_invoice_blocking.model_sale_order
msgid "Sales Order"
msgstr "Pedido de venta"
#. module: sale_invoice_blocking
#: model:ir.model.constraint,message:sale_invoice_blocking.constraint_invoice_blocking_reason_name_uniq
msgid "You cannot have two invoice blocking reasons with the same name."
msgstr "No puede tener dos motivos de bloqueo con el mismo nombre."

View File

@@ -0,0 +1,93 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * sale_invoice_blocking
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
"Language: es_PA\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"
#. module: sale_invoice_blocking
#: code:addons/sale_invoice_blocking/models/sale_order.py:0
#, python-format
msgid ""
"\n"
"- You may have an invoice blocking reason on the sale order\n"
" "
msgstr ""
#. module: sale_invoice_blocking
#: model:ir.model.fields,field_description:sale_invoice_blocking.field_sale_order__invoice_blocking_reason_id
msgid "Blocking for invoicing"
msgstr ""
#. module: sale_invoice_blocking
#: model:ir.model.fields,field_description:sale_invoice_blocking.field_invoice_blocking_reason__create_uid
msgid "Created by"
msgstr ""
#. module: sale_invoice_blocking
#: model:ir.model.fields,field_description:sale_invoice_blocking.field_invoice_blocking_reason__create_date
msgid "Created on"
msgstr ""
#. module: sale_invoice_blocking
#: model:ir.model.fields,field_description:sale_invoice_blocking.field_invoice_blocking_reason__display_name
#: model:ir.model.fields,field_description:sale_invoice_blocking.field_sale_order__display_name
msgid "Display Name"
msgstr ""
#. module: sale_invoice_blocking
#: model:ir.model.fields,field_description:sale_invoice_blocking.field_invoice_blocking_reason__id
#: model:ir.model.fields,field_description:sale_invoice_blocking.field_sale_order__id
msgid "ID"
msgstr ""
#. module: sale_invoice_blocking
#: model:ir.actions.act_window,name:sale_invoice_blocking.invoice_blocking_reason_action
#: model:ir.ui.menu,name:sale_invoice_blocking.menu_invoice_blocking_reason
msgid "Invoicing block reasons"
msgstr ""
#. module: sale_invoice_blocking
#: model:ir.model.fields,field_description:sale_invoice_blocking.field_invoice_blocking_reason____last_update
#: model:ir.model.fields,field_description:sale_invoice_blocking.field_sale_order____last_update
msgid "Last Modified on"
msgstr ""
#. module: sale_invoice_blocking
#: model:ir.model.fields,field_description:sale_invoice_blocking.field_invoice_blocking_reason__write_uid
msgid "Last Updated by"
msgstr ""
#. module: sale_invoice_blocking
#: model:ir.model.fields,field_description:sale_invoice_blocking.field_invoice_blocking_reason__write_date
msgid "Last Updated on"
msgstr ""
#. module: sale_invoice_blocking
#: model:ir.model.fields,field_description:sale_invoice_blocking.field_invoice_blocking_reason__name
msgid "Reason"
msgstr ""
#. module: sale_invoice_blocking
#: model:ir.model,name:sale_invoice_blocking.model_invoice_blocking_reason
msgid "Sale invoice blocking reason"
msgstr ""
#. module: sale_invoice_blocking
#: model:ir.model,name:sale_invoice_blocking.model_sale_order
msgid "Sales Order"
msgstr ""
#. module: sale_invoice_blocking
#: model:ir.model.constraint,message:sale_invoice_blocking.constraint_invoice_blocking_reason_name_uniq
msgid "You cannot have two invoice blocking reasons with the same name."
msgstr ""

100
sale_invoice_blocking/i18n/fr.po Executable file
View File

@@ -0,0 +1,100 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * sale_invoice_blocking
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0+e\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-05-25 07:02+0000\n"
"PO-Revision-Date: 2021-05-25 07:02+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: sale_invoice_blocking
#: code:addons/sale_invoice_blocking/models/sale_order.py:0
#, python-format
msgid ""
"\n"
"- You may have an invoice blocking reason on the sale order\n"
" "
msgstr ""
"\n"
"- Vous avez un motif de blocage de la facturation sur le bon de commande\n"
" "
#. module: sale_invoice_blocking
#: model:ir.model.fields,field_description:sale_invoice_blocking.field_sale_order__invoice_blocking_reason_id
msgid "Blocking for invoicing"
msgstr "Blocage pour facturation"
#. module: sale_invoice_blocking
#: model:ir.model.fields,field_description:sale_invoice_blocking.field_invoice_blocking_reason__create_uid
msgid "Created by"
msgstr "Créé par"
#. module: sale_invoice_blocking
#: model:ir.model.fields,field_description:sale_invoice_blocking.field_invoice_blocking_reason__create_date
msgid "Created on"
msgstr "Créé le"
#. module: sale_invoice_blocking
#: model:ir.model.fields,field_description:sale_invoice_blocking.field_invoice_blocking_reason__display_name
#: model:ir.model.fields,field_description:sale_invoice_blocking.field_sale_order__display_name
msgid "Display Name"
msgstr "Nom affiché"
#. module: sale_invoice_blocking
#: model:ir.model.fields,field_description:sale_invoice_blocking.field_invoice_blocking_reason__id
#: model:ir.model.fields,field_description:sale_invoice_blocking.field_sale_order__id
msgid "ID"
msgstr ""
#. module: sale_invoice_blocking
#: model:ir.actions.act_window,name:sale_invoice_blocking.invoice_blocking_reason_action
#: model:ir.ui.menu,name:sale_invoice_blocking.menu_invoice_blocking_reason
msgid "Invoicing block reasons"
msgstr "Motifs de blocage de la facturation"
#. module: sale_invoice_blocking
#: model:ir.model.fields,field_description:sale_invoice_blocking.field_invoice_blocking_reason____last_update
#: model:ir.model.fields,field_description:sale_invoice_blocking.field_sale_order____last_update
msgid "Last Modified on"
msgstr "Dernière modification le"
#. module: sale_invoice_blocking
#: model:ir.model.fields,field_description:sale_invoice_blocking.field_invoice_blocking_reason__write_uid
msgid "Last Updated by"
msgstr "Dernière modification par"
#. module: sale_invoice_blocking
#: model:ir.model.fields,field_description:sale_invoice_blocking.field_invoice_blocking_reason__write_date
msgid "Last Updated on"
msgstr "Dernière modification le"
#. module: sale_invoice_blocking
#: model:ir.model.fields,field_description:sale_invoice_blocking.field_invoice_blocking_reason__name
msgid "Reason"
msgstr "Motif"
#. module: sale_invoice_blocking
#: model:ir.model,name:sale_invoice_blocking.model_invoice_blocking_reason
msgid "Sale invoice blocking reason"
msgstr "Motif de blocage de la facturation"
#. module: sale_invoice_blocking
#: model:ir.model,name:sale_invoice_blocking.model_sale_order
msgid "Sales Order"
msgstr "Bon de commande"
#. module: sale_invoice_blocking
#: model:ir.model.constraint,message:sale_invoice_blocking.constraint_invoice_blocking_reason_name_uniq
msgid "You cannot have two invoice blocking reasons with the same name."
msgstr ""
"Vous ne pouvez pas avoir deux motifs de blocage de facturation avec le même "
"nom."

View File

@@ -0,0 +1,89 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * sale_invoice_blocking
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 18.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2025-08-25 14:25+0000\n"
"Last-Translator: mymage <stefano.consolaro@mymage.it>\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.10.4\n"
#. module: sale_invoice_blocking
#. odoo-python
#: code:addons/sale_invoice_blocking/models/sale_order.py:0
msgid ""
"\n"
"- You may have an invoice blocking reason on the sale order"
msgstr ""
"\n"
"- Si potrebbe avere un motivo di blocco della fattura nell'ordine di vendita"
#. module: sale_invoice_blocking
#: model:ir.model.fields,field_description:sale_invoice_blocking.field_sale_order__invoice_blocking_reason_id
msgid "Blocking for invoicing"
msgstr "Bloccante per la fatturazione"
#. module: sale_invoice_blocking
#: model:ir.model.fields,field_description:sale_invoice_blocking.field_invoice_blocking_reason__create_uid
msgid "Created by"
msgstr "Creato da"
#. module: sale_invoice_blocking
#: model:ir.model.fields,field_description:sale_invoice_blocking.field_invoice_blocking_reason__create_date
msgid "Created on"
msgstr "Creato il"
#. module: sale_invoice_blocking
#: model:ir.model.fields,field_description:sale_invoice_blocking.field_invoice_blocking_reason__display_name
msgid "Display Name"
msgstr "Nome visualizzato"
#. module: sale_invoice_blocking
#: model:ir.model.fields,field_description:sale_invoice_blocking.field_invoice_blocking_reason__id
msgid "ID"
msgstr "ID"
#. module: sale_invoice_blocking
#: model:ir.actions.act_window,name:sale_invoice_blocking.invoice_blocking_reason_action
#: model:ir.ui.menu,name:sale_invoice_blocking.menu_invoice_blocking_reason
msgid "Invoicing block reasons"
msgstr "Motivi blocco fatturazione"
#. module: sale_invoice_blocking
#: model:ir.model.fields,field_description:sale_invoice_blocking.field_invoice_blocking_reason__write_uid
msgid "Last Updated by"
msgstr "Ultimo aggiornamento di"
#. module: sale_invoice_blocking
#: model:ir.model.fields,field_description:sale_invoice_blocking.field_invoice_blocking_reason__write_date
msgid "Last Updated on"
msgstr "Ultimo aggiornamento il"
#. module: sale_invoice_blocking
#: model:ir.model.fields,field_description:sale_invoice_blocking.field_invoice_blocking_reason__name
msgid "Reason"
msgstr "Motivo"
#. module: sale_invoice_blocking
#: model:ir.model,name:sale_invoice_blocking.model_invoice_blocking_reason
msgid "Sale invoice blocking reason"
msgstr "Motivo blocco fatturazione vendite"
#. module: sale_invoice_blocking
#: model:ir.model,name:sale_invoice_blocking.model_sale_order
msgid "Sales Order"
msgstr "Ordine di vendita"
#. module: sale_invoice_blocking
#: model:ir.model.constraint,message:sale_invoice_blocking.constraint_invoice_blocking_reason_name_uniq
msgid "You cannot have two invoice blocking reasons with the same name."
msgstr ""
"Non si possono avere due motivi di blocco fatturazione con lo stesso nome."

View File

@@ -0,0 +1,83 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * sale_invoice_blocking
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 18.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_invoice_blocking
#. odoo-python
#: code:addons/sale_invoice_blocking/models/sale_order.py:0
msgid ""
"\n"
"- You may have an invoice blocking reason on the sale order"
msgstr ""
#. module: sale_invoice_blocking
#: model:ir.model.fields,field_description:sale_invoice_blocking.field_sale_order__invoice_blocking_reason_id
msgid "Blocking for invoicing"
msgstr ""
#. module: sale_invoice_blocking
#: model:ir.model.fields,field_description:sale_invoice_blocking.field_invoice_blocking_reason__create_uid
msgid "Created by"
msgstr ""
#. module: sale_invoice_blocking
#: model:ir.model.fields,field_description:sale_invoice_blocking.field_invoice_blocking_reason__create_date
msgid "Created on"
msgstr ""
#. module: sale_invoice_blocking
#: model:ir.model.fields,field_description:sale_invoice_blocking.field_invoice_blocking_reason__display_name
msgid "Display Name"
msgstr ""
#. module: sale_invoice_blocking
#: model:ir.model.fields,field_description:sale_invoice_blocking.field_invoice_blocking_reason__id
msgid "ID"
msgstr ""
#. module: sale_invoice_blocking
#: model:ir.actions.act_window,name:sale_invoice_blocking.invoice_blocking_reason_action
#: model:ir.ui.menu,name:sale_invoice_blocking.menu_invoice_blocking_reason
msgid "Invoicing block reasons"
msgstr ""
#. module: sale_invoice_blocking
#: model:ir.model.fields,field_description:sale_invoice_blocking.field_invoice_blocking_reason__write_uid
msgid "Last Updated by"
msgstr ""
#. module: sale_invoice_blocking
#: model:ir.model.fields,field_description:sale_invoice_blocking.field_invoice_blocking_reason__write_date
msgid "Last Updated on"
msgstr ""
#. module: sale_invoice_blocking
#: model:ir.model.fields,field_description:sale_invoice_blocking.field_invoice_blocking_reason__name
msgid "Reason"
msgstr ""
#. module: sale_invoice_blocking
#: model:ir.model,name:sale_invoice_blocking.model_invoice_blocking_reason
msgid "Sale invoice blocking reason"
msgstr ""
#. module: sale_invoice_blocking
#: model:ir.model,name:sale_invoice_blocking.model_sale_order
msgid "Sales Order"
msgstr ""
#. module: sale_invoice_blocking
#: model:ir.model.constraint,message:sale_invoice_blocking.constraint_invoice_blocking_reason_name_uniq
msgid "You cannot have two invoice blocking reasons with the same name."
msgstr ""

View File

@@ -0,0 +1,2 @@
from . import invoice_blocking_reason
from . import sale_order

View File

@@ -0,0 +1,18 @@
# Copyright 2021 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class InvoiceBlockingReason(models.Model):
_name = "invoice.blocking.reason"
_description = "Sale invoice blocking reason"
name = fields.Char(string="Reason", required=True)
_sql_constraints = [
(
"name_uniq",
"unique (name)",
"You cannot have two invoice blocking reasons with the same name.",
)
]

View File

@@ -0,0 +1,36 @@
# Copyright 2021 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import _, api, fields, models
from odoo.exceptions import UserError
class SaleOrder(models.Model):
_inherit = "sale.order"
invoice_blocking_reason_id = fields.Many2one(
"invoice.blocking.reason",
string="Blocking for invoicing",
)
@api.depends("invoice_blocking_reason_id", "state", "order_line.invoice_status")
def _compute_invoice_status(self):
res = super()._compute_invoice_status()
for order in self.filtered(
lambda order: order.invoice_blocking_reason_id
and order.state in ("sale", "done")
):
order.invoice_status = "no"
return res
def _get_invoiceable_lines(self, final=False):
"""Return the invoiceable lines for order `self`."""
if self.invoice_blocking_reason_id:
return self.env["sale.order.line"]
return super()._get_invoiceable_lines(final=final)
def _nothing_to_invoice_error_message(self):
error = super()._nothing_to_invoice_error_message()
error += _("\n- You may have an invoice blocking reason on the sale order")
return UserError(error)

View File

@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"

View File

@@ -0,0 +1,6 @@
To configure this module, you need to:
1. Go to 'Sales \> Configuration \> Sales Orders \> Invoicing block
reasons'.
2. Create the different reasons that can lead to block the invoices of
a sales order.

View File

@@ -0,0 +1,2 @@
- Damien Crier \<<damien.crier@camptocamp.com>\>
- Dhara Solanki \<<dhara.solanki@initos.com>\>

View File

@@ -0,0 +1,2 @@
This module extends the functionality of sales to allow you to block the
creation of invoices from a sales order and give a reason.

View File

@@ -0,0 +1,5 @@
To use this module, you need to:
1. Create a new sale order and provide a 'Blocking for invoicing'.
2. When you try to create Regular Invoice if an invoicing blocking
reason is set on the sale order. It will show blocking reasons.

View File

@@ -0,0 +1,3 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_invoice_blocking_reason_base_user,invoice_blocking_reason base user,model_invoice_blocking_reason,base.group_user,1,0,0,0
access_invoice_blocking_reason_system,invoice_blocking_reason system,model_invoice_blocking_reason,sales_team.group_sale_manager,1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_invoice_blocking_reason_base_user invoice_blocking_reason base user model_invoice_blocking_reason base.group_user 1 0 0 0
3 access_invoice_blocking_reason_system invoice_blocking_reason system model_invoice_blocking_reason sales_team.group_sale_manager 1 1 1 1

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

View File

@@ -0,0 +1,452 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
<title>README.rst</title>
<style type="text/css">
/*
:Author: David Goodger (goodger@python.org)
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
:Copyright: This stylesheet has been placed in the public domain.
Default cascading style sheet for the HTML output of Docutils.
Despite the name, some widely supported CSS2 features are used.
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
customize this style sheet.
*/
/* used to remove borders from tables and images */
.borderless, table.borderless td, table.borderless th {
border: 0 }
table.borderless td, table.borderless th {
/* Override padding for "table.docutils td" with "! important".
The right padding separates the table cells. */
padding: 0 0.5em 0 0 ! important }
.first {
/* Override more specific margin styles with "! important". */
margin-top: 0 ! important }
.last, .with-subtitle {
margin-bottom: 0 ! important }
.hidden {
display: none }
.subscript {
vertical-align: sub;
font-size: smaller }
.superscript {
vertical-align: super;
font-size: smaller }
a.toc-backref {
text-decoration: none ;
color: black }
blockquote.epigraph {
margin: 2em 5em ; }
dl.docutils dd {
margin-bottom: 0.5em }
object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
overflow: hidden;
}
/* Uncomment (and remove this text!) to get bold-faced definition list terms
dl.docutils dt {
font-weight: bold }
*/
div.abstract {
margin: 2em 5em }
div.abstract p.topic-title {
font-weight: bold ;
text-align: center }
div.admonition, div.attention, div.caution, div.danger, div.error,
div.hint, div.important, div.note, div.tip, div.warning {
margin: 2em ;
border: medium outset ;
padding: 1em }
div.admonition p.admonition-title, div.hint p.admonition-title,
div.important p.admonition-title, div.note p.admonition-title,
div.tip p.admonition-title {
font-weight: bold ;
font-family: sans-serif }
div.attention p.admonition-title, div.caution p.admonition-title,
div.danger p.admonition-title, div.error p.admonition-title,
div.warning p.admonition-title, .code .error {
color: red ;
font-weight: bold ;
font-family: sans-serif }
/* Uncomment (and remove this text!) to get reduced vertical space in
compound paragraphs.
div.compound .compound-first, div.compound .compound-middle {
margin-bottom: 0.5em }
div.compound .compound-last, div.compound .compound-middle {
margin-top: 0.5em }
*/
div.dedication {
margin: 2em 5em ;
text-align: center ;
font-style: italic }
div.dedication p.topic-title {
font-weight: bold ;
font-style: normal }
div.figure {
margin-left: 2em ;
margin-right: 2em }
div.footer, div.header {
clear: both;
font-size: smaller }
div.line-block {
display: block ;
margin-top: 1em ;
margin-bottom: 1em }
div.line-block div.line-block {
margin-top: 0 ;
margin-bottom: 0 ;
margin-left: 1.5em }
div.sidebar {
margin: 0 0 0.5em 1em ;
border: medium outset ;
padding: 1em ;
background-color: #ffffee ;
width: 40% ;
float: right ;
clear: right }
div.sidebar p.rubric {
font-family: sans-serif ;
font-size: medium }
div.system-messages {
margin: 5em }
div.system-messages h1 {
color: red }
div.system-message {
border: medium outset ;
padding: 1em }
div.system-message p.system-message-title {
color: red ;
font-weight: bold }
div.topic {
margin: 2em }
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
margin-top: 0.4em }
h1.title {
text-align: center }
h2.subtitle {
text-align: center }
hr.docutils {
width: 75% }
img.align-left, .figure.align-left, object.align-left, table.align-left {
clear: left ;
float: left ;
margin-right: 1em }
img.align-right, .figure.align-right, object.align-right, table.align-right {
clear: right ;
float: right ;
margin-left: 1em }
img.align-center, .figure.align-center, object.align-center {
display: block;
margin-left: auto;
margin-right: auto;
}
table.align-center {
margin-left: auto;
margin-right: auto;
}
.align-left {
text-align: left }
.align-center {
clear: both ;
text-align: center }
.align-right {
text-align: right }
/* reset inner alignment in figures */
div.align-right {
text-align: inherit }
/* div.align-center * { */
/* text-align: left } */
.align-top {
vertical-align: top }
.align-middle {
vertical-align: middle }
.align-bottom {
vertical-align: bottom }
ol.simple, ul.simple {
margin-bottom: 1em }
ol.arabic {
list-style: decimal }
ol.loweralpha {
list-style: lower-alpha }
ol.upperalpha {
list-style: upper-alpha }
ol.lowerroman {
list-style: lower-roman }
ol.upperroman {
list-style: upper-roman }
p.attribution {
text-align: right ;
margin-left: 50% }
p.caption {
font-style: italic }
p.credits {
font-style: italic ;
font-size: smaller }
p.label {
white-space: nowrap }
p.rubric {
font-weight: bold ;
font-size: larger ;
color: maroon ;
text-align: center }
p.sidebar-title {
font-family: sans-serif ;
font-weight: bold ;
font-size: larger }
p.sidebar-subtitle {
font-family: sans-serif ;
font-weight: bold }
p.topic-title {
font-weight: bold }
pre.address {
margin-bottom: 0 ;
margin-top: 0 ;
font: inherit }
pre.literal-block, pre.doctest-block, pre.math, pre.code {
margin-left: 2em ;
margin-right: 2em }
pre.code .ln { color: gray; } /* line numbers */
pre.code, code { background-color: #eeeeee }
pre.code .comment, code .comment { color: #5C6576 }
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
pre.code .literal.string, code .literal.string { color: #0C5404 }
pre.code .name.builtin, code .name.builtin { color: #352B84 }
pre.code .deleted, code .deleted { background-color: #DEB0A1}
pre.code .inserted, code .inserted { background-color: #A3D289}
span.classifier {
font-family: sans-serif ;
font-style: oblique }
span.classifier-delimiter {
font-family: sans-serif ;
font-weight: bold }
span.interpreted {
font-family: sans-serif }
span.option {
white-space: nowrap }
span.pre {
white-space: pre }
span.problematic, pre.problematic {
color: red }
span.section-subtitle {
/* font-size relative to parent (h1..h6 element) */
font-size: 80% }
table.citation {
border-left: solid 1px gray;
margin-left: 1px }
table.docinfo {
margin: 2em 4em }
table.docutils {
margin-top: 0.5em ;
margin-bottom: 0.5em }
table.footnote {
border-left: solid 1px black;
margin-left: 1px }
table.docutils td, table.docutils th,
table.docinfo td, table.docinfo th {
padding-left: 0.5em ;
padding-right: 0.5em ;
vertical-align: top }
table.docutils th.field-name, table.docinfo th.docinfo-name {
font-weight: bold ;
text-align: left ;
white-space: nowrap ;
padding-left: 0 }
/* "booktabs" style (no vertical lines) */
table.docutils.booktabs {
border: 0px;
border-top: 2px solid;
border-bottom: 2px solid;
border-collapse: collapse;
}
table.docutils.booktabs * {
border: 0px;
}
table.docutils.booktabs th {
border-bottom: thin solid;
text-align: left;
}
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
font-size: 100% }
ul.auto-toc {
list-style-type: none }
</style>
</head>
<body>
<div class="document">
<a class="reference external image-reference" href="https://odoo-community.org/get-involved?utm_source=readme">
<img alt="Odoo Community Association" src="https://odoo-community.org/readme-banner-image" />
</a>
<div class="section" id="sale-invoice-blocking">
<h1>Sale Invoice Blocking</h1>
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:ebe242f955f0b304048603bf5dea6f5e2c98970eabe2d8ff9cfe7de291974a87
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/license-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/sale-workflow/tree/18.0/sale_invoice_blocking"><img alt="OCA/sale-workflow" src="https://img.shields.io/badge/github-OCA%2Fsale--workflow-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/sale-workflow-18-0/sale-workflow-18-0-sale_invoice_blocking"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/sale-workflow&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This module extends the functionality of sales to allow you to block the
creation of invoices from a sales order and give a reason.</p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
<ul class="simple">
<li><a class="reference internal" href="#configuration" id="toc-entry-1">Configuration</a></li>
<li><a class="reference internal" href="#usage" id="toc-entry-2">Usage</a></li>
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-3">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="toc-entry-4">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="toc-entry-5">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="toc-entry-6">Contributors</a></li>
<li><a class="reference internal" href="#maintainers" id="toc-entry-7">Maintainers</a></li>
</ul>
</li>
</ul>
</div>
<div class="section" id="configuration">
<h2><a class="toc-backref" href="#toc-entry-1">Configuration</a></h2>
<p>To configure this module, you need to:</p>
<ol class="arabic simple">
<li>Go to Sales &gt; Configuration &gt; Sales Orders &gt; Invoicing block
reasons.</li>
<li>Create the different reasons that can lead to block the invoices of a
sales order.</li>
</ol>
</div>
<div class="section" id="usage">
<h2><a class="toc-backref" href="#toc-entry-2">Usage</a></h2>
<p>To use this module, you need to:</p>
<ol class="arabic simple">
<li>Create a new sale order and provide a Blocking for invoicing.</li>
<li>When you try to create Regular Invoice if an invoicing blocking
reason is set on the sale order. It will show blocking reasons.</li>
</ol>
</div>
<div class="section" id="bug-tracker">
<h2><a class="toc-backref" href="#toc-entry-3">Bug Tracker</a></h2>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/sale-workflow/issues">GitHub Issues</a>.
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
<a class="reference external" href="https://github.com/OCA/sale-workflow/issues/new?body=module:%20sale_invoice_blocking%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
<h2><a class="toc-backref" href="#toc-entry-4">Credits</a></h2>
<div class="section" id="authors">
<h3><a class="toc-backref" href="#toc-entry-5">Authors</a></h3>
<ul class="simple">
<li>Camptocamp</li>
</ul>
</div>
<div class="section" id="contributors">
<h3><a class="toc-backref" href="#toc-entry-6">Contributors</a></h3>
<ul class="simple">
<li>Damien Crier &lt;<a class="reference external" href="mailto:damien.crier&#64;camptocamp.com">damien.crier&#64;camptocamp.com</a>&gt;</li>
<li>Dhara Solanki &lt;<a class="reference external" href="mailto:dhara.solanki&#64;initos.com">dhara.solanki&#64;initos.com</a>&gt;</li>
</ul>
</div>
<div class="section" id="maintainers">
<h3><a class="toc-backref" href="#toc-entry-7">Maintainers</a></h3>
<p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org">
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
</a>
<p>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.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/sale-workflow/tree/18.0/sale_invoice_blocking">OCA/sale-workflow</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div>
</div>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1 @@
from . import test_sale_invoice_blocking

View File

@@ -0,0 +1,86 @@
from psycopg2.errors import UniqueViolation
from odoo.exceptions import UserError
from odoo.tests.common import TransactionCase, mute_logger
class TestSaleInvoiceBlocking(TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.sale_order_model = cls.env["sale.order"]
cls.sale_order_line_model = cls.env["sale.order.line"]
# Data
product_ctg = cls._create_product_category()
cls.service_1 = cls._create_product("test_product1", product_ctg)
cls.service_2 = cls._create_product("test_product2", product_ctg)
cls.customer = cls._create_customer("Test Customer")
@classmethod
def _create_customer(cls, name):
"""Create a Partner."""
return cls.env["res.partner"].create(
{"name": name, "email": "example@yourcompany.com", "phone": 123456}
)
@classmethod
def _create_product_category(cls):
product_ctg = cls.env["product.category"].create({"name": "test_product_ctg"})
return product_ctg
@classmethod
def _create_product(cls, name, product_ctg):
product = cls.env["product.product"].create(
{
"name": name,
"categ_id": product_ctg.id,
"type": "service",
"invoice_policy": "order",
}
)
return product
@mute_logger("odoo.sql_db")
def test_duplicate_reason(self):
self.env["invoice.blocking.reason"].create({"name": "Test Reason"})
with self.assertRaises(UniqueViolation):
self.env["invoice.blocking.reason"].create({"name": "Test Reason"})
def test_sales_order_invoicing(self):
so = self.sale_order_model.create({"partner_id": self.customer.id})
sol1 = self.sale_order_line_model.create(
{"product_id": self.service_1.id, "product_uom_qty": 1, "order_id": so.id}
)
sol2 = self.sale_order_line_model.create(
{"product_id": self.service_2.id, "product_uom_qty": 2, "order_id": so.id}
)
# confirm quotation
so.action_confirm()
# update quantities delivered
sol1.qty_delivered = 1
sol2.qty_delivered = 2
self.assertEqual(
so.invoice_status, "to invoice", "The invoice status should be To Invoice"
)
so.invoice_blocking_reason_id = self.env["invoice.blocking.reason"].create(
{"name": "Test Reason"}
)
self.assertEqual(
so.invoice_status, "no", "The invoice status should be Nothing to Invoice"
)
with self.assertRaisesRegex(
UserError, "Cannot create an invoice. No items are available to invoice"
):
so._create_invoices()
so.invoice_blocking_reason_id = False
self.assertEqual(
so.invoice_status, "to invoice", "The invoice status should be To Invoice"
)
so._create_invoices()

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<menuitem
id="menu_invoice_blocking_reason"
parent="sale.menu_sales_config"
action="invoice_blocking_reason_action"
/>
</odoo>

View File

@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="invoice_blocking_reason_search_view" model="ir.ui.view">
<field name="name">invoice.blocking.reason.search</field>
<field name="model">invoice.blocking.reason</field>
<field name="arch" type="xml">
<search>
<field name="name" />
</search>
</field>
</record>
<record id="invoice_blocking_reason_form_view" model="ir.ui.view">
<field name="name">invoice.blocking.reason.form</field>
<field name="model">invoice.blocking.reason</field>
<field name="arch" type="xml">
<form class="oe_form_configuration">
<sheet>
<group name="first">
<field name="name" />
</group>
</sheet>
</form>
</field>
</record>
<record id="invoice_blocking_reason_list_view" model="ir.ui.view">
<field name="name">invoice.blocking.reason.list</field>
<field name="model">invoice.blocking.reason</field>
<field name="arch" type="xml">
<list>
<field name="name" />
</list>
</field>
</record>
<record id="invoice_blocking_reason_action" model="ir.actions.act_window">
<field name="name">Invoicing block reasons</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">invoice.blocking.reason</field>
<field name="search_view_id" ref="invoice_blocking_reason_search_view" />
<field name="view_id" ref="invoice_blocking_reason_list_view" />
<field name="view_mode">list,form</field>
</record>
</odoo>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="view_order_form_invoice_blocking_reason" model="ir.ui.view">
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_order_form" />
<field name="arch" type="xml">
<field name="client_order_ref" position="after">
<field name="invoice_blocking_reason_id" />
</field>
</field>
</record>
</odoo>