Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0][MIG] project_forecast_line #1247

Open
wants to merge 75 commits into
base: 16.0
Choose a base branch
from

Conversation

ntsirintanis
Copy link

No description provided.

Copy link
Member

@dreispt dreispt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please squash your fixup commits

@ntsirintanis ntsirintanis force-pushed the 16.0-mig-project_forecast_line branch from 7ffa1c0 to a5080b7 Compare April 29, 2024 07:13
Copy link

github-actions bot commented Sep 1, 2024

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Sep 1, 2024
@gjotten
Copy link

gjotten commented Sep 4, 2024

@OCA/project-service-maintainers this needs a no-stale

Copy link
Contributor

@alexey-pelykh alexey-pelykh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM

@github-actions github-actions bot removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Sep 8, 2024
yankinmax and others added 18 commits October 24, 2024 09:03
in some cases, we could have capacity consumed by a task which was not matching
a work capacity line in the period because of a faulty optimisation we were making
which skipped the creation of lines with a capacity of 0 -> then we had no line on which
to compute the negative consolidated capacity.

We remove the optimisation to fix this case and show the problematic periods
in the consolidated capacity graphs
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: project-15.0/project-15.0-project_forecast_line
Translate-URL: https://translation.odoo-community.org/projects/project-15-0/project-15-0-project_forecast_line/
During some operations, forecast lines are deleted and recreated. This
can lead to some hr.employee.forecast.role lines being deleted which
leaves the forecast lines on the same period without a related document
to store the consolidated capacity. Normally that line is recreated
shortly afterwards but the creation does not recompute the link between
the parent-less lines and the new one. This patches forces the
recomputation when new lines are created.
OCA-git-bot and others added 23 commits October 24, 2024 09:03
Currently translated at 100.0% (95 of 95 strings)

Translation: project-15.0/project-15.0-project_forecast_line
Translate-URL: https://translation.odoo-community.org/projects/project-15-0/project-15-0-project_forecast_line/it/
Currently translated at 100.0% (95 of 95 strings)

Translation: project-15.0/project-15.0-project_forecast_line
Translate-URL: https://translation.odoo-community.org/projects/project-15-0/project-15-0-project_forecast_line/it/
Currently translated at 100.0% (95 of 95 strings)

Translation: project-15.0/project-15.0-project_forecast_line
Translate-URL: https://translation.odoo-community.org/projects/project-15-0/project-15-0-project_forecast_line/it/
Currently translated at 100.0% (95 of 95 strings)

Translation: project-15.0/project-15.0-project_forecast_line
Translate-URL: https://translation.odoo-community.org/projects/project-15-0/project-15-0-project_forecast_line/it/
when running in multi company, sometimes the user making a change is not connected
using the company of the record. In this case the default value for company_id on
forecast.line will lead to a wrong forecast.

we fix this by using the best company when updating the forecast (the
employee's company for task assigned to employees or leaves, the sale
line's company for sales forecast
the condition was wrong, preventing the fast update from being used
when only the remaining time is updated
Currently translated at 100.0% (95 of 95 strings)

Translation: project-15.0/project-15.0-project_forecast_line
Translate-URL: https://translation.odoo-community.org/projects/project-15-0/project-15-0-project_forecast_line/it/
when using the quick update, we would get an inversion of the sign of the forecast
because the ratio was negative
Currently translated at 100.0% (95 of 95 strings)

Translation: project-15.0/project-15.0-project_forecast_line
Translate-URL: https://translation.odoo-community.org/projects/project-15-0/project-15-0-project_forecast_line/es/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: project-15.0/project-15.0-project_forecast_line
Translate-URL: https://translation.odoo-community.org/projects/project-15-0/project-15-0-project_forecast_line/
Currently translated at 100.0% (95 of 95 strings)

Translation: project-15.0/project-15.0-project_forecast_line
Translate-URL: https://translation.odoo-community.org/projects/project-15-0/project-15-0-project_forecast_line/it/
Currently translated at 100.0% (95 of 95 strings)

Translation: project-15.0/project-15.0-project_forecast_line
Translate-URL: https://translation.odoo-community.org/projects/project-15-0/project-15-0-project_forecast_line/it/
tarteo added a commit to onesteinbv/addons-oca that referenced this pull request Nov 15, 2024
Copy link
Member

@tarteo tarteo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good so far. I partly tested this, I'll continue next week

<field name="inherit_id" ref="project.view_task_form2" />
<field name="arch" type="xml">
<field name="parent_id" position="before">
<field name="forecast_role_id" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is outside the sheet of the form:

image

_inherit = ["project.task", "forecast.line.mixin"]

forecast_role_id = fields.Many2one("forecast.role", ondelete="restrict")
forecast_date_planned_start = fields.Date("Planned start date")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it better to use existing fields from project_timeline?

class="app_settings_block"
data-string="Forecast"
string="Forecast"
data-key="project_forecast_line"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be changed to forecast, or the action should be changed. Otherwise this happens:

image

if not task._should_have_forecast():
task_with_lines_to_clean.append(task.id)
continue
if task.project_id.stage_id:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When updating tasks I get this error:

image
Because of

image
If I assign the group to the user I don't get it.

@@ -0,0 +1,85 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="sale_order_software_project" model="sale.order">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpicking: Too much indentation

@tarteo
Copy link
Member

tarteo commented Nov 19, 2024

@ntsirintanis Will you be working on this or can I continue the work?

@ntsirintanis
Copy link
Author

@ntsirintanis Will you be working on this or can I continue the work?

Hi @tarteo

First of all thanks for your review, very very much appreciated. I will probably pick it up next week, but if you are in a hurry, please go ahead and push your commits.

@tarteo
Copy link
Member

tarteo commented Nov 19, 2024

👍 Awesome thanks @ntsirintanis !!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.