Skip to content

Commit

Permalink
[REF] minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
maksymkv25 committed Nov 9, 2023
1 parent f5e3338 commit 6dae668
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion sale_commission_so_based/__manifest__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright 2016-2022 Tecnativa - Pedro M. Baeza
{
"name": "Sales commissions based on Sale Order",
"author": "Opsway, " "Odoo Community Association (OCA)",
"author": "Opsway, " "Odoo Community Association (OCA), " "Tecnativa",
"license": "AGPL-3",
"website": "https://github.com/OCA/commission",
"category": "Sales Management",
Expand Down
10 changes: 5 additions & 5 deletions sale_commission_so_based/models/commission_settlement.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,26 @@ class SettlementLine(models.Model):
string="Source sale line",
)

@api.depends("invoice_agent_line_id", "sale_agent_line_id")
@api.depends("sale_agent_line_id")
def _compute_date(self):
# pylint: disable= missing-return
super()._compute_date()
for record in self:
if record.sale_agent_line_id:
record.date = record.sale_agent_line_id.invoice_date

@api.depends("invoice_agent_line_id", "sale_agent_line_id")
@api.depends("sale_agent_line_id")
def _compute_commission_id(self):
# pylint: disable= missing-return
super()._compute_date()
super()._compute_commission_id()
for record in self:
if record.sale_agent_line_id:
record.commission_id = record.sale_agent_line_id.commission_id

@api.depends("invoice_agent_line_id", "sale_agent_line_id")
@api.depends("sale_agent_line_id")
def _compute_settled_amount(self):
# pylint: disable= missing-return
super()._compute_date()
super()._compute_settled_amount()
for record in self:
if record.sale_agent_line_id:
record.settled_amount = record.sale_agent_line_id.amount

0 comments on commit 6dae668

Please sign in to comment.