(self)
Calculates the total_* fields from the line values.
Calculates the total_* fields from the line values.
Calculates the total_ * fields from the line values .
def _compute_totals(self):
        """Calculates the total_* fields from the line values."""
        for record in self:
            record.total_partner_records = len(record.partner_record_ids)
            record.total_amount = sum(record.mapped("partner_record_ids.amount"))
            record.total_cash_amount = sum(
                record.mapped("partner_record_ids.cash_amount")
            )
            record.total_real_estate_transmissions_amount = sum(
                record.mapped("partner_record_ids.real_estate_transmissions_amount")
            )
def _compute_totals ( self ) : for record in self : record . total_partner_records = len ( record . partner_record_ids ) record . total_amount = sum ( record . mapped ( "partner_record_ids.amount" ) ) record . total_cash_amount = sum ( record . mapped ( "partner_record_ids.cash_amount" ) ) record . total_real_estate_transmissions_amount = sum ( record . mapped ( "partner_record_ids.real_estate_transmissions_amount" ) )