تخطي للذهاب إلى المحتوى
أودو القائمة
  • تسجيل الدخول
  • جرب مجاناً
  • التطبيقات
    المالية
    • المحاسبة
    • فوترة
    • النفقات
    • جدول البيانات (BI)
    • المستندات
    • توقيع إلكتروني
    المبيعات
    • إدارة علاقات العملاء
    • المبيعات
    • نقطة البيع للمتاجر
    • نقطة البيع للمطاعم
    • الاشتراكات
    • تأجير
    المواقع الإلكترونية
    • أداة بناء المواقع الإلكترونية
    • متاجر إلكترونية
    • مدونة
    • المنتدى
    • دردشة مباشرة
    • التعليم الإلكتروني
    سلسلة التوريد
    • المستودعات
    • التصنيع
    • إدارة دورة حياة المنتج
    • المشتريات
    • الصيانة
    • الجودة
    الموارد البشرية
    • موظفون
    • التوظيف
    • إجازة عمل
    • التقييمات
    • الإحالات
    • تطبيق الأسطول
    التسويق
    • التسويق الإجتماعي
    • التسويق عبر البريد الإلكتروني
    • التسويق عبر الرسائل النصية
    • فعاليات
    • أتمتة التسويق
    • الاستطلاعات
    الخدمات
    • المشاريع
    • الجداول الزمنية
    • الخدمة الميدانية
    • مكتب المساعدة
    • التخطيط
    • مواعيد
    اﻹنتاجية
    • مناقشة
    • الموافقات
    • إنترنت الأشياء "IoT"
    • بروتوكول ربط المحادثات الصوتية عبر الإنترنت
    • المعرفة
    • WhatsApp
    التطبيقات الخارجية ستوديو أودو منصة أودو السحابية
  • قطاعات الأعمال
    البيع بالتجزئة
    • متجر كتب
    • متجر ملابس
    • متجر أثاث
    • متجر بقالة
    • متجر معدات
    • متجر ألعاب
    الطعام والضيافة
    • بار وحانة
    • المطعم
    • مطعم للوجبات السريعة
    • نزل للضيوف
    • موزّع مشروبات
    • فندق
    العقارات
    • وكالة عقارات
    • شركة هندسة معمارية
    • البناء
    • إدارة العقارات
    • العناية بالحدائق
    • اتحاد مُلاّك العقارات
    استشارة
    • مؤسسة محاسبية
    • شريك أودو
    • وكالة تسويقية
    • منشأة قانونية
    • استقطاب المواهب
    • التدقيق والتوثيق
    التصنيع
    • الأقمشة
    • معدني
    • الأثاث
    • الطعام
    • مصنع خمور
    • هدايا الشركات
    الصحة واللياقة البدنية
    • نادي رياضي
    • متجر نظارات
    • مركز لياقة بدنية
    • الممارسون الصحيون
    • صيدلية
    • صالون تصفيف الشعر
    التجارة
    • عامل صيانة
    • الأجهزة والمعدات التقنية ودعمها
    • أنظمة الطاقة الشمسية
    • صانع أحذية
    • خدمات التنظيف
    • خدمات التكييف (HVAC)
    غير ذلك
    • منظمة غير ربحية
    • وكالة بيئية
    • تأجير لوحات إعلانية
    • تصوير
    • تأجير دراجات
    • بائع وسيط للبرمجيات
    تصفح كافة قطاعات الأعمال
  • مجتمع أودو
    تعلم
    • دروس
    • التوثيق
    • شهادات
    • التدريب
    • مدونة
    • بودكاست
    قم بتعزيز التعليم
    • برنامج تعليم
    • Scale UP! لعبة الأعمال
    • قم بزيارة أودو
    احصل على البرنامج
    • تحميل
    • قارنْ الإصدارات
    • إطلاق
    تعاون
    • جيت هاب "Github"
    • المنتدى
    • فعاليات
    • الترجمات
    • كنْ شريكاً
    • خدمات الشركاء
    • سجل مكتب المحاسبة الخاص بك
    احصل على الخدمات
    • اعثر على شريك
    • اعثر على محاسب
    • قابل أحد مرشدي الأعمال
    • خدمات التنفيذ
    • مراجع العملاء
    • الدعم
    • الترقيات
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    الحصول على عرض توضيحي
  • الأسعار
  • المساعدة

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • إدارة علاقات العملاء
  • e-Commerce
  • المحاسبة
  • المخزون
  • PoS
  • المشروع
  • MRP
All apps
يجب أن تكون مسجلاً حتى تتفاعل مع المجتمع.
كافة المنشورات الأفراد الشارات
علامات التصنيف (عرض الكل)
odoo accounting v14 pos v15
حول هذا المنتدى
يجب أن تكون مسجلاً حتى تتفاعل مع المجتمع.
كافة المنشورات الأفراد الشارات
علامات التصنيف (عرض الكل)
odoo accounting v14 pos v15
حول هذا المنتدى
المساعدة

Fields defined as char take up way to much space in list view

اشتراك

تسلم الإشعارات عندما يكون هناك نشاط في هذا المنشور

لقد تم الإبلاغ عن هذا السؤال
development
4 الردود
2883 أدوات العرض
الصورة الرمزية
Blerton Ismaili

I've been following the written tutorial, and I am currently at Chapter 6: Basic Views.

The next step was to create the following list view (tried to upload image, couldn't), and I got everything to work except the Title and Postcode (both char fields) take up almost all of the width, and the columns don't equally divide the width.

I looked for ways to make this work, but the only "decent" solution was to set the width to a fixed amount in pixels.


My question would be, how did the guide achieve making all columns take up equal space.


Thank you for your time :)

1
الصورة الرمزية
إهمال
الصورة الرمزية
Andry Ang
أفضل إجابة

Hi Blerton,


Edit: 

I see you mentioned list. My bad haha.

What you do is already on the right track by adjusting the "width" attribute. But, as you need to know that odoo's table is auto adjusted to fit the contents. If you have a very long title and very short postcode, it will auto adjust to try to fit it as "fair" as possible. Check the reference here


If you really insist to change the width. It might be too "forcing" and I afraid mess up other columns size. You can dive into the css or js files in the web module to know what's the width for each field types.


Hope this helps.


Previous reply:

I assume you are referring to this. It would be best if you could share your current code so we can work from there.


I would suggest you to follow this code as reference only and I only write the starting from the <form> tag only

<form string="Property Form">

<sheet>

<div class="oe_title">

<label for="name"/> <!-- This is the label for the name field: optional -->

<h1><field name="name" class="oe_inline"/></h1>

</div>

<group>

<group>

<field name="postcode"/>

<field name="available_from"/>

</group>

<group>

<field name="expected_price"/>

<field name="selling_price"/>

</group>

</group>

<!-- This is a notebook with description page: I skip this -->

<notebook></notebook>

</sheet>

</form>

Hope this helps.

1
الصورة الرمزية
إهمال
الصورة الرمزية
Christoph Farnleitner
أفضل إجابة

https://www.odoo.com/documentation/18.0/developer/tutorials/server_framework_101/06_basicviews.html#list

Just so we're talking about the same thing here: the columns shown in the tutorial have never been equally sized nor equally spaced to begin with.


Given a small enough view port, any list will look 'almost equally spaced' if enough columns are there.

Apart from that the width-attribute is correct. Else you would need to add a class to the list and create a stylesheet specific to it (which I wouldn't suggest you to do just for the sake of column widths unless the nature of the data in that list explicitly require it).

0
الصورة الرمزية
إهمال
الصورة الرمزية
Ariko Stephen Philemon
أفضل إجابة

Ran into the same isuue. Getting results different from those expected by the tutorial is a huge bad learning experience. If the tutorial intended to delay explanations on column width customization, the tutorial should have explicitly stated this.

0
الصورة الرمزية
إهمال
الصورة الرمزية
Blerton Ismaili
الكاتب أفضل إجابة

This was described as the form view, what I meant is the list view, where you can see all record and choose a single record to view. (I would post a picture but I dont have enough karma).

<record id="estate_property_view_list" model="ir.ui.view">
<field name="name">estate.property.view.list</field>
<field name="model">estate.property</field>
<field name="arch" type="xml">
<list string="Properties">
<field name="title" width="150px"/>
<field name="postcode" width="50px"/>
<field name="bedrooms"/>
<field name="living_area"/>
<field name="expected_price"/>
<field name="selling_price"/>
<field name="date_availability"/>
</list>
</field>
</record>


This is the code I'm using, where I use the width attribute to kind-of fix this issue (but if there were texts longer than this they wont be entirely visible), but isn't there any better way to make it only take up as much space as it needs.

What I want is each column to take the same amount of space, these char fields mess things up.


Thanks for your time


Edit: I somehow messed this up, didn't know I had to comment your response .-.

0
الصورة الرمزية
إهمال
Blerton Ismaili
الكاتب

"But, as you need to know that odoo's table is auto adjusted to fit the contents." - This is the part that I find confusing since it doesn't seem to do that for me.

The width is *WAY* bigger than the content, meaning the width isn't correctly adjusting to the content.

In my case the title takes like 40% of the screen, same for the postcode, and then all the other fields are crammed into the rest of the screen. (If i dont specify the width my self)

Any idea why that might be happening?

In the meantime manually setting the width will have to do I guess

هل أعجبك النقاش؟ لا تكن مستمعاً فقط. شاركنا!

أنشئ حساباً اليوم لتستمتع بالخصائص الحصرية، وتفاعل مع مجتمعنا الرائع!

تسجيل
المنشورات ذات الصلة الردود أدوات العرض النشاط
Odoo 17: How to Create a Custom Table Header in List (Tree) View Using OWL
development
الصورة الرمزية
0
ديسمبر 25
105
How to create custom Table header by using odoo 17
development
الصورة الرمزية
الصورة الرمزية
1
ديسمبر 25
334
Oddo Integration with Intune
development
الصورة الرمزية
0
ديسمبر 25
1748
@guia@¿Cómo hablar con una persona en Air France?
development
الصورة الرمزية
0
ديسمبر 25
2
How do I change the name of the module, or rather the name assigned to the module, after I created it in Odoo Studio?
development
الصورة الرمزية
الصورة الرمزية
1
ديسمبر 25
558
المجتمع
  • دروس
  • التوثيق
  • المنتدى
مصدر مفتوح
  • تحميل
  • جيت هاب "Github"
  • المشغل الآلي رنبوت
  • الترجمات
خدماتنا
  • استضافة أودو إس إتش
  • الدعم
  • الترقية
  • التطويرات المخصصة
  • التعليم
  • اعثر على محاسب
  • اعثر على شريك
  • كنْ شريكاً
معلومات عنا
  • شركتنا
  • أصول العلامة التجارية
  • اتصلْ بنا
  • الوظائف
  • فعاليات
  • بودكاست
  • مدونة
  • عملاء
  • قانوني • الخصوصية
  • الحماية
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

أودو هو عبارة عن مجموعة من تطبيقات الأعمال مفتوحة المصدر التي تغطي جميع احتياجات شركتك، مثل: إدارة علاقات العملاء والتجارة الإلكترونية والمحاسبة والمخزون ونقاط البيع وإدارة المشاريع وما إلى ذلك.

ما يجعل من أودو مميزاً هو هدفه بأن يكون سهل الاستخدام للغاية ومتكاملاً تمامًا في الوقت ذاته.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now