Skip to Content
Odoo Menu
  • Prihlásiť sa
  • Vyskúšajte zadarmo
  • Aplikácie
    Financie
    • Účtovníctvo
    • Fakturácia
    • Výdavky
    • Tabuľka (BI)
    • Dokumenty
    • Podpis
    Predaj
    • CRM
    • Predaj
    • POS Shop
    • POS Restaurant
    • Manažment odberu
    • Požičovňa
    Webstránky
    • Tvorca webstránok
    • eShop
    • Blog
    • Fórum
    • Živý chat
    • eLearning
    Supply Chain
    • Sklad
    • Výroba
    • Správa životného cyklu produktu
    • Nákup
    • Údržba
    • Manažment kvality
    Ľudské zdroje
    • Zamestnanci
    • Nábor zamestnancov
    • Voľné dni
    • Hodnotenia
    • Odporúčania
    • Vozový park
    Marketing
    • Marketing sociálnych sietí
    • Email marketing
    • SMS marketing
    • Eventy
    • Marketingová automatizácia
    • Prieskumy
    Služby
    • Projektové riadenie
    • Pracovné výkazy
    • Práca v teréne
    • Helpdesk
    • Plánovanie
    • Schôdzky
    Produktivita
    • Tímová komunikácia
    • Schvalovania
    • IoT
    • VoIP
    • Znalosti
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Estate Managament
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Výroba
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware and Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Komunita
    Vzdelávanie
    • Tutoriály
    • Dokumentácia
    • Certifikácie
    • Školenie
    • Blog
    • Podcast
    Empower Education
    • Vzdelávací program
    • Scale Up! Business Game
    • Visit Odoo
    Softvér
    • Stiahnuť
    • Porovnanie Community a Enterprise vierzie
    • Releases
    Spolupráca
    • Github
    • Fórum
    • Eventy
    • Preklady
    • Staň sa partnerom
    • Services for Partners
    • Register your Accounting Firm
    Služby
    • Nájdite partnera
    • Nájdite účtovníka
    • Meet an advisor
    • Implementation Services
    • Zákaznícke referencie
    • Podpora
    • Upgrades
    ​Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Získajte demo
  • Cenník
  • Help

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

  • CRM
  • e-Commerce
  • Účtovníctvo
  • Sklady
  • PoS
  • Projektové riadenie
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tagy (View all)
inventory Inventory Invenotry stock.move.line Zebra
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tagy (View all)
inventory Inventory Invenotry stock.move.line Zebra
About this forum
  1. Inventory
  2. Fórum

Product custom fields for every serial number

Odoberať

Get notified when there's activity on this post

This question has been flagged
inventory
2 Replies
3097 Zobrazenia
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
Zrušiť
Avatar
Gracious Joseph
Best Answer

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
Zrušiť
Avatar
Olivier
Best Answer

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
Zrušiť
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Registrácia
Related Posts Replies Zobrazenia Aktivita
How to populate inventory very 1st time using Odoor? I'm lost
inventory
Avatar
Avatar
Avatar
2
okt 25
4769
Best Practices for Implementing Inventory Management in Odoo for a Café
inventory
Avatar
Avatar
1
apr 25
3791
Foro in Spanish, i want to connect whit people spoke Spanish
inventory
Avatar
0
okt 25
2851
Customizing Odoo to Link Serial Numbers for Camera Kit Products
inventory
Avatar
0
jún 24
3065
Odoo Enterprise v16 User Portal for Viewing Inventory Stock Qty & Locations
inventory
Avatar
0
nov 23
2983
Komunita
  • Tutoriály
  • Dokumentácia
  • Fórum
Open Source
  • Stiahnuť
  • Github
  • Runbot
  • Preklady
Služby
  • Odoo.sh hosting
  • Podpora
  • Vyššia verzia
  • Custom Developments
  • Vzdelávanie
  • Nájdite účtovníka
  • Nájdite partnera
  • Staň sa partnerom
O nás
  • Naša spoločnosť
  • Majetok značky
  • Kontaktujte nás
  • Pracovné ponuky
  • Eventy
  • Podcast
  • Blog
  • Zákazníci
  • Právne dokumenty • Súkromie
  • Bezpečnosť
الْعَرَبيّة 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 je sada podnikových aplikácií s otvoreným zdrojovým kódom, ktoré pokrývajú všetky potreby vašej spoločnosti: CRM, e-shop, účtovníctvo, skladové hospodárstvo, miesto predaja, projektový manažment atď.

Odoo prináša vysokú pridanú hodnotu v jednoduchom použití a súčasne plne integrovanými biznis aplikáciami.

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