Skip to Content
Odoo मेन्यू
  • Sign in
  • मुफ़्त में आज़माएं
  • ऐप्लिकेशन
    फ़ाइनेंस
    • अकाउंटिंग
    • इनवॉइसिंग
    • एक्सपेंस
    • स्प्रेडशीट (बीआई)
    • डॉक्यूमेंट्स
    • साइन
    सेल्स
    • सीआरएम
    • सेल्स
    • पीओएस शॉप
    • पीओएस रेस्टोरेंट
    • सब्सक्रिप्शन
    • रेंटल
    वेबसाइट
    • वेबसाइट बिल्डर
    • ई-कॉमर्स
    • ब्लॉग
    • फ़ोरम
    • लाइव चैट
    • ई-लर्निंग
    सप्लाई चेन
    • इन्वेंट्री
    • मैन्युफ़ैक्चरिंग
    • पीएलएम
    • परचेज़
    • मेंटेनेंस
    • क्वालिटी
    मानव संसाधन
    • कर्मचारी
    • रिक्रूटमेंट
    • टाइम ऑफ़
    • अप्रेज़ल
    • रेफ़रल
    • फ़्लीट
    मार्केटिंग
    • सोशल मार्केटिंग
    • ईमेल मार्केटिंग
    • एसएमएस मार्केटिंग
    • इवेंट
    • मार्केटिंग ऑटोमेशन
    • सर्वे
    सेवाएं
    • प्रोजेक्ट
    • टाइमशीट
    • फ़ील्ड सर्विस
    • हेल्पडेस्क
    • प्लानिंग
    • अपॉइंटमेंट
    प्रॉडक्टिविटी
    • डिस्कस
    • अप्रूवल
    • आईओटी
    • वीओआईपी
    • नॉलेज
    • WhatsApp
    तीसरे पक्ष के ऐप्लिकेशन Odoo स्टूडियो Odoo क्लाउड प्लेटफ़ॉर्म
  • इंडस्ट्री
    रीटेल
    • बुक स्टोर
    • क्लोदिंग स्टोर
    • फ़र्नीचर स्टोर
    • ग्रॉसरी स्टोर
    • हार्डवेयर स्टोर
    • टॉय स्टोर
    Food & Hospitality
    • बार और पब
    • रेस्टोरेंट
    • फ़ास्ट फ़ूड
    • Guest House
    • बेवरिज डिस्ट्रीब्यूटर
    • होटल
    रियल एस्टेट
    • Real Estate Agency
    • आर्किटेक्चर फ़र्म
    • कंसट्रक्शन
    • एस्टेट मैनेजमेंट
    • गार्ड्निंग
    • प्रॉपर्टी ओनर असोसिएशन
    कंसल्टिंग
    • अकाउंटिंग फ़र्म
    • Odoo पार्टनर
    • मार्केटिंग एजेंसी
    • लॉ फ़र्म
    • टैलेंट ऐक्विज़िशन
    • ऑडिट & सर्टिफ़िकेशन
    मैन्युफ़ैक्चरिंग
    • टेक्सटाइल
    • Metal
    • फ़र्नीचर
    • फ़ूड
    • Brewery
    • कॉर्पोरेट गिफ़्ट
    हेल्थ & फिटनेस
    • स्पोर्ट्स क्लब
    • आईवियर स्टोर
    • फिटनेस सेंटर
    • वेलनेस प्रैक्टिशनर
    • फॉर्मेसी
    • हेयर सैलून
    Trades
    • Handyman
    • आईटी हॉर्डवेयर और सपोर्ट
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    अन्य
    • Nonprofit Organization
    • एन्वायरमेंटल एजेंसी
    • बिलबोर्ड रेंटल
    • फ़ोटोग्राफी
    • बाइक लीजिंग
    • सॉफ़्टवेयर रीसेलर
    Browse all Industries
  • कम्यूनिटी
    सीखें
    • ट्यूटोरियल्स
    • दस्तावेज़
    • सर्टिफ़िकेशन
    • ट्रेनिंग
    • ब्लॉग
    • पॉडकास्ट
    शिक्षा को बढ़ावा दें
    • एजुकेशन प्रोग्राम
    • स्केल अप! बिजनेस गेम
    • Odoo के ऑफ़िस में आएं
    सॉफ़्टवेयर पाएं
    • डाउनलोड
    • वर्शन की तुलना करें
    • रिलीज़
    साथ मिलकर काम करें
    • Github
    • फ़ोरम
    • इवेंट
    • अनुवाद
    • पार्टनर बनें
    • Services for Partners
    • अपना अकाउंटिंग फ़र्म रजिस्टर करें
    सेवाएं पाएं
    • पार्टनर ढूंढें
    • अकाउंटेंट खोजें
    • सलाहकार की मदद लें
    • इम्प्लिमेंटेशन सेवाएं
    • कस्टमर रेफ़रेंस
    • सहायता
    • अपग्रेड
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    डेमो देखें
  • कीमत
  • सहायता

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • सीआरएम
  • e-Commerce
  • लेखांकन
  • इन्वेंटरी
  • PoS
  • प्रोजेक्ट
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
टैग (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
टैग (View all)
odoo accounting v14 pos v15
About this forum
Help

customize website portal sale template V10

Subscribe

Get notified when there's activity on this post

This question has been flagged
templatesportalwebsiteodoo10
2 Replies
8130 Views
Avatar
Alvin

Hi

please how to customize (add a new menu after quote) website portal sale template ? which method to use ?

i tried to add my code in the in website_portal_sale_templates.xml by copying existing code and modified it. but i get no change. :

<template id="portal_my_orders" name="My Sales Orders 1">
      <t t-call="website_portal.portal_layout">
        <h3 class="page-header">Your Orders 1</h3>
        <t t-if="not orders">
            <p>There are currently no orders for your account.</p>
        </t>
        <t t-if="orders">
            <table class="table table-hover o_my_status_table">
                <thead>
                  <tr class="active">
                    <th>numero #</th>
                    <th>numero 2 #</th>
                    <th>Order Date</th>
                    <th></th>
                    <th>Total</th>
                  </tr>
                </thead>
                <t t-foreach="orderrs" t-as="orderr">
                    <tr>
                        <td>
                            <a t-attf-href="/my/orderrs/{{orderr.id}}?{{keep_query()}}"><t t-esc="orderr.name"/></a>
                        </td>
                         <td>
                            <a t-attf-href="/my/orderrs/{{orderr.id}}?{{keep_query()}}"><t t-esc="orderr.id"/></a>
                        </td>
                        <td><span t-field="orderr.date_order"/></td>
                        <td>
                            <t t-if="orderr.state == 'progress'">
                                <span class="label label-info"><i class="fa fa-fw fa-clock-o"/> Invoiced</span>
                            </t>
                            <t t-if="orderr.state in ['shipping_except','invoice_except']">
                                <span class="label label-danger"><i class="fa fa-fw fa-warning"/> Problem</span>
                            </t>
                            <t t-if="orderr.state == 'done'">
                                <span class="label label-default"><i class="fa fa-fw fa-check"/> Done</span>
                            </t>
                        </td>
                        <td><span t-field="orderr.amount_total" t-options='{"widget": "monetary", "display_currency": order.pricelist_id.currency_id}'/></td>
                    </tr>
                </t>
            </table>
            <div t-if="pager" class="o_portal_pager text-center">
              <t t-call="website.pager"/>
            </div>
        </t>
      </t>
    </template>



Please help me.


regards

0
Avatar
Discard
Avatar
Tintuk Tomin
Best Answer

The below code should is the xml code


<template id="new_link" name="New Link" inherit_id="website_portal.portal_layout" priority="25">
    <xpath expr="//ul[contains(@class,'o_portal_submenu')]" position="inside">
        <li>
            <a href="/my/newlink">New Menu</a>
        </li>
    </xpath>
</template>


The above code is used to create a new menu in the portal view of odoo 10. Also you want to create a new python function in the controller for creating the action. What to do on clicking on this new menu, with the link /my/newlink


For example

class CustomerPortal(CustomerPortal):

    @http.route(['/my/newlink', '/my/quotes/page/<int:page>'], type='http', auth="user", website=True)
    def portal_my_records(self, page=1, date_begin=None, date_end=None, sortby=None, **kw):
        
        print("IN PYTHON CONTROLLER")
        data={}
        return request.render("call.template", data)

When you click on the New menu in the portal page the python function will execute. and from here you can pass the controll to another template. in the above code call.template is the template name and data is the values that you need to pass into that particular template.


If you want to create a new menu in the portal page of odoo 11 refer the below link.

https://stackoverflow.com/questions/52733625/how-to-add-my-custom-menu-to-the-portal-users-menu-list



0
Avatar
Discard
Avatar
FG
Best Answer

typo orderr maybe. If you have an order as in <t t-if="orders"> you still have no orderr and nothing is displayed

0
Avatar
Discard
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Sign up
Related Posts Replies Views Activity
Projects/Tasks not showing in Portal for User in Odoo 10 Solved
project portal website odoo10
Avatar
Avatar
2
सित॰ 22
10628
How can I activate signup on website in Odoo 10 Solved
portal signup website odoo10
Avatar
Avatar
2
मार्च 17
11740
How to set date format in datepicker in the portal template? Solved
portal template datepicker website odoo10
Avatar
Avatar
Avatar
2
अग॰ 23
19076
Error after changing some fields in 'my details' page.
portal website
Avatar
Avatar
1
जन॰ 23
2888
How to print/Download report from website ? Solved
website odoo10
Avatar
Avatar
Avatar
5
फ़र॰ 24
25380
कम्यूनिटी
  • ट्यूटोरियल्स
  • दस्तावेज़
  • फ़ोरम
ओपन सोर्स
  • डाउनलोड
  • Github
  • रनबॉट
  • अनुवाद
सेवाएं
  • Odoo.sh Hosting
  • सहायता
  • अपग्रेड
  • कस्टम डेवलपमेंट्स
  • शिक्षा
  • अकाउंटेंट खोजें
  • पार्टनर ढूंढें
  • पार्टनर बनें
हमारे बारे में
  • हमारी कंपनी
  • ब्रांड ऐसेट
  • संपर्क करें
  • नौकरियां
  • इवेंट
  • पॉडकास्ट
  • ब्लॉग
  • ग्राहक
  • लीगल • गोपनीयता
  • सुरक्षा
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo, बिज़नेस से जुड़े ऐप्लिकेशन का एक कलेक्शन है जो ओपन सोर्स पर आधारित है. इसमें आपकी कंपनी की हर ज़रूरत के लिए ऐप्लिकेशन हैं. जैसे, सीआरएम, ई-कॉमर्स, अकाउंटिंग, इन्वेंट्री, पॉइंट ऑफ़ सेल, प्रोजेक्ट मैनेजमेंट वगैरह.

Odoo की सबसे बड़ी खासियत है कि यह इस्तेमाल करने में बहुत आसान है और यह पूरी तरह से इंटिग्रेट किया हुआ है.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now