Skip to content

Instantly share code, notes, and snippets.

@akhmadkresna
Last active April 28, 2021 16:29
Show Gist options
  • Save akhmadkresna/e0d858f4dfb68144aa4a9a49ce7a2f39 to your computer and use it in GitHub Desktop.
Save akhmadkresna/e0d858f4dfb68144aa4a9a49ce7a2f39 to your computer and use it in GitHub Desktop.
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 ;)
@sehrishnaz
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment