19.0 vanilla

This commit is contained in:
Ernad Husremovic 2026-03-09 09:32:43 +01:00
parent 4607ccbd2e
commit 825ff6514e
487 changed files with 184979 additions and 195262 deletions

View file

@ -5,7 +5,7 @@ from odoo import api, fields, models, _
from odoo.tools import float_round
class LunchCashMove(models.Model):
class LunchCashmove(models.Model):
""" Two types of cashmoves: payment (credit) or order (debit) """
_name = 'lunch.cashmove'
_description = 'Lunch Cashmove'
@ -18,8 +18,9 @@ class LunchCashMove(models.Model):
amount = fields.Float('Amount', required=True)
description = fields.Text('Description')
def name_get(self):
return [(cashmove.id, '%s %s' % (_('Lunch Cashmove'), '#%d' % cashmove.id)) for cashmove in self]
def _compute_display_name(self):
for cashmove in self:
cashmove.display_name = '{} {}'.format(_('Lunch Cashmove'), '#%s' % (cashmove.id or "_"))
@api.model
def get_wallet_balance(self, user, include_config=True):