İçereği Atla
Odoo Menü
  • Portal
  • Ücretsiz deneyin
  • Uygulamalar
    Finans
    • Muhasebe
    • Faturalama
    • Masraf Yönetimi
    • Elektronik Çizelge (BI)
    • Belgeler
    • İmza
    Satış
    • Müşteri İlişkileri Yönetimi (CRM)
    • Satış
    • Satış Noktası Mağaza
    • Satış Noktası Restoran
    • Abonelikler
    • Kiralama
    Web Sitesi
    • Web Sitesi Oluşturucu
    • eTicaret
    • Blog
    • Forum
    • Canlı Sohbet
    • eÖğrenme
    Tedarik Zinciri
    • Envanter
    • Üretim
    • Ürün Yaşam Döngüsü Yönetimi
    • Satın Alma
    • Bakım
    • Kalite
    İnsan Kaynakları
    • Çalışanlar
    • İşe Alım
    • İzin
    • Değerlendirme
    • Referans
    • Filo Yönetimi
    Pazarlama
    • Sosyal Medyada Pazarlama
    • E-posta ile Pazarlama
    • SMS ile Pazarlama
    • Etkinlikler
    • Pazarlama Otomasyonu
    • Anket
    Hizmetler
    • Proje Yönetimi
    • Çalışma Çizelgeleri
    • Saha Hizmeti
    • Yardım Masası
    • Planlama
    • Randevular
    Verimlilik
    • Sohbet
    • Onay
    • Nesnelerin İnterneti
    • VoIP
    • Bilgi Bankası
    • WhatsApp
    Üçüncü taraf uygulamalar Odoo Stüdyo Odoo Bulut Platformu
  • Sektörler
    Perakende satış
    • Kitapçı
    • Giyim Mağazası
    • Mobilya Mağazası
    • Gıda Marketi
    • Hırdavat Dükkanı
    • Oyuncak Dükkanı
    Gıda ve Konaklama
    • Bar ve Pub
    • Restoran
    • Fast Food Restoranı
    • Konuk Evi
    • İçecek Distribütörü
    • Otel
    Gayrimenkul
    • Emlak Acentesi
    • Mimarlık Firması
    • İnşaat
    • Emlak Yönetimi
    • Bahçe Tasarımı
    • Mülk Sahipleri Derneği
    Uzmanlık
    • Muhasebe Firması
    • Odoo Partner
    • Pazarlama Ajansı
    • Hukuk Firması
    • Yetenek Kazanımı
    • Denetim ve Belgelendirme
    Üretim
    • Tekstil
    • Metal
    • Mobilyalar
    • Gıda
    • Bira fabrikası
    • Kurumsal Hediye
    Sağlık ve Spor
    • Spor Kulübü
    • Optik Mağazası
    • Fitness Merkezi
    • Sağlıklı Yaşam Merkezi
    • Eczane
    • Kuaför Salonu
    Ticaret
    • Tamirci
    • BT Donanım & Destek
    • Güneş Enerjisi Sistemleri
    • Ayakkabı İmalatçısı
    • Temizlik Hizmetleri
    • HVAC Hizmetleri
    Diğerleri
    • Kar Amacı Gütmeyen Kuruluş
    • Çevre Ajansı
    • Reklam Panosu Kiralama
    • Fotoğrafçılık
    • Bisiklet Kiralama
    • Yazılım Bayisi
    Tüm Sektörlere Göz Atın
  • Topluluk
    Öğrenim
    • Eğitim Araçları
    • Dokümantasyon
    • Sertifikasyonlar
    • Eğitim Etkinlikleri
    • Blog
    • Podcast
    Eğitim ve Gelişim
    • Eğitim Programı
    • Scale Up! İşletme Oyunu
    • Odoo'yu Ziyaret Edin
    Yazılım
    • İndirin
    • Sürümleri Kıyaslayın
    • Sürümler
    İş Birliği
    • Github
    • Forum
    • Etkinlikler
    • Çeviriler
    • Partner Olun
    • Partnerler için Hizmetler
    • Muhasebe Firmanızı Kaydettirin
    Hizmetler
    • Partner Bulun
    • Muhasebeci Bulun
    • Bir danışmanla görüşün
    • Kurulum Hizmetleri
    • Müşteri Referansları
    • Destek
    • Sürüm Yükseltme
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Demo randevusu alın
  • Fiyatlandırma
  • Yardım

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • Müşteri İlişkileri Yönetimi
  • e-Commerce
  • Muhasebe
  • Envanter
  • PoS
  • Proje Yönetimi
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Etiketler (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Etiketler (View all)
odoo accounting v14 pos v15
About this forum
Yardım

How to display this view two times in a row with my wizard?

Abone Ol

Get notified when there's activity on this post

Bu soru işaretlendi
wizardpythonviewboard
2 Cevaplar
7889 Görünümler
Avatar
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
Avatar
Vazgeç
Pascal Tremblay
Üretici

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?

Avatar
Axel Mendoza
En İyi Yanıt

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
Avatar
Vazgeç
Pascal Tremblay
Üretici

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

LIke magic!

Pascal Tremblay
Üretici

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!! :)

Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Üye Ol
İlgili Gönderiler Cevaplar Görünümler Aktivite
error in open a wizard from python code?
wizard python
Avatar
Avatar
2
Mar 15
8421
Before view form show an wizard related!!!
wizard view
Avatar
Avatar
Avatar
2
Mar 15
4378
FileName Attribute(binary Field) Not Working With Wizard
wizard python
Avatar
0
Mar 15
7932
How to refresh the original view after wizard actions? Çözüldü
wizard views python
Avatar
3
Şub 25
58846
Return tree view from wizard
wizard view v6.0
Avatar
0
Mar 15
8225
Topluluk
  • Eğitim Araçları
  • Dokümantasyon
  • Forum
Açık Kaynak
  • İndirin
  • Github
  • Runbot
  • Çeviriler
Hizmetler
  • Odoo.sh Hosting
  • Destek
  • Sürüm Yükseltme
  • Özel Geliştirmeler
  • Eğitim
  • Muhasebeci Bulun
  • Partner Bulun
  • Partner Olun
Hakkında
  • Şirketimiz
  • Pazarlama Gereçleri
  • İletişim
  • Kariyer
  • Etkinlikler
  • Podcast
  • Blog
  • Müşteriler
  • Hukuki • Gizlilik
  • Güvenlik
الْعَرَبيّة 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

Odoo, müşteri ilişkileri yönetimi, eTicaret, muhasebe, envanter, satış noktası, proje yönetimi gibi şirketinizin tüm ihtiyaçlarını karşılayan bir açık kaynak işletme uygulamaları paketidir.

Odoo’nun eşsiz değer önermesi, aynı anda hem kullanımının çok kolay olup hem de tamamen entegre olmasıdır.

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