Skip to content

Commit 8924b73

Browse files
committed
[MIG]purchase_warn_message: Migration to 16.0
1 parent d1ca926 commit 8924b73

File tree

5 files changed

+20
-14
lines changed

5 files changed

+20
-14
lines changed

purchase_warn_message/README.rst

+6-6
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Purchase Warn Message
77
!! This file is generated by oca-gen-addon-readme !!
88
!! changes will be overwritten. !!
99
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10-
!! source digest: sha256:aec036bc74d0c3efe8e8a4990d38635173bede96eb34336b11d236a516bc3a92
10+
!! source digest: sha256:3395df735ee6e95d7a5f2d3bb2bea4a15d05627bd6e9c9228f60946c719495e0
1111
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1212
1313
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
@@ -17,13 +17,13 @@ Purchase Warn Message
1717
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
1818
:alt: License: AGPL-3
1919
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fpurchase--workflow-lightgray.png?logo=github
20-
:target: https://github.com/OCA/purchase-workflow/tree/15.0/purchase_warn_message
20+
:target: https://github.com/OCA/purchase-workflow/tree/16.0/purchase_warn_message
2121
:alt: OCA/purchase-workflow
2222
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23-
:target: https://translation.odoo-community.org/projects/purchase-workflow-15-0/purchase-workflow-15-0-purchase_warn_message
23+
:target: https://translation.odoo-community.org/projects/purchase-workflow-16-0/purchase-workflow-16-0-purchase_warn_message
2424
:alt: Translate me on Weblate
2525
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
26-
:target: https://runboat.odoo-community.org/builds?repo=OCA/purchase-workflow&target_branch=15.0
26+
:target: https://runboat.odoo-community.org/builds?repo=OCA/purchase-workflow&target_branch=16.0
2727
:alt: Try me on Runboat
2828

2929
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -42,7 +42,7 @@ Bug Tracker
4242
Bugs are tracked on `GitHub Issues <https://github.com/OCA/purchase-workflow/issues>`_.
4343
In case of trouble, please check there if your issue has already been reported.
4444
If you spotted it first, help us to smash it by providing a detailed and welcomed
45-
`feedback <https://github.com/OCA/purchase-workflow/issues/new?body=module:%20purchase_warn_message%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
45+
`feedback <https://github.com/OCA/purchase-workflow/issues/new?body=module:%20purchase_warn_message%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
4646

4747
Do not contact contributors directly about support or help with technical issues.
4848

@@ -73,6 +73,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
7373
mission is to support the collaborative development of Odoo features and
7474
promote its widespread use.
7575

76-
This module is part of the `OCA/purchase-workflow <https://github.com/OCA/purchase-workflow/tree/15.0/purchase_warn_message>`_ project on GitHub.
76+
This module is part of the `OCA/purchase-workflow <https://github.com/OCA/purchase-workflow/tree/16.0/purchase_warn_message>`_ project on GitHub.
7777

7878
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

purchase_warn_message/__manifest__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"name": "Purchase Warn Message",
66
"summary": """
77
Add a popup warning on purchase to ensure warning is populated""",
8-
"version": "15.0.1.0.0",
8+
"version": "16.0.1.0.0",
99
"license": "AGPL-3",
1010
"author": "ForgeFlow, Odoo Community Association (OCA)",
1111
"website": "https://github.com/OCA/purchase-workflow",

purchase_warn_message/models/purchase_order.py

+8-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,13 @@ def _compute_purchase_warn_msg(self):
2626
separator = ""
2727
if p.purchase_warn == "warning":
2828
separator = "\n"
29-
purchase_warn_msg += p.purchase_warn_msg
29+
purchase_warn_msg = "%(msg)s" % ({"msg": p.purchase_warn_msg})
3030
if p != rec.partner_id and rec.partner_id.purchase_warn == "warning":
31-
purchase_warn_msg += separator + rec.partner_id.purchase_warn_msg
31+
purchase_warn_msg = "%(old_msg)s%(separator)s%(msg)s" % (
32+
{
33+
"old_msg": purchase_warn_msg,
34+
"separator": separator,
35+
"msg": rec.partner_id.purchase_warn_msg,
36+
}
37+
)
3238
rec.purchase_warn_msg = purchase_warn_msg or False

purchase_warn_message/static/description/index.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -367,9 +367,9 @@ <h1 class="title">Purchase Warn Message</h1>
367367
!! This file is generated by oca-gen-addon-readme !!
368368
!! changes will be overwritten. !!
369369
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
370-
!! source digest: sha256:aec036bc74d0c3efe8e8a4990d38635173bede96eb34336b11d236a516bc3a92
370+
!! source digest: sha256:3395df735ee6e95d7a5f2d3bb2bea4a15d05627bd6e9c9228f60946c719495e0
371371
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
372-
<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/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/purchase-workflow/tree/15.0/purchase_warn_message"><img alt="OCA/purchase-workflow" src="https://img.shields.io/badge/github-OCA%2Fpurchase--workflow-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/purchase-workflow-15-0/purchase-workflow-15-0-purchase_warn_message"><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/purchase-workflow&amp;target_branch=15.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
372+
<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/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/purchase-workflow/tree/16.0/purchase_warn_message"><img alt="OCA/purchase-workflow" src="https://img.shields.io/badge/github-OCA%2Fpurchase--workflow-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/purchase-workflow-16-0/purchase-workflow-16-0-purchase_warn_message"><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/purchase-workflow&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
373373
<p>This module add a warning popup on purchase orders to ensure warning is
374374
populated no only when partner is changed.</p>
375375
<p><strong>Table of contents</strong></p>
@@ -389,7 +389,7 @@ <h1><a class="toc-backref" href="#toc-entry-1">Bug Tracker</a></h1>
389389
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/purchase-workflow/issues">GitHub Issues</a>.
390390
In case of trouble, please check there if your issue has already been reported.
391391
If you spotted it first, help us to smash it by providing a detailed and welcomed
392-
<a class="reference external" href="https://github.com/OCA/purchase-workflow/issues/new?body=module:%20purchase_warn_message%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
392+
<a class="reference external" href="https://github.com/OCA/purchase-workflow/issues/new?body=module:%20purchase_warn_message%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
393393
<p>Do not contact contributors directly about support or help with technical issues.</p>
394394
</div>
395395
<div class="section" id="credits">
@@ -414,7 +414,7 @@ <h2><a class="toc-backref" href="#toc-entry-5">Maintainers</a></h2>
414414
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
415415
mission is to support the collaborative development of Odoo features and
416416
promote its widespread use.</p>
417-
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/purchase-workflow/tree/15.0/purchase_warn_message">OCA/purchase-workflow</a> project on GitHub.</p>
417+
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/purchase-workflow/tree/16.0/purchase_warn_message">OCA/purchase-workflow</a> project on GitHub.</p>
418418
<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>
419419
</div>
420420
</div>

purchase_warn_message/views/purchase_order_views.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
>
1717
<p>
1818
<i class="fa fa-info-circle" />
19-
&amp;nbsp;
19+
<span>&amp;nbsp;</span>
2020
<field name="purchase_warn_msg" class="oe_inline" />
2121
</p>
2222
</div>

0 commit comments

Comments
 (0)