Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions purchase_rfq_number/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ Contributors
------------

- Prapassorn Sornkaew <prapassorn.s@prothaitechnology.com>
- Alejandro Parrales <alejandro17parrales@gmail.com>

Other credits
-------------
Expand Down
1 change: 1 addition & 0 deletions purchase_rfq_number/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
- Prapassorn Sornkaew \<prapassorn.s@prothaitechnology.com\>
- Alejandro Parrales \<alejandro17parrales@gmail.com\>
1 change: 1 addition & 0 deletions purchase_rfq_number/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,7 @@ <h3><a class="toc-backref" href="#toc-entry-4">Authors</a></h3>
<h3><a class="toc-backref" href="#toc-entry-5">Contributors</a></h3>
<ul class="simple">
<li>Prapassorn Sornkaew &lt;<a class="reference external" href="mailto:prapassorn.s&#64;prothaitechnology.com">prapassorn.s&#64;prothaitechnology.com</a>&gt;</li>
<li>Alejandro Parrales &lt;<a class="reference external" href="mailto:alejandro17parrales&#64;gmail.com">alejandro17parrales&#64;gmail.com</a>&gt;</li>
</ul>
</div>
<div class="section" id="other-credits">
Expand Down
14 changes: 7 additions & 7 deletions purchase_rfq_number/tests/test_purchase_order.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
# Copyright 2021 ProThai Technology Co.,Ltd. (http://prothaitechnology.com)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo.exceptions import UserError
from odoo.tests import TransactionCase
from odoo.addons.base.tests.common import BaseCommon


class TestPurchaseOrder(TransactionCase):
class TestPurchaseOrder(BaseCommon):
@classmethod
def setUpClass(cls):
super().setUpClass()
Expand All @@ -14,6 +13,7 @@ def setUpClass(cls):
company = cls.env.company
company.keep_name_po = False
company.auto_attachment_rfq = True
cls.partner = cls.env["res.partner"].create({"name": "RFQ Number Test Partner"})

def test_enumeration(self):
order1 = self.purchase_order_model.create({"partner_id": self.partner.id})
Expand Down Expand Up @@ -66,10 +66,10 @@ def test_error_confirmation_sequence(self):
]
)
next_name = sequence_id.get_next_char(sequence_id.number_next_actual)
try:
order.button_confirm()
except UserError: # pylint: disable=except-pass
pass
# Re-confirming an already confirmed order is a no-op in core Odoo
# (it doesn't raise anymore since 19.0); it must not consume/advance
# the purchase order sequence either.
order.button_confirm()
order.update({"state": "draft"})
# Now the RFQ can be confirmed
order.button_confirm()
Expand Down
Loading