Skip to content

Commit

Permalink
[IMP] tg_sale_commission: pre-commit auto fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
kwhatk0k3 committed Oct 9, 2024
1 parent a706836 commit 2f5dfcc
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 12 deletions.
2 changes: 1 addition & 1 deletion tg_sale_commission/__manifest__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": """Sales commissions modifications for Tribal Gathering""",
"version": "14.0.0.1.0",
"version": "17.0.0.1.0",
"author": "IT-Projects LLC, Eugene Molotov",
"support": "[email protected]",
"website": "https://github.com/it-projects-llc/tg-addons",
Expand Down
10 changes: 5 additions & 5 deletions tg_sale_commission/models/settlement.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ class Settlement(models.Model):
def name_get(self):
res = []
for record in self:
name = _("Settlement for %s (%s - %s)") % (
record.agent_id.name,
record.date_from,
record.date_to,
)
name = _("Settlement for %(agent_name)s (%(date_from)s - %(date_to)s)") % {
"agent_name": record.agent_id.name,
"date_from": record.date_from,
"date_to": record.date_to,
}
res.append((record.id, name))
return res

Expand Down
3 changes: 3 additions & 0 deletions tg_sale_commission/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
8 changes: 2 additions & 6 deletions tg_sale_commission/wizard/wizard_settle.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,9 @@ class SaleCommissionMakeSettle(models.TransientModel):
def _get_settlement(self, agent, company, sett_from, sett_to):
if company.commission_settlement_company:
company = company.commission_settlement_company
return super(SaleCommissionMakeSettle, self)._get_settlement(
agent, company, sett_from, sett_to
)
return super()._get_settlement(agent, company, sett_from, sett_to)

def _prepare_settlement_vals(self, agent, company, sett_from, sett_to):
if company.commission_settlement_company:
company = company.commission_settlement_company
return super(SaleCommissionMakeSettle, self)._prepare_settlement_vals(
agent, company, sett_from, sett_to
)
return super()._prepare_settlement_vals(agent, company, sett_from, sett_to)

0 comments on commit 2f5dfcc

Please sign in to comment.