Se rendre au contenu
Menu
Cette question a été signalée
1 Répondre
2787 Vues

Hi all i have created a custom module in odoo13 , when i try to upgrade iam getting this error

Traceback:
TypeError: Cannot read property 'type' of undefined
at Class._renderBodyCell (\http\:\/\/localhost\:8069\/web\/static\/src\/js\/views\/list\/list_renderer\.js\:444\:50\\)\
at\&nbsp\;\http\:\/\/localhost\:8069\/web\/static\/src\/js\/views\/list\/list_renderer\.js\:838\:25\\
at\ Array\.map\ \(\)\
at\ Class\._renderRow\ \[as\ _super\]\ \(\
http\:\/\/localhost\:8069\/web\/static\/src\/js\/views\/list\/list_renderer\.js\:837\:35\\)\
at\ Class\._renderRow\ \(\
http\:\/\/localhost\:8069\/web\/static\/src\/js\/views\/list\/list_editable_renderer\.js\:1166\:32\\)\
at\ Class\._renderRow\ \(\
http\:\/\/localhost\:8069\/web\/static\/src\/js\/core\/class\.js\:123\:38\\)\
at\ Array\.map\ \(\)\
at\ Class\._renderRows\ \(\
http\:\/\/localhost\:8069\/web\/static\/src\/js\/views\/list\/list_renderer\.js\:858\:32\\)\
at\ Class\._renderRows\ \(\
http\:\/\/localhost\:8069\/web\/static\/src\/js\/views\/list\/list_editable_renderer\.js\:1187\:26\\)\
at\ Class\._renderRows\ \(\
http://localhost:8069/web/static/src/js/core/class.js:123:38)

it was working fine but suddenly idk what happened i cant access the module , these are my conf files for the module
transfers.xml:

<record id="action_transfers" model="ir.actions.act_window">
       <field name="name">Transfers</field>
       <field name="type">ir.actions.act_window</field>
       <field name="res_model">transfers.name</field>
   <field name="view_mode">tree,form</field>
       <field name="help" type="html">
     <p class="o_view_nocontent_smiling_face">
       create your first transfer
     </p>            
       </field>
 </record>


<menuitem id ="transfers_root" name ="Transfers" sequence ="0" web_icon="transfers,static/description/icon.png" />  
<menuitem id ="transfers_name" name ="Transfers_Name" parent="transfers_root" action="action_transfers"/>

transfers.py:

from odoo import models, fields, _

class Transfers(models.Model):
_name ="transfers.name"
_description ="Transfer Record"

 transfers_Name = fields.Char(string="Name", required = True)
 transfers_ISO = fields.Char(string="ISO") 
 transfers_amount = fields.Integer("Amount")
 notes = fields.Text(string ="Notes")
 image = fields.Binary(string ="Image")

ps : i have restarted multiple times , also tried to update is in superuser mode . anyone help with this

Avatar
Ignorer
Meilleure réponse

It seems you define the wrong field name in tree view XML definition OR wrong tree view created by the system.
if you define tree view can you please provide it ? or if it framework problem then just define rec_name like

class Transfers(models.Model):
   _name ="transfers.name"
  _description ="Transfer Record"
  _rec_name = 'transfers_Name'





Avatar
Ignorer
Auteur

yeah i havent defined anything for tree structure