İçereği Atla
Odoo Menü
  • Portal
  • Ücretsiz deneyin
  • Uygulamalar
    Finans
    • Muhasebe
    • Faturalama
    • Masraf Yönetimi
    • Elektronik Çizelge (BI)
    • Belgeler
    • İmza
    Satış
    • Müşteri İlişkileri Yönetimi (CRM)
    • Satış
    • Satış Noktası Mağaza
    • Satış Noktası Restoran
    • Abonelikler
    • Kiralama
    Web Sitesi
    • Web Sitesi Oluşturucu
    • eTicaret
    • Blog
    • Forum
    • Canlı Sohbet
    • eÖğrenme
    Tedarik Zinciri
    • Envanter
    • Üretim
    • Ürün Yaşam Döngüsü Yönetimi
    • Satın Alma
    • Bakım
    • Kalite
    İnsan Kaynakları
    • Çalışanlar
    • İşe Alım
    • İzin
    • Değerlendirme
    • Referans
    • Filo Yönetimi
    Pazarlama
    • Sosyal Medyada Pazarlama
    • E-posta ile Pazarlama
    • SMS ile Pazarlama
    • Etkinlikler
    • Pazarlama Otomasyonu
    • Anket
    Hizmetler
    • Proje Yönetimi
    • Çalışma Çizelgeleri
    • Saha Hizmeti
    • Yardım Masası
    • Planlama
    • Randevular
    Verimlilik
    • Sohbet
    • Onay
    • Nesnelerin İnterneti
    • VoIP
    • Bilgi Bankası
    • WhatsApp
    Üçüncü taraf uygulamalar Odoo Stüdyo Odoo Bulut Platformu
  • Sektörler
    Perakende satış
    • Kitapçı
    • Giyim Mağazası
    • Mobilya Mağazası
    • Gıda Marketi
    • Hırdavat Dükkanı
    • Oyuncak Dükkanı
    Gıda ve Konaklama
    • Bar ve Pub
    • Restoran
    • Fast Food Restoranı
    • Konuk Evi
    • İçecek Distribütörü
    • Otel
    Gayrimenkul
    • Emlak Acentesi
    • Mimarlık Firması
    • İnşaat
    • Emlak Yönetimi
    • Bahçe Tasarımı
    • Mülk Sahipleri Derneği
    Uzmanlık
    • Muhasebe Firması
    • Odoo Partner
    • Pazarlama Ajansı
    • Hukuk Firması
    • Yetenek Kazanımı
    • Denetim ve Belgelendirme
    Üretim
    • Tekstil
    • Metal
    • Mobilyalar
    • Gıda
    • Bira fabrikası
    • Kurumsal Hediye
    Sağlık ve Spor
    • Spor Kulübü
    • Optik Mağazası
    • Fitness Merkezi
    • Sağlıklı Yaşam Merkezi
    • Eczane
    • Kuaför Salonu
    Ticaret
    • Tamirci
    • BT Donanım & Destek
    • Güneş Enerjisi Sistemleri
    • Ayakkabı İmalatçısı
    • Temizlik Hizmetleri
    • HVAC Hizmetleri
    Diğerleri
    • Kar Amacı Gütmeyen Kuruluş
    • Çevre Ajansı
    • Reklam Panosu Kiralama
    • Fotoğrafçılık
    • Bisiklet Kiralama
    • Yazılım Bayisi
    Tüm Sektörlere Göz Atın
  • Topluluk
    Öğrenim
    • Eğitim Araçları
    • Dokümantasyon
    • Sertifikasyonlar
    • Eğitim Etkinlikleri
    • Blog
    • Podcast
    Eğitim ve Gelişim
    • Eğitim Programı
    • Scale Up! İşletme Oyunu
    • Odoo'yu Ziyaret Edin
    Yazılım
    • İndirin
    • Sürümleri Kıyaslayın
    • Sürümler
    İş Birliği
    • Github
    • Forum
    • Etkinlikler
    • Çeviriler
    • Partner Olun
    • Partnerler için Hizmetler
    • Muhasebe Firmanızı Kaydettirin
    Hizmetler
    • Partner Bulun
    • Muhasebeci Bulun
    • Bir danışmanla görüşün
    • Kurulum Hizmetleri
    • Müşteri Referansları
    • Destek
    • Sürüm Yükseltme
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Demo randevusu alın
  • Fiyatlandırma
  • Yardım

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

  • Müşteri İlişkileri Yönetimi
  • e-Commerce
  • Muhasebe
  • Envanter
  • PoS
  • Proje Yönetimi
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Etiketler (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Etiketler (View all)
odoo accounting v14 pos v15
About this forum
Yardım

how develop report from 2 models Odoo 10

Abone Ol

Get notified when there's activity on this post

Bu soru işaretlendi
2 Cevaplar
3527 Görünümler
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
Vazgeç
Avatar
Sylvie
Üretici En İyi Yanıt

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
Vazgeç
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
Üretici

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)
En İyi Yanıt

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
Vazgeç
Enjoying the discussion? Don't just read, join in!

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

Üye Ol
Topluluk
  • Eğitim Araçları
  • Dokümantasyon
  • Forum
Açık Kaynak
  • İndirin
  • Github
  • Runbot
  • Çeviriler
Hizmetler
  • Odoo.sh Hosting
  • Destek
  • Sürüm Yükseltme
  • Özel Geliştirmeler
  • Eğitim
  • Muhasebeci Bulun
  • Partner Bulun
  • Partner Olun
Hakkında
  • Şirketimiz
  • Pazarlama Gereçleri
  • İletişim
  • Kariyer
  • Etkinlikler
  • Podcast
  • Blog
  • Müşteriler
  • Hukuki • Gizlilik
  • Güvenlik
الْعَرَبيّة 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, müşteri ilişkileri yönetimi, eTicaret, muhasebe, envanter, satış noktası, proje yönetimi gibi şirketinizin tüm ihtiyaçlarını karşılayan bir açık kaynak işletme uygulamaları paketidir.

Odoo’nun eşsiz değer önermesi, aynı anda hem kullanımının çok kolay olup hem de tamamen entegre olmasıdır.

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