Загрузка...

Odoo 18 Development: Auto-Generate Product Internal Reference Based on Product Category

In this Odoo 18 tutorial, we show you how to automatically generate a unique internal reference (default_code) for products based on their product category. This customization enhances product management by ensuring your SKUs follow a structured and category-based format like Rem0001, Inc0002, and Over0003.

🔧 What You’ll Learn:
✅ How to override the create() method in product.template
✅ How to create and use Odoo sequences for auto-numbering
✅ How to link product categories to prefixes (like Rem, Inc, Over)
✅ How to fall back to smart numbering if a sequence is missing
✅ How to raise friendly validation errors if no category is selected

👍 Like | 💬 Comment | 🔔 Subscribe for more Odoo 18 Customization Tutorials
📢 Don’t forget to share it with fellow Odoo developers!

🟣 Meet Odoo 18: https://www.odoo.com/blog/odoo-news-5...
💻 Visual Studio Code Download Link: [https://code.visualstudio.com/download]
🟢 Odoo18 Download Link: https://www.odoo.com/page/download
📂 Code Repository: [https://github.com/odooistic/youtube_...]
🔗 Module code: https://github.com/ffaemy/my_odoo_modules search for product_reference

Видео Odoo 18 Development: Auto-Generate Product Internal Reference Based on Product Category канала Odooistic
Страницу в закладки Мои закладки
Все заметки Новая заметка Страницу в заметки

На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.

Об использовании CookiesПринять