Skip to Content
Odoo Meniu
  • Autentificare
  • Try it free
  • Aplicații
    Finanțe
    • Contabilitate
    • Facturare
    • Cheltuieli
    • Spreadsheet (BI)
    • Documente
    • Semn
    Vânzări
    • CRM
    • Vânzări
    • POS Shop
    • POS Restaurant
    • Abonamente
    • Închiriere
    Site-uri web
    • Constructor de site-uri
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Lanț Aprovizionare
    • Inventar
    • Producție
    • PLM
    • Achiziție
    • Maintenance
    • Calitate
    Resurse Umane
    • Angajați
    • Recrutare
    • Time Off
    • Evaluări
    • Referințe
    • Flotă
    Marketing
    • Social Marketing
    • Marketing prin email
    • SMS Marketing
    • Evenimente
    • Automatizare marketing
    • Sondaje
    Servicii
    • Proiect
    • Foi de pontaj
    • Servicii de teren
    • Centru de asistență
    • Planificare
    • Programări
    Productivitate
    • Discuss
    • Aprobări
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Aplicații Terțe Odoo Studio Platforma Odoo Cloud
  • Industrii
    Retail
    • Book Store
    • Magazin de îmbrăcăminte
    • Magazin de Mobilă
    • Magazin alimentar
    • Magazin de materiale de construcții
    • Magazin de jucării
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Distribuitor de băuturi
    • Hotel
    Proprietate imobiliara
    • Real Estate Agency
    • Firmă de Arhitectură
    • Construcție
    • Estate Managament
    • Grădinărit
    • Asociația Proprietarilor de Proprietăți
    Consultanta
    • Firma de Contabilitate
    • Partener Odoo
    • Agenție de marketing
    • Law firm
    • Atragere de talente
    • Audit & Certification
    Producție
    • Textil
    • Metal
    • Mobilier
    • Mâncare
    • Brewery
    • Cadouri corporate
    Health & Fitness
    • Club Sportiv
    • Magazin de ochelari
    • Centru de Fitness
    • Wellness Practitioners
    • Farmacie
    • Salon de coafură
    Trades
    • Handyman
    • IT Hardware and Support
    • Asigurare socială de stat
    • Cizmar
    • Servicii de curățenie
    • HVAC Services
    Altele
    • Organizație nonprofit
    • Agenție de Mediu
    • Închiriere panouri publicitare
    • Fotografie
    • Închiriere biciclete
    • Asigurare socială
    Browse all Industries
  • Comunitate
    Învăță
    • Tutorials
    • Documentație
    • Certificări
    • Instruire
    • Blog
    • Podcast
    Empower Education
    • Program Educațional
    • Scale Up! Business Game
    • Visit Odoo
    Obține Software-ul
    • Descărcare
    • Compară Edițiile
    • Lansări
    Colaborați
    • Github
    • Forum
    • Evenimente
    • Translations
    • Devino Partener
    • Services for Partners
    • Înregistrează-ți Firma de Contabilitate
    Obține Servicii
    • Găsește un Partener
    • Găsiți un contabil
    • Meet an advisor
    • Servicii de Implementare
    • Referințe ale clienților
    • Suport
    • Actualizări
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Obține un demo
  • Prețuri
  • Ajutor

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

  • CRM
  • e-Commerce
  • Contabilitate
  • Inventar
  • PoS
  • Proiect
  • MRP
All apps
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
All Posts Oameni Insigne
Etichete (View all)
odoo accounting v14 pos v15
Despre acest forum
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
All Posts Oameni Insigne
Etichete (View all)
odoo accounting v14 pos v15
Despre acest forum
Suport

Is it possible to link an odoo module with website module in odoo 17?

Abonare

Primiți o notificare când există activitate la acestă postare

Această întrebare a fost marcată
website_builderodoo17
2 Răspunsuri
3577 Vizualizări
Imagine profil
Jugert Mucoimaj

Hi!! I wanted to know if there's possible to display some values in Odoo Website module getting them from a module that does the calculations. I searched about this but couldn't see any examples.

0
Imagine profil
Abandonează
Imagine profil
Cybrosys Techno Solutions Pvt.Ltd
Cel mai bun răspuns

Hi,


Yes, linking your custom module with the Website module in Odoo 17 is possible.


Ensure that the website module is included as a dependency:


{

    'name': 'Custom Website Integration',

    'depends': ['base', 'website'],  # Add 'website' as a dependency

    # ... other manifest settings

}


Create a controller to define the route and pass the calculated data to the website template.

example:


from odoo import http

from odoo.http import request


class CustomWebsite(http.Controller):

    @http.route(['/custom/calculations'], type='http', auth='public', website=True)

    def display_calculations(self, **kwargs):

        # Fetch calculations from your custom model

        calculation_model = request.env['your.model.name']

        calculations = calculation_model.search([])  # Replace 'your.model.name' with your model's name

        values = {

            'calculations': calculations,

        }

        return request.render('your_module.template_id', values)


Create a website template to o show the data on the website. Add this template to your module's views folder:


<?xml version="1.0" encoding="utf-8"?>

<odoo>

    <template id="template_id" name="Calculations">

        <t t-call="website.layout">

            <div class="container">

                <h1>Calculations</h1>

                <div t-foreach="calculations" t-as="calc">

                    <p t-field="calc.value"/>  <!-- Adjust 'value' to match your model's field -->

                </div>

            </div>

        </t>

    </template>

</odoo>


If you want to add a menu item to  make your page accessible from the website:


<odoo>

    <record id="menu_calculations" model="website.menu">

        <field name="name">Calculations</field>

        <field name="url">/custom/calculations</field>

        <field name="parent_id" ref="website.main_menu"/>

        <field name="sequence" type="int">11</field>

    </record>

</odoo>


If you want to display your data on an existing website page (e.g., the product page), you can extend the template using inherit_id:


<odoo>

    <template id="product_page_extension" inherit_id="website_sale.product">

        <xpath expr="//div[@id='product_details']" position="after">

            <div class="custom-data">

                <h3>Custom Calculations</h3>

                <div t-foreach="calculations" t-as="calc">

                    <p t-field="calc.value"/>  <!-- Adjust 'value' to match your model's field -->

                </div>

            </div>

        </xpath>

    </template>

</odoo>


You can also create custom snippet templates and integrate them with the Website Builder. For more details refer to the following blogs:

https://www.cybrosys.com/blog/how-to-create-a-snippet-in-odoo-17

https://www.cybrosys.com/blog/how-to-create-a-generic-controller-in-odoo-17-website


Hope it helps

1
Imagine profil
Abandonează
Imagine profil
Jugert Mucoimaj
Autor Cel mai bun răspuns

Thank You so much!

0
Imagine profil
Abandonează
Enjoying the discussion? Don't just read, join in!

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

Înscrie-te
Related Posts Răspunsuri Vizualizări Activitate
odoo website customer reviews ratting attachment issue
website_builder odoo17
Imagine profil
0
ian. 25
1419
Special characters in website Rezolvat
website_builder odoo17
Imagine profil
Imagine profil
1
nov. 24
1712
Page 'does not exists' when adding a new custom menu from a module in Website.
website_builder website odoo17
Imagine profil
0
nov. 24
1715
AssertionError while install Appoinment in website
website_builder
Imagine profil
Imagine profil
Imagine profil
2
nov. 25
198
Error while posting invoice to ZATCA odoo sh Rezolvat
odoo17
Imagine profil
Imagine profil
Imagine profil
Imagine profil
3
iul. 25
3036
Comunitate
  • Tutorials
  • Documentație
  • Forum
Open Source
  • Descărcare
  • Github
  • Runbot
  • Translations
Servicii
  • Hosting Odoo.sh
  • Suport
  • Actualizare
  • Custom Developments
  • Educație
  • Găsiți un contabil
  • Găsește un Partener
  • Devino Partener
Despre Noi
  • Compania noastră
  • Active de marcă
  • Contactați-ne
  • Locuri de muncă
  • Evenimente
  • Podcast
  • Blog
  • Clienți
  • Aspecte juridice • Confidențialitate
  • Securitate
الْعَرَبيّة 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 este o suită de aplicații de afaceri open source care acoperă toate nevoile companiei dvs.: CRM, comerț electronic, contabilitate, inventar, punct de vânzare, management de proiect etc.

Propunerea de valoare unică a Odoo este să fie în același timp foarte ușor de utilizat și complet integrat.

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