Community mailing list archives

community@mail.odoo.com

SQL CONSTRAINT ON STOCK.PICKING FIELD OPENERP 7

by
Yassine TEIMI
- 12/01/2014 11:52:44

Dear all,

The objects stock.picking.out (Delivery orders) and stock.picking.in (Incomings Shipments), inherits from stock.picking by prototype inheritance, So as to customize the stock.picking.out form view, I added a field on stock.picking, and made it visible juste for stock.picking.out, but now I want to add a sql_constraints unique, to that field, I wrote on stock.picking where the field is decalred : 

_sql_constraints = [('bl_uniq','unique(num_bl','Physical Delivery order number is unique !')].

But this sql constraint doesn't work, is it due to the prototype inheritance ? if yes what is the solution to overcome this issue ?


--

Cordialement

Yassine TEIMI

Ingénieur SI-BI & Consultant technico-fonctionnel ERP 

TEL : 06-56 15 31 47