Skip to content

Commit 3f0c2b1

Browse files
committed
Merge PR OCA#2885 into 18.0
Signed-off-by pedrobaeza
2 parents 9923c4b + 840ea8e commit 3f0c2b1

5 files changed

Lines changed: 33 additions & 45 deletions

File tree

purchase_no_rfq/README.rst

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
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-
51
=========================================
62
Purchase Order - No Request For Quotation
73
=========================================
@@ -17,7 +13,7 @@ Purchase Order - No Request For Quotation
1713
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
1814
:target: https://odoo-community.org/page/development-status
1915
:alt: Beta
20-
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
16+
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
2117
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
2218
:alt: License: AGPL-3
2319
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fpurchase--workflow-lightgray.png?logo=github
@@ -83,6 +79,7 @@ Contributors
8379
------------
8480

8581
- Sylvain LE GAL <https://twitter.com/legalsylvain>
82+
8683
- `Binhex <https://binhex.cloud/>`__:
8784

8885
- Deriman Alonso
@@ -91,6 +88,8 @@ Contributors
9188

9289
- Bhavesh Heliconia
9390

91+
- Alejandro Parrales <alejandro17parrales@gmail.com>
92+
9493
Maintainers
9594
-----------
9695

purchase_no_rfq/hooks.py

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,14 @@
22
# @author: Sylvain LE GAL (https://twitter.com/legalsylvain)
33
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
44

5-
from odoo import api
6-
75

86
def uninstall_hook(env):
9-
with api.Environment.manage():
10-
# Unhide menu item for request for quotation and restore sequence
11-
env.ref("purchase.menu_purchase_rfq").write(
12-
{
13-
"groups_id": [(5,)],
14-
"sequence": 0,
15-
}
16-
)
17-
# ReCreate ir.actions.report
18-
env.ref("purchase.report_purchase_quotation").create_action()
7+
# Unhide menu item for request for quotation and restore sequence
8+
env.ref("purchase.menu_purchase_rfq").write(
9+
{
10+
"groups_id": [(5,)],
11+
"sequence": 0,
12+
}
13+
)
14+
# ReCreate ir.actions.report
15+
env.ref("purchase.report_purchase_quotation").create_action()

purchase_no_rfq/readme/CONTRIBUTORS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@
44
- [Heliconia Solutions Pvt. Ltd.](https://www.heliconia.io)
55
- Bhavesh Heliconia
66

7+
8+
- Alejandro Parrales \<<alejandro17parrales@gmail.com>\>

purchase_no_rfq/static/description/index.html

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
55
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
6-
<title>README.rst</title>
6+
<title>Purchase Order - No Request For Quotation</title>
77
<style type="text/css">
88

99
/*
@@ -360,21 +360,16 @@
360360
</style>
361361
</head>
362362
<body>
363-
<div class="document">
363+
<div class="document" id="purchase-order-no-request-for-quotation">
364+
<h1 class="title">Purchase Order - No Request For Quotation</h1>
364365

365-
366-
<a class="reference external image-reference" href="https://odoo-community.org/get-involved?utm_source=readme">
367-
<img alt="Odoo Community Association" src="https://odoo-community.org/readme-banner-image" />
368-
</a>
369-
<div class="section" id="purchase-order-no-request-for-quotation">
370-
<h1>Purchase Order - No Request For Quotation</h1>
371366
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
372367
!! This file is generated by oca-gen-addon-readme !!
373368
!! changes will be overwritten. !!
374369
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
375370
!! source digest: sha256:5d1c74bb7d1c6c722be25a8f8dd8b46b1a57a95f97265fd2453346353a254d80
376371
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
377-
<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/purchase-workflow/tree/18.0/purchase_no_rfq"><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-18-0/purchase-workflow-18-0-purchase_no_rfq"><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=18.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/18.0/purchase_no_rfq"><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-18-0/purchase-workflow-18-0-purchase_no_rfq"><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=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
378373
<p>This module extends the odoo purchase module, to remove ‘Request for
379374
Quotation’ state, simplifying the workflow for the end users.</p>
380375
<p>Once installed :</p>
@@ -407,23 +402,23 @@ <h1>Purchase Order - No Request For Quotation</h1>
407402
</ul>
408403
</div>
409404
<div class="section" id="bug-tracker">
410-
<h2><a class="toc-backref" href="#toc-entry-1">Bug Tracker</a></h2>
405+
<h1><a class="toc-backref" href="#toc-entry-1">Bug Tracker</a></h1>
411406
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/purchase-workflow/issues">GitHub Issues</a>.
412407
In case of trouble, please check there if your issue has already been reported.
413408
If you spotted it first, help us to smash it by providing a detailed and welcomed
414409
<a class="reference external" href="https://github.com/OCA/purchase-workflow/issues/new?body=module:%20purchase_no_rfq%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
415410
<p>Do not contact contributors directly about support or help with technical issues.</p>
416411
</div>
417412
<div class="section" id="credits">
418-
<h2><a class="toc-backref" href="#toc-entry-2">Credits</a></h2>
413+
<h1><a class="toc-backref" href="#toc-entry-2">Credits</a></h1>
419414
<div class="section" id="authors">
420-
<h3><a class="toc-backref" href="#toc-entry-3">Authors</a></h3>
415+
<h2><a class="toc-backref" href="#toc-entry-3">Authors</a></h2>
421416
<ul class="simple">
422417
<li>GRAP</li>
423418
</ul>
424419
</div>
425420
<div class="section" id="contributors">
426-
<h3><a class="toc-backref" href="#toc-entry-4">Contributors</a></h3>
421+
<h2><a class="toc-backref" href="#toc-entry-4">Contributors</a></h2>
427422
<ul class="simple">
428423
<li>Sylvain LE GAL &lt;<a class="reference external" href="https://twitter.com/legalsylvain">https://twitter.com/legalsylvain</a>&gt;</li>
429424
<li><a class="reference external" href="https://binhex.cloud/">Binhex</a>:<ul>
@@ -434,10 +429,11 @@ <h3><a class="toc-backref" href="#toc-entry-4">Contributors</a></h3>
434429
<li>Bhavesh Heliconia</li>
435430
</ul>
436431
</li>
432+
<li>Alejandro Parrales &lt;<a class="reference external" href="mailto:alejandro17parrales&#64;gmail.com">alejandro17parrales&#64;gmail.com</a>&gt;</li>
437433
</ul>
438434
</div>
439435
<div class="section" id="maintainers">
440-
<h3><a class="toc-backref" href="#toc-entry-5">Maintainers</a></h3>
436+
<h2><a class="toc-backref" href="#toc-entry-5">Maintainers</a></h2>
441437
<p>This module is maintained by the OCA.</p>
442438
<a class="reference external image-reference" href="https://odoo-community.org">
443439
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
@@ -452,6 +448,5 @@ <h3><a class="toc-backref" href="#toc-entry-5">Maintainers</a></h3>
452448
</div>
453449
</div>
454450
</div>
455-
</div>
456451
</body>
457452
</html>

purchase_no_rfq/views/view_purchase_order.xml

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<attribute name="decoration-info">state in ('draft','sent')</attribute>
1010
</xpath>
1111
<field name="state" position="attributes">
12-
<attribute name="invisible">0</attribute>
12+
<attribute name="column_invisible">0</attribute>
1313
<attribute name="optional">show</attribute>
1414
<attribute name="widget">badge</attribute>
1515
<attribute
@@ -22,9 +22,7 @@
2222
</field>
2323
<field name="date_order" position="attributes">
2424
<attribute name="widget">remaining_days</attribute>
25-
<attribute
26-
name="invisible"
27-
>state in ('purchase', 'done', 'cancel')</attribute>
25+
<attribute name="column_invisible">0</attribute>
2826
</field>
2927
</field>
3028
</record>
@@ -59,15 +57,12 @@
5957
>
6058
<attribute name="string">Print</attribute>
6159
</xpath>
62-
63-
<!-- Add a print button, displayed in non draft and sent states -->
64-
<xpath expr="/form/header/button[@name='print_quotation']" position="after">
65-
<button
66-
name="print_quotation"
67-
string="Print"
68-
type="object"
69-
groups="base.group_user"
70-
/>
60+
<xpath
61+
expr="/form/header/button[@name='print_quotation'][last()]"
62+
position="attributes"
63+
>
64+
<attribute name="string">Print</attribute>
65+
<attribute name="invisible">state=='draft'</attribute>
7166
</xpath>
7267
</field>
7368
</record>

0 commit comments

Comments
 (0)