Skip to Content
Menu
This question has been flagged
2 Replies
2841 Views

SOLVED WITH ONLY 1 LINE OF CODE THANKS TO YOU

odoo -c /apps/odoo/conf/odoo-server.conf -d MYDATABASE -u stock --no-http --stop-after-init


Hello everyone,

I unfortunately uninstalled the inventory module on my odoo 11 community edition and now I can't acces neither the front or back office of my odoo :'(

I must admit that I'm a noob in Odoo programming since I'm used with PHP/MySql and already passed many hours trying to find a issue but I'm facing a wall :'(

Maybe some of you experts would have a easy solution I think that it's quite of nothing to repair ^^

Here's the main problem I think :

2020-12-10 19:10:46.329 UTC [1973] ERROR: column res_partner.picking_warn does not exist at character 289 2020-12-10 19:10:46.329 UTC [1973] STATEMENT: SELECT "res_partner"."id" as "id","res_partner"."user_id" as "user_id","res_partner"."function" as "function","res_partner"."employee" as "employee","res_partner"."company_name" as "company_name","res_partner"."credit_limit" as "credit_limit","res_partner"."debit_limit" as "debit_limit","res_partner"."picking_warn" as "picking_warn","res_partner"."ref" as "ref","res_partner"."website_meta_title" as "website_meta_title","res_partner"."sale_warn" as "sale_warn","res_partner"."team_id" as "team_id","res_partner"."is_company" as "is_company","res_partner"."street" as "street","res_partner"."date" as "date","res_partner"."partner_latitude" as "partner_latitude","res_partner"."type" as "type","res_partner"."message_last_post" as "message_last_post","res_partner"."message_bounce" as "message_bounce","res_partner"."picking_warn_msg" as "picking_warn_msg","res_partner"."phone" as "phone","res_partner"."website_meta_keywords" as "website_meta_keywords","res_partner"."title" as "title","res_partner"."commercial_partner_id" as "commercial_partner_id","res_partner"."color" as "color","res_partner"."active" as "active","res_partner"."street2" as "street2","res_partner"."partner_longitude" as "partner_longitude","res_partner"."opt_out" as "opt_out","res_partner"."state_id" as "state_id","res_partner"."website_meta_description" as "website_meta_description","res_partner"."create_date" as "create_date","res_partner"."vat" as "vat","res_partner"."mobile" as "mobile","res_partner"."parent_id" as "parent_id","res_partner"."partner_share" as "partner_share","res_partner"."lang" as "lang","res_partner"."customer" as "customer","res_partner"."name" as "name","res_partner"."zip" as "zip","res_partner"."commercial_partner_country_id" as "commercial_partner_country_id","res_partner"."signup_token" as "signup_token","res_partner"."country_id" as "country_id","res_partner"."signup_expiration" as "signup_expiration","res_partner"."invoice_warn" as "invoice_warn","res_partner"."website" as "website","res_partner"."siret" as "siret","res_partner"."create_uid" as "create_uid","res_partner"."date_localization" as "date_localization","res_partner"."supplier" as "supplier","res_partner"."tz" as "tz","res_partner"."last_time_entries_checked" as "last_time_entries_checked","res_partner"."display_name" as "display_name","res_partner"."city" as "city","res_partner"."signup_type" as "signup_type","res_partner"."invoice_warn_msg" as "invoice_warn_msg","res_partner"."website_published" as "website_published","res_partner"."sale_warn_msg" as "sale_warn_msg","res_partner"."industry_id" as "industry_id","res_partner"."barcode" as "barcode","res_partner"."commercial_company_name" as "commercial_company_name","res_partner"."write_uid" as "write_uid","res_partner"."website_description" as "website_description","res_partner"."write_date" as "write_date","res_partner"."activity_date_deadline" as "activity_date_deadline","res_partner"."calendar_last_notif_ack" as "calendar_last_notif_ack","res_partner"."comment" as "comment","res_partner"."website_short_description" as "website_short_description","res_partner"."email" as "email","res_partner"."company_id" as "company_id" FROM "res_partner" WHERE "res_partner".id IN (3)

Here's the complete error log when I had the crash for the first time :


Odoo Server Error
Traceback (most recent call last):
File "/opt/bitnami/apps/odoo/lib/odoo-11.0.post20180618-py3.6.egg/odoo/fields.py", line 937, in get
value = record.env.cache.get(record, self)
File "/opt/bitnami/apps/odoo/lib/odoo-11.0.post20180618-py3.6.egg/odoo/api.py", line 960, in get
value = self._data[field][record.id][key]
KeyError:

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/opt/bitnami/apps/odoo/lib/odoo-11.0.post20180618-py3.6.egg/odoo/fields.py", line 937, in get
value = record.env.cache.get(record, self)
File "/opt/bitnami/apps/odoo/lib/odoo-11.0.post20180618-py3.6.egg/odoo/api.py", line 960, in get
value = self._data[field][record.id][key]
KeyError: (, 1)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/opt/bitnami/apps/odoo/lib/odoo-11.0.post20180618-py3.6.egg/odoo/fields.py", line 937, in get
value = record.env.cache.get(record, self)
File "/opt/bitnami/apps/odoo/lib/odoo-11.0.post20180618-py3.6.egg/odoo/api.py", line 960, in get
value = self._data[field][record.id][key]
KeyError: (, 1)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/opt/bitnami/apps/odoo/lib/odoo-11.0.post20180618-py3.6.egg/odoo/http.py", line 650, in handleexception
return super(JsonRequest, self).handleexception(exception)
File "/opt/bitnami/apps/odoo/lib/odoo-11.0.post20180618-py3.6.egg/odoo/http.py", line 310, in handleexception
raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
File "/opt/bitnami/apps/odoo/lib/odoo-11.0.post20180618-py3.6.egg/odoo/tools/pycompat.py", line 87, in reraise
raise value
File "/opt/bitnami/apps/odoo/lib/odoo-11.0.post20180618-py3.6.egg/odoo/http.py", line 692, in dispatch
result = self.callfunction(**self.params)
File "/opt/bitnami/apps/odoo/lib/odoo-11.0.post20180618-py3.6.egg/odoo/http.py", line 342, in callfunction
return checked_call(self.db, *args, **kwargs)
File "/opt/bitnami/apps/odoo/lib/odoo-11.0.post20180618-py3.6.egg/odoo/service/model.py", line 97, in wrapper
return f(dbname, *args, **kwargs)
File "/opt/bitnami/apps/odoo/lib/odoo-11.0.post20180618-py3.6.egg/odoo/http.py", line 335, in checked_call
result = self.endpoint(*a, **kw)
File "/opt/bitnami/apps/odoo/lib/odoo-11.0.post20180618-py3.6.egg/odoo/http.py", line 936, in call
return self.method(*args, **kw)
File "/opt/bitnami/apps/odoo/lib/odoo-11.0.post20180618-py3.6.egg/odoo/http.py", line 515, in response_wrap
response = f(*args, **kw)
File "/opt/bitnami/apps/odoo/lib/odoo-11.0.post20180618-py3.6.egg/odoo/addons/web/controllers/main.py", line 1221, in load
action = request.env[action_type].browse([action_id]).read()
File "/opt/bitnami/apps/odoo/lib/odoo-11.0.post20180618-py3.6.egg/odoo/addons/base/ir/ir_actions.py", line 198, in read
result = super(IrActionsActWindow, self).read(fields, load=load)
File "/opt/bitnami/apps/odoo/lib/odoo-11.0.post20180618-py3.6.egg/odoo/models.py", line 2601, in read
values[name] = field.convert_to_read(record[name], record, use_name_get)
File "/opt/bitnami/apps/odoo/lib/odoo-11.0.post20180618-py3.6.egg/odoo/fields.py", line 1999, in convert_to_read
return (value.id, value.sudo().display_name)
File "/opt/bitnami/apps/odoo/lib/odoo-11.0.post20180618-py3.6.egg/odoo/fields.py", line 941, in get
self.determine_value(record)
File "/opt/bitnami/apps/odoo/lib/odoo-11.0.post20180618-py3.6.egg/odoo/fields.py", line 1052, in determine_value
self.compute_value(recs)
File "/opt/bitnami/apps/odoo/lib/odoo-11.0.post20180618-py3.6.egg/odoo/fields.py", line 1008, in compute_value
self.computevalue(records)
File "/opt/bitnami/apps/odoo/lib/odoo-11.0.post20180618-py3.6.egg/odoo/fields.py", line 999, in computevalue
getattr(records, self.compute)()
File "/opt/bitnami/apps/odoo/lib/odoo-11.0.post20180618-py3.6.egg/odoo/models.py", line 1489, in computedisplay_name
names = dict(self.name_get())
File "/opt/bitnami/apps/odoo/lib/odoo-11.0.post20180618-py3.6.egg/odoo/models.py", line 1508, in name_get
result.append((record.id, convert(record[name], record)))
File "/opt/bitnami/apps/odoo/lib/odoo-11.0.post20180618-py3.6.egg/odoo/models.py", line 4754, in getitem
return self._fields[key].get(self, type(self))
File "/opt/bitnami/apps/odoo/lib/odoo-11.0.post20180618-py3.6.egg/odoo/fields.py", line 941, in get
self.determine_value(record)
File "/opt/bitnami/apps/odoo/lib/odoo-11.0.post20180618-py3.6.egg/odoo/fields.py", line 1052, in determine_value
self.compute_value(recs)
File "/opt/bitnami/apps/odoo/lib/odoo-11.0.post20180618-py3.6.egg/odoo/fields.py", line 1008, in compute_value
self.computevalue(records)
File "/opt/bitnami/apps/odoo/lib/odoo-11.0.post20180618-py3.6.egg/odoo/fields.py", line 1001, in computevalue
self.compute(records)
File "/opt/bitnami/apps/odoo/lib/odoo-11.0.post20180618-py3.6.egg/odoo/fields.py", line 589, in computerelated
record[self.name] = value[self.related_field.name]
File "/opt/bitnami/apps/odoo/lib/odoo-11.0.post20180618-py3.6.egg/odoo/models.py", line 4754, in getitem
return self._fields[key].get(self, type(self))
File "/opt/bitnami/apps/odoo/lib/odoo-11.0.post20180618-py3.6.egg/odoo/fields.py", line 941, in get
self.determine_value(record)
File "/opt/bitnami/apps/odoo/lib/odoo-11.0.post20180618-py3.6.egg/odoo/fields.py", line 1042, in determine_value
record.prefetchfield(self)
File "/opt/bitnami/apps/odoo/lib/odoo-11.0.post20180618-py3.6.egg/odoo/models.py", line 2646, in prefetchfield
result = records.read([f.name for f in fs], load='classicwrite')
File "/opt/bitnami/apps/odoo/lib/odoo-11.0.post20180618-py3.6.egg/odoo/models.py", line 2590, in read
self.readfrom_database(stored, inherited)
File "/opt/bitnami/apps/odoo/lib/odoo-11.0.post20180618-py3.6.egg/odoo/models.py", line 2709, in readfrom_database
cr.execute(query_str, params)
File "/opt/bitnami/apps/odoo/lib/odoo-11.0.post20180618-py3.6.egg/odoo/sql_db.py", line 155, in wrapper
return f(self, *args, **kwargs)
File "/opt/bitnami/apps/odoo/lib/odoo-11.0.post20180618-py3.6.egg/odoo/sql_db.py", line 232, in execute
res = self._obj.execute(query, params)
psycopg2.ProgrammingError: column res_partner.picking_warn_msg does not exist
LINE 1: ...itude","res_partner"."create_uid" as "create_uid","res_partn...


And the site url with the nice "Internal Server Error" now:

vo-conciergerie.com


Thanks in advance for your help Imin a very bad period and have all my clients data lost if I can't solve this quickly :'(

Best regards.



SOLVED WITH ONLY 1 LINE OF CODE THANKS TO YOU

odoo -c /apps/odoo/conf/odoo-server.conf -d MYDATABASE -u stock --no-http --stop-after-init


Avatar
Discard

One of the fields on the res.partner model is giving an issue. Do an update of the modules from the command line:

./odoo-bin -u base -c /etc/odoo-server.conf

Author Best Answer

Hello !

I kind of understand what you guys are talking about but I don't really know how to do this practicly ^^ In fact the odoo was installed using bitnami and the command lines you wrote doesn't work without adapting it :'(

For this one ./odoo-bin -u base -c /etc/odoo-server.conf
But seems that the odoo-server.conf isn't placed there :

odoo-bin: error: The config file '/etc/odoo-server.conf' selected with -c/--config doesn't exist or is not readable, use -s/--save if you want to generate it
For this one :

Once you add the new field to res.partner try to upgrade the module from terminal, 


odoo-bin -c odoo.conf -d DatabaseName -u ModuleName

I don't even know how to add the field in the database cause I think that no postgre manager is installed on the cloud instance ^^

In fact I only know the french name of the module (Inventaire/Inventory) and don't know the technical name of this one ^^
Furthurmore I can't acces to the BO also (Internal Server Error)...

So sorry to be such a noob but I'm only used in standard web developpement ^^

If one of you can maybe take the hand over my config I'll be never ended gratefull ^^

Thanks a lot indeed for your help I very appreciate that !

Regards









Avatar
Discard
Best Answer

Hi, 

Newly added field 'picking_warn_msg'in res.partner causing the issue.


Once you add the new field to res.partner try to upgrade the module from terminal, 


odoo-bin -c odoo.conf -d DatabaseName -u ModuleName


There is a tricky way, Just go into the Apps menu and open your module/app. After that Restart Odoo and upgrade the module/app.

Hope it helps. 

Avatar
Discard