Skip to content

Commit 45fc915

Browse files
authored
Merge pull request #2026 from OCA/18.0
Syncing from upstream OCA/purchase-workflow (18.0)
2 parents 6a59c21 + 1282e01 commit 45fc915

File tree

24 files changed

+971
-11
lines changed

24 files changed

+971
-11
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ addon | version | maintainers | summary
102102
[purchase_triple_discount](purchase_triple_discount/) | 18.0.1.0.0 | | Manage triple discount on purchase order lines
103103
[purchase_uninvoiced_amount_force_invoiced_line](purchase_uninvoiced_amount_force_invoiced_line/) | 18.0.1.0.0 | <a href='https://github.com/JoanSForgeFlow'><img src='https://github.com/JoanSForgeFlow.png' width='32' height='32' style='border-radius:50%;' alt='JoanSForgeFlow'/></a> | Glue module between uninvoiced amount line and force invoiced line
104104
[purchase_warn_message](purchase_warn_message/) | 18.0.1.0.0 | | Add a popup warning on purchase to ensure warning is populated
105+
[purchase_warn_option](purchase_warn_option/) | 18.0.1.0.1 | <a href='https://github.com/Shide'><img src='https://github.com/Shide.png' width='32' height='32' style='border-radius:50%;' alt='Shide'/></a> <a href='https://github.com/rafaelbn'><img src='https://github.com/rafaelbn.png' width='32' height='32' style='border-radius:50%;' alt='rafaelbn'/></a> | Add Options to Purchase Warn Messages
105106
[purchase_work_acceptance](purchase_work_acceptance/) | 18.0.1.0.0 | <a href='https://github.com/ps-tubtim'><img src='https://github.com/ps-tubtim.png' width='32' height='32' style='border-radius:50%;' alt='ps-tubtim'/></a> | Purchase Work Acceptance
106107
[purchase_work_acceptance_invoice_plan](purchase_work_acceptance_invoice_plan/) | 18.0.1.0.0 | <a href='https://github.com/kittiu'><img src='https://github.com/kittiu.png' width='32' height='32' style='border-radius:50%;' alt='kittiu'/></a> <a href='https://github.com/Saran440'><img src='https://github.com/Saran440.png' width='32' height='32' style='border-radius:50%;' alt='Saran440'/></a> | Purchase Work Acceptance Invoice Plan
107108
[sale_purchase_force_vendor](sale_purchase_force_vendor/) | 18.0.1.0.0 | <a href='https://github.com/victoralmau'><img src='https://github.com/victoralmau.png' width='32' height='32' style='border-radius:50%;' alt='victoralmau'/></a> | Sale Purchase Force Vendor

purchase_cancel_reason/i18n/sl.po

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,16 @@ msgstr ""
99
"Project-Id-Version: Odoo Server 10.0\n"
1010
"Report-Msgid-Bugs-To: \n"
1111
"POT-Creation-Date: 2018-03-03 03:48+0000\n"
12-
"PO-Revision-Date: 2018-03-03 03:48+0000\n"
13-
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2018\n"
12+
"PO-Revision-Date: 2026-01-22 19:50+0000\n"
13+
"Last-Translator: Matjaz Mozetic <matjaz@luxim.si>\n"
1414
"Language-Team: Slovenian (https://www.transifex.com/oca/teams/23907/sl/)\n"
1515
"Language: sl\n"
1616
"MIME-Version: 1.0\n"
1717
"Content-Type: text/plain; charset=UTF-8\n"
1818
"Content-Transfer-Encoding: \n"
19-
"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || "
20-
"n%100==4 ? 2 : 3);\n"
19+
"Plural-Forms: nplurals=4; plural=n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || "
20+
"n%100==4 ? 2 : 3;\n"
21+
"X-Generator: Weblate 5.15.2\n"
2122

2223
#. module: purchase_cancel_reason
2324
#: model:ir.model,name:purchase_cancel_reason.model_purchase_order_cancel
@@ -60,7 +61,7 @@ msgstr "Ustvarjeno"
6061
#: model:ir.model.fields,field_description:purchase_cancel_reason.field_purchase_order_cancel__display_name
6162
#: model:ir.model.fields,field_description:purchase_cancel_reason.field_purchase_order_cancel_reason__display_name
6263
msgid "Display Name"
63-
msgstr "Prikazni naziv"
64+
msgstr "Prikazani naziv"
6465

6566
#. module: purchase_cancel_reason
6667
#: model:ir.model.fields,field_description:purchase_cancel_reason.field_purchase_order_cancel__id

purchase_request_to_requisition/i18n/sl.po

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,16 @@ msgstr ""
99
"Project-Id-Version: Odoo Server 9.0c\n"
1010
"Report-Msgid-Bugs-To: \n"
1111
"POT-Creation-Date: 2017-02-11 01:39+0000\n"
12-
"PO-Revision-Date: 2017-02-11 01:39+0000\n"
13-
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n"
12+
"PO-Revision-Date: 2026-01-22 19:50+0000\n"
13+
"Last-Translator: Matjaz Mozetic <matjaz@luxim.si>\n"
1414
"Language-Team: Slovenian (https://www.transifex.com/oca/teams/23907/sl/)\n"
1515
"Language: sl\n"
1616
"MIME-Version: 1.0\n"
1717
"Content-Type: text/plain; charset=UTF-8\n"
1818
"Content-Transfer-Encoding: \n"
19-
"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n"
20-
"%100==4 ? 2 : 3);\n"
19+
"Plural-Forms: nplurals=4; plural=n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || "
20+
"n%100==4 ? 2 : 3;\n"
21+
"X-Generator: Weblate 5.15.2\n"
2122

2223
#. module: purchase_request_to_requisition
2324
#: code:addons/purchase_request_to_requisition/models/purchase_requisition.py:0
@@ -94,7 +95,7 @@ msgstr "Opis"
9495
#: model:ir.model.fields,field_description:purchase_request_to_requisition.field_purchase_request_line_make_purchase_requisition__display_name
9596
#: model:ir.model.fields,field_description:purchase_request_to_requisition.field_purchase_request_line_make_purchase_requisition_item__display_name
9697
msgid "Display Name"
97-
msgstr "Prikazni naziv"
98+
msgstr "Prikazani naziv"
9899

99100
#. module: purchase_request_to_requisition
100101
#: code:addons/purchase_request_to_requisition/wizard/purchase_request_line_make_purchase_requisition.py:0

purchase_warn_option/README.rst

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
.. image:: https://odoo-community.org/readme-banner-image
2+
:target: https://odoo-community.org/get-involved?utm_source=readme
3+
:alt: Odoo Community Association
4+
5+
====================
6+
Purchase Warn Option
7+
====================
8+
9+
..
10+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
11+
!! This file is generated by oca-gen-addon-readme !!
12+
!! changes will be overwritten. !!
13+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
14+
!! source digest: sha256:df5cb27140accacbeb7e79925d06f39cd68a96509f4b78d01a63edc2ff62565f
15+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
16+
17+
.. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png
18+
:target: https://odoo-community.org/page/development-status
19+
:alt: Alpha
20+
.. |badge2| image:: https://img.shields.io/badge/license-LGPL--3-blue.png
21+
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
22+
:alt: License: LGPL-3
23+
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fpurchase--workflow-lightgray.png?logo=github
24+
:target: https://github.com/OCA/purchase-workflow/tree/18.0/purchase_warn_option
25+
:alt: OCA/purchase-workflow
26+
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
27+
:target: https://translation.odoo-community.org/projects/purchase-workflow-18-0/purchase-workflow-18-0-purchase_warn_option
28+
:alt: Translate me on Weblate
29+
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
30+
:target: https://runboat.odoo-community.org/builds?repo=OCA/purchase-workflow&target_branch=18.0
31+
:alt: Try me on Runboat
32+
33+
|badge1| |badge2| |badge3| |badge4| |badge5|
34+
35+
This module extends the functionality of Supplier and Product blocking
36+
messages to support more consistency between messages and to allow you
37+
to set a blocking message quickly.
38+
39+
.. IMPORTANT::
40+
This is an alpha version, the data model and design can change at any time without warning.
41+
Only for development or testing purpose, do not use in production.
42+
`More details on development status <https://odoo-community.org/page/development-status>`_
43+
44+
**Table of contents**
45+
46+
.. contents::
47+
:local:
48+
49+
Use Cases / Context
50+
===================
51+
52+
This module has been developed to maintain consistency in the messages
53+
used when blocking suppliers or products in purchase models.
54+
55+
If you need this module for those reasons, these might interest you too:
56+
57+
- sale_warn_option
58+
- account_warn_option
59+
- stock_warn_option
60+
61+
Usage
62+
=====
63+
64+
To use this module, you need to:
65+
66+
- Go to Purchase App > Configuration Menu > Settings
67+
- Under *Orders* check **Warnings** checkbox
68+
- Go to Orders > Vendors > Internal Notes Tab
69+
- Select Warn Options under *Warning on the Purchase Order*
70+
- Go to a Product > Purchase Tab
71+
- Select Warn Options under *Warning when Purchasing this Product*
72+
73+
Bug Tracker
74+
===========
75+
76+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/purchase-workflow/issues>`_.
77+
In case of trouble, please check there if your issue has already been reported.
78+
If you spotted it first, help us to smash it by providing a detailed and welcomed
79+
`feedback <https://github.com/OCA/purchase-workflow/issues/new?body=module:%20purchase_warn_option%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
80+
81+
Do not contact contributors directly about support or help with technical issues.
82+
83+
Credits
84+
=======
85+
86+
Authors
87+
-------
88+
89+
* Moduon
90+
91+
Contributors
92+
------------
93+
94+
- Eduardo de Miguel (`Moduon <https://www.moduon.team/>`__)
95+
- Sabrina Rodriguez (`Moduon <https://www.moduon.team/>`__)
96+
97+
Maintainers
98+
-----------
99+
100+
This module is maintained by the OCA.
101+
102+
.. image:: https://odoo-community.org/logo.png
103+
:alt: Odoo Community Association
104+
:target: https://odoo-community.org
105+
106+
OCA, or the Odoo Community Association, is a nonprofit organization whose
107+
mission is to support the collaborative development of Odoo features and
108+
promote its widespread use.
109+
110+
.. |maintainer-Shide| image:: https://github.com/Shide.png?size=40px
111+
:target: https://github.com/Shide
112+
:alt: Shide
113+
.. |maintainer-rafaelbn| image:: https://github.com/rafaelbn.png?size=40px
114+
:target: https://github.com/rafaelbn
115+
:alt: rafaelbn
116+
117+
Current `maintainers <https://odoo-community.org/page/maintainer-role>`__:
118+
119+
|maintainer-Shide| |maintainer-rafaelbn|
120+
121+
This module is part of the `OCA/purchase-workflow <https://github.com/OCA/purchase-workflow/tree/18.0/purchase_warn_option>`_ project on GitHub.
122+
123+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

purchase_warn_option/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import models
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Copyright 2024 Moduon Team S.L.
2+
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl-3.0)
3+
4+
{
5+
"name": "Purchase Warn Option",
6+
"summary": "Add Options to Purchase Warn Messages",
7+
"version": "18.0.1.0.1",
8+
"development_status": "Alpha",
9+
"category": "Inventory/Purchase",
10+
"website": "https://github.com/OCA/purchase-workflow",
11+
"author": "Moduon, Odoo Community Association (OCA)",
12+
"maintainers": ["Shide", "rafaelbn"],
13+
"license": "LGPL-3",
14+
"application": False,
15+
"installable": True,
16+
"auto_install": True,
17+
"depends": ["purchase", "base_warn_option"],
18+
"data": [
19+
"views/res_partner_views.xml",
20+
"views/product_template_views.xml",
21+
],
22+
}

purchase_warn_option/i18n/es.po

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Translation of Odoo Server.
2+
# This file contains the translation of the following modules:
3+
# * purchase_warn_option
4+
#
5+
msgid ""
6+
msgstr ""
7+
"Project-Id-Version: Odoo Server 15.0+e\n"
8+
"Report-Msgid-Bugs-To: \n"
9+
"POT-Creation-Date: 2024-04-11 09:09+0000\n"
10+
"PO-Revision-Date: 2024-04-11 11:11+0200\n"
11+
"Last-Translator: \n"
12+
"Language-Team: \n"
13+
"Language: es\n"
14+
"MIME-Version: 1.0\n"
15+
"Content-Type: text/plain; charset=UTF-8\n"
16+
"Content-Transfer-Encoding: 8bit\n"
17+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
18+
"X-Generator: Poedit 3.4.2\n"
19+
20+
#. module: purchase_warn_option
21+
#: model:ir.model.fields.selection,name:purchase_warn_option.selection__warn_option__allowed_warning_usage__partner_purchase_warn
22+
msgid "(Partner) Warning on the Purchase Order"
23+
msgstr "(Contacto) Aviso en el pedido de compra"
24+
25+
#. module: purchase_warn_option
26+
#: model:ir.model.fields.selection,name:purchase_warn_option.selection__warn_option__allowed_warning_usage__product_purchase_warn
27+
msgid "(Product) Warning when Purchasing this Product"
28+
msgstr "(Producto) Aviso cuando compra este producto"
29+
30+
#. module: purchase_warn_option
31+
#: model:ir.model.fields,field_description:purchase_warn_option.field_warn_option__allowed_warning_usage
32+
msgid "Allowed Warning Usage"
33+
msgstr "Uso de la alerta permitida"
34+
35+
#. module: purchase_warn_option
36+
#: model:ir.model.fields,help:purchase_warn_option.field_warn_option__allowed_warning_usage
37+
msgid "Allows to choose where the message can be selected"
38+
msgstr "Permite elegir dónde puede ser seleccionado el mensaje"
39+
40+
#. module: purchase_warn_option
41+
#: model:ir.model,name:purchase_warn_option.model_res_partner
42+
msgid "Contact"
43+
msgstr "Contacto"
44+
45+
#. module: purchase_warn_option
46+
#: model:ir.model,name:purchase_warn_option.model_product_template
47+
msgid "Product Template"
48+
msgstr "Plantilla de producto"
49+
50+
#. module: purchase_warn_option
51+
#: model:ir.model.fields,field_description:purchase_warn_option.field_product_product__purchase_line_warn_option
52+
#: model:ir.model.fields,field_description:purchase_warn_option.field_product_template__purchase_line_warn_option
53+
msgid "Purchase Line Warn Option"
54+
msgstr "Opción de alerta en líneas de compras"
55+
56+
#. module: purchase_warn_option
57+
#: model:ir.model.fields,field_description:purchase_warn_option.field_res_partner__purchase_warn_option
58+
#: model:ir.model.fields,field_description:purchase_warn_option.field_res_users__purchase_warn_option
59+
msgid "Purchase Warn Option"
60+
msgstr "Opción de alerta en compras"
61+
62+
#. module: purchase_warn_option
63+
#: model_terms:ir.ui.view,arch_db:purchase_warn_option.purchase_warn_option_partner_form
64+
#: model_terms:ir.ui.view,arch_db:purchase_warn_option.purchase_warn_option_product_form
65+
msgid "Select a warning option"
66+
msgstr "Selecciona una opción de alerta"
67+
68+
#. module: purchase_warn_option
69+
#: model:ir.model,name:purchase_warn_option.model_warn_option
70+
msgid "Warn Option"
71+
msgstr "Opción de alerta"
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Translation of Odoo Server.
2+
# This file contains the translation of the following modules:
3+
# * purchase_warn_option
4+
#
5+
msgid ""
6+
msgstr ""
7+
"Project-Id-Version: Odoo Server 18.0\n"
8+
"Report-Msgid-Bugs-To: \n"
9+
"Last-Translator: \n"
10+
"Language-Team: \n"
11+
"MIME-Version: 1.0\n"
12+
"Content-Type: text/plain; charset=UTF-8\n"
13+
"Content-Transfer-Encoding: \n"
14+
"Plural-Forms: \n"
15+
16+
#. module: purchase_warn_option
17+
#: model:ir.model.fields.selection,name:purchase_warn_option.selection__warn_option__allowed_warning_usage__partner_purchase_warn
18+
msgid "(Partner) Warning on the Purchase Order"
19+
msgstr ""
20+
21+
#. module: purchase_warn_option
22+
#: model:ir.model.fields.selection,name:purchase_warn_option.selection__warn_option__allowed_warning_usage__product_purchase_warn
23+
msgid "(Product) Warning when Purchasing this Product"
24+
msgstr ""
25+
26+
#. module: purchase_warn_option
27+
#: model:ir.model.fields,field_description:purchase_warn_option.field_warn_option__allowed_warning_usage
28+
msgid "Allowed Warning Usage"
29+
msgstr ""
30+
31+
#. module: purchase_warn_option
32+
#: model:ir.model.fields,help:purchase_warn_option.field_warn_option__allowed_warning_usage
33+
msgid "Allows to choose where the message can be selected"
34+
msgstr ""
35+
36+
#. module: purchase_warn_option
37+
#: model:ir.model,name:purchase_warn_option.model_res_partner
38+
msgid "Contact"
39+
msgstr ""
40+
41+
#. module: purchase_warn_option
42+
#: model:ir.model,name:purchase_warn_option.model_product_template
43+
msgid "Product"
44+
msgstr ""
45+
46+
#. module: purchase_warn_option
47+
#: model:ir.model.fields,field_description:purchase_warn_option.field_product_product__purchase_line_warn_option
48+
#: model:ir.model.fields,field_description:purchase_warn_option.field_product_template__purchase_line_warn_option
49+
msgid "Purchase Line Warn Option"
50+
msgstr ""
51+
52+
#. module: purchase_warn_option
53+
#: model:ir.model.fields,field_description:purchase_warn_option.field_res_partner__purchase_warn_option
54+
#: model:ir.model.fields,field_description:purchase_warn_option.field_res_users__purchase_warn_option
55+
msgid "Purchase Warn Option"
56+
msgstr ""
57+
58+
#. module: purchase_warn_option
59+
#: model_terms:ir.ui.view,arch_db:purchase_warn_option.purchase_warn_option_partner_form
60+
#: model_terms:ir.ui.view,arch_db:purchase_warn_option.purchase_warn_option_product_form
61+
msgid "Select a warning option"
62+
msgstr ""
63+
64+
#. module: purchase_warn_option
65+
#: model:ir.model,name:purchase_warn_option.model_warn_option
66+
msgid "Warn Option"
67+
msgstr ""
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from . import warn_option
2+
from . import res_partner
3+
from . import product_template
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Copyright 2024 Moduon Team S.L.
2+
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl-3.0)
3+
4+
from odoo import api, fields, models
5+
6+
7+
class ProductTemplate(models.Model):
8+
_inherit = "product.template"
9+
10+
purchase_line_warn_option = fields.Many2one(
11+
comodel_name="warn.option",
12+
)
13+
14+
@api.onchange("purchase_line_warn_option")
15+
def _onchange_purchase_line_warn_option(self):
16+
if self.purchase_line_warn != "no-message" and self.purchase_line_warn_option:
17+
self.purchase_line_warn_msg = self.purchase_line_warn_option.name

0 commit comments

Comments
 (0)