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

How can i display by foreach loop my helpdesk tickets in odoo 10 ?

Odoberať

Get notified when there's activity on this post

This question has been flagged
ticketdisplaytableattributeodoo10.0
2 Replies
10320 Zobrazenia
Avatar
Jules

Hello my friends, 

I want to display helpdesk tickets on my website page. 

I finded the database table "helpdesk_ticket" on pgAdmin4 but i can't display them by foreach loop.

Can someone help me about those attribute in order to display tickets ? 

That my template where i'm trying to find the right technical name of helpdesk_ticket : 


<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="liste_offres" model="ir.ui.view">
<field name="model">helpdesk.team.form.inherit.website.form.helpdesk</field>
<field name="model">helpdesk.team</field>
<field name="inherit_id" ref="coopaname_helpdesk.marchepublic" />
<field name="mode">primary</field>
<field name="key">coopaname_helpdesk.liste_offres</field>
<field name="arch" type="xml">

<xpath expr="//div" position="after">


<h1 style="text-align:center;">le fichier est load</h1>

<t t-foreach="helpdesk.team.id" t-as="helpdesk.team">
<p style="text-align:center;"><t t-esc="i"/></p>
</t>






</xpath>

</field>
</record>
</data>
</odoo>


about my error : 


Error to render compiling AST
AttributeError: 'NoneType' object has no attribute 'team'
Template: 1863
Path: /templates/t/t/t/t[2]
Node: <t t-foreach="helpdesk.team.id" t-as="helpdesk.team">
            <p style="text-align:center;"><t t-esc="i"/></p>
            </t>

Best regards, 

Jules


0
Avatar
Zrušiť
Avatar
Zbik
Best Answer

You have defined the field about the model twice.

Replace:
<field name="model">helpdesk.team.form.inherit.website.form.helpdesk</field>
by
<field name="name">helpdesk.team.form.inherit.website.form.helpdesk</field>


and check if you are still getting an error.

0
Avatar
Zrušiť
Avatar
Jules
Autor Best Answer

Hi my friends, thanks for your help but i still get an error


template.xml : 

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="liste_offres" model="ir.ui.view">
<field name="name">coopaname_helpdesk.liste_offres</field>
<field name="inherit_id" ref="coopaname_helpdesk.marchepublic" />
<field name="mode">primary</field>
<field name="key">coopaname_helpdesk.liste_offres</field>
<field name="arch" type="xml">

<xpath expr="//div" position="after">
<div class="oe_structure" >
<div class="container" >
<h1 style="text-align:center;">le fichier est load</h1>
<t t-foreach="tickets" t-as="ticket">


<div class="panel-footer text-center">
<p class="text-muted">
<i class="o_default_snippet_text"> Publié par : <span t-field="ticket.x_name"/></i>
</p>
</div>


</t>
</div>
</div>
</xpath>

</field>
</record>
</data>
</odoo>

and

 controller.py : 


@http.route('/coopaname_helpdesk/post_form_ticket/<string:model_name>',  methods=['POST'], type = 'http', auth='public',  website= True, Store=True )
def website_form(self, model_name, **kwargs):
try:
objet_consultation = kwargs.get('x_objet_consultation')
cat = kwargs.get('x_cat')
membre_interne = kwargs.get('x_membre_interne')
membre_externe = kwargs.get('x_membre_externe')
equipeok = kwargs.get('x_equipeok')
admin = kwargs.get('x_admin')
type_marche = kwargs.get('x_type_marche')
ville_adju = kwargs.get('x_ville_adju')
date_order = kwargs.get('x_date_order')
date_limite = kwargs.get('x_date_limite')
duree_marche = kwargs.get('x_duree_marche')
montant_marche = kwargs.get('x_montant_marche')
num_ref = kwargs.get('x_num_ref')
pj = kwargs.get('x_pj')
name = kwargs.get('x_name')
mail = kwargs.get('x_mail')
inputstreet1 = kwargs.get('x_inputstreet1')
inputcity1 = kwargs.get('x_inputcity1')
inputzip1 = kwargs.get('x_inputzip1')
inputstreet2 = kwargs.get('x_inputstreet2')
inputcity2 = kwargs.get('x_inputcity2')
inputzip2 = kwargs.get('x_inputzip2')

data = {
'x_cat' : cat,
'x_objet_consultation' : objet_consultation,
'x_membre_interne' : membre_interne,
'x_membre_externe' : membre_externe,
'x_equipeok' : equipeok,
'x_admin' : admin,
'x_type_marche' : type_marche,
'x_ville_adju':ville_adju,
'x_date_order': date_order,
'x_date_limite': date_limite,
'x_duree_marche': duree_marche,
'x_montant_marche' : montant_marche,
'x_num_ref' : num_ref,
'x_pj' : pj,
'x_name' : name,
'x_mail' : mail,
'x_inputstreet1' : inputstreet1,
'x_inputcity1' : inputcity1,
'x_inputzip1' : inputzip1,
'x_inputstreet2': inputstreet2,
'x_inputzip2' : inputzip2,
'x_inputcity2' : inputcity2
}
print('ca passe par le try')
return request.env['monmarchepublic'].create(data)

except:
return json.dumps({'error' : ' tout est casse'})

and 

model.py : 

from odoo import models, fields, api

class MonHelpdeskTicket(models.Model):

_name = "monmarchepublic"
_inherit = 'res.users'
_inherit = [
'mail.thread',
'ir.needaction_mixin',
]
x_name = fields.Char('Nom et Prenom', readonly=0, website_form_blacklisted=0, Store=True )
x_objet_consultation = fields.Char('Objet de la consultation', readonly=0, website_form_blacklisted=0, Store=True)
x_membre_interne = fields.Char("Membres de l'équipe INTERNE Coopaname", readonly=0, website_form_blacklisted=0, Store=True)
x_membre_externe = fields.Char(" Membres de l'équipe EXTERNE et/ou informations utiles", readonly=0, website_form_blacklisted=0, Store=True)
x_equipeok = fields.Boolean('Equipe complète', readonly=0, website_form_blacklisted=0, Store=True)
x_admin = fields.Char('Administration', readonly=0, website_form_blacklisted=0, Store=True)
x_inputstreet1 = fields.Char('N° et Rue', readonly=0, website_form_blacklisted=0, Store=True)
x_inputcity1 = fields.Char('Ville', readonly=0, website_form_blacklisted=0, Store=True)
x_inputzip1 = fields.Char('Code Postal', readonly=0, website_form_blacklisted=0, Store=True)
x_date_order = fields.Date('Date de publication', readonly=0, website_form_blacklisted=0, Store=True)
x_type_marche = fields.Selection([("offre_ferme", "Appel d'offre Fermé"), ('offre_ouvert', "Appel d'offre Ouvert"), ('concours', 'Concours'), ('consultation', 'Consultation'), ('mapa', 'MAPA')], readonly=0, website_form_blacklisted=0, Store=True)
x_date_limite = fields.Datetime('Date et heure limites de dépot de candidature', readonly=0, website_form_blacklisted=0, Store=True)
x_duree_marche = fields.Char('Durée du marché', readonly=0, website_form_blacklisted=0, Store=True)
x_montant_marche = fields.Char('Montant du marché', readonly=0, website_form_blacklisted=0, Store=True)
x_inputstreet2 = fields.Char('N° et Rue', readonly=0, website_form_blacklisted=0, Store=True)
x_inputcity2 = fields.Char('Ville', readonly=0, website_form_blacklisted=0, Store=True)
x_inputzip2 = fields.Char('Code Postal', readonly=0, website_form_blacklisted=0, Store=True)
x_num_ref = fields.Char('Numéro de référence attribué au marché', readonly=0, website_form_blacklisted=0, Store=True)
x_cat = fields.Selection([("Etudes, Maitrise d oeuvre, Controle", "Etudes, Maîtrise d'oeuvre, Contrôle"), ('Travaux de batiment', 'Travaux de bâtiment'), ('Travaux Publics', 'Travaux Publics'), ('Fournitures', 'Fournitures'), ('Services', 'Services')], readonly=0, website_form_blacklisted=0, Store=True)
x_pj = fields.Char('Pièce Jointe', readonly=0, website_form_blacklisted=0, Store=True)
x_ville_adju = fields.Char('Ville du Pouvoir Adjudicateur', readonly=0, website_form_blacklisted=0, Store=True)
x_mail = fields.Char('Email', readonly=0, website_form_blacklisted=0, Store=True)
x_etape = fields.Selection([('New', 'New'), ('CCTP', 'CCTP'), ('En cours de traitement', 'En cours de traitement'), ('Valide', 'Validé'), ('Refuse', 'Refusé'), ('Archive', 'Archivé')], readonly=0, website_form_blacklisted=0, Store=True)
message_ids = fields.One2many('mail.message', 'res_id', string="Commentaire", Store=True)
partner_ids = fields.Many2many('res.partner', string='Recipients', help="List of partners that will be added as follower of the current document.", readonly=0, website_form_blacklisted=0, Store=True)
message_partner_ids = fields.Many2many(
comodel_name='res.partner', string='Followers Test',
compute='_get_followers', search='_search_follower_partners', readonly=0, website_form_blacklisted=0, Store=True)
follower_ids = fields.One2many('mail.followers', 'res_id', string="follo", readonly=0, website_form_blacklisted=0, Store=True)


So How can i display my tickets because i got this error message : 


Error to render compiling AST
BuildError: (<odoo.http.EndPoint object at 0x7f3bd8606990>, {}, None)
Template: website.layout
Path: /templates/t/t/t[5]/t[5]/t
Node: <t t-foreach="website.get_alternate_languages(request.httprequest)" t-as="lg">
                    <link rel="alternate" t-att-hreflang="lg['hreflang']" t-att-href="lg['href']" data-oe-id="1390" data-oe-model="ir.ui.view" data-oe-field="arch" data-oe-xpath="/t[1]/t[1]/t[4]/t[5]/t[1]/link[1]"/>
                </t>





0
Avatar
Zrušiť
Zbik

Your helpdesk_ticket is not set or not pass to view, helpdesk_ticket = None

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
how to display a table on webside?
xml display table
Avatar
0
júl 19
4978
Personalize Ticket on POS - Odoo v8
pos ticket restaurant table odooV8
Avatar
Avatar
2
mar 17
3796
count number of records based on condition Solved
odoo10.0
Avatar
Avatar
1
nov 24
21230
How to install odoo 10 in ubuntu 20.04? Solved
odoo10.0
Avatar
Avatar
1
sep 23
4004
Question about action_confirm
odoo10.0
Avatar
Avatar
Avatar
3
máj 23
6596
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