Community: Framework mailing list archives

expert-framework@mail.odoo.com

Re: Community: Framework

by
omar
- 04/28/2016 05:49:15
hi comminity,
I use this method ORM :
 products = self.env[ ' product.Product '] . Search ( [ ( ' product_tmpl_id ', ' =' ,self.product_template.id ) ] )


2016-04-28 10:48 GMT+01:00 omar frikha <omarfrikha59@gmail.com>:
hi comminity,
I use this method ORM :
self.env products = [ ' product.Product '] . Search ( [ ( ' product_tmpl_id ', ' =' , self.product_template.id ) ] )

to get a product list
but this generate this error: 
openerp.sql_db: bad query: INSERT INTO "product_template" ("id", "list_price", "color", "uom_id", "sale_ok", "purchase_method", "purchase_ok", "sequence", "company_id", "track_service", "uom_po_id", "type", "sale_delay", "active", "categ_id", "rental", "tracking", "invoice_policy", "create_uid", "write_uid", "create_date", "write_date") VALUES(nextval('product_template_id_seq'), '1.00', 0, 1, true, 'receive', true, 1, 1, 'manual', 1, 'product', 7.0, true, 1, false, 'none', 'order', 1, 1, (now() at time zone 'UTC'), (now() at time zone 'UTC')) RETURNING id
Help me, please , thank you