تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
5555 أدوات العرض

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 ???
 
الصورة الرمزية
إهمال
أفضل إجابة

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

الصورة الرمزية
إهمال
الكاتب

Thank you so much !!!

المنشورات ذات الصلة الردود أدوات العرض النشاط
1
يناير 25
1770
0
أغسطس 22
2643
0
مارس 22
2620
2
مايو 18
6461
1
أبريل 17
7692