Se rendre au contenu
Menu
Cette question a été signalée
1 Répondre
2709 Vues

i have to add a scroll bar in one2many table. How to achieve this in odoo?

Avatar
Ignorer
Meilleure réponse

Hi, 

To set the scrollbar for an one2Many field you just have to add width for the field, this can be achieved by adding a class on the field and styling the class in a CSS file, to attach a CSS file in odoo 14 the file should be mentioned in the assets XML file. The format for it is :


<?xml version="1.0" encoding="utf-8" ?>

<odoo>

<template id="assets_backend" inherit_id="web.assets_backend">

                         <xpath expr="." position="inside">

<link rel="stylesheet" href="/your_modulename/static/src/css/style.css"/>

                         </xpath>

                  </template>

             </odoo>


    in the CSS file:                 

​.your_class{ width: your_value px; }


    to set the scrollbar on height, set these attributes in CSS:                

​ .your_class{ height: your_value px;

​ overflow: auto; }


Hope it helps


Avatar
Ignorer
Publications associées Réponses Vues Activité
1
févr. 24
1327
1
juil. 25
2510
2
juil. 25
7952
2
juil. 25
4391
2
juil. 25
4100