Skip to content

Commit

Permalink
Merge pull request #54 from hbrunn/14.0-316-percentage-rounding
Browse files Browse the repository at this point in the history
[FIX] #316 ps_planning: percentage rounding
  • Loading branch information
Stephanvandenberg authored Nov 14, 2024
2 parents be7344d + a95cf6a commit b94557e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ps_planning/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
"name": "PS planning",
"summary": "Planning tool for professional services",
"version": "14.0.1.0.0",
"version": "14.0.1.0.1",
"development_status": "Alpha",
"category": "Planning",
"website": "http://www.tosc.nl",
Expand Down
4 changes: 4 additions & 0 deletions ps_planning/migrations/14.0.1.0.1/pre-migration.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
def migrate(cr, version=None):
cr.execute(
"alter table ps_planning_report_wizard_line drop column budget_utilization"
)
7 changes: 4 additions & 3 deletions ps_planning/wizards/ps_planning_report_wizard.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,9 @@ def action_open_report(self):
- vals["days_planned_full_month"] * mtd_fraction,
days_actual_commercial_mtd=vals["days_actual_mtd"]
- vals["days_commercial_full_month"] * mtd_fraction,
budget_utilization=vals["days_actual_mtd"]
/ vals["days_commercial_full_month"]
budget_utilization=(
vals["days_actual_mtd"] / vals["days_commercial_full_month"]
)
if vals["days_commercial_full_month"]
else 1,
)
Expand Down Expand Up @@ -142,6 +143,6 @@ class PsPlanningReportWizardLine(models.TransientModel):
days_actual_mtd = fields.Integer("MTD Actual MD")
days_actual_planned_mtd = fields.Integer("MTD Actual - Planned MD")
days_actual_commercial_mtd = fields.Integer("MTD Actual - Commercial MD")
budget_utilization = fields.Integer("KPI % MTD")
budget_utilization = fields.Float("KPI % MTD", digits=(16, 2))
actual_commercial_ytm = fields.Integer("Actual Commercial YTM")
manager_name = fields.Char("Project Manager")

0 comments on commit b94557e

Please sign in to comment.