Skip to content

Commit

Permalink
[17.0][MIG] account_invoice_fiscal_position_update
Browse files Browse the repository at this point in the history
  • Loading branch information
moitabenfdz committed Dec 23, 2024
1 parent 15d5830 commit 9da5a97
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 5 deletions.
2 changes: 2 additions & 0 deletions account_invoice_fiscal_position_update/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ Contributors

- Roel Adriaans <[email protected]>

- Marcos Oitabén <[email protected]>

- `Tecnativa <https://www.tecnativa.com>`__:

- Ernesto Tejeda
Expand Down
2 changes: 1 addition & 1 deletion account_invoice_fiscal_position_update/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

{
"name": "Invoice Fiscal Position Update",
"version": "16.0.1.0.0",
"version": "17.0.1.0.0",
"category": "Accounting",
"license": "AGPL-3",
"summary": "Changing the fiscal position of an invoice will auto-update "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def _onchange_fiscal_position_id_account_invoice_fiscal_position_invoice(self):
res = {}
lines_without_product = self.env["account.move.line"]
invoice_lines = self.invoice_line_ids.filtered(
lambda l: "product" == l.display_type
lambda k: "product" == k.display_type
)
for line in invoice_lines:
if not line.product_id:
Expand Down
2 changes: 2 additions & 0 deletions account_invoice_fiscal_position_update/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

- Roel Adriaans \<<[email protected]>\>

- Marcos Oitabén \<<[email protected]>\>

- [Tecnativa](https://www.tecnativa.com):

> - Ernesto Tejeda
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,8 @@ <h2><a class="toc-backref" href="#toc-entry-5">Contributors</a></h2>
</li>
<li><p class="first">Roel Adriaans &lt;<a class="reference external" href="mailto:roel&#64;road-support.nl">roel&#64;road-support.nl</a>&gt;</p>
</li>
<li><p class="first">Marcos Oitabén &lt;<a class="reference external" href="mailto:marcos.oitaben&#64;dynapps.eu">marcos.oitaben&#64;dynapps.eu</a>&gt;</p>
</li>
<li><p class="first"><a class="reference external" href="https://www.tecnativa.com">Tecnativa</a>:</p>
<blockquote>
<ul class="simple">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class TestProductIdChange(AccountTestInvoicingCommon):
"""

def setUp(self):
super(TestProductIdChange, self).setUp()
super().setUp()
self.invoice_model = self.env["account.move"]
self.fiscal_position_model = self.env["account.fiscal.position"]
self.fiscal_position_tax_model = self.env["account.fiscal.position.tax"]
Expand Down Expand Up @@ -140,7 +140,7 @@ def test_fiscal_position_id_change(self):
onchange_result = out_invoice.with_context(
check_move_validity=False
)._onchange_fiscal_position_id_account_invoice_fiscal_position_invoice()
self.assertTrue(type(onchange_result) == dict)
self.assertTrue(isinstance(onchange_result, dict))
self.assertEqual(list(onchange_result.keys()), ["warning"])

# for all lines without product
Expand All @@ -165,5 +165,5 @@ def test_fiscal_position_id_change(self):
onchange_result = out_invoice_without_prd.with_context(
check_move_validity=False
)._onchange_fiscal_position_id_account_invoice_fiscal_position_invoice()
self.assertTrue(type(onchange_result) == dict)
self.assertTrue(isinstance(onchange_result, dict))
self.assertEqual(list(onchange_result.keys()), ["warning"])

0 comments on commit 9da5a97

Please sign in to comment.