Files
Romain Derie 9d1269dbc0 [FIX] website: add website field in ir_asset list view
For some reason the `website_id` field was added in the form view of the
`ir.asset` model in a website module overide but it was not done for the
list view where it matters equally (if not most regarding the flow).

Indeed, those views / this model is mainly accessed for debugging
purpose in which case you are most likely looking for a specific asset.
In the website case, it's most of the time to find the custom asset
that was created following a scss customization in the right panel of
the website builder.
In such a case, it will have a website_id and will be easy to find in
the list view.

It's also the case for all the records having a `website_id`, we show
that field in both form and list view, it's always important when
managing / debugging DBs in multi-website environment.

See [1] for introduction of `ir.asset`.

[1]: https://github.com/odoo/odoo/commit/8cc066173dfb61bd95b8e1f0716f71f4e251810a

closes odoo/odoo#112156

X-original-commit: 1e6ea1a1e38f9769b91b80c3fd1e2ecabae35bb6
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-02-08 12:26:05 +01:00

24 lines
1013 B
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="asset_view_form_inherit_website" model="ir.ui.view">
<field name="name">ir.asset.form.inherit.website</field>
<field name="model">ir.asset</field>
<field name="inherit_id" ref="base.asset_view_form"/>
<field name="arch" type="xml">
<field name="directive" position="after">
<field name="website_id" options="{'no_create': True}" groups="website.group_multi_website"/>
</field>
</field>
</record>
<record id="asset_view_tree_inherit_website" model="ir.ui.view">
<field name="name">ir.asset.tree.inherit.website</field>
<field name="model">ir.asset</field>
<field name="inherit_id" ref="base.asset_view_tree"/>
<field name="arch" type="xml">
<field name="bundle" position="after">
<field name="website_id" groups="website.group_multi_website"/>
</field>
</field>
</record>
</odoo>