I am trying to display field values when button is clicked. This button is not linked to any module.It is in the navigation bar just beside the conversations. How can i get the field values from a particular module on button click.
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
- Project
- MRP
Bu soru işaretlendi
            
                1
                
                    Cevapla
                
            
        
        
            
                9350
                
                    Görünümler
                
            
        
    Your JS code should look like this:
var model = require('web.DataModel');
$('#my-button').click(function() {
     new Model('addon.model').query(['name'])
                             .filter([['id', '=', 1]])
                             .first()
                             .then(function(res) {
                                  console.log(res);
                             });
}); Check out the docs for more info: https://www.odoo.com/documentation/10.0/reference/javascript.html#high-level-api-calling-into-odoo-models
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 | |
|---|---|---|---|---|
|  | 2 Haz 23  | 43270 | ||
|  | 1 Haz 23  | 4332 | ||
|  | 1 Ağu 20  | 9729 | ||
|  | 2 Haz 20  | 4812 | ||
|  | 1 Eyl 18  | 106 | 
