تخطي للذهاب إلى المحتوى
أودو القائمة
  • تسجيل الدخول
  • جرب مجاناً
  • التطبيقات
    المالية
    • المحاسبة
    • فوترة
    • النفقات
    • جدول البيانات (BI)
    • المستندات
    • توقيع إلكتروني
    المبيعات
    • إدارة علاقات العملاء
    • المبيعات
    • نقطة البيع للمتاجر
    • نقطة البيع للمطاعم
    • الاشتراكات
    • تأجير
    المواقع الإلكترونية
    • أداة بناء المواقع الإلكترونية
    • متاجر إلكترونية
    • مدونة
    • المنتدى
    • دردشة مباشرة
    • التعليم الإلكتروني
    سلسلة التوريد
    • المستودعات
    • التصنيع
    • إدارة دورة حياة المنتج
    • المشتريات
    • الصيانة
    • الجودة
    الموارد البشرية
    • موظفون
    • التوظيف
    • إجازة عمل
    • التقييمات
    • الإحالات
    • تطبيق الأسطول
    التسويق
    • التسويق الإجتماعي
    • التسويق عبر البريد الإلكتروني
    • التسويق عبر الرسائل النصية
    • فعاليات
    • أتمتة التسويق
    • الاستطلاعات
    الخدمات
    • المشاريع
    • الجداول الزمنية
    • الخدمة الميدانية
    • مكتب المساعدة
    • التخطيط
    • مواعيد
    اﻹنتاجية
    • مناقشة
    • الموافقات
    • إنترنت الأشياء "IoT"
    • بروتوكول ربط المحادثات الصوتية عبر الإنترنت
    • المعرفة
    • WhatsApp
    التطبيقات الخارجية ستوديو أودو منصة أودو السحابية
  • قطاعات الأعمال
    البيع بالتجزئة
    • متجر كتب
    • متجر ملابس
    • متجر أثاث
    • متجر بقالة
    • متجر معدات
    • متجر ألعاب
    الطعام والضيافة
    • بار وحانة
    • المطعم
    • مطعم للوجبات السريعة
    • نزل للضيوف
    • موزّع مشروبات
    • فندق
    العقارات
    • وكالة عقارات
    • شركة هندسة معمارية
    • البناء
    • إدارة العقارات
    • العناية بالحدائق
    • اتحاد مُلاّك العقارات
    استشارة
    • مؤسسة محاسبية
    • شريك أودو
    • وكالة تسويقية
    • منشأة قانونية
    • استقطاب المواهب
    • التدقيق والتوثيق
    التصنيع
    • الأقمشة
    • معدني
    • الأثاث
    • الطعام
    • مصنع خمور
    • هدايا الشركات
    الصحة واللياقة البدنية
    • نادي رياضي
    • متجر نظارات
    • مركز لياقة بدنية
    • الممارسون الصحيون
    • صيدلية
    • صالون تصفيف الشعر
    التجارة
    • عامل صيانة
    • الأجهزة والمعدات التقنية ودعمها
    • أنظمة الطاقة الشمسية
    • صانع أحذية
    • خدمات التنظيف
    • خدمات التكييف (HVAC)
    غير ذلك
    • منظمة غير ربحية
    • وكالة بيئية
    • تأجير لوحات إعلانية
    • تصوير
    • تأجير دراجات
    • بائع وسيط للبرمجيات
    تصفح كافة قطاعات الأعمال
  • مجتمع أودو
    تعلم
    • دروس
    • التوثيق
    • شهادات
    • التدريب
    • مدونة
    • بودكاست
    قم بتعزيز التعليم
    • برنامج تعليم
    • Scale UP! لعبة الأعمال
    • قم بزيارة أودو
    احصل على البرنامج
    • تحميل
    • قارنْ الإصدارات
    • إطلاق
    تعاون
    • جيت هاب "Github"
    • المنتدى
    • فعاليات
    • الترجمات
    • كنْ شريكاً
    • خدمات الشركاء
    • سجل مكتب المحاسبة الخاص بك
    احصل على الخدمات
    • اعثر على شريك
    • اعثر على محاسب
    • قابل أحد مرشدي الأعمال
    • خدمات التنفيذ
    • مراجع العملاء
    • الدعم
    • الترقيات
    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
يجب أن تكون مسجلاً حتى تتفاعل مع المجتمع.
كافة المنشورات الأفراد الشارات
علامات التصنيف (عرض الكل)
odoo accounting v14 pos v15
حول هذا المنتدى
يجب أن تكون مسجلاً حتى تتفاعل مع المجتمع.
كافة المنشورات الأفراد الشارات
علامات التصنيف (عرض الكل)
odoo accounting v14 pos v15
حول هذا المنتدى
المساعدة

how we use python parser file in odoo report

اشتراك

تسلم الإشعارات عندما يكون هناك نشاط في هذا المنشور

لقد تم الإبلاغ عن هذا السؤال
reportsparserodooV8
7 الردود
13790 أدوات العرض
الصورة الرمزية
kartik

i am use odoo version 8

i want to create custom report in account module.

 in "account_report.xml"

<report

id="custom_report_all_invoice"

model="account.invoice"

string="Sekoo Report all invoice"

report_type="qweb-pdf"

name="account.partnerledger_sekoo_all"

attachment_use="False"

file="account.partnerledger_sekoo_all"

/>


in my "partnerledger_sekoo_all.py"


import time

import datetime

from dateutil.relativedelta import relativedelta

from openerp.osv import osv

from openerp.report import report_sxw


class partnerledger_sekoo_all_report_parser(report_sxw.rml_parse):

     def __init__(self, cr, uid, name, context):

         super(partnerledger_sekoo_all_report_parser, self).__init__(cr, uid, name, context=context)

         self.localcontext.update({

               'time': time,

               'lines': self.lines,

              'get_partners':self._get_partners,

              'hello_world': self._hello_world,

              'invoices': self.invoices,

            })

     def invoices(self):

         self.cr.execute(

            "SELECT * FROM account_move_line l ")

           res = self.cr.dictfetchall()

           sum = 0.0

           if self.initial_balance:

              sum = self.init_bal_sum

              for r in res:

                 sum += r['debit'] - r['credit']

                 r['progress'] = sum

               full_account.append(r)

         return full_account

     def _hello_world(self):

        return "Hello World!"


class partnerledger_sekoo_all(osv.AbstractModel):

     _name = 'report.partnerledger_sekoo_all'

    _inherit = 'report.abstract_report'

    _template = 'partnerledger_sekoo_all'

    _wrapped_report_class = partnerledger_sekoo_all_report_parser



in "partnerledger_sekoo_all.xml"


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

<openerp>

<data>

<template id="partnerledger_sekoo_all">

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

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

<div class="page">

<h2>Sekoo Partner Ledger all</h2>

<span t-esc="hello_world()"/>

</t>

</t>

</template>

</data>

</openerp>


i also make entry in __openerp.py__ of xml file

and in __init.py__ import partnerledger_sekoo_all_report_parser


but in template that not show anything,

it return error like

"'NoneType' object is not callable" while evaluating

'hello_world()'

how can i solve that please help

0
الصورة الرمزية
إهمال
Zbik

Do you have 'report' in depends, in __openerp__py?

Axel Mendoza

@Zbik i make entry of report.xml file in __openerp__.py it render template and not show any error but parser method hello_world() not accessible in .xml file please specify if anything else is required for parser in report also any detail doc for that

الصورة الرمزية
Axel Mendoza
أفضل إجابة

Hi @kartik

Your report name is 'account.partnerledger_sekoo_all' so you need to use it for the parser _template and _name in order to be used by Odoo. You could read a complete explanation and example at:

https://www.odoo.com/es_ES/forum/help-1/question/how-to-define-a-custom-methods-functions-to-be-used-in-a-qweb-report-how-to-define-and-use-a-report-parser-92244

Your case could be solved like:

class partnerledger_sekoo_all(osv.AbstractModel):

_name = 'report.account.partnerledger_sekoo_all'

_inherit = 'report.abstract_report'

_template = 'account.partnerledger_sekoo_all'

_wrapped_report_class = partnerledger_sekoo_all_report_parser
0
الصورة الرمزية
إهمال
kartik
الكاتب

thank it wroks for me now i want to get all invoice objects with invoice lilne how can i get that in report.xml through parser file in odoo report

Axel Mendoza

Don't you have a function in the parser for that?. In the link above there is examples of how to do it

kartik
الكاتب

i want to get all invoice with invoice line in odoo report i try with this def invoices(self): self.cr.execute( "SELECT * FROM account_move_line l ") res = self.cr.dictfetchall() return res but it gives all record i want to get invoice list customer wise

Axel Mendoza

You could vote up if your post issue is solved

الصورة الرمزية
Zbik
أفضل إجابة

In __openerp__.py, try this

'depends': ['account','report']

UPDATE:

You comment lines and test again:

'lines': self.lines,

'get_partners':self._get_partners,

'invoices': self.invoices,


0
الصورة الرمزية
إهمال
kartik
الكاتب

in accounts/__openerp__.py line already exist 'depends' : ['base_setup', 'product', 'analytic', 'board', 'edi', 'report'], after i add 'depends' : ['base_setup', 'product', 'analytic', 'board', 'edi', 'report','account'], so it return error 500: Internal Server Error Error Error message: account.invoice in log file it shows 2015-10-16 13:15:05,288 8204 ERROR bitnami_openerp openerp.addons.document.content_index: Cannot determine mime type. Traceback (most recent call last): File "C:\Bitnami\odoo-8.0-8\apps\odoo\Lib\site-packages\odoo-8.0_20150423-py2.7.egg\openerp\addons\document\content_index.py", line 167, in doIndex pop = Popen(['file','-b','--mime',fname], shell=False, stdout=PIPE) File "C:\Bitnami\odoo-8.0-8\python\lib\subprocess.py", line 709, in __init__ errread, errwrite) File "C:\Bitnami\odoo-8.0-8\python\lib\subprocess.py", line 957, in _execute_child startupinfo) WindowsError: [Error 2] The system cannot find the file specified 2015-10-16 13:15:07,450 8204 ERROR bitnami_openerp openerp.addons.document.content_index: Cannot determine mime type. Traceback (most recent call last): File "C:\Bitnami\odoo-8.0-8\apps\odoo\Lib\site-packages\odoo-8.0_20150423-py2.7.egg\openerp\addons\document\content_index.py", line 167, in doIndex pop = Popen(['file','-b','--mime',fname], shell=False, stdout=PIPE) File "C:\Bitnami\odoo-8.0-8\python\lib\subprocess.py", line 709, in __init__ errread, errwrite) File "C:\Bitnami\odoo-8.0-8\python\lib\subprocess.py", line 957, in _execute_child startupinfo) WindowsError: [Error 2] The system cannot find the file specified 2015-10-16 13:15:18,243 8204 INFO bitnami_openerp openerp.service.common: successful login from 'admin' using database 'bitnami_openerp' 2015-10-16 09:15:43,584 8988 WARNING bitnami_openerp openerp.addons.base.ir.ir_cron: Model `automatic.workflow.job` does not exist. 2015-10-16 09:16:43,622 8988 WARNING bitnami_openerp openerp.addons.base.ir.ir_cron: Model `automatic.workflow.job` does not exist.

Zbik

You create own custom module with this report and with this depends. If you only modify module account (it is NOT recommended), probably other error exist in code. Show your log file. PS. for new api in v8 see "Custom reports" - https://www.odoo.com/documentation/8.0/reference/reports.html

Zbik

answer updated

هل أعجبك النقاش؟ لا تكن مستمعاً فقط. شاركنا!

أنشئ حساباً اليوم لتستمتع بالخصائص الحصرية، وتفاعل مع مجتمعنا الرائع!

تسجيل
المنشورات ذات الصلة الردود أدوات العرض النشاط
how can i get month wise reports for Bank, Revenue, Expenses
reports odooV8
الصورة الرمزية
0
أكتوبر 15
3929
How to register a parser for a qweb report تم الحل
invoice qweb reports parser odooV8
الصورة الرمزية
الصورة الرمزية
1
سبتمبر 15
7129
How to customize contact widget in qweb reports? تم الحل
qweb reports odooV8
الصورة الرمزية
الصورة الرمزية
2
أكتوبر 22
29908
QWebException: "Invalid template id: 'header_foobar'" while evaluating "translate_doc(doc_id, doc_model, 'partner_id.lang', 'account.report_invoice_foobar_document')"
qweb reports odooV8 QWebTemplateNotFound
الصورة الرمزية
0
نوفمبر 22
7327
Report Parser Odoo 8
qweb voucher reports parser
الصورة الرمزية
الصورة الرمزية
1
مارس 16
6974
المجتمع
  • دروس
  • التوثيق
  • المنتدى
مصدر مفتوح
  • تحميل
  • جيت هاب "Github"
  • المشغل الآلي رنبوت
  • الترجمات
خدماتنا
  • استضافة أودو إس إتش
  • الدعم
  • الترقية
  • التطويرات المخصصة
  • التعليم
  • اعثر على محاسب
  • اعثر على شريك
  • كنْ شريكاً
معلومات عنا
  • شركتنا
  • أصول العلامة التجارية
  • اتصلْ بنا
  • الوظائف
  • فعاليات
  • بودكاست
  • مدونة
  • عملاء
  • قانوني • الخصوصية
  • الحماية
الْعَرَبيّة 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

أودو هو عبارة عن مجموعة من تطبيقات الأعمال مفتوحة المصدر التي تغطي جميع احتياجات شركتك، مثل: إدارة علاقات العملاء والتجارة الإلكترونية والمحاسبة والمخزون ونقاط البيع وإدارة المشاريع وما إلى ذلك.

ما يجعل من أودو مميزاً هو هدفه بأن يكون سهل الاستخدام للغاية ومتكاملاً تمامًا في الوقت ذاته.

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