Skip to content

Instantly share code, notes, and snippets.

@akhmadkresna
akhmadkresna / sale_checkout_inheritance.py
Last active April 28, 2021 16:29
odoo controller inheritance
from odoo.addons.website_sale.controllers.main import WebsiteSale
class WebsiteSaleInherit(WebsiteSale):
@http.route(['/shop/checkout'], type='http', auth="public", website=True)
def checkout(self, **post):
# use super to call prevously defined checkout methods so we not overriding the method but extend it.
res = super(WebsiteSale, self).checkout(**post)
# code your bugs in here ;)
@akhmadkresna
akhmadkresna / sale_checkout.py
Last active June 30, 2018 14:05
odoo sale checkout controller
from odoo import http, tools, _
class WebsiteSale(http.Controller):
@http.route(['/shop/checkout'], type='http', auth="public", website=True)
def checkout(self, **post):
# we have base code in here
@akhmadkresna
akhmadkresna / navbar.css
Last active December 18, 2016 11:32
Odoo frontend module sticky navbar
@media screen and (min-width: 768px){
/* Styles before scroll */
#custom-nav {
background-color: rgba(0,0,0,0);
border: 0;
box-shadow: none;
z-index: 999;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;