Odoo Help

0
1
jithesh
On 5/17/18, 3:41 AM

Hi, Maria

yes there is a way

js,py,controller,xml

this is the basic idea to popup wizard

odoo.define('website_sale_quote.webaccount', function(require) {
"use strict";

var ajax = require('web.ajax');
require('web.dom_ready');
//var Model = require('web.DataModel');
var weContext = require("web_editor.context");
require('portal.portal');
var websui = require('portal.portal');

$('.o_portal #quote_request').click(function(event){
var $form = $(this).closest('div');
console.log(this);
event.preventDefault();
ajax.jsonRpc("/my/temps", 'call', {
'product_id': 'jitheshk',
}).then(function (modals) {
////your events you want to process//////////

controller part///////////////////
@http.route(['/my/temps'],type='json', auth="public", methods=['POST'], website=True)
def quote_requests(self, product_id):
print("hai");
print(product_id);
return request.env['ir.ui.view'].render_template("website_sale_quote.temp",{
'Quot':product_id,
})
xml part/////////////////////////////

<template id="temp" name="Optional Productss">
<div id="modal_optional_products" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button>
<h4 class="modal-title" id="myModalLabel">Quote Request</h4>
</div>
<div class="modal-body">
<table class="table table-striped table-condensed">
<thead>
<tr>
<th><t t-esc="Quot"/></th>
<!--<th></th>-->
<!--<th class="text-center td-qty">Details</th>-->
<!--<th class="text-center td-price">Price</th>-->
</tr>
</thead>
<tbody>    
           

</tbody>
</table>
</div>
<div class="modal-footer">
<a class="btn btn-default a-submit js_goto_shop"><i class="fa fa-chevron-left"></i> <span class="hidden-xs">Cancel</span><span class="visible-xs-inline">Continue</span></a>
<a class="btn btn-primary pull-right a-submit"><i class="fa fa-shopping-cart fa-fw"></i> <span class="hidden-xs">Submit Now</span><span class="visible-xs-inline">Checkout</span></a>
</div>
</div>
</div>
</div>
</template>
0
Hilar AK
On 5/16/18, 10:22 AM

Either you can use the bootstrap modals or you can call existing view by restricting and adding more securities on odoo view. like the portal access.

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 5/16/18, 9:03 AM
Seen: 692 times
Last updated: 5/17/18, 3:41 AM