I need to clear "many2many" fields value, So i tried these code but it does not empty the field
My Code:
purchase_id = fields.Many2many(
'purchase.order',
string='Purchase Order',
store=False,
readonly=True,
help='Associated Purchase Order. Filled in automatically when a PO is chosen on the vendor bill.'
)
@api.onchange('purchase_id')
def _onchage_purchase(self):
self.purchase_id = [6, 0, []]
I tried like this, but it doesn't works.. Please, can anyone help me to resolve this.