python - Odoo: set select item from many2many_tags widget -


i have button inside customer refund form.when click on it, loop through invoice lines update column "tax" display corresponding tax. i'm able id of associated tax (the tax column many2many_tags widget )for product. want display item id using python. please suggestions.

enter image description here

res['value']['invoice_line_tax_id']=mytaxeid doesn't work 

you need use triplets many2many fields.

2 examples:

  1. replace taxes taxes ids 2 , 4
res['value']['invoice_line_tax_id'] = [(6, 0, [2, 4])] 
  1. add tax id 7
res['value']['invoice_line_tax_id'] = [(4, 7)] 

Comments