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)
inventory Inventory Invenotry stock.move.line Zebra
Über dieses Forum
Sie müssen registriert sein, um mit der Community zu interagieren.
Alle Beiträge Personen Abzeichen
Stichwörter (Alle anzeigen)
inventory Inventory Invenotry stock.move.line Zebra
Über dieses Forum
  1. Inventory
  2. Forum

Product custom fields for every serial number

Abonnieren

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

Diese Frage wurde gekennzeichnet
inventory
2 Antworten
3087 Ansichten
Avatar
Maria Bleta

Dear Odoo forum,


I want to be able to create custom fields for my product

But the custom fields I want need to be on the serial number level

with this I mean I want to be able to input several custom fields, for every serial number, and those would have different values

I will give you an example:

Fields:

Serial Number, PIN (custom field), PUK (custom field), Phone number (custom field)

So, for example:

SN: 00001, PIN: 1234, PUK: 879456, Phone number: 778945125

SN: 00002, PIN: 4567, PUK: 136547, Phone number: 787456876

10:35

I could not find a way to do this in odoo community.


I am using a self-hosted odoo16 community. I know this can be done because I have seen it with odoo studio for the odoo enterprise version.


Any help on this issue would be greatly appreciated.

0
Avatar
Verwerfen
Avatar
Gracious Joseph
Beste Antwort

In Odoo 16 Community, it is possible to achieve custom fields at the serial number level (lot/serial number) by customizing the stock.production.lot model, which is responsible for tracking lots and serial numbers. Although Odoo Studio is not available in the Community version, you can achieve this functionality through custom development. Here's a step-by-step guide:

1. Understand the Model

  • Serial Numbers in Odoo:
    • Serial numbers are stored in the stock.production.lot model.
    • Each serial number is linked to a product.

To add custom fields like PIN, PUK, and Phone Number, you need to extend this model.

2. Extend the Model with Custom Fields

You can create a custom module to add fields to the stock.production.lot model. Here's an example:

Custom Module Code

  1. Create a Module Structure:
    • Navigate to your Odoo addons directory and create a new folder for the custom module, e.g., custom_lot_fields.
    • Add the required __init__.py, __manifest__.py, and models folder.
  2. Define the Custom Fields: In models/stock_production_lot.py:
    from odoo import models, fields
    
    class StockProductionLot(models.Model):
        _inherit = 'stock.production.lot'
    
        pin = fields.Char(string="PIN")
        puk = fields.Char(string="PUK")
        phone_number = fields.Char(string="Phone Number")
    
  3. Add Metadata: In __manifest__.py:
    {
        'name': 'Custom Lot Fields',
        'version': '16.0.1.0',
        'summary': 'Add custom fields for serial numbers',
        'author': 'Your Name',
        'category': 'Inventory',
        'depends': ['stock'],
        'data': [
            'views/stock_production_lot_views.xml',
        ],
        'installable': True,
        'application': False,
        'auto_install': False,
    }
    
  4. Add Custom Fields to the Serial Number Form View: In views/stock_production_lot_views.xml:
    <odoo>
        <record id="view_stock_production_lot_form_inherit" model="ir.ui.view">
            <field name="name">stock.production.lot.form.inherit</field>
            <field name="model">stock.production.lot</field>
            <field name="inherit_id" ref="stock.view_production_lot_form"/>
            <field name="arch" type="xml">
                <xpath expr="//form/sheet" position="inside">
                    <group>
                        <field name="pin"/>
                        <field name="puk"/>
                        <field name="phone_number"/>
                    </group>
                </xpath>
            </field>
        </record>
    </odoo>
    
  5. Install the Module:
    • Restart your Odoo server.
    • Navigate to Apps, search for Custom Lot Fields, and install the module.

3. How to Use

  1. Navigate to Inventory > Products > Lots/Serial Numbers.
  2. Open or create a new serial number.
  3. You will see the new fields PIN, PUK, and Phone Number on the form view.
  4. Input unique values for each serial number.

4. Alternative Approaches

If you're not comfortable with module development:

  • Use Odoo Studio (Enterprise Only): For Enterprise users, you can directly add fields to the stock.production.lot model using Studio.
  • Use the CSV Import/Export:
    • Export serial numbers to a CSV.
    • Add custom fields (e.g., PIN, PUK, Phone Number) to the CSV.
    • Import the updated CSV back into Odoo.

5. Testing and Debugging

  • Test the Fields:
    • Ensure that each serial number can have different values for the custom fields.
    • Verify that the fields are displayed in the desired locations.
  • Debug Errors:
    • Check server logs for errors during development.
    • Use Odoo's Developer Mode to inspect the form view and ensure proper field rendering.

Outcome

By following these steps, you can create custom fields for serial numbers in Odoo Community. These fields will allow you to input values like PIN, PUK, and Phone Number for each serial number.

If you need further help with development or installation, let me know!

0
Avatar
Verwerfen
Avatar
Olivier
Beste Antwort

Hey, 


I am not sure if you are still looking for it, but Odoo 18 provides this in native. Please consult : 

https://www.odoo.com/fr_FR/event/odoo-experience-2024-4662/track/traceability-enhanced-master-the-use-of-properties-on-lots-and-serial-numbers-for-unmatched-accuracy-6653

Cheers

0
Avatar
Verwerfen
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
How to populate inventory very 1st time using Odoor? I'm lost
inventory
Avatar
Avatar
Avatar
2
Okt. 25
4756
Best Practices for Implementing Inventory Management in Odoo for a Café
inventory
Avatar
Avatar
1
Apr. 25
3770
Foro in Spanish, i want to connect whit people spoke Spanish
inventory
Avatar
0
Okt. 25
2838
Customizing Odoo to Link Serial Numbers for Camera Kit Products
inventory
Avatar
0
Juni 24
3057
Odoo Enterprise v16 User Portal for Viewing Inventory Stock Qty & Locations
inventory
Avatar
0
Nov. 23
2970
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