<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport"
          content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <title>F7DEMO</title>
    <link rel="stylesheet" href="/ex_framework7/static/framework7/css/framework7.ios.css">
    <link rel="stylesheet" href="/ex_framework7/static/framework7/css/framework7.ios.colors.css">
</head>
<body>
<script type="text/javascript" src="/ex_framework7/static/framework7/js/framework7.min.js"></script>
<script type="text/javascript" src="/ex_framework7/static/src/js/odoo.js"></script>
<script>
    var f7App = new Framework7({
        'precompileTemplates': true,
        'smartSelectBackText': '返回',
        'smartSelectPopupCloseText': '关闭',
        'smartSelectPickerCloseText': '确定',
        'modalButtonOk': '确定',
        'modalButtonCancel': '取消',
        'modalPreloaderTitle': '加载中...',
        'notificationCloseButtonText': '关闭'
    });
    var $ = Dom7;


    var odoo = new Odoo(f7App);

    var args = [
        [34],
        {'id': 34, state: "confirm", customer_id: 22},
        "customer_id",
        {
            state: "1",
            balance_pay: "",
            can_cancel: "",
            can_confirm: "",
            can_delivery: "",
            cash_coupon_ids: "",
            cash_coupon_pay: "1",
            child_ids: "1",
            'child_ids.amount_total': "1",
            'child_ids.need_date': "",
            'child_ids.number': "",
            'child_ids.state': "1",
            'create_date': "",
            'create_uid': "",
            'customer_id': "1",
            'has_children': "",
            'id': "",
            'line_ids': "1",
            'line_ids.balance_pay': "",
            'line_ids.cash_coupon_pay': "1",
            'line_ids.force_need_date': "",
            'line_ids.line_amount': "1",
            'line_ids.need_date': "1",
            'line_ids.need_time': "",
            'line_ids.package_id': "1",
            'line_ids.package_qty': "1",
            'line_ids.pkg_qty_adjustment': "",
            'line_ids.price': "",
            'line_ids.product_id': "1",
            'line_ids.qty': "1",
            'line_ids.qty_adjustment': "",
            'line_ids.remark': "",
            'line_ids.uom_id': "",
        },
        {tz: 'Asiz/Shanghai'}
    ];
    var kwargs = {};
    jdgo.rpcCall('jd.bc.sal.pre.sale.order', 'onchange', args, kwargs, function (result) {
        console.log(result);
    }, function () {
        console.log('finished....')
    })
</script>
</body>
</html>
