Skip to content

Commit

Permalink
[IMP]sale_commission_check_deposit: test requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
matteonext committed Dec 18, 2024
1 parent a6e397d commit a37da41
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions sale_commission_check_deposit/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"license": "AGPL-3",
"depends": [
"sale_commission",
"account_check_deposit"
],
"website": "https://github.com/OCA/commission",
"data": ["views/account_journal_view.xml"],
Expand Down
5 changes: 2 additions & 3 deletions sale_commission_check_deposit/wizard/wizard_check_settle.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,14 @@ def _get_agent_lines(self, agent, date_to_agent):
agent_lines = super()._get_agent_lines(agent, date_to_agent)
for line in agent_lines.filtered(
lambda r: r.commission_id.invoice_state == "paid"
and r.invoice_id.invoice_payments_widget != "false"
and r.invoice_id.invoice_payments_widget
):
if not self.get_move_ids(line.invoice_id.invoice_payments_widget):
agent_lines -= line
return agent_lines

def get_move_ids(self, payments_widget):
move_dict = json.loads(payments_widget)
account_move_ids = [content["move_id"] for content in move_dict["content"]]
account_move_ids = [content["move_id"] for content in payments_widget["content"]]
move_lines = self.env["account.move.line"].search(
[
("move_id", "in", account_move_ids),
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-account_check_deposit @ git+https://github.com/OCA/account-financial-tools.git@refs/pull/1907/head#subdirectory=setup/account_check_deposit

0 comments on commit a37da41

Please sign in to comment.