Odoo Ajuda

0

0
2 Respostas
1
jithesh Índia
17/05/18 03:41

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
Avatar

Hilar AK Omã

--Hilar AK--
17374
| 7 6 11
Muscut, Omã
--Hilar AK--
Experienced Odoo / Python Developer with a demonstrated history of working in the information technology and services industry with 3.5+years of experience. Skilled in Python, PostgreSQL, SQL, HTML, JavaScript. Strong engineering professional with a Bachelor of Technology (BTech) focused on Computer Science from the College of Engineering Munnar.

 Blogs:-

https://medium.com/@hilarak
https://hilarlive.wordpress.com/
 StackOverflow:
       https://stackoverflow.com/users/7561347/burmese-pythis-hilar-ak


Hilar AK Omã
16/05/18 10:22

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.

Faça uma Pergunta
Writer
Keep Informed
1 seguidor (es)
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register
Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now