Skip to content

Commit

Permalink
[IMP] account_invoice_pricelist: Proper tagging of unittest
Browse files Browse the repository at this point in the history
  • Loading branch information
mt-software-de committed Nov 23, 2023
1 parent 76784d0 commit 42368e3
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
3 changes: 2 additions & 1 deletion account_invoice_pricelist/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Account - Pricelist on Invoices
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:8388c51d0116d587ac4f23ae76ccdc9ddd496797f53a4d1f42e3e76d009363a2
!! source digest: sha256:666316445602b6cad8ea8c2ec4e00d98d220c7f77de418f7ad28ba8d1153acfc
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
Expand Down Expand Up @@ -74,6 +74,7 @@ Contributors
* Alberto Martín <alberto.martin@guadaltech.es>
* Nikul Chaudhary <nikulchaudhary2112@gmail.com>
* Manuel Regidor <manuel.regidor@sygel.es>
* Michael Tietz (MT Software) <mtietz@mt-software.de>

Maintainers
~~~~~~~~~~~
Expand Down
1 change: 1 addition & 0 deletions account_invoice_pricelist/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
* Alberto Martín <alberto.martin@guadaltech.es>
* Nikul Chaudhary <nikulchaudhary2112@gmail.com>
* Manuel Regidor <manuel.regidor@sygel.es>
* Michael Tietz (MT Software) <mtietz@mt-software.de>
3 changes: 2 additions & 1 deletion account_invoice_pricelist/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ <h1 class="title">Account - Pricelist on Invoices</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:8388c51d0116d587ac4f23ae76ccdc9ddd496797f53a4d1f42e3e76d009363a2
!! source digest: sha256:666316445602b6cad8ea8c2ec4e00d98d220c7f77de418f7ad28ba8d1153acfc
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<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/account-invoicing/tree/14.0/account_invoice_pricelist"><img alt="OCA/account-invoicing" src="https://img.shields.io/badge/github-OCA%2Faccount--invoicing-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/account-invoicing-14-0/account-invoicing-14-0-account_invoice_pricelist"><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/account-invoicing&amp;target_branch=14.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<ul class="simple">
Expand Down Expand Up @@ -421,6 +421,7 @@ <h2><a class="toc-backref" href="#toc-entry-4">Contributors</a></h2>
<li>Alberto Martín &lt;<a class="reference external" href="mailto:alberto.martin&#64;guadaltech.es">alberto.martin&#64;guadaltech.es</a>&gt;</li>
<li>Nikul Chaudhary &lt;<a class="reference external" href="mailto:nikulchaudhary2112&#64;gmail.com">nikulchaudhary2112&#64;gmail.com</a>&gt;</li>
<li>Manuel Regidor &lt;<a class="reference external" href="mailto:manuel.regidor&#64;sygel.es">manuel.regidor&#64;sygel.es</a>&gt;</li>
<li>Michael Tietz (MT Software) &lt;<a class="reference external" href="mailto:mtietz&#64;mt-software.de">mtietz&#64;mt-software.de</a>&gt;</li>
</ul>
</div>
<div class="section" id="maintainers">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import hashlib
import inspect

from odoo.tests import Form, common
from odoo.tests import Form, common, tagged

from odoo.addons.sale.models.sale import SaleOrderLine as upstream

Expand All @@ -14,6 +14,7 @@
VALID_HASHES = ["7c0bb27c20598327008f81aee58cdfb4"]


@tagged("post_install", "-at_install")
class TestAccountMovePricelist(common.SavepointCase):
@classmethod
def setUpClass(cls):
Expand Down Expand Up @@ -262,7 +263,7 @@ def test_account_invoice_change_pricelist(self):
self.invoice.pricelist_id = self.sale_pricelist.id
self.invoice.button_update_prices_from_pricelist()
invoice_line = self.invoice.invoice_line_ids[:1]
self.assertEqual(invoice_line.price_unit, 60.00)
self.assertAlmostEqual(invoice_line.price_unit, 60.00)
self.assertEqual(invoice_line.discount, 0.00)

def test_account_invoice_pricelist_without_discount(self):
Expand All @@ -276,7 +277,7 @@ def test_account_invoice_with_discount_change_pricelist(self):
self.invoice.pricelist_id = self.sale_pricelist_with_discount.id
self.invoice.button_update_prices_from_pricelist()
invoice_line = self.invoice.invoice_line_ids[:1]
self.assertEqual(invoice_line.price_unit, 90.00)
self.assertAlmostEqual(invoice_line.price_unit, 90.00)
self.assertEqual(invoice_line.discount, 0.00)

def test_account_invoice_without_discount_change_pricelist(self):
Expand Down Expand Up @@ -307,7 +308,7 @@ def test_account_invoice_fixed_pricelist_with_discount_secondary_currency(self):
self.invoice.pricelist_id = self.sale_pricelist_fixed_with_discount_in_euros.id
self.invoice.button_update_prices_from_pricelist()
invoice_line = self.invoice.invoice_line_ids[:1]
self.assertEqual(invoice_line.price_unit, 60.00)
self.assertAlmostEqual(invoice_line.price_unit, 60.00)
self.assertEqual(invoice_line.discount, 0.00)

def test_account_invoice_fixed_pricelist_without_discount_secondary_currency(self):
Expand Down

0 comments on commit 42368e3

Please sign in to comment.