[quote="javier"]
> i am going to try, but with inherit it just modified invoice and not create 
> another object with relation. 


This had been discussed previously:
http://www.openerp.com/forum/topic6771.html

But you can simulate one2one relation with a many2one field and sql 
constraints, just use unique clause.


class account_retention(osv.osv):
    _name = "account.retention"
    _description = "Comprobante de Retencion"
    _columns = {
         invoice_num : 
fields.many2one('account.invoice', 'number', required=True),
   }
   _sql_constraints = [
      ('inv_num_uniq', 'unique (invoice_num)', 
'The invoice Number must be unique !')
   ]


you can see an example of sql constraints on partner module


Saludos,[/quote]

------------------------
javier
Venezuela




-------------------- m2f --------------------

--
http://www.openerp.com/forum/viewtopic.php?p=25340#25340

-------------------- m2f --------------------


_______________________________________________
Tinyerp-users mailing list
http://tiny.be/mailman/listinfo/tinyerp-users

Reply via email to