Hello everyone,
In the invoice I had added a field the invoice number and depending on this field the refund invoice line will be filled the pb is when I save those line are deleted.
This is my code:
'invoice_id' : fields.many2one('account.invoice', string='Invoice number'),
def onchange_invoice_id(self, cr, uid, ids, invoice_id, context=None):
obj_inv_line = self.pool.get('account.invoice.line')
acc_line_ids = []
if invoice_id:
acc_line_ids = obj_inv_line.search(cr, uid, [('invoice_id', '=', invoice_id)])
return {'value': {'invoice_line': acc_line_ids}}
Any help please???