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

Get a functionnnal field on advanced research fields option , on the filter [v7]

اشتراك

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

لقد تم الإبلاغ عن هذا السؤال
filterfieldsv7advanced_filterfunctional
2 الردود
6198 أدوات العرض
الصورة الرمزية
TEIMI Yassine

I added a functionnal field on stock.picking model, I want to have this field, on the list of fields to choose, when you try to filter on fields, using the openerp filter tool. How this can be possible ?

As it's for payed and delivered functionnal fields on sale.order, I want to put my field among the choosable fields on advanced research option, on the filter. 

Many thanks.

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

This has been discussed numerous times albeit with different context: by default function fields are not stored in the database and cannot be used for filtering/domain/sorting unless if you implement fnct_search or set the store attribute to True.

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

I have already values computed for this functionnal field, when I add the store=True parameter, it raises error that the column of this functionnal field does not exist on database. Do I have to add store=True only when there is no values computed for this field ?

TEIMI Yassine
الكاتب

I'm inheriting with "orm.Model" should I do it with osv.osv so that the field can be stored on database ?

Ivan

orm.Model is just an alias for osv.osv. They are pointing to the same object/class. So, it is not the issue. I don't quite get what you mean by "Do I have to add store=True only when there is no values computed for this field ?". Also by "I have already values computed for this functionnal field, when I add the store=True parameter, it raises error that the column of this functionnal field does not exist on database.". Exact wording of error will help. If you previously already have a field with the same name, it may cause problem, though I'm not sure what it will be exactly.

Ivan

store=True is defined for a column/field. So, it will be applicable whether the function used to calculate the column/field return value or not. In fact they MUST return value, although the value can be NULL or 0.0

TEIMI Yassine
الكاتب

I mean that I created the functionnal field, without the store=True parameter, and i have data on this field, it means that on the view containing this field, i already created records. and when I add the store=True parameter, for the functionnal field "amount_bl" for example it raises error : ProgrammingError: column stock_picking.amount_bl does not exist LINE 1: ...stock_picking."num_bl",stock_picking."commercial",stock_pick...

Ivan

You need to upgrade the module first.

الصورة الرمزية
TEIMI Yassine
الكاتب أفضل إجابة

@Ivan : To Explain more my situation : First of all, I created the functionnal field without the store parameter (i forgot), it's on stock.picking.out model, (stock_picking table). Then, users created "delivery orders", so this functionnal field has computed values. So, right now, when I add the store parameter, into the functionnal field "amount_bl" for example, it raises error : ProgrammingError: column stock_picking.amount_bl does not exist LINE 1: ...stock_picking."num_bl",stock_picking."commercial",stock_pick...

I wonder if that error comes from the fact that users have already created delivery orders, and does not find where to store it.? (a supposition).

                                                            EDITED ANWSER :

@Ivan : When updating the module an error raises : 

File "/opt/openerp/server/openerp/addons/add_bl_valcr/stock.py", line 23, in _amount_order so_record = self.pool.get('sale.order').browse(cr, uid, so_id, context=None) AttributeError: 'NoneType' object has no attribute 'browse'

It's related the function of the field, here is the code : 

class StockPickingOut(orm.Model):

    _inherit = 'stock.picking.out'
    _name = 'stock.picking.out'

    def _amount_order(self, cr, uid, ids, amount_bl, arg, context):

        res = {}
       
        for picking in self.browse(cr, uid, ids, context):

            res[picking.id] =  0.0
            origin = picking.origin
            cr.execute("SELECT ID FROM SALE_ORDER WHERE NAME='%s' AND ID IS NOT NULL" %(origin))
            so = cr.fetchone()
            if so:
                so_id = so[0]
                so_record = self.pool.get('sale.order').browse(cr, uid, so_id, context=None)
                amount = so_record.amount_total
             
                res[picking.id] = amount
        return res

I think it has a relation with the fact that old none stored values have been deleted. 

So what I did, it's ignoring this error, and updating the module, So now the functionnal field is empty.

Just to explain more what the function does, it just pull the amount of the sale order, and put it on the delivery order. I don't know now after putting store=True, it's not working properly (supposition).

I'm now working to improve the code of my functionnal field, I'll let you know of my results.

Many thanks Ivan.

 

 

 

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

You need to upgrade the module first.

TEIMI Yassine
الكاتب

Yes it worked, but I lost all old none stored values for this field. How can I recompute these values again ?

TEIMI Yassine
الكاتب

@ivan : check my edited answer please.

Ivan

Remove the column from the table (or rename it to something else), the upgrade the module again.

TEIMI Yassine
الكاتب

In fact, that's what I did, I first renamed the column and add the store parameter as True, same result, The column is created on database, but with empty values for existing records. Secondly, I created other column, with the same function code, but of course renamed, (I passed the correct field_name parameter for the field's function). then, same result.

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

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

تسجيل
المنشورات ذات الصلة الردود أدوات العرض النشاط
How to use AND / OR operators in advanced filters? تم الحل
filter v7
الصورة الرمزية
الصورة الرمزية
الصورة الرمزية
الصورة الرمزية
3
أبريل 23
35340
Filter last year and last month تم الحل
filter v7
الصورة الرمزية
الصورة الرمزية
الصورة الرمزية
3
أغسطس 17
24693
How to filter numerical values?
filter v7
الصورة الرمزية
الصورة الرمزية
1
يناير 16
11919
Date is less than 3 months
filter fields
الصورة الرمزية
0
يوليو 15
4350
Why an advanced product search with condition "doesn't contain" doesn't display products with empty searched field?
filter v7
الصورة الرمزية
0
مارس 15
5520
المجتمع
  • دروس
  • التوثيق
  • المنتدى
مصدر مفتوح
  • تحميل
  • جيت هاب "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