PostgreSQL MAKE NO FIELD IN THE DATABASE

Asked by Nestor Diaz

HOLA COMUNIDAD:

The following problem happens to me to want to keep a record in the database
data, and I was looking in postgres and I do not generate columns
x_placa, x_marca en la tabla modulo_autos:

Environment Information :
System : Windows-XP-5.1.2600-SP2
OS Name : nt
Operating System Release : XP
Operating System Version : 5.1.2600
Operating System Architecture : 32bit
Operating System Locale : es_CO.cp1252
Python Version : 2.5.2
OpenERP-Client Version : 5.0.10
Last revision No. & ID :Bazaar Package not Found !Traceback (most recent call last):
  File "netsvc.pyo", line 245, in dispatch
  File "netsvc.pyo", line 74, in __call__
  File "service\web_services.pyo", line 576, in execute
  File "osv\osv.pyo", line 58, in wrapper
  File "osv\osv.pyo", line 119, in execute
  File "osv\osv.pyo", line 111, in execute_cr
  File "osv\orm.pyo", line 2842, in create
  File "sql_db.pyo", line 77, in wrapper
  File "sql_db.pyo", line 122, in execute
ProgrammingError: column "x_modelo" of relation "modulo_autos" does not exist
LINE 1: insert into "modulo_autos" (id,"x_modelo","x_marca","x_placa...

This is the Python code:

from osv import osv, fields

class modulo_autos(osv.osv):
 _name = 'modulo.autos'
 _auto = 'False'
 _columns = {
  'x_placa': fields.char('PLACA', size=20),
  'x_marca': fields.char('MARCA', size=10),
  'x_modelo': fields.char('MODELO', size=10),
  }
modulo_autos()

CODE XML:

<terp>
<data>
<record model="ir.ui.view" id="view_modulo_autos_form">
<field name="name">modulo.autos.form</field>
<field name="model">modulo.autos</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="modulo.autos">
 <!--<field name="assumpte" select="1">-->
 <field name="x_placa" required="1"/>
 <field name="x_marca"/>
 <field name="x_modelo"/>

<!--</field>-->
</form>
</field>
</record>

<record model="ir.ui.view" id="view_modulo_autos_tree">
<field name="name">vehiculos.tree</field>
<field name="model">modulo.autos</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="modulo.autos">
<!--<field name="assumpte">-->
 <field name="x_placa" required="1"/>
 <field name="x_marca"/>
 <field name="x_modelo"/>

<!--</field>-->
</tree>

</field>
</record>

<record model="ir.actions.act_window" id="action_modulo_autos">
<field name="name">modulo.autos</field>
<field name="res_model">modulo.autos</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>

</record>

<menuitem name="GESTION VEHICULOS/Inventario/nuevo_auto"
id="menu_modulo_autos" action="action_modulo_autos"></menuitem>

</data>
</terp>

I can not find the solution to this problem thanks in advance
                                       ^

Question information

Language:
English Edit question
Status:
Answered
For:
Odoo Addons (MOVED TO GITHUB) Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
shanky (shankar-shinde-deactivatedaccount) said :
#1

Hello Nestor Diaz,

Only remove or comment the following line in the python code
 _auto = 'False'
After this table create in the your Database

Can you help with this problem?

Provide an answer of your own, or ask Nestor Diaz for more information if necessary.

To post a message you must log in.