Update project.py
This commit is contained in:
parent
91dedb99e7
commit
bfc7f5c9ef
|
|
@ -182,11 +182,13 @@ class Project(models.Model):
|
|||
for phase in rec.project_phase_ids:
|
||||
progress += phase.weight * phase.progress / 100
|
||||
rec.progress = progress
|
||||
|
||||
|
||||
@api.depends('invoice_ids', 'invoice_ids.amount')
|
||||
def compute_total_invoiced_amount(self):
|
||||
for rec in self:
|
||||
rec.total_invoiced_amount = sum(rec.invoice_ids.mapped('amount'))
|
||||
|
||||
|
||||
@api.depends('invoice_ids', 'invoice_ids.amount','invoice_ids.payment_amount')
|
||||
def compute_total_invoiced_payment(self):
|
||||
for rec in self:
|
||||
rec.total_invoiced_payment = 0
|
||||
|
|
|
|||
Loading…
Reference in New Issue