pay=Payment_terms.find([('name','=','30J')]) #<= this works
party.customer_payment_term = pay #<= this do not works AssertionError
party.payment_terms = pay #<= this do not works AttributeError
Your issue might be that pay is a list, and maybe you are trying to assign a list to customer_payment_term.
Try it like this to return the record instead of the list of records: pay,=Payment_terms.find([('name','=','30J')])
In the case above your list must have only one item.
If there are more items you can use [0] to return the first item, but it will result is not precise.
Btw, you can also run python in interactive mode and test it.
Always take care to access the record instance, not the list of record instances returned by find.