Hello,
I'm new to odoo and i'm trying to modify the 'add product' a little, more exactly the internal reference field. I would like to add a dynamic search to it, so that when i start to enter a reference, i get below a list of references that match what i have already entered. More exactly you can see this already implemented in Purchases - Requests for Quotation - Create - Add an item - product column.
I tried to start small and create a simple module to just have the internal reference unique. But i can't figure it out. I've read the few posts that mention this, but i couldn't make it work. My current code is:
class product_product(osv.osv):
_name = "product.product"
_description = "Product"
_inherits = {'product.template': 'product_tmpl_id'}
_sql_constraints = [
('default_code', 'unique(default_code)', 'Product Reference must be unique!'),
]
product_product()
I also tried this module https://www.odoo.com/apps/modules/8.0/product_unique_default_code/ , but it doesn't work either.
If you have any idea please help. Also, i can't find any proper docs for odoo. Their website seems to only have bits and pieces. Do you know any better tutorials?
Thank you