Update **The below example is not exclusive to my model design.**
Certainly tested 6.1 and 7.0. When using the model screen and creating a new model, the database table does not have the correct columns, hence the error. I can manually add the colums to the database table, but this didn't used to work like this. I really think I am missing something or there is a problem, but even looking at my old documents for 5.x the steps were create the model and the correct table/columns were created.
I have tested 6.1 and 7.0. It seems that if you literally go to settings>technical>database structure. Add a model with just x_name field and then create a menu. Go to add a new record via the new menu, it cannot find the new field in the new database table. Have I missed a simple setup??
I created a new model within Settings>Technical>Database Structure called x_contracts.
name field-label field-type required readonly searchable-Type
x_name Title char True False Custom Field
x_expired Expired boolean False False Custom Field
x_last_payment_date Date Date False False Custom Field
I am extending the res.partner by adding a custom field called x_contracts manytomany using model x_contracts. Now if I add the new field x_contracts to my view res.partner, in page:
This is done via development mode>manage views under debug>edit (res.partner.form) and adding the field in there.
I get the error, when I go to the page tab under customers and select the dropdown create and edit, then save the new record:
ProgrammingError: column "x_last_payment_date" of relation "x_contracts" does not exist
LINE 1: insert into "x_contracts" (id,"x_last_payment_date","x_maint...
Now checking the database, yes there is no x_last_payment_date in the table x_contracts physically in PostgreSQL. However when using the interface to create a new model, I believe it is stored else where.
So the question may be, have I missed a step or mis-configured it?
How do I display the data in a page within the customers screen and link the two.
↧