This commit is contained in:
michel 2018-02-12 16:30:28 +01:00
parent e4ea0a3187
commit 624181c903
2 changed files with 1 additions and 2 deletions

View File

@ -57,9 +57,9 @@ class GolemMember(models.Model):
if payment_ids: if payment_ids:
payment_ids = payment_ids.sorted(lambda r: r.payment_date, reverse=True) payment_ids = payment_ids.sorted(lambda r: r.payment_date, reverse=True)
today = fields.Date.today() today = fields.Date.today()
last_payment_id = None
for payment in payment_ids: for payment in payment_ids:
if payment.payment_date < today: if payment.payment_date < today:
last_payment_id = None
last_payment_id = payment last_payment_id = payment
break break
if last_payment_id: if last_payment_id:

View File

@ -57,6 +57,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</field> </field>
</record> </record>
</data> </data>
</odoo> </odoo>