Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
5055 Tampilan

Hi,

Is it possible to get all due dates computed from account.payment.term ? I want to generate all due dates for every payment.term.line. How is this possible? Thanks.

Avatar
Buang
Jawaban Terbai

Hey Tessnim ZRAYGA,

May be this Will help You.


class AccountInvoice(models.Model):   
    _inherit = 'account.invoice'

    all_due_date = fields.Char(compute= '_cal_all_due_date', string='All Due Date')

    @api.multi
    def _cal_all_due_date(self):
        inv_due_date = []
        for inv in self:
            if inv.date_due:
                inv_due_date.append(inv.date_due)
Avatar
Buang
Post Terkait Replies Tampilan Aktivitas
0
Jan 18
4190
0
Mar 15
3779
0
Jun 24
5
1
Jan 23
2129
1
Agu 25
68