تخطي للذهاب إلى المحتوى
أودو القائمة
  • تسجيل الدخول
  • جرب مجاناً
  • التطبيقات
    المالية
    • المحاسبة
    • فوترة
    • النفقات
    • جدول البيانات (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 to hide reports from print menu?

اشتراك

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

لقد تم الإبلاغ عن هذا السؤال
actionreport
4 الردود
27917 أدوات العرض
الصورة الرمزية
Gleb
I'm trying hide two reports, but when i run the code only one (first report) is not displayed. Can you tell me what the problem is?     
@api.model
def fields_view_get(self, view_id=None, view_type='form', toolbar=False, submenu=False):
res = super(AccountInvoice, self).fields_view_get(view_id=view_id, view_type=view_type, toolbar=toolbar,
submenu=submenu)
report_account_invoice_bill = self.env.ref('l10n_ru_doc.report_account_invoice_bill')
report_account_invoice_act = self.env.ref('l10n_ru_doc.report_account_invoice_act')
for print_submenu in res.get('toolbar', {}).get('print', []):
if print_submenu['id'] == report_account_invoice_bill.id:
res['toolbar']['print'].remove(print_submenu)
if print_submenu['id'] == report_account_invoice_act.id:
res['toolbar']['print'].remove(print_submenu)
return res
Thanks!
1
الصورة الرمزية
إهمال
Gleb
الكاتب

Solution:

Use two methods

@api.multi

def create_action(self):

""" Create a contextual action for each report. """

for report in self:

model = self.env['ir.model']._get(report.model)

report.write({'binding_model_id': model.id, 'binding_type': 'report'})

return True

@api.multi

def unlink_action(self):

""" Remove the contextual actions created for the reports. """

self.check_access_rights('write', raise_exception=True)

self.filtered('binding_model_id').write({'binding_model_id': False})

return True

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

add menu=False to report action

      id="account_invoices"

      model="account.invoice"

      string="Invoices"

      report_type="qweb-pdf"

      name="account.report_invoice_with_payments"

      file="account.report_invoice_with_payments"

      attachment="(object.state in ('open','in_payment','paid')) and ('INV'+(object.number or '').replace('/','')+'.pdf')"

      print_report_name="(object._get_report_base_filename())"

      groups="account.group_account_invoice"

    menu =False

  />

Video: https://www.youtube.com/watch?v=lVMDXpqasic&t=1s

5
الصورة الرمزية
إهمال
Jose David Moreno Hernandez

It works perfectly, thank you!

LaoThai

Great Answer, thank you

M.halim

just Add

menu="False"

Sakthi Priya

how to set menu false based on state

الصورة الرمزية
Pradip Yenpure (prye)
أفضل إجابة

If you want to hide the particulate report from the print menu then you can hide using the fields_view_get() function.I  added the below snippet code. This code may help you.

@api.model
def fields_view_get(self, view_id=None, view_type='form', toolbar=False, submenu=False):
    ##Sample Code of Hide print ,action menu and particular report
    res = super().fields_view_get(view_id, view_type, toolbar, submenu)
    remove_report_id = self.env.ref('purchase.report_purchase_quotation').id
    if view_type == 'form' and remove_report_id and \
        toolbar and res['toolbar'] and res['toolbar'].get('print'):
        remove_report_record = [rec for rec in res['toolbar'].get('print') if rec.get('id')==                                 remove_report_id]
        if remove_report_record and remove_report_record[0]:
             res['toolbar'].get('print').remove(remove_report_record[0])
    return res
0
الصورة الرمزية
إهمال
الصورة الرمزية
Asad Asif
أفضل إجابة

Hello,
There is an inexpensive app which can allow you to do that:

\https://www.odoo.com/apps/modules/12.0/hide_any_report/​

0
الصورة الرمزية
إهمال
الصورة الرمزية
Haresh Kansara
أفضل إجابة

Hi Gleb,

i think you need to first find the report external id defined in XML file and then inherit that XML code and add parameter invisible="1" to that code using xpath.

e.g. i have one report in account module and i want to hide then

<report

      id="account_invoices"

      model="account.invoice"

      string="Invoices"

      report_type="qweb-pdf"

      name="account.report_invoice_with_payments"

      file="account.report_invoice_with_payments"

      attachment="(object.state in ('open','in_payment','paid')) and ('INV'+(object.number or '').replace('/','')+'.pdf')"

      print_report_name="(object._get_report_base_filename())"

      groups="account.group_account_invoice"

  />


Then add invisible parameter like:


<report

      id="account.account_invoices"

      invisible="1"

      model="account.invoice"

      string="Invoices"

      report_type="qweb-pdf"

      name="account.report_invoice_with_payments"

      file="account.report_invoice_with_payments"

      attachment="(object.state in ('open','in_payment','paid')) and ('INV'+(object.number or '').replace('/','')+'.pdf')"

      print_report_name="(object._get_report_base_filename())"

      groups="account.group_account_invoice"

  />

There is one module available to hide print button: https://goo.gl/nuvnmw

Accept and upvote answer if helpful

Thanks and regards

Haresh Kansara

0
الصورة الرمزية
إهمال
هل أعجبك النقاش؟ لا تكن مستمعاً فقط. شاركنا!

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

تسجيل
المنشورات ذات الصلة الردود أدوات العرض النشاط
Preview or show a specific report تم الحل
action report preview
الصورة الرمزية
الصورة الرمزية
الصورة الرمزية
3
أكتوبر 25
1747
Need Advice For Migrate Thousands of Messy SKUs
action
الصورة الرمزية
0
نوفمبر 25
8
Pickup Date for E-Commerce تم الحل
action
الصورة الرمزية
الصورة الرمزية
الصورة الرمزية
2
نوفمبر 25
161
[FAQ's]~Can you book a cruise over the phone?
action
الصورة الرمزية
0
نوفمبر 25
2
Report with a different footer in the first page. How to do it?
report
الصورة الرمزية
الصورة الرمزية
2
نوفمبر 25
245
المجتمع
  • دروس
  • التوثيق
  • المنتدى
مصدر مفتوح
  • تحميل
  • جيت هاب "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