-
-
Notifications
You must be signed in to change notification settings - Fork 981
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
930 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,89 @@ | ||
================ | ||
Sale Warn Option | ||
================ | ||
|
||
.. | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! This file is generated by oca-gen-addon-readme !! | ||
!! changes will be overwritten. !! | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! source digest: sha256:4c2006b61d80b7abaac942c0a84e0be5c28ff7df347a1a1f249c738425a103c6 | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
.. |badge_devstat| image:: https://img.shields.io/badge/maturity-alpha-brightgreen.png | ||
:target: https://odoo-community.org/page/development-status | ||
:alt: Alpha | ||
|
||
.. |badge_license| image:: https://img.shields.io/badge/license-LGPL--3-blue.png | ||
:alt: LGPL-3 | ||
|
||
|badge_devstat| |badge_license| | ||
|
||
This module extends the functionality of Customer and Product blocking | ||
messages to support more consistency between messages and to allow you | ||
to set a blocking message quickly. | ||
|
||
.. IMPORTANT:: | ||
This is an alpha version, the data model and design can change at any time without warning. | ||
Only for development or testing purpose, do not use in production. | ||
`More details on development status <https://odoo-community.org/page/development-status>`_ | ||
|
||
**Table of contents** | ||
|
||
.. contents:: | ||
:local: | ||
|
||
Use Cases / Context | ||
=================== | ||
|
||
This module has been developed to maintain consistency in the messages | ||
used when blocking customers or products in sale models. | ||
|
||
If you need this module for those reasons, these might interest you too: | ||
|
||
- base_warn_option | ||
- sale_warn_option | ||
- purchase_warn_option | ||
- account_warn_option | ||
- stock_warn_option | ||
|
||
Usage | ||
===== | ||
|
||
To use this module, you need to: | ||
|
||
- Go to a Customer | ||
- Select Warn Options under *Warning on the Sales Order* | ||
- Go to a Product | ||
- Select Warn Options under *Warning when Selling this Product* | ||
|
||
Credits | ||
======= | ||
|
||
Authors | ||
------- | ||
|
||
* Moduon | ||
|
||
Contributors | ||
------------ | ||
|
||
- Eduardo de Miguel (`Moduon <https://www.moduon.team/>`__) | ||
|
||
Maintainers | ||
----------- | ||
|
||
This module is maintained by Moduon. | ||
|
||
Contact the maintainer through their official support channels in case you find | ||
any issues with this module. | ||
|
||
|
||
|
||
.. |maintainer-Shide| image:: https://github.com/Shide.png?size=40px | ||
:target: https://github.com/Shide | ||
:alt: Shide | ||
|
||
Current maintainer: | ||
|
||
|maintainer-Shide| |
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 @@ | ||
from . import models |
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,22 @@ | ||
# Copyright 2024 Moduon Team S.L. | ||
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl-3.0) | ||
|
||
{ | ||
"name": "Sale Warn Option", | ||
"summary": "Add Options to Sale Warn Messages", | ||
"version": "15.0.1.0.0", | ||
"development_status": "Alpha", | ||
"category": "Sales/Sales", | ||
"website": "https://github.com/OCA/sale-workflow", | ||
"author": "Moduon, Odoo Community Association (OCA)", | ||
"maintainers": ["Shide"], | ||
"license": "LGPL-3", | ||
"application": False, | ||
"installable": True, | ||
"auto_install": True, | ||
"depends": ["sale", "base_warn_option"], | ||
"data": [ | ||
"views/res_partner_views.xml", | ||
"views/product_template_views.xml", | ||
], | ||
} |
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,71 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * sale_warn_option | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 15.0+e\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2024-04-11 09:12+0000\n" | ||
"PO-Revision-Date: 2024-04-11 11:13+0200\n" | ||
"Last-Translator: \n" | ||
"Language-Team: \n" | ||
"Language: es\n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: 8bit\n" | ||
"Plural-Forms: nplurals=2; plural=(n != 1);\n" | ||
"X-Generator: Poedit 3.4.2\n" | ||
|
||
#. module: sale_warn_option | ||
#: model:ir.model.fields.selection,name:sale_warn_option.selection__warn_option__allowed_warning_usage__partner_sale_warn | ||
msgid "(Partner) Warning on the Sales Order" | ||
msgstr "(Contacto) Advertencia en el pedido de venta" | ||
|
||
#. module: sale_warn_option | ||
#: model:ir.model.fields.selection,name:sale_warn_option.selection__warn_option__allowed_warning_usage__product_sale_warn | ||
msgid "(Product) Warning when Selling this Product" | ||
msgstr "(Producto) Aviso cuando vende este producto" | ||
|
||
#. module: sale_warn_option | ||
#: model:ir.model.fields,field_description:sale_warn_option.field_warn_option__allowed_warning_usage | ||
msgid "Allowed Warning Usage" | ||
msgstr "Uso de la alerta permitida" | ||
|
||
#. module: sale_warn_option | ||
#: model:ir.model.fields,help:sale_warn_option.field_warn_option__allowed_warning_usage | ||
msgid "Allows to choose where the message can be selected" | ||
msgstr "Permite elegir dónde puede ser seleccionado el mensaje" | ||
|
||
#. module: sale_warn_option | ||
#: model:ir.model,name:sale_warn_option.model_res_partner | ||
msgid "Contact" | ||
msgstr "Contacto" | ||
|
||
#. module: sale_warn_option | ||
#: model:ir.model,name:sale_warn_option.model_product_template | ||
msgid "Product Template" | ||
msgstr "Plantilla de producto" | ||
|
||
#. module: sale_warn_option | ||
#: model:ir.model.fields,field_description:sale_warn_option.field_product_product__sale_line_warn_option | ||
#: model:ir.model.fields,field_description:sale_warn_option.field_product_template__sale_line_warn_option | ||
msgid "Sale Line Warn Option" | ||
msgstr "Opción de alerta en líneas de ventas" | ||
|
||
#. module: sale_warn_option | ||
#: model:ir.model.fields,field_description:sale_warn_option.field_res_partner__sale_warn_option | ||
#: model:ir.model.fields,field_description:sale_warn_option.field_res_users__sale_warn_option | ||
msgid "Sale Warn Option" | ||
msgstr "Opción de alerta en ventas" | ||
|
||
#. module: sale_warn_option | ||
#: model_terms:ir.ui.view,arch_db:sale_warn_option.sale_warn_option_partner_form | ||
#: model_terms:ir.ui.view,arch_db:sale_warn_option.sale_warn_option_product_form | ||
msgid "Select a warning option" | ||
msgstr "Selecciona una opción de alerta" | ||
|
||
#. module: sale_warn_option | ||
#: model:ir.model,name:sale_warn_option.model_warn_option | ||
msgid "Warn Option" | ||
msgstr "Opción de alerta" |
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,69 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * sale_warn_option | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 15.0+e\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2024-04-11 09:11+0000\n" | ||
"PO-Revision-Date: 2024-04-11 09:11+0000\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_warn_option | ||
#: model:ir.model.fields.selection,name:sale_warn_option.selection__warn_option__allowed_warning_usage__partner_sale_warn | ||
msgid "(Partner) Warning on the Sales Order" | ||
msgstr "" | ||
|
||
#. module: sale_warn_option | ||
#: model:ir.model.fields.selection,name:sale_warn_option.selection__warn_option__allowed_warning_usage__product_sale_warn | ||
msgid "(Product) Warning when Selling this Product" | ||
msgstr "" | ||
|
||
#. module: sale_warn_option | ||
#: model:ir.model.fields,field_description:sale_warn_option.field_warn_option__allowed_warning_usage | ||
msgid "Allowed Warning Usage" | ||
msgstr "" | ||
|
||
#. module: sale_warn_option | ||
#: model:ir.model.fields,help:sale_warn_option.field_warn_option__allowed_warning_usage | ||
msgid "Allows to choose where the message can be selected" | ||
msgstr "" | ||
|
||
#. module: sale_warn_option | ||
#: model:ir.model,name:sale_warn_option.model_res_partner | ||
msgid "Contact" | ||
msgstr "" | ||
|
||
#. module: sale_warn_option | ||
#: model:ir.model,name:sale_warn_option.model_product_template | ||
msgid "Product Template" | ||
msgstr "" | ||
|
||
#. module: sale_warn_option | ||
#: model:ir.model.fields,field_description:sale_warn_option.field_product_product__sale_line_warn_option | ||
#: model:ir.model.fields,field_description:sale_warn_option.field_product_template__sale_line_warn_option | ||
msgid "Sale Line Warn Option" | ||
msgstr "" | ||
|
||
#. module: sale_warn_option | ||
#: model:ir.model.fields,field_description:sale_warn_option.field_res_partner__sale_warn_option | ||
#: model:ir.model.fields,field_description:sale_warn_option.field_res_users__sale_warn_option | ||
msgid "Sale Warn Option" | ||
msgstr "" | ||
|
||
#. module: sale_warn_option | ||
#: model_terms:ir.ui.view,arch_db:sale_warn_option.sale_warn_option_partner_form | ||
#: model_terms:ir.ui.view,arch_db:sale_warn_option.sale_warn_option_product_form | ||
msgid "Select a warning option" | ||
msgstr "" | ||
|
||
#. module: sale_warn_option | ||
#: model:ir.model,name:sale_warn_option.model_warn_option | ||
msgid "Warn Option" | ||
msgstr "" |
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 @@ | ||
from . import warn_option | ||
from . import res_partner | ||
from . import product_template |
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,17 @@ | ||
# Copyright 2024 Moduon Team S.L. | ||
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl-3.0) | ||
|
||
from odoo import api, fields, models | ||
|
||
|
||
class ProductTemplate(models.Model): | ||
_inherit = "product.template" | ||
|
||
sale_line_warn_option = fields.Many2one( | ||
comodel_name="warn.option", | ||
) | ||
|
||
@api.onchange("sale_line_warn_option") | ||
def _onchange_sale_line_warn_option(self): | ||
if self.sale_line_warn != "no-message" and self.sale_line_warn_option: | ||
self.sale_line_warn_msg = self.sale_line_warn_option.name |
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,17 @@ | ||
# Copyright 2024 Moduon Team S.L. | ||
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl-3.0) | ||
|
||
from odoo import api, fields, models | ||
|
||
|
||
class ResPartner(models.Model): | ||
_inherit = "res.partner" | ||
|
||
sale_warn_option = fields.Many2one( | ||
comodel_name="warn.option", | ||
) | ||
|
||
@api.onchange("sale_warn_option") | ||
def _onchange_sale_warn_option(self): | ||
if self.sale_warn != "no-message" and self.sale_warn_option: | ||
self.sale_warn_msg = self.sale_warn_option.name |
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,19 @@ | ||
# Copyright 2024 Moduon Team S.L. | ||
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl-3.0) | ||
|
||
from odoo import fields, models | ||
|
||
|
||
class WarnOption(models.Model): | ||
_inherit = "warn.option" | ||
|
||
allowed_warning_usage = fields.Selection( | ||
selection_add=[ | ||
("partner_sale_warn", "(Partner) Warning on the Sales Order"), | ||
("product_sale_warn", "(Product) Warning when Selling this Product"), | ||
], | ||
ondelete={ | ||
"partner_sale_warn": "set default", | ||
"product_sale_warn": "set default", | ||
}, | ||
) |
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,10 @@ | ||
This module has been developed to maintain consistency in the messages used when | ||
blocking customers or products in sale models. | ||
|
||
If you need this module for those reasons, these might interest you too: | ||
|
||
- base_warn_option | ||
- sale_warn_option | ||
- purchase_warn_option | ||
- account_warn_option | ||
- stock_warn_option |
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 @@ | ||
- Eduardo de Miguel ([Moduon](https://www.moduon.team/)) |
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 @@ | ||
This module extends the functionality of Customer and Product blocking messages to | ||
support more consistency between messages and to allow you to set a blocking message | ||
quickly. |
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,6 @@ | ||
To use this module, you need to: | ||
|
||
- Go to a Customer | ||
- Select Warn Options under _Warning on the Sales Order_ | ||
- Go to a Product | ||
- Select Warn Options under _Warning when Selling this Product_ |
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.