Skip to content

[19.0][MIG] maintenance_stock - #567

Open
robyf70 wants to merge 21 commits into
OCA:19.0from
robyf70:19.0-mig-maintenance_stock
Open

robyf70 wants to merge 21 commits into
OCA:19.0from
robyf70:19.0-mig-maintenance_stock

Conversation

@robyf70

@robyf70 robyf70 commented Jun 18, 2026

Copy link
Copy Markdown

Migrated to 19.0

dalonsod and others added 20 commits June 18, 2026 16:53
Currently translated at 96.7% (29 of 30 strings)

Translation: maintenance-12.0/maintenance-12.0-maintenance_stock
Translate-URL: https://translation.odoo-community.org/projects/maintenance-12-0/maintenance-12-0-maintenance_stock/es/
Currently translated at 100.0% (30 of 30 strings)

Translation: maintenance-12.0/maintenance-12.0-maintenance_stock
Translate-URL: https://translation.odoo-community.org/projects/maintenance-12-0/maintenance-12-0-maintenance_stock/pt_BR/
Currently translated at 100.0% (30 of 30 strings)

Translation: maintenance-12.0/maintenance-12.0-maintenance_stock
Translate-URL: https://translation.odoo-community.org/projects/maintenance-12-0/maintenance-12-0-maintenance_stock/it/
Currently translated at 100.0% (30 of 30 strings)

Translation: maintenance-12.0/maintenance-12.0-maintenance_stock
Translate-URL: https://translation.odoo-community.org/projects/maintenance-12-0/maintenance-12-0-maintenance_stock/it/
- Invisible only hid the values in the column
- Replace invisible attribute with column_invisible in list views
to hide the whole column when it should not be visible
@robyf70
robyf70 force-pushed the 19.0-mig-maintenance_stock branch 2 times, most recently from 818e0e4 to cd52246 Compare June 18, 2026 15:45
@robyf70
robyf70 force-pushed the 19.0-mig-maintenance_stock branch from cd52246 to deb8dee Compare June 18, 2026 15:49
Comment on lines +49 to +58
# TODO Grouping by destination allows separating consumptions
# and returns. Look for a better system and remove this
show_groupby_to = (
len(
self.env["stock.move.line"]
.search([("maintenance_equipment_id", "=", self.id)])
.mapped("location_dest_id")
)
> 1
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
# TODO Grouping by destination allows separating consumptions
# and returns. Look for a better system and remove this
show_groupby_to = (
len(
self.env["stock.move.line"]
.search([("maintenance_equipment_id", "=", self.id)])
.mapped("location_dest_id")
)
> 1
)
dest_loc_groups = self.env["stock.move.line"]._read_group(
domain=[("maintenance_equipment_id", "=", self.id)],
groupby=["location_dest_id"],
limit=2,
)
show_groupby_to = len(dest_loc_groups) > 1

Comment on lines +53 to +62
# TODO Grouping by destination allows separating consumptions
# and returns. Look for a better system and remove this
show_groupby_to = (
len(
self.env["stock.move.line"]
.search([("maintenance_request_id", "=", self.id)])
.mapped("location_dest_id")
)
> 1
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
# TODO Grouping by destination allows separating consumptions
# and returns. Look for a better system and remove this
show_groupby_to = (
len(
self.env["stock.move.line"]
.search([("maintenance_request_id", "=", self.id)])
.mapped("location_dest_id")
)
> 1
)
dest_loc_groups = self.env["stock.move.line"]._read_group(
domain=[("maintenance_request_id", "=", self.id)],
groupby=["location_dest_id"],
limit=2,
)
show_groupby_to = len(dest_loc_groups) > 1

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

Labels

mod:maintenance_stock Module maintenance_stock series:19.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.