Impossible to connect when a field is added in res.partner

Asked by Guewen Baconnier @ Camptocamp

Hello,

'res.users' is not a _inherits of 'res.partner', this change brought the following side-effect:

Steps to reproduce:
* create a custom addon and install it
* add a field in 'res.partner' in the custom addon, for instance 'company'
* restart the server
* connect to OpenERP in order to update the custom addon
* you can't connect (even with XML/RPC) because it cannot browse 'res.users'

Work-around:
Update the module with ./openerp-server -u <custom_addon>

Traceback of the error:

2013-03-14 11:49:40,802 18631 ERROR openerp_magento7 openerp.sql_db: Programming error: column res_partner.company does not exist
LINE 1: ...r."type",res_partner."vat",res_partner."function",res_partne...
                                                             ^
, in query SELECT res_partner."ean13",res_partner."tz",res_partner."opt_out",res_partner."title",res_partner."parent_id",res_partner."last_reconciliation_date",res_partner."emp
loyee",res_partner."fax",res_partner."image_medium",res_partner."name",res_partner."debit_limit",res_partner."signup_token",res_partner."street",res_partner."country_id",res_p$
rtner."notification_email_send",res_partner."supplier",res_partner."ref",res_partner."email",res_partner."street2",res_partner."signup_expiration",res_partner."zip",res_partner
."comment",res_partner."color",res_partner."image",res_partner."city",res_partner."user_id",res_partner."type",res_partner."vat",res_partner."function",res_partner."company",re
s_partner."phone",res_partner."customer",res_partner."image_small",res_partner."birthdate",res_partner."state_id",res_partner."website",res_partner."use_parent_address",res_par
tner."signup_type",res_partner."date",res_partner."is_company",res_partner."birthday",res_partner."lang",res_partner."credit_limit",res_partner."mobile",res_partner.id FROM "re
s_partner" WHERE res_partner.id IN %s ORDER BY name
2013-03-14 11:49:40,802 18631 DEBUG openerp_magento7 openerp.tools.translate: translation went wrong for "'Install'", skipped
2013-03-14 11:49:40,804 18631 ERROR openerp_magento7 openerp.sql_db: bad query: SELECT res_users."menu_id",res_users."alias_id",res_users."share",res_users."active",res_users."
password",res_users."partner_id",res_users."id",res_users."login_date",res_users."company_id",res_users."signature",res_users."login",res_users."action_id",res_users."company_i
d",res_users."active",res_users."partner_id",res_users."alias_id",res_users.id FROM "res_users" WHERE res_users.id IN (1) ORDER BY id
Traceback (most recent call last):
  File "/home/guewen/code/dev_instances/openerp_magento7/parts/server/openerp/sql_db.py", line 226, in execute
    res = self._obj.execute(query, params)
InternalError: current transaction is aborted, commands ignored until end of transaction block

Question information

Language:
English Edit question
Status:
Solved
For:
Odoo Server (MOVED TO GITHUB) Edit question
Assignee:
No assignee Edit question
Solved by:
Guewen Baconnier @ Camptocamp
Solved:
Last query:
Last reply:
Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) said :
#1

Hello,

'res.users' is not a _inherits of 'res.partner', this change brought the following side-effect:

Steps to reproduce:
* create custom addon and install it
* add a field in 'res.partner' in the custom addon, for instance 'company'
* restart the server
* connect to OpenERP in order to update the custom addon
* you can't connect (even with XML/RPC) because it cannot browse 'res.users'

Work-around:
Update the module with ./openerp-server -u <custom_addon>

Traceback of the error:

2013-03-14 11:49:40,802 18631 ERROR openerp_magento7 openerp.sql_db: Programming error: column res_partner.company does not exist
LINE 1: ...r."type",res_partner."vat",res_partner."function",res_partne...
                                                             ^
, in query SELECT res_partner."ean13",res_partner."tz",res_partner."opt_out",res_partner."title",res_partner."parent_id",res_partner."last_reconciliation_date",res_partner."emp
loyee",res_partner."fax",res_partner."image_medium",res_partner."name",res_partner."debit_limit",res_partner."signup_token",res_partner."street",res_partner."country_id",res_p$
rtner."notification_email_send",res_partner."supplier",res_partner."ref",res_partner."email",res_partner."street2",res_partner."signup_expiration",res_partner."zip",res_partner
."comment",res_partner."color",res_partner."image",res_partner."city",res_partner."user_id",res_partner."type",res_partner."vat",res_partner."function",res_partner."company",re
s_partner."phone",res_partner."customer",res_partner."image_small",res_partner."birthdate",res_partner."state_id",res_partner."website",res_partner."use_parent_address",res_par
tner."signup_type",res_partner."date",res_partner."is_company",res_partner."birthday",res_partner."lang",res_partner."credit_limit",res_partner."mobile",res_partner.id FROM "re
s_partner" WHERE res_partner.id IN %s ORDER BY name
2013-03-14 11:49:40,802 18631 DEBUG openerp_magento7 openerp.tools.translate: translation went wrong for "'Install'", skipped
2013-03-14 11:49:40,804 18631 ERROR openerp_magento7 openerp.sql_db: bad query: SELECT res_users."menu_id",res_users."alias_id",res_users."share",res_users."active",res_users."
password",res_users."partner_id",res_users."id",res_users."login_date",res_users."company_id",res_users."signature",res_users."login",res_users."action_id",res_users."company_i
d",res_users."active",res_users."partner_id",res_users."alias_id",res_users.id FROM "res_users" WHERE res_users.id IN (1) ORDER BY id
Traceback (most recent call last):
  File "/home/guewen/code/dev_instances/openerp_magento7/parts/server/openerp/sql_db.py", line 226, in execute
    res = self._obj.execute(query, params)
InternalError: current transaction is aborted, commands ignored until end of transaction block

Revision history for this message
Serpent Consulting Services (serpent-consulting-services) said :
#2

Guewen,

We have added many custom modules and to be honest, I did not face such an issue ever.

I am sure this could either be due the py file not appearing in __init__ or missing access of the py file.

Lets go deep if you still face the error now.

Thanks.

Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) said :
#3

I don't know why Launchpad suddenly sends out emails of this old question, but for the sake of completeness: seems related to https://bugs.launchpad.net/openobject-server/+bug/1253200 (MP provided).

Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) said :
#4

On Tue, Dec 24, 2013 at 5:26 PM, Stefan Rijnhart (Therp)
<email address hidden> wrote:
> Your question #241239 on OpenERP Server changed:
> https://answers.launchpad.net/openobject-server/+question/241239
>
> Stefan Rijnhart (Therp) proposed the following answer:
> I don't know why Launchpad suddenly sends out emails of this old
> question, but for the sake of completeness: seems related to
> https://bugs.launchpad.net/openobject-server/+bug/1253200 (MP provided).
>

It reappeared because it was at the origin a bug report (lp:1155102)
that has just been converted to a question.
Thanks for the link Stefan, my issue was probably the same.

@Jay: I think it would have been more correct to merely respond to the
bug report, rather than converting it to a question. My report was
obviously not a question. Thanks for your message anyway.

Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) said :
#5

just close this question