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

how develop report from 2 models Odoo 10

Subscribe

Get notified when there's activity on this post

This question has been flagged
2 Replies
3524 Views
Avatar
Sylvie

I create a report from my module but I need to display one specify tuple from res.partner on this report.

0
Avatar
Discard
Avatar
Sylvie
Author Best Answer

Sorry in fact I am new with Odoo and Python,maybe I am not so clear.

 I did a report from one of my model (convention) but inside that template I need to print the name of one res.partner that have  my boolean is_gerant true. Maybe your answer is the solution, I trying to understand how everything works.

0
Avatar
Discard
Niyas Raphy (Walnut Software Solutions)

Hi sylvie,can you tell me from which model you are trying to print the report ?

OdooBot

I trying to print a report from a model I make name :convention. I send you my code.

 

Thank you

 

Sylvie Nolais

 

De : Niyas Raphy
Envoyé le :vendredi 2 juin 2017 14:54
À : Sylvie
Objet :Re: how develop report from 2 models Odoo 10

 

View Forum Post

Odoo S.A.

Hi sylvie,can you tell me from which model you are trying to print the report ?

--
Niyas Raphy

 

Sent by Odoo S.A. using Odoo.

 

Sylvie
Author

the model i try to report is one I developp :

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

<odoo>

<data>

<!-- QWeb Reports -->

<report

id="convention_report"

model="mybeeformation.convention"

string="Conventions"

report_type="qweb-pdf"

name="myBeeFormation.report_convention_document"

file="myBeeFormation.report_convention_document"

attachment_use="False"

attachment="('convention.pdf')"

/>

<template id="report_convention_document">

<t t-call="report.html_container">

<t t-foreach="docs" t-as="o">

<t t-call="report.external_layout">

<div class="page">

<h3>CONVENTION DE FORMATION PROFESSIONNELLE CONTINUE<br/>

(Article L 920-1 du code du travail)</h3>

<p>Entre les soussignés :<br/>

<ol>

<li>(Raison sociale de l'organisme de formation): <span t-field="res_company.name"/><br/>Enregistré sous le numéro(déclaration d'activité):

<span t-field="res_company.numActivFormation"/></li>

<li>(Désignation de l'entreprise) <span t-field="o.client_id"/><br/>Représentée par

<!-- this where I need a res.partner I finally add a fields.Many2one to res.partner with a domain in my model : -->

<span t-field="o.representant_id"/>

</li>

</ol>

<p>Est conclue la convention suivante, en application des dispositions du livre IX du Code du Tavail portant organisation

de la formation professionnelle continue dans le cadre de la formation professionnelle tout au long de la vie.</p>

</p>

<h4><strong>ARTICLE 1er : Objet de la Convention</strong></h4>

<p>L'organisme <span t-field="res_company.name"/> organisera l'action de formation suivante:

<ul>

<li>Intitulé du stage: <span t-field="o.name"/></li>

<li>Objectifs: <span t-field="o.objectifConvention"/></li>

<li>Programmes et methodes (annexe 1) </li>

<li>Type d'action de formation(au sens des articles L 900-2 et L 900-6 du code du travail): <span t-field="o.action_id"/></li>

<li>Dates : Entre le <span t-field="o.dateDebut"/> et le <span t-field="o.dateFin"/></li>

<li>Durée : <span t-field="o.dureeStage"/></li>

<li>Lieu: <t t-if="o.type_stage == 'Inter'"><span t-field="o.lieu_id"/></t>

<t t-elif="o.type_stage == 'Intra'">Au sein de l'entreprise</t></li>

</ul>

</p>

<h4><strong>ARTICLE 2 : Effectif formé</strong></h4>

<p>L'organisme <span t-field="res_company.name"/> accueillera les personnes suivantes (noms et fonctions) <br/>

<strong>Stagiaires:</strong>

<t t-foreach="o.stagiaire_ids" t-as="v">

<tr>

<td>

<span t-esc="v.name"/> <span t-esc="v.function"/><br/>

</td>

</tr>

</t>

</p>

<div class="col-xs-3">

</div><br/>

<h4><strong>ARTICLE 3 : Disposition financières</strong></h4>

<p>En contrepartie de cette action de formation, l'employeur s'acquittera des couts suivants:</p>

<ul>

<li>Frais de formation: coût unitaire H.T <span t-field="o.prixFacture"/> X <span t-field="o.nbInscrit"/> Stagiaires =

<span t-esc="o.prixFacture * o.nbInscrit"/> € H.T.</li>

<li>Frais de restauration et/ou d'hebergement: coût unitaire H.T <t t-if="o.inclureFrais"><t t-set="totRest" t-value="o.r_fraisAnnexe * o.nbInscrit"/><span t-field="o.r_fraisAnnexe"/> X <span t-field="o.nbInscrit"/> =</t>

<t t-else=""><span t-esc="o.fraisTotal + o.r_fraisAnnexe"/> X <span t-field="o.nbInscrit"/> =

<t t-set="totRest" t-value="(o.fraisTotal + o.r_fraisAnnexe) * o.nbInscrit"/></t><t t-esc="totRest" /> € H.T.</li>

<li>Soit un total de<t t-esc="o.prixFacture * o.nbInscrit + totRest"/> € H.T.</li>

<li>T.V.A. (20,0%) <t t-esc="(o.prixFacture * o.nbInscrit + totRest)*0.2"/> </li>

<li>Total General <t t-esc="(o.prixFacture * o.nbInscrit + totRest)*1.2"/></li>

</ul>

<h4><strong>ARTICLE 4 : Modalités de règlement</strong></h4>

<p>Le paiement sera dû à reception de la facture.<br/>A régler: par virement</p>

<h4><strong>ARTICLE 5 : Non réalisation de la prestation de formation</strong></h4>

<p>En application de l'article L991-6 du code du travail, il est convenu entre les signataires que faute de réalisation totale ou partielle de la formation,

l'organisme prestataire devra rembourser au cocontractant les sommes indûment perçues de ce fait.</p>

<h4><strong>ARTICLE 6 : Différends éventuels</strong></h4>

<p>Si une contestation ou un différend ne peuvent être réglés à l'amiable, le Tribunal de Bayonne sera le seul compétent pour régler le litige</p>

</div>

</t>

</t>

</t>

Avatar
Niyas Raphy (Walnut Software Solutions)
Best Answer

Hi, i didn't understand what exactly you meant. As far as i understood, i think you want to access the data from some other model rather than current  model. If so, you can write a parser for the report and access the required value from other model.
Below attached is a sample code of parser. inside the function you can access the value and return the value into report template

class RentalReportParser(report_sxw.rml_parse):

def __init__(self, cr, uid, name, context=None):
super(RentalReportParser, self).__init__(cr, uid, name, context=context)
self.localcontext.update({
'get_date': self.get_date,

})
self.context = context

def get_date(self):
date = datetime.datetime.now()
return date


class PrintReport(osv.AbstractModel):
_name = 'report.rental_profit_report.report_rental'
_inherit = 'report.abstract_report'
_template = 'rental_profit_report.report_rental'
_wrapped_report_class = RentalReportParser
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
कम्यूनिटी
  • ट्यूटोरियल्स
  • दस्तावेज़
  • फ़ोरम
ओपन सोर्स
  • डाउनलोड
  • 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