Skip to content

[18.0][MIG] maintenance_equipment_image: Migration to 18.0#516

Open
ypapouin wants to merge 18 commits intoOCA:18.0from
decgroupe:18.0-mig-maintenance_equipment_image
Open

[18.0][MIG] maintenance_equipment_image: Migration to 18.0#516
ypapouin wants to merge 18 commits intoOCA:18.0from
decgroupe:18.0-mig-maintenance_equipment_image

Conversation

@ypapouin
Copy link
Contributor

@ypapouin ypapouin commented Oct 13, 2025

Big headache for a basic thing.

Demo pictures have been added:
image

My first idea was to use a combination of a wildcard expression expr=".../*" (aka: select all children) with position="replace".
But Odoo is not working like this, node locate only returns the first value (return nodes[0] if nodes else None)

    <record id="hr_equipment_view_kanban" model="ir.ui.view">
        <field name="model">maintenance.equipment</field>
        <field name="inherit_id" ref="maintenance.hr_equipment_view_kanban" />
        <field name="arch" type="xml">
            <xpath expr="//t[@t-name='card']/*" position="replace" >
                <t t-name="card" class="flex-row">
                    <aside class="o_kanban_aside_full">
                        <field
                            name="image_128"
                            options="{
                                'placeholder': '/base/static/img/company_image.png',
                                'size': [150, 150],
                                'img_class': 'object-fit-cover'
                            }"
                            widget="image"
                        />
                    </aside>
                    <main class="ps-2 ms-1">$0</main>
                </t>
            </xpath>
        </field>
    </record>

Since there is no way to use an XPath expression to replace/move all children at once. I had to do it manually for each child.

@ypapouin ypapouin force-pushed the 18.0-mig-maintenance_equipment_image branch from c1a157b to 17df205 Compare October 13, 2025 14:32
@ypapouin ypapouin mentioned this pull request Oct 21, 2025
16 tasks
@github-actions
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 Feb 15, 2026
pedrocs-exo and others added 18 commits February 16, 2026 09:30
Currently translated at 100.0% (10 of 10 strings)

Translation: maintenance-14.0/maintenance-14.0-maintenance_equipment_image
Translate-URL: https://translation.odoo-community.org/projects/maintenance-14-0/maintenance-14-0-maintenance_equipment_image/it/
Currently translated at 100.0% (7 of 7 strings)

Translation: maintenance-16.0/maintenance-16.0-maintenance_equipment_image
Translate-URL: https://translation.odoo-community.org/projects/maintenance-16-0/maintenance-16-0-maintenance_equipment_image/es/
Currently translated at 100.0% (10 of 10 strings)

Translation: maintenance-16.0/maintenance-16.0-maintenance_equipment_image
Translate-URL: https://translation.odoo-community.org/projects/maintenance-16-0/maintenance-16-0-maintenance_equipment_image/it/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: maintenance-16.0/maintenance-16.0-maintenance_equipment_image
Translate-URL: https://translation.odoo-community.org/projects/maintenance-16-0/maintenance-16-0-maintenance_equipment_image/
Currently translated at 100.0% (7 of 7 strings)

Translation: maintenance-16.0/maintenance-16.0-maintenance_equipment_image
Translate-URL: https://translation.odoo-community.org/projects/maintenance-16-0/maintenance-16-0-maintenance_equipment_image/fr/
@ypapouin ypapouin force-pushed the 18.0-mig-maintenance_equipment_image branch from 17df205 to f10d72d Compare February 16, 2026 08:30
@github-actions github-actions bot removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Feb 22, 2026
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.

8 participants