Skip to content

Commit

Permalink
[18.0][MIG] account_move_tier_validation: Migration to 18.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinkhao committed Nov 11, 2024
1 parent 4f314a7 commit 4b19155
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 7 deletions.
3 changes: 3 additions & 0 deletions account_move_tier_validation/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ Contributors

- Odoo Perú <[email protected]>
- Tharathip Chaweewongphan <[email protected]>
- `360ERP <https://www.360erp.com>`__:

- Kevin Khao <[email protected]>

Maintainers
-----------
Expand Down
2 changes: 1 addition & 1 deletion account_move_tier_validation/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"name": "Account Move Tier Validation",
"summary": "Extends the functionality of Account Moves to "
"support a tier validation process.",
"version": "16.0.1.0.1",
"version": "18.0.1.0.1",
"category": "Accounts",
"website": "https://github.com/OCA/account-invoicing",
"author": "PESOL, Odoo Community Association (OCA)",
Expand Down
2 changes: 1 addition & 1 deletion account_move_tier_validation/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def _get_under_validation_exceptions(self):
return super()._get_under_validation_exceptions() + ["needed_terms_dirty"]

def _get_to_validate_message_name(self):
name = super(AccountMove, self)._get_to_validate_message_name()
name = super()._get_to_validate_message_name()
if self.move_type == "in_invoice":
name = _("Bill")
elif self.move_type == "in_refund":
Expand Down
2 changes: 2 additions & 0 deletions account_move_tier_validation/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
- Odoo Perú \<<[email protected]>\>
- Tharathip Chaweewongphan \<<[email protected]>\>
- [360ERP](https://www.360erp.com):
- Kevin Khao <<[email protected]>>
4 changes: 4 additions & 0 deletions account_move_tier_validation/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,10 @@ <h2><a class="toc-backref" href="#toc-entry-7">Contributors</a></h2>
<ul class="simple">
<li>Odoo Perú &lt;<a class="reference external" href="mailto:info&#64;odooperu.pe">info&#64;odooperu.pe</a>&gt;</li>
<li>Tharathip Chaweewongphan &lt;<a class="reference external" href="mailto:tharathipc&#64;ecosoft.co.th">tharathipc&#64;ecosoft.co.th</a>&gt;</li>
<li><a class="reference external" href="https://www.360erp.com">360ERP</a>:<ul>
<li>Kevin Khao &lt;<a class="reference external" href="mailto:kevinkhao&#64;gmail.com">kevinkhao&#64;gmail.com</a>&gt;</li>
</ul>
</li>
</ul>
</div>
<div class="section" id="maintainers">
Expand Down
10 changes: 5 additions & 5 deletions account_move_tier_validation/tests/test_tier_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@

from odoo import _, fields
from odoo.exceptions import ValidationError
from odoo.tests import common
from odoo.tests.common import tagged
from odoo.tests import Form
from odoo.tests.common import TransactionCase, tagged


@tagged("post_install", "-at_install")
class TestAccountTierValidation(common.TransactionCase):
class TestAccountTierValidation(TransactionCase):
def test_01_tier_definition_models(self):
res = self.env["tier.definition"]._get_tier_validation_model_names()
self.assertIn("account.move", res)
Expand All @@ -20,10 +20,10 @@ def test_02_form(self):
"model_id": self.env["ir.model"]
.search([("model", "=", "account.move")])
.id,
"definition_domain": "[('move_type', '=', '%s')]" % _type,
"definition_domain": f"[('move_type', '=', '{_type}')]",
}
)
with common.Form(
with Form(
self.env["account.move"].with_context(default_move_type=_type)
) as form:
form.save()
Expand Down
1 change: 1 addition & 0 deletions test-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
odoo-addon-base_tier_validation @ git+https://github.com/OCA/server-ux.git@refs/pull/966/head#subdirectory=base_tier_validation

0 comments on commit 4b19155

Please sign in to comment.