def write(self, ids, vals):
if vals.get('invoice', 0) < 0:
vals = vals.copy()
del vals['invoice']
return super(InvoiceLine, self).write(ids, vals)
Only if you don't fill: invoice_type, party, currency and company.
But reading the code, I think perhaps the states is buggy (need to test).
--
Cédric Krier
B2CK SPRL
Rue de Rotterdam, 4
4000 Liège
Belgium
Tel: +32 472 54 46 59
Email/Jabber: cedric...@b2ck.com
Website: http://www.b2ck.com/