تخطي للذهاب إلى المحتوى
أودو القائمة
  • تسجيل الدخول
  • جرب مجاناً
  • التطبيقات
    المالية
    • المحاسبة
    • فوترة
    • النفقات
    • جدول البيانات (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 remove product description from invoice lines?

اشتراك

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

لقد تم الإبلاغ عن هذا السؤال
invoiceodoov18
2 الردود
2999 أدوات العرض
الصورة الرمزية
Nico

Hello Odoo Community,

I’m facing an issue with invoice lines where the product description is displayed by default, both in the backend and on PDF invoices. This makes the invoices and the order lines extremely cluttered and hard to read, and it’s not the desired behavior. What I want is for only the product name, internal reference, and variant to be displayed—without the product description.

Currently, in the invoice template, the product name is rendered using:

<td name="account_invoice_line_name"><span t-if="line.name" t-field="line.name" t-options="{'widget': 'text'}">Bacon Burger</span></td>

However, line.name also includes the product description, which is not necessary. I would like to remove the description from the invoice lines but keep the internal reference and variant as part of the product name. Also line.product_id.name just includes the name but not the Variant oder reference.

Is there a way to achieve this globally in Odoo, so that the product description is no longer shown in each line of the invoice (both in the backend and on PDF invoices)? Only in Invocies would be also helpful at first.

Any help or guidance on how to implement this would be greatly appreciated.

Thank you in advance!

0
الصورة الرمزية
إهمال
الصورة الرمزية
Cybrosys Techno Solutions Pvt.Ltd
أفضل إجابة

Hi,


Try the following code for removing the product description from the invoice line.


from odoo import _, api, fields, models

class AccountMoveLine(models.Model):

    _inherit = 'account.move.line'


    @api.depends('product_id', 'move_id.payment_reference')

    def _compute_name(self):

        def get_clean_name(line):

            values = []

            if line.partner_id.lang:

                product = line.product_id.with_context(lang=line.partner_id.lang)

            else:

                product = line.product_id

            if not product:

                return False

            # Add internal reference

            if product.default_code:

                values.append(f"[{product.default_code}]")

            # Add product name

            values.append(product.name or '')

            # Add variant attributes

            if product.product_template_attribute_value_ids:

                variant_names = ', '.join(

                    v.name for v in product.product_template_attribute_value_ids

                )

                values.append(variant_names)

            return ' '.join(values).strip()

        term_by_move = (self.move_id.line_ids | self).filtered(

            lambda l: l.display_type == 'payment_term'

        ).sorted(lambda l: l.date_maturity or date.max).grouped('move_id')

        for line in self.filtered(lambda l: l.move_id.inalterable_hash is False):

            if line.display_type == 'payment_term':

                term_lines = term_by_move.get(line.move_id, self.env['account.move.line'])

                n_terms = len(line.move_id.invoice_payment_term_id.line_ids)

                name = line.move_id.payment_reference or False

                if n_terms > 1:

                    index = term_lines._ids.index(line.id) if line in term_lines else len(term_lines)

                    name = _('%s installment #%s', name if name else '', index + 1).lstrip()

                if n_terms > 1 or not line.name or line._origin.name == line._origin.move_id.payment_reference:

                    line.name = name

            if not line.product_id or line.display_type in ('line_section', 'line_note'):

                continue

            if not line.name or line._origin.name == get_clean_name(line._origin):

                line.name = get_clean_name(line)


- For removing from the PDF, refer to the following.

* https://www.odoo.com/sl_SI/forum/pomoc-1/hide-product-name-on-invoice-just-have-description-270191

* https://www.odoo.com/sl_SI/forum/pomoc-1/remove-product-description-in-pdf-documents-239621



Hope it helps.

0
الصورة الرمزية
إهمال
الصورة الرمزية
Jainesh Shah(Aktiv Software)
أفضل إجابة

Hello, Nico


    To show only the product name, internal reference, and variant to be displayed—without the product description once

    user add a product in Invoice.

   

    Please create a custom module and add a below code of snippet

   

        1) Create a Module, after that create a account_move_line.py file and add it in folder called 'models'.


//Code in comment//


2) As you can see in below image that I have cretaed 3 new products, One Product without variants and Internal Reference,

   Second Product with Variants only and third product with Internal Reference.

   

   

3) For the report Please check below image.


 

Hope this helps !

     

If you need any help in customization feel free to contact us.


Thanks & Regards,

Email:    odoo@aktivsoftware.com           

Skype: kalpeshmaheshwari

0
الصورة الرمزية
إهمال
Jainesh Shah(Aktiv Software)

# -*- coding: utf-8 -*-

from odoo import api, models, fields

class AccountMoveLine(models.Model):
"""Inherited account move line for customization"""
_inherit = 'account.move.line'

def _get_computed_name(self):
"""
Custom logic to compute the name for invoice lines.
This will include the product name, internal reference, and variant,
but will exclude the description.
"""
self.ensure_one()
name = self.product_id.display_name or ''
if self.product_id.default_code: # Internal Reference
name = name

# If it's a variant, append the variant details
if self.product_id.product_template_attribute_value_ids:
variant = ", ".join(
attr.name for attr in self.product_id.product_template_attribute_value_ids
)
name = name

return name

@api.depends('product_id', 'quantity', 'price_unit')
def _compute_name(self):
"""
Override to customize the behavior of the `name` field.
"""
for line in self:
if line.move_id.is_invoice(): # Only modify for invoices
line.name = line._get_computed_name()
else:
super(AccountMoveLine, line)._compute_name()

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

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

تسجيل
المنشورات ذات الصلة الردود أدوات العرض النشاط
Header Missing From PDF Invoice - V18 Community
invoice v18
الصورة الرمزية
الصورة الرمزية
2
أكتوبر 24
2783
What are the value need to pass in field 'type' of account.invoice table in Odoo to get Customer_Invoice & Supplier_Invoice ?
invoice odoo
الصورة الرمزية
الصورة الرمزية
1
أكتوبر 18
4713
Error Converting Sale Orders to Invoice
invoice odoo
الصورة الرمزية
0
أكتوبر 15
4145
Remove link from offer and invoice email تم الحل
invoice emailtemplate odoo
الصورة الرمزية
الصورة الرمزية
الصورة الرمزية
2
نوفمبر 24
3782
Invoice form View 'Total' label to 'Gross' odoo 17 تم الحل
invoice widget odoo
الصورة الرمزية
الصورة الرمزية
1
أكتوبر 24
2212
المجتمع
  • دروس
  • التوثيق
  • المنتدى
مصدر مفتوح
  • تحميل
  • جيت هاب "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