Odoo Passing Value in Website Popup Wizard V11

Website Popup Wizard Pass Value

Probuse Admin
XML:
<template id="assets_editor" inherit_id="website.assets_frontend" name="Event Sale">
  <xpath expr="." position="inside">
    <script type="text/javascript" src="/website_portal_customer_payment/static/src/js/website_portal_payment.js"></script>
  </xpath>
</template>
JS:

odoo.define('website_portal_customer_payment_payment', function (require) {
'use strict';
var website = require('website.website');
    $(document).ready(function () {
        $('#Invoice_payment_partially').click(function(){
            var num = $(this).data('number');
            var amount = $(this).data('amount');
            $("#payment_partially #reference").val( num );
             $("#payment_partially #amount").val( amount );
        })
    })
});

Button code:
<a t-if="invoice.state == 'open'" id="Invoice_payment_partially" class="fa fa-arrow-circle-right  btn btn-xs btn-primary text-right"
                                    data-placement="top"
                                    data-html="true"
                                    data-toggle="modal"
                                    data-target="#payment_partially"
                                    t-att-data-number="invoice.number"
                                    t-att-data-amount="invoice.residual"
                                    alt="Pay Now" >Pay Partially</a>

Ref: website_customer_portal_payment

https://www.odoo.com/apps/modules/10.0/website_portal_customer_payment/s2.png