Skip to content

Commit

Permalink
[REF] intrastat_product: fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
dreispt committed Sep 12, 2024
1 parent bd2eedc commit f24ab29
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion intrastat_product/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ class AccountMoveLine(models.Model):
def _compute_hs_code_id(self):
for rec in self:
intrastat_line = self.move_id.intrastat_line_ids.filtered(
lambda r: r.invoice_line_id == rec
lambda r, rec: r.invoice_line_id == rec
)
rec.hs_code_id = (
intrastat_line.hs_code_id or rec.product_id.get_hs_code_recursively()
Expand Down
2 changes: 1 addition & 1 deletion intrastat_product/models/intrastat_product_declaration.py
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ def _gather_invoices(self, notedict):
"line_nbr": line_nbr,
}
inv_intrastat_line = invoice.intrastat_line_ids.filtered(
lambda r: r.invoice_line_id == inv_line
lambda r, inv_line: r.invoice_line_id == inv_line
)

if (
Expand Down
4 changes: 2 additions & 2 deletions intrastat_product/tests/common_purchase.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ def _check_line_values(self, final=False, declaration=None, purchase=None):
for line in purchase.order_line:
expected_vals = self._get_expected_vals(line)
comp_line = declaration.computation_line_ids.filtered(
lambda cline: cline.product_id == line.product_id
lambda cline, line: cline.product_id == line.product_id
)
self.assertTrue(
all(comp_line[key] == val for key, val in expected_vals.items())
)
if final:
decl_line = declaration.declaration_line_ids.filtered(
lambda dline: comp_line in dline.computation_line_ids
lambda comp_line, dline: comp_line in dline.computation_line_ids
)
self.assertTrue(
all(decl_line[key] == val for key, val in expected_vals.items())
Expand Down
4 changes: 2 additions & 2 deletions intrastat_product/tests/common_sale.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ def _check_line_values(self, final=False, declaration=None, sale=None):
for line in sale.order_line:
expected_vals = self._get_expected_vals(line)
comp_line = declaration.computation_line_ids.filtered(
lambda cline: cline.product_id == line.product_id
lambda cline, line: cline.product_id == line.product_id
)
self.assertTrue(
all(comp_line[key] == val for key, val in expected_vals.items())
)
if final:
decl_line = declaration.declaration_line_ids.filtered(
lambda dline: comp_line in dline.computation_line_ids
lambda comp_line, dline: comp_line in dline.computation_line_ids
)
self.assertTrue(
all(decl_line[key] == val for key, val in expected_vals.items())
Expand Down

0 comments on commit f24ab29

Please sign in to comment.