تخطي للذهاب إلى المحتوى
أودو القائمة
  • تسجيل الدخول
  • جرب مجاناً
  • التطبيقات
    المالية
    • المحاسبة
    • فوترة
    • النفقات
    • جدول البيانات (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 display this view two times in a row with my wizard?

اشتراك

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

لقد تم الإبلاغ عن هذا السؤال
wizardpythonviewboard
2 الردود
7895 أدوات العرض
الصورة الرمزية
Pascal Tremblay

Hello,

I'm in odoo 8.

I have a wizard to choose a category and display a board.board (I want many graphs in this board, but for the moment, only one is displayed).

It works well. But If I click a two times in a row on the wizard menuitem, it doesn't work. The first time, my board.board displays well. But the second time, my board is empty. No error...

I have to refresh the page if I want it to work two times in a row. Or I have to click on another menuitem before to come back to my wizard...

Since I was trying to imitate the existing wizard_valuation_history class of Odoo, I tries to click many times in a row of its menuitem and this wizard always displays correctly its tree view page... Why not mine?

Could you help?


Python code of my wizard :

class wizard_choose_category(models.TransientModel):
    _name = 'wizard.choose.category'
    _description = 'Wizard that allow to choose a category'

    choose_category = fields.Many2one('product.category', string='Product category', domain=[('parent_id','!=', 1)])
        #date = fields.Datetime('Date', default=fields.Datetime.now, required=True)
   
    @api.multi
    def open_table(self):
        self.ensure_one()
        ctx = dict(
            self._context,
            category=self.choose_category.id
            )
            
 
        res = {
            'domain': "[]",
            'name': _('My dashboard by category'),
            'view_type': 'form',
            'view_mode': 'form',
            'res_model': 'board.board',
            'type': 'ir.actions.act_window',
            'context': ctx,
            'view_id': self.env.ref('vtm2_cavavin_inventory_graphs.inventory_by_category_form').id,
            'target': 'current',
        }
 
        return res


XML of the board :

<record id="inventory_by_category_form" model="ir.ui.view">
            <field name="name">Inventory dashboard form</field>
            <field name="model">board.board</field>
            <field name="arch" type="xml">
                <form string="Inventory dashboard" >
                    <board style="1" >
                        <column>
                          <action context="{'choosen_category':9}" string="Inventory of your choosen category - pivot table"
                                 name="%(action_inventory_pivot_1)d"  />
                        </column>
                    </board>
                </form>
            </field>
        </record>


XML of my graph action :

<record id="action_inventory_pivot_1" model="ir.actions.act_window">
            <field name="name">My inventory pivot #1</field>
            <field name="res_model">stock.quant</field>
            <field name="view_type">form</field>
            <field name="view_mode">graph</field>
 
            <field name="domain">['&amp;','&amp;',('warehouse_id','!=', False),('qty','&gt;',0),
                    ('product_category_id','=',context.get('choosen_category'))]</field>
            <field name="view_id" ref="inventory_pivot_1" />
 </record>




EDIT #1

If I display my board directly from a new menuitem, without a wizard, I can click as many times as I want on the menuitem. The board always displays my graph correctly...

<record id="inventory_category_boards" model="ir.actions.act_window">
            <field name="name">Inventory - by category</field>
            <field name="res_model">board.board</field>
            <field name="view_type">form</field>
            <field name="view_mode">form</field>
            <field name="usage">menu</field>
            <field name="view_id" ref="inventory_by_category_form" />
        </record>


EDIT #2

In my wizard, If I use :

'target': 'new',

Instead of :

'target': 'current',

My board and graph is correctly displayed even if I click many times on the wizard menuitem. But it is displayed in a modal window (popup)... It is not what I want.


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

May be I should create an init() method to my wizard. When the wizard opens, it initializes the current view. So, when the user confirms the wizard, it displays the board in a initialized current window... Is it doable?

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

Hi Pascal,

Here again, you find a very weird case in v8, I don't know if this are fixed in v9 or latter but here is a quick solution for your problem.

Just load this JS code in any of your modules and you will be ok

openerp.your_module_name_here = function (instance) {
    instance.web.ActionManager.include({     dialog_stop: function (reason) {     if(this.inner_widget != null && this.inner_action != null && reason &&      this.inner_action.res_model == 'board.board' && this.inner_widget.active_view == 'form' &&     reason.res_model == "board.board" && reason.target == "current"){     this.inner_widget.views.form.controller.destroy();     }     this._super.apply(this, arguments);     }     });
}
1
الصورة الرمزية
إهمال
Pascal Tremblay
الكاتب

I could never have found it myself! Never. Ouf! Once again, I have to say to you : 1000 thanks!

LIke magic!

Pascal Tremblay
الكاتب

When I see what you can do in Odoo, I understand that I have still many many many work to do to become a master!

Axel Mendoza

I have a lot of imagination and patience to read and find the code!! :)

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

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

تسجيل
المنشورات ذات الصلة الردود أدوات العرض النشاط
error in open a wizard from python code?
wizard python
الصورة الرمزية
الصورة الرمزية
2
مارس 15
8421
Before view form show an wizard related!!!
wizard view
الصورة الرمزية
الصورة الرمزية
الصورة الرمزية
2
مارس 15
4378
FileName Attribute(binary Field) Not Working With Wizard
wizard python
الصورة الرمزية
0
مارس 15
7935
How to refresh the original view after wizard actions? تم الحل
wizard views python
الصورة الرمزية
3
فبراير 25
58847
Return tree view from wizard
wizard view v6.0
الصورة الرمزية
0
مارس 15
8228
المجتمع
  • دروس
  • التوثيق
  • المنتدى
مصدر مفتوح
  • تحميل
  • جيت هاب "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