Skip to Content
Odoo Menu
  • Prihlásiť sa
  • Vyskúšajte zadarmo
  • Aplikácie
    Financie
    • Účtovníctvo
    • Fakturácia
    • Výdavky
    • Tabuľka (BI)
    • Dokumenty
    • Podpis
    Predaj
    • CRM
    • Predaj
    • POS Shop
    • POS Restaurant
    • Manažment odberu
    • Požičovňa
    Webstránky
    • Tvorca webstránok
    • eShop
    • Blog
    • Fórum
    • Živý chat
    • eLearning
    Supply Chain
    • Sklad
    • Výroba
    • Správa životného cyklu produktu
    • Nákup
    • Údržba
    • Manažment kvality
    Ľudské zdroje
    • Zamestnanci
    • Nábor zamestnancov
    • Voľné dni
    • Hodnotenia
    • Odporúčania
    • Vozový park
    Marketing
    • Marketing sociálnych sietí
    • Email marketing
    • SMS marketing
    • Eventy
    • Marketingová automatizácia
    • Prieskumy
    Služby
    • Projektové riadenie
    • Pracovné výkazy
    • Práca v teréne
    • Helpdesk
    • Plánovanie
    • Schôdzky
    Produktivita
    • Tímová komunikácia
    • Schvalovania
    • IoT
    • VoIP
    • Znalosti
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Priemyselné odvetvia
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Reštaurácia
    • Fast Food
    • Guest House
    • Beverage distributor
    • Hotel
    Reality
    • Real Estate Agency
    • Architecture Firm
    • Konštrukcia
    • Estate Managament
    • Gardening
    • Property Owner Association
    Poradenstvo
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Výroba
    • Textile
    • Metal
    • Furnitures
    • Jedlo
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware and Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Iní
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Komunita
    Vzdelávanie
    • Tutoriály
    • Dokumentácia
    • Certifikácie
    • Školenie
    • Blog
    • Podcast
    Empower Education
    • Vzdelávací program
    • Scale Up! Business Game
    • Visit Odoo
    Softvér
    • Stiahnuť
    • Porovnanie Community a Enterprise vierzie
    • Releases
    Spolupráca
    • Github
    • Fórum
    • Eventy
    • Preklady
    • Staň sa partnerom
    • Services for Partners
    • Register your Accounting Firm
    Služby
    • Nájdite partnera
    • Nájdite účtovníka
    • Meet an advisor
    • Implementation Services
    • Zákaznícke referencie
    • Podpora
    • Upgrades
    ​Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Získajte demo
  • Cenník
  • Pomoc

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

  • CRM
  • e-Commerce
  • Účtovníctvo
  • Sklady
  • PoS
  • Projektové riadenie
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tagy (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tagy (View all)
odoo accounting v14 pos v15
About this forum
Pomoc

customize website portal sale template V10

Odoberať

Get notified when there's activity on this post

This question has been flagged
templatesportalwebsiteodoo10
2 Replies
8202 Zobrazenia
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
Zrušiť
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
Zrušiť
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
Zrušiť
Enjoying the discussion? Don't just read, join in!

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

Registrácia
Related Posts Replies Zobrazenia Aktivita
Projects/Tasks not showing in Portal for User in Odoo 10 Solved
project portal website odoo10
Avatar
Avatar
2
sep 22
10708
How can I activate signup on website in Odoo 10 Solved
portal signup website odoo10
Avatar
Avatar
2
mar 17
11772
How to set date format in datepicker in the portal template? Solved
portal template datepicker website odoo10
Avatar
Avatar
Avatar
2
aug 23
19148
Error after changing some fields in 'my details' page.
portal website
Avatar
Avatar
1
jan 23
2935
How to print/Download report from website ? Solved
website odoo10
Avatar
Avatar
Avatar
5
feb 24
25490
Komunita
  • Tutoriály
  • Dokumentácia
  • Fórum
Open Source
  • Stiahnuť
  • Github
  • Runbot
  • Preklady
Služby
  • Odoo.sh hosting
  • Podpora
  • Vyššia verzia
  • Custom Developments
  • Vzdelávanie
  • Nájdite účtovníka
  • Nájdite partnera
  • Staň sa partnerom
O nás
  • Naša spoločnosť
  • Majetok značky
  • Kontaktujte nás
  • Pracovné ponuky
  • Eventy
  • Podcast
  • Blog
  • Zákazníci
  • Právne dokumenty • Súkromie
  • Bezpečnosť
الْعَرَبيّة 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 je sada podnikových aplikácií s otvoreným zdrojovým kódom, ktoré pokrývajú všetky potreby vašej spoločnosti: CRM, e-shop, účtovníctvo, skladové hospodárstvo, miesto predaja, projektový manažment atď.

Odoo prináša vysokú pridanú hodnotu v jednoduchom použití a súčasne plne integrovanými biznis aplikáciami.

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