Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
1 Vastaa
5609 Näkymät

I'm a new for Odoo and keep learning odoo by cookbook .  This my py file 

from datetime import date, datetime, timedelta 
from odoo import api, fields, models, SUPERUSER_ID, _
from odoo.exceptions import UserError
from odoo.tools import DEFAULT_SERVER_DATE_FORMAT, DEFAULT_SERVER_DATETIME_FORMAT


class CenterEquipment(models.Model):    
_name = 'center.equipment'    
_description = 'Center Branch'
name = fields.Char('Center Name', required=True, translate=True)   
sequence_number = fields.Char('sequence', default=0)    
electronic_devices = fields.Integer('Electronic Devices', default=0)    
office_equipment = fields.Integer('Office Equipment', default=0)    
total_equipment = fields.Integer('Total Equipment', default=0)
and this's my xml :
<!-- Kanban -->    
<record id="center_equipment_kanban_view" model="ir.ui.view">
<field name="name">center.equipment.kanban</field>            
<field name="model">center.equipment</field>            
<field name="arch" type="xml">                
<kanban>                    
<field name="name"/>                    
<field name="electronic_devices"/>                    
<field name="office_equipment"/>                    
<field name="total_equipment"/>                    
<templates>                        
<t t-name="kanban-box">                            
<div t-attf-class="oe_kanban_global_click">                                
<div>                                    
<strong><field name="name"/></strong>                                    
<button><t t-esc="#"/> Request  </button>                                    
<field name="electronic_devices"/> 
<field name="office_equipment"/> 
<field name="total_equipment"/>                               
</div>                            
</div>                       
</t>                   
</templates>                
</kanban>            
</field>    
</record>  
This's my action for kanban view :
<record id="center_equipment_action_view" model="ir.actions.act_window">        
<field name="name">center.equipment.action</field>        
<field name="res_model">center.equipment</field>        
<field name="view_model">kanban,form</field>        
<field name="view_id" ref="center_equipment_kanban_view"/>        
<field name="help" type="html">           
 <p class="o_view_nocontent_smiling_face">                
Add a new Center            
</p>        
</field>    
</record> 
 I can't understand when i add a <menuitem> with action ref="center_equipment_action_view"  The kanban not display, Its just only Tree view show up ???
 
Avatar
Hylkää
Paras vastaus

You must have to add kanban view into action window as well.

Avatar
Hylkää
Tekijä

Thank you so much !!!

Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
1
tammik. 25
1814
0
elok. 22
2677
0
maalisk. 22
2639
2
toukok. 18
6501
1
huhtik. 17
7726