Skip ke Konten
Odoo Menu
  • Login
  • Uji coba gratis
  • Aplikasi
    Keuangan
    • Akuntansi
    • Faktur
    • Pengeluaran
    • Spreadsheet (BI)
    • Dokumen
    • Tanda Tangan
    Sales
    • CRM
    • Sales
    • POS Toko
    • POS Restoran
    • Langganan
    • Rental
    Website
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Rantai Pasokan
    • Inventaris
    • Manufaktur
    • PLM
    • Purchase
    • Maintenance
    • Kualitas
    Sumber Daya Manusia
    • Karyawan
    • Rekrutmen
    • Cuti
    • Appraisal
    • Referensi
    • Armada
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Acara
    • Otomatisasi Marketing
    • Survei
    Layanan
    • Project
    • Timesheet
    • Layanan Lapangan
    • Meja Bantuan
    • Planning
    • Appointment
    Produktivitas
    • Diskusi
    • Approval
    • IoT
    • VoIP
    • Pengetahuan
    • WhatsApp
    Aplikasi pihak ketiga Odoo Studio Platform Odoo Cloud
  • Industri-Industri
    Retail
    • Toko Buku
    • Toko Baju
    • Toko Furnitur
    • Toko Kelontong
    • Toko Hardware
    • Toko Mainan
    Makanan & Hospitality
    • Bar dan Pub
    • Restoran
    • Fast Food
    • Rumah Tamu
    • Distributor Minuman
    • Hotel
    Real Estate
    • Agensi Real Estate
    • Firma Arsitektur
    • Konstruksi
    • Estate Management
    • Perkebunan
    • Asosiasi Pemilik Properti
    Konsultansi
    • Firma Akuntansi
    • Mitra Odoo
    • Agensi Marketing
    • Firma huku
    • Talent Acquisition
    • Audit & Sertifikasi
    Manufaktur
    • Tekstil
    • Logam
    • Perabotan
    • Makanan
    • Brewery
    • Corporate Gift
    Kesehatan & Fitness
    • Sports Club
    • Toko Kacamata
    • Fitness Center
    • Wellness Practitioners
    • Farmasi
    • Salon Rambut
    Perdagangan
    • Handyman
    • IT Hardware & Support
    • Sistem-Sistem Energi Surya
    • Pembuat Sepatu
    • Cleaning Service
    • Layanan HVAC
    Lainnya
    • Organisasi Nirlaba
    • Agen Lingkungan
    • Rental Billboard
    • Fotografi
    • Penyewaan Sepeda
    • Reseller Software
    Browse semua Industri
  • Komunitas
    Belajar
    • Tutorial-tutorial
    • Dokumentasi
    • Sertifikasi
    • Pelatihan
    • Blog
    • Podcast
    Empower Education
    • Program Edukasi
    • Game Bisnis 'Scale Up!'
    • Kunjungi Odoo
    Dapatkan Softwarenya
    • Download
    • Bandingkan Edisi
    • Daftar Rilis
    Kolaborasi
    • Github
    • Forum
    • Acara
    • Terjemahan
    • Menjadi Partner
    • Layanan untuk Partner
    • Daftarkan perusahaan Akuntansi Anda.
    Dapatkan Layanan
    • Temukan Mitra
    • Temukan Akuntan
    • Temui penasihat
    • Layanan Implementasi
    • Referensi Pelanggan
    • Bantuan
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Dapatkan demo
  • Harga
  • Bantuan

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

  • CRM
  • e-Commerce
  • Akuntansi
  • Inventaris
  • PoS
  • Project
  • MRP
All apps
Anda harus terdaftar untuk dapat berinteraksi di komunitas.
Semua Post Orang Lencana-Lencana
Label (Lihat semua)
odoo accounting v14 pos v15
Mengenai forum ini
Anda harus terdaftar untuk dapat berinteraksi di komunitas.
Semua Post Orang Lencana-Lencana
Label (Lihat semua)
odoo accounting v14 pos v15
Mengenai forum ini
Help

Cannot search archived products by barcode

Langganan

Dapatkan notifikasi saat terdapat aktivitas pada post ini

Pertanyaan ini telah diberikan tanda
9 Replies
11073 Tampilan
Avatar
Glen Lowe

Odoo CE 10

It seems that when you archive a product the barcode and the cost temporarily disappear from the product for some reason (even though they are still stored in database and show up when re-activated).  This makes it impossible to search archived items by barcode.  So lets say you want to add a new item and you get the "Cannot add item: this barcode already exists" message.  This means you cannot search the archived items for the matching  barcode and simply re-activate it.  I currently have to:

1) Search archived products by name or other filter

2) Temporarily un-archive product to "see" the barcode and check if it's my match

3 If it's not a match, repeat this process with all the filtered archived items until I find my barcode match and un-archive it

Is this the normal behavior?  How can I make this easier?  Thank you!

1
Avatar
Buang
Pawan Kumar Sharma

Hello @Keegan,

I need barcode feature for my system Odoo CE 10. So, Can you help me by providing your barcode code or task perform by you to implement this feature.

Thanks,

Manish Bohra

Hello @Keegan,

I am also need barcode functionality for odoo10 Community Edition. So Can you tell me how to perform this functionality.

Avatar
Parth Choksi (pch)
Jawaban Terbai

Hi,

This can be done by passing this value in the context of your view: {'active_test': False,}

Like for eg:  

<filter string="Archived" name="inactive" context="{'active_test': False}" domain="[('active','=',False)]"/>


0
Avatar
Buang
Avatar
Jerome Guerriat
Jawaban Terbai

Archived records are NEVER included in any standard search..

If you use self.env['sale.order'].search([]), it will retrieve every sale order in your system.. Except the ones that are archived. This is standard.

This mean that, indeed, if you search a product over its barcode, the search function will NOT find your archived product.
However, if a SQL constrains is defined over the field, then it will still be triggered uppon insertion of a new record (meaning you won't be able to add a new product with the same barcode if a unique(barcode) constrains is set in the database)

The only way of including the archived records in a search is to specifically add a filter in the search function. 

You could add the filters ['|', ('active','=',True),  ('active','=',False)] to the search method whenever you need to search for any product (wether they are inactive or not) 

0
Avatar
Buang
Ray Carnes

This is a great answer for programmatic searching. I think from some of the clues in the post, like "temporarily un-archive product" and "filtered archived items" that the question may be about searching via the UI.

Glen Lowe
Penulis

Correct. This is a function I was hoping an end-user can do from the web UI. If not possible by default, I can possibly use the info in the previous answer to make a custom module for this? Users need to be able to find products by barcode whether archived or not.

Jerome Guerriat

you can also do that from the UI.

On the search bar, click on the "+", "filters", "add a custom filter", "active is false", "add a condition", "active is true".

This will create a filter "active is false or active is true".

you can then save the current search.

All the products will now be displayed in the tree view by default.

Glen Lowe
Penulis

I know how to display all the items in the list view, but this still does not allow for searching them by barcode, try for yourself.

Jerome Guerriat

I just tested with that specific case and indeed it act kind of weird.

The barcode field is defined on product.product. So if you go in the product variants, you'll be able to search over that field.

However, on the product.template, the field barcode is defined as related to the variant_ids:

barcode = fields.Char('Barcode', oldname='ean13', related='product_variant_ids.barcode')

and indeed when a record with a related field is archived, the relation might be broken until you un-archive the record.

If you want to solve this completely using the GUI, i think there is only a dirty way of doing it :/.

- install Studio

- add a new field on the product.template form view

- go to its properties, then click on "more"

- make it computed, stored, and dependent on "barcode"

- then use this kind of code:

for product in self:

if product.product_variant_ids[0]:

product['x_permanent_barcode'] = product.product_variant_ids[0].barcode

where x_permanent_barcode is the name of the field you are defining.

By doing so, you will be able to search over the value of x_permanent_barcode, this time, even archiving the record will NOT remove that value.

However, as i said, you'll still have to use a custom filter (programmaticaly or from the GUI) to be able to search for archived records.

We never use studio, so i would of course recommand creating a custom module that fits your needs, for example by directly redifining the barcode field on product.product (remove the related=.. and make it computed), but if you specifically need to use only the GUI, this would work.

Menikmati diskusi? Jangan hanya membaca, ikuti!

Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!

Daftar
Komunitas
  • Tutorial-tutorial
  • Dokumentasi
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Terjemahan
Layanan
  • Odoo.sh Hosting
  • Bantuan
  • Peningkatan
  • Custom Development
  • Pendidikan
  • Temukan Akuntan
  • Temukan Mitra
  • Menjadi Partner
Tentang Kami
  • Perusahaan kami
  • Aset Merek
  • Hubungi kami
  • Tugas
  • Acara
  • Podcast
  • Blog
  • Pelanggan
  • Hukum • Privasi
  • Keamanan
الْعَرَبيّة 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 adalah rangkaian aplikasi bisnis open source yang mencakup semua kebutuhan perusahaan Anda: CRM, eCommerce, akuntansi, inventaris, point of sale, manajemen project, dan seterusnya.

Mudah digunakan dan terintegrasi penuh pada saat yang sama adalah value proposition unik Odoo.

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