When calling directly a method with proteus, you must always add the context as last parameter.
So in your example, it should be:
Sale.get_party_invoices_last_month([party.id], config.context)
When calling directly a method with proteus, you must always add the context as last parameter.
So in your example, it should be:
Sale.get_party_invoices_last_month([party.id], config.context)