Zum Inhalt springen
Odoo Menü
  • Anmelden
  • Jetzt gratis testen
  • Apps
    Finanzen
    • Buchhaltung
    • Rechnungsstellung
    • Spesenabrechnung
    • Tabellenkalkulation (BI)
    • Dokumente
    • E-Signatur
    Vertrieb
    • CRM
    • Vertrieb
    • Kassensystem – Shop
    • Kassensystem – Restaurant
    • Abonnements
    • Vermietung
    Websites
    • Website-Builder
    • E-Commerce
    • Blog
    • Forum
    • Livechat
    • E-Learning
    Lieferkette
    • Lager
    • Fertigung
    • PLM
    • Einkauf
    • Wartung
    • Qualität
    Personalwesen
    • Mitarbeiter
    • Personalbeschaffung
    • Abwesenheiten
    • Mitarbeiterbeurteilung
    • Personalempfehlungen
    • Fuhrpark
    Marketing
    • Social Marketing
    • E-Mail-Marketing
    • SMS-Marketing
    • Veranstaltungen
    • Marketing-Automatisierung
    • Umfragen
    Dienstleistungen
    • Projekte
    • Zeiterfassung
    • Außendienst
    • Kundendienst
    • Planung
    • Termine
    Produktivität
    • Dialog
    • Genehmigungen
    • IoT
    • VoIP
    • Wissensdatenbank
    • WhatsApp
    Apps von Drittanbietern Odoo Studio Odoo Cloud-Plattform
  • Branchen
    Einzelhandel
    • Buchladen
    • Kleidergeschäft
    • Möbelhaus
    • Lebensmittelgeschäft
    • Baumarkt
    • Spielwarengeschäft
    Essen & Gastgewerbe
    • Bar und Kneipe
    • Restaurant
    • Fast Food
    • Gästehaus
    • Getränkehändler
    • Hotel
    Immobilien
    • Immobilienagentur
    • Architekturbüro
    • Baugewerbe
    • Immobilienverwaltung
    • Gartenarbeit
    • Eigentümervereinigung
    Beratung
    • Buchhaltungsfirma
    • Odoo-Partner
    • Marketingagentur
    • Anwaltskanzlei
    • Talentakquise
    • Prüfung & Zertifizierung
    Fertigung
    • Textil
    • Metall
    • Möbel
    • Speisen
    • Brauerei
    • Firmengeschenke
    Gesundheit & Fitness
    • Sportklub
    • Brillengeschäft
    • Fitnessstudio
    • Therapeut
    • Apotheke
    • Friseursalon
    Handel
    • Handyman
    • IT-Hardware & -Support
    • Solarenergiesysteme
    • Schuster
    • Reinigungsdienstleistungen
    • HLK-Dienstleistungen
    Sonstiges
    • Gemeinnützige Organisation
    • Umweltschutzagentur
    • Plakatwandvermietung
    • Fotostudio
    • Fahrrad-Leasing
    • Software-Händler
    Alle Branchen ansehen
  • Community
    Lernen
    • Tutorials
    • Dokumentation
    • Zertifizierungen
    • Schulung
    • Blog
    • Podcast
    Bildung fördern
    • Bildungsprogramm
    • Scale-Up! Planspiel
    • Odoo besuchen
    Software anfragen
    • Herunterladen
    • Editionen vergleichen
    • Releases
    Zusammenarbeiten
    • Github
    • Forum
    • Veranstaltungen
    • Übersetzungen
    • Partner werden
    • Dienstleistungen für Partner
    • Buchhaltungsfirma registrieren
    Services anfragen
    • Partner finden
    • Buchhalter finden
    • Einen Experten treffen
    • Implementierungsservices
    • Kundenreferenzen
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Eine Demo erhalten
  • Preiskalkulation
  • Hilfe

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

  • CRM
  • e-Commerce
  • Buchhaltung
  • Lager
  • PoS
  • Projekte
  • MRP
All apps
Sie müssen registriert sein, um mit der Community zu interagieren.
Alle Beiträge Personen Abzeichen
Stichwörter (Alle anzeigen)
odoo accounting v14 pos v15
Über dieses Forum
Sie müssen registriert sein, um mit der Community zu interagieren.
Alle Beiträge Personen Abzeichen
Stichwörter (Alle anzeigen)
odoo accounting v14 pos v15
Über dieses Forum
Hilfe

How to get the design of address fields looking like the contact

Abonnieren

Erhalten Sie eine Benachrichtigung, wenn es eine Aktivität zu diesem Beitrag gibt

Diese Frage wurde gekennzeichnet
addressstudiodesign
1 Antworten
3780 Ansichten
Avatar
Michael Spitzer

I am using odoo studio and there is a  very nice address section in the contacts module where the word 'contact' is displayed and then a few address fields underneath to make it into a group of fields, I would like to make the user put in an address on a custom module and I want to know how to make it look similar to the one on the contacts but this module has no relation to the contacts module.

For Example I want to have the fields 'address Line 1', 'address Line 2', 'city', 'zip' etc. but I don't want it to look like completely separate fields, rather I want it to look like a group, something like this:




 

0
Avatar
Verwerfen
Gracious Joseph

To achieve the same grouped design for address fields in your custom module as seen in the Contacts module, follow these steps:

1. Leverage Odoo Studio (UI Approach)

If you're using Odoo Studio, you can group fields visually to mimic the Contacts module's address section.

  1. Go to Your Custom Module in Studio:
    • Open the module you want to modify in Odoo Studio.
  2. Add a New Group:
    • Drag and drop a Group container to the form view where you want the address section.
  3. Add Fields to the Group:
    • Add fields like Street, Street2, City, ZIP, State, and Country inside the group.
    • Ensure the fields are aligned horizontally (you can adjust this in the group properties).
  4. Customize the Label:
    • Add a Static Text above the group and set it to "Contact" or another label to match the Contacts module.
  5. Apply CSS (Optional):
    • If the design isn’t exactly what you want, you can add custom CSS using the "Custom JavaScript/CSS" section in Odoo Studio (only available in certain editions).

2. Manual XML Customization (Developer Mode)

If Odoo Studio doesn't provide enough flexibility or you're comfortable editing XML, you can directly modify the form view of your custom module.

Example:

Here’s how to create an address-like design:

xmlCopy code<record id="view_custom_module_form" model="ir.ui.view">
    <field name="name">custom.module.form</field>
    <field name="model">custom.module</field>
    <field name="arch" type="xml">
        <form string="Custom Module">
            <sheet>
                <!-- Address Section -->
                <group>
                    <div class="o_address_format">
                        <div>
                            <label>Contact</label>
                        </div>
                        <group>
                            <field name="street" placeholder="Street..." />
                            <field name="street2" placeholder="Street 2..." />
                            <group>
                                <field name="city" placeholder="City..." />
                                <field name="state_id" placeholder="State..." />
                                <field name="zip" placeholder="ZIP..." />
                            </group>
                            <field name="country_id" placeholder="Country..." />
                        </group>
                    </div>
                </group>
            </sheet>
        </form>
    </field>
</record>

3. Use the Address Formatting Style

Odoo's Contacts module uses predefined CSS styles to group address fields. You can apply the same styles to your custom module by adding o_address_format and related CSS classes.

CSS Styling (Optional):

If you want finer control over the appearance, you can add custom CSS.

Example:

xmlCopy code<template id="assets_backend" inherit_id="web.assets_backend" name="Custom Address Styles">
    <xpath expr="." position="inside">
        <style>
            .o_address_format {
                margin-bottom: 10px;
                padding: 10px;
                border: 1px solid #eaeaea;
                border-radius: 5px;
                background-color: #f9f9f9;
            }
            .o_address_format label {
                font-weight: bold;
                margin-bottom: 5px;
                display: block;
            }
        </style>
    </xpath>
</template>

4. Add Country and State Widgets

To enhance the functionality of the fields, use many2one fields for state_id and country_id, referencing the respective models (res.country.state and res.country). This provides dropdowns similar to the Contacts module.

Example:

xmlCopy code<field name="country_id" widget="many2one" options="{'no_create': True}" placeholder="Country..." />
<field name="state_id" widget="many2one" options="{'no_create': True}" placeholder="State..." />

5. Add Placeholders (Optional)

To make the fields look cleaner, you can add placeholders (like "Street...", "City...") as shown in the example XML above. These placeholders guide the user without needing labels for every field.

6. Test and Adjust

  • Once you've implemented the changes, save your modifications and refresh the module.
  • Test the form layout to ensure it looks and functions as expected.

Avatar
Gracious Joseph
Beste Antwort
  1. ChatGPT said:
    In Odoo Studio, the "Group" container is not found directly in the fields menu but rather in the form view editor toolbar. Here's how you can locate and use it:

    Steps to Find and Use the "Group" Container in Odoo Studio:

    1. Open Odoo Studio:
      • Navigate to your custom module.
      • Activate the Studio by clicking the "Studio" button in the top-right corner.
    2. Edit the Form View:
      • Select the form view of the model you want to modify.
      • Enter the Edit mode for the form.
    3. Locate the Group Container:
      • In the layout toolbox on the right-hand side, look for the "Group" element.
      • This is usually available under the "Form Elements" or "Structure" section.
    4. Drag and Drop the Group Container:
      • Drag the "Group" element into the form where you want to place the address fields.
    5. Add Fields to the Group:
      • After placing the group, drag the address fields (e.g., Street, City, ZIP) into the group container.
      • Adjust the arrangement of the fields horizontally or vertically as needed.
    6. Customize the Group:
      • Add a static label (e.g., "Contact") above the group for clarity.
      • Adjust the properties of the group (like columns and alignment) using the sidebar options.
    7. Save and Test:
      • Save your changes and test the form layout to ensure it meets your requirements.
    If the "Group" container is not visible, it may be due to limited access permissions or an issue with the Studio configuration. In that case, you can consider customizing the XML code of the form view, as shown in the previous example, for greater control.

0
Avatar
Verwerfen
Ricardo Ayala

there is no "group" container, but maybe it refers to the column container

Diskutieren Sie gerne? Treten Sie bei, statt nur zu lesen!

Erstellen Sie heute ein Konto, um exklusive Funktionen zu nutzen und mit unserer tollen Community zu interagieren!

Registrieren
Verknüpfte Beiträge Antworten Ansichten Aktivität
Display Delivery Address in Sales Orders
address salesorder studio customfield
Avatar
Avatar
1
Juli 23
3550
debit and credit in currency
studio
Avatar
Avatar
1
Nov. 25
2000
Menu's with different default filter Gelöst
studio
Avatar
Avatar
1
Juli 25
2138
Digest mails - any good resources for Studio Gelöst
studio
Avatar
Avatar
2
März 25
2258
Payment terms format change
studio
Avatar
0
Feb. 25
1860
Community
  • Tutorials
  • Dokumentation
  • Forum
Open Source
  • Herunterladen
  • Github
  • Runbot
  • Übersetzungen
Dienstleistungen
  • Odoo.sh-Hosting
  • Support
  • Upgrade
  • Individuelle Entwicklungen
  • Ausbildung
  • Buchhalter finden
  • Partner finden
  • Partner werden
Über uns
  • Unsere Firma
  • Markenwerte
  • Kontakt
  • Karriere
  • Veranstaltungen
  • Podcast
  • Blog
  • Kunden
  • Rechtliches • Datenschutz
  • Sicherheit
الْعَرَبيّة 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

Odoo ist eine Suite von Open-Source-Betriebsanwendungen, die alle Bedürfnisse Ihres Unternehmens abdecken: CRM, E-Commerce, Buchhaltung, Lager, Kassensystem, Projektmanagement etc.

Das einzigartige Wertversprechen von Odoo ist, dass es gleichzeitig sehr einfach zu bedienen und voll integriert ist.

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