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

[17.0][MIG] project_stock: Migration to 17.0 #1306

Open
wants to merge 72 commits into
base: 17.0
Choose a base branch
from

Conversation

joaoc-exo
Copy link

No description provided.

victoralmau and others added 30 commits June 26, 2024 17:30
TT34554

[UPD] Update project_stock.pot

[UPD] README.rst
…e access to stock.

TT35899

project_stock 13.0.1.1.0
…ailability materials" button (if movements have been added after confirming the materials).

TT35602

project_stock 13.0.1.1.1
…e if there is any assigned move.

TT36812

[UPD] Update project_stock.pot

project_stock 13.0.1.1.2

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: project-13.0/project-13.0-project_stock
Translate-URL: https://translation.odoo-community.org/projects/project-13-0/project-13-0-project_stock/
TT34555

[UPD] Update project_stock.pot
… sections (project and task) from stock to stock.group_stock_user.

TT35602
…in moves to prevent merge moves from another tasks.

TT37708

[UPD] Update project_stock.pot

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: project-13.0/project-13.0-project_stock
Translate-URL: https://translation.odoo-community.org/projects/project-13-0/project-13-0-project_stock/
TT37708

project_stock 13.0.2.0.1

project_stock 13.0.2.1.0
TT37028

[UPD] Update project_stock.pot

[UPD] README.rst
Currently translated at 94.6% (53 of 56 strings)

Translation: project-14.0/project-14.0-project_stock
Translate-URL: https://translation.odoo-community.org/projects/project-14-0/project-14-0-project_stock/hr/
We need to apply sudo to avoid error if the user does not have access to analytical accounting.
TT38702

project_stock 14.0.1.0.1
The possibility of set a specific date in project or task has been added
so that if it is set it will be used in analytic items linked to materials.

TT38988

[UPD] Update project_stock.pot

project_stock 14.0.1.1.0

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: project-14.0/project-14.0-project_stock
Translate-URL: https://translation.odoo-community.org/projects/project-14-0/project-14-0-project_stock/
Currently translated at 33.3% (19 of 57 strings)

Translation: project-14.0/project-14.0-project_stock
Translate-URL: https://translation.odoo-community.org/projects/project-14-0/project-14-0-project_stock/it/
…ns in tasks.

TT39639

project_stock 14.0.1.1.1
@joaoc-exo joaoc-exo force-pushed the 17.0-mig-project_stock branch from 18e5aa8 to 243d729 Compare June 26, 2024 20:18
@andrel-exo
Copy link

LGTM!

@joaoc-exo joaoc-exo mentioned this pull request Jun 27, 2024
29 tasks
@rousseldenis
Copy link

/ocabot migration project_stock

@OCA-git-bot OCA-git-bot added this to the 17.0 milestone Jul 11, 2024
@rousseldenis
Copy link

@JffCosta Could you check tests?

@joaoc-exo joaoc-exo force-pushed the 17.0-mig-project_stock branch from 9182f5a to 95720be Compare July 11, 2024 14:53
Copy link

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 Nov 10, 2024
@coleste
Copy link

coleste commented Nov 12, 2024

why does codecov hit test files?
I've seen the same thing in other module # Prevent incoherence when hr_timesheet addon is installed.

@pedrobaeza pedrobaeza removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Nov 13, 2024
Copy link
Member

@pedrobaeza pedrobaeza 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 the migration commits into one (excluding pre-commit auto-fixes one).

Don't pay attention to codecov thing. It's not relevant.

@joaoc-exo joaoc-exo force-pushed the 17.0-mig-project_stock branch from e2a01f1 to a9bcf7d Compare November 13, 2024 10:53
@joaoc-exo
Copy link
Author

@pedrobaeza
can you check, please ?

@@ -44,9 +44,7 @@ class ProjectTask(models.Model):
comodel_name="stock.picking.type",
string="Operation Type",
readonly=False,
domain="[('company_id', '=', company_id)]",
Copy link
Member

Choose a reason for hiding this comment

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

Why are you removing this?

Copy link

Choose a reason for hiding this comment

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

BTW, in v17, task.company_id is computed from project.company_id and this field can be false in mono company database.
On the other hand, stock_move.company_id is mandatory.
Something must force company_id = self.env.company when stock_move is created

@@ -63,11 +61,6 @@ class ProjectTask(models.Model):
check_company=True,
)
stock_analytic_date = fields.Date(string="Analytic date")
unreserve_visible = fields.Boolean(
Copy link
Member

Choose a reason for hiding this comment

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

Why removing this feature?

self.move_ids._action_confirm()
self.move_ids.filtered(
lambda move: move.state not in ("draft", "cancel", "done")
)._trigger_scheduler()
Copy link
Member

Choose a reason for hiding this comment

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

This actions shouldn't trigger the scheduler.

@@ -189,23 +179,11 @@ def button_scrap(self):
"target": "new",
}

def do_unreserve(self):
Copy link
Member

Choose a reason for hiding this comment

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

Why removing this feature?

@victoralmau
Copy link
Member

Please, cherry-pick #1421 to commit history

Copy link

@cvinh cvinh left a comment

Choose a reason for hiding this comment

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

in v17, task.company_id is computed from project.company_id and this field can be false in mono company database.

On the other hand, stock_move.company_id is mandatory.
Something must force company_id = self.env.company when stock_move is create
I suggest inheriting create function

)
raw_material_task_id = fields.Many2one(
comodel_name="project.task", string="Task for material", check_company=True
)
Copy link

@cvinh cvinh Feb 19, 2025

Choose a reason for hiding this comment

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

Suggested change
)
)
@api.model_create_multi
def create(self, vals_list):
for vals in vals_list:
if not vals['company_id']:
vals['company_id'] = self.env.company.id
return super().create(vals_list)

@Crazor
Copy link

Crazor commented Feb 25, 2025

It would be awesome if the pending changes could be reviewed and merged soon-ish. I'd really like to use this on Odoo 17. I'm happy to test before merge, but I'm not sure how I should check out the PR with the requested changes.

@victoralmau
Copy link
Member

Please, cherry-pick #1421 to commit history

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

Successfully merging this pull request may close these issues.