Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Done by RHT on the 07/03/2024
- #Reviewed by EMI on the 03/04/2024
- #Review: https://pastebin.com/L0MM1xBs
- #911 task: https://www.odoo.com/web#id=3792792&cids=1&menu_id=4720&action=333&active_id=5686&model=project.task&view_type=form
- #Need: to know the amount to invoice (non-recurrent)
- for so in self:
- invoiced_amount = 0
- for invoice in so.invoice_ids:
- invoiced_amount += invoice.amount_untaxed
- diff = so.non_recurring_total - invoiced_amount
- if diff > 0:
- so["x_studio_amount_to_invoice"] = diff
- else:
- so["x_studio_amount_to_invoice"] = 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement