Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
5491 Widoki

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 ???
 
Awatar
Odrzuć
Najlepsza odpowiedź

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

Awatar
Odrzuć
Autor

Thank you so much !!!

Powiązane posty Odpowiedzi Widoki Czynność
1
sty 25
1687
0
sie 22
2563
0
mar 22
2544
2
maj 18
6395
1
kwi 17
7634