İç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 navigate back in view history (SOLVED)

Abone Ol

Get notified when there's activity on this post

Bu soru işaretlendi
12 Cevaplar
15924 Görünümler
Avatar
Pau Ubach

This question is related to:
https://www.odoo.com/forum/help-1/question/open-a-form-view-for-a-specific-record-or-go-back-to-previous-view-64998

When I'm navigating between views, in the header I can see this history:

Example: Opportunities / New oportunity / Administrator 
Clicking in New oportunity would navigate one view back, clicking in Opportunities would navigate 2 views back.

How can I do this automatically from a function in python? 

I have managed to create a new view, but can't go back to last view.

Thanks,
Pau

 

0
Avatar
Vazgeç
Avatar
Pau Ubach
Üretici En İyi Yanıt

I managed to solve it!! (where's the smiley of infinite happiness?)

I just navigate back in browser history.

For this I need to create an action: 

        <record model="ir.actions.client" id="action_client_back">
            <field name="name">instance.bdt.Back</field>
            <field name="tag">bdt.back</field>
            <field name="params">{}</field>
        </record>

and the JS function:

openerp.request_project = function(instance) {
    instance.request_project = {};
    instance.request_project.back = function(){
        window.history.back();
    };
    instance.web.client_actions.add('bdt.back', 'instance.request_project.back');
}

So, when I finish what button does I can return back:

return {'type': 'ir.actions.client', 'tag': 'bdt.back'}
2
Avatar
Vazgeç
Russell Briggs

And just to update this for odoo 16 (and probably above).

Add the following JS to your module:

```js
/** @odoo-module **/
import { registry } from '@web/core/registry';

async function goBack(env, action) {
env.services.action.restore();
}

registry.category('actions').add('history_back', goBack);
```

Now you can actually use the following in your python code

```python
return {'type': 'ir.actions.client', 'tag': 'history_back'}
```

Avatar
Zyphos
En İyi Yanıt

To navigate back in history,

you don't need to create a new function. It is already in Odoo.

Just add at the end of your button python function:

return {'type': 'ir.actions.client', 'tag': 'history_back'}

0
Avatar
Vazgeç
Chandni Gandhi

Best. Thanks :)

Russell Briggs

FYI Tried this in Odoo 16 and it doesn't work

Avatar
Deepa Venkatesh
En İyi Yanıt

If you are meaning, to load a particular action...

then in your return statement of the function, return the action / ir_act_window...

Example:

model_obj = self.pool.get('ir.model.data')
        
form_view = model_obj._get_id(cr, uid, 'MODULE_NAME', 'XML_VIEW')
if form_view:
            form_view = model_obj.browse(cr, uid, form_view, context=context).res_id

return {
                    'view_type' : 'form',
                    'view_mode' : 'form',
                    'res_model' : 'MODEL',
                    'res_id'    : False,
                    'view_id'   : False,
                    'views'     : [(form_view, 'form'), ],
                    'type'      : 'ir.actions.act_window',
                    'target'    : 'current',
                  }

You can also refer in standard, Invoice to Refund option as well, in which when an invoice is refunded, it loads action of Refunds...

0
Avatar
Vazgeç
Pau Ubach
Üretici

Hi deep, thanks but I don't mean it. You can check the link to the other question.

Pau Ubach
Üretici

Now I do as you described, and the problem is that I get a new element in the navigation history instead of deleting the last one.

Deepa Venkatesh

add reload: True in the value list

Deepa Venkatesh

'tag': 'reload',

Pau Ubach
Üretici

Could you clarify last answer?

Deepa Venkatesh

If still the problem persists, then you can write you own widget to do the same....

Deepa Venkatesh

I didnt get... which one?

Pau Ubach
Üretici

I tried reload, but it doesn't go to the previous view, it just refresh the new one.

Pau Ubach
Üretici

Thanks anyway deep.

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
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