Sélectionner une révision Git
account_move.py 650 o
# Copyright 2021 Le Filament (<http://www.le-filament.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import models
class FumocAccountMove(models.Model):
_inherit = 'account.move'
def _get_invoiced_lot_values(self):
"""
Inherit function to return expiration_date in dict
"""
result = super(FumocAccountMove, self)._get_invoiced_lot_values()
for lot_values in result:
lot_id = self.env['stock.production.lot'].\
browse(lot_values.get('lot_id'))
lot_values['expiration_date'] = lot_id.expiration_date
return result