Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[11.0] Uninstall sale will break accounting feature #23270

Closed
sswapnesh opened this issue Feb 22, 2018 · 3 comments
Closed

[11.0] Uninstall sale will break accounting feature #23270

sswapnesh opened this issue Feb 22, 2018 · 3 comments
Assignees
Labels

Comments

@sswapnesh
Copy link
Contributor

Impacted versions: 11.0

Steps to reproduce: Go to Runbot --> Uninstall sale module --> Go to Contacts --> Open one (Runbot link)

Current behavior: Traceback on screen

Traceback (most recent call last):
  File "/home/odoo/runbot/extra/runbot/static/build/305507-11-0-5ce76a/odoo/fields.py", line 936, in __get__
    value = record.env.cache.get(record, self)
  File "/home/odoo/runbot/extra/runbot/static/build/305507-11-0-5ce76a/odoo/api.py", line 960, in get
    value = self._data[field][record.id][key]
KeyError: <odoo.api.Environment object at 0x7fccc20f0a58>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/odoo/runbot/extra/runbot/static/build/305507-11-0-5ce76a/odoo/http.py", line 647, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/home/odoo/runbot/extra/runbot/static/build/305507-11-0-5ce76a/odoo/http.py", line 307, in _handle_exception
    raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
  File "/home/odoo/runbot/extra/runbot/static/build/305507-11-0-5ce76a/odoo/tools/pycompat.py", line 87, in reraise
    raise value
  File "/home/odoo/runbot/extra/runbot/static/build/305507-11-0-5ce76a/odoo/http.py", line 689, in dispatch
    result = self._call_function(**self.params)
  File "/home/odoo/runbot/extra/runbot/static/build/305507-11-0-5ce76a/odoo/http.py", line 339, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/home/odoo/runbot/extra/runbot/static/build/305507-11-0-5ce76a/odoo/service/model.py", line 97, in wrapper
    return f(dbname, *args, **kwargs)
  File "/home/odoo/runbot/extra/runbot/static/build/305507-11-0-5ce76a/odoo/http.py", line 332, in checked_call
    result = self.endpoint(*a, **kw)
  File "/home/odoo/runbot/extra/runbot/static/build/305507-11-0-5ce76a/odoo/http.py", line 933, in __call__
    return self.method(*args, **kw)
  File "/home/odoo/runbot/extra/runbot/static/build/305507-11-0-5ce76a/odoo/http.py", line 512, in response_wrap
    response = f(*args, **kw)
  File "/home/odoo/runbot/extra/runbot/static/build/305507-11-0-5ce76a/odoo/addons/web/controllers/main.py", line 930, in call_kw
    return self._call_kw(model, method, args, kwargs)
  File "/home/odoo/runbot/extra/runbot/static/build/305507-11-0-5ce76a/odoo/addons/web/controllers/main.py", line 922, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/home/odoo/runbot/extra/runbot/static/build/305507-11-0-5ce76a/odoo/api.py", line 689, in call_kw
    return call_kw_multi(method, model, args, kwargs)
  File "/home/odoo/runbot/extra/runbot/static/build/305507-11-0-5ce76a/odoo/api.py", line 680, in call_kw_multi
    result = method(recs, *args, **kwargs)
  File "/home/odoo/runbot/extra/runbot/static/build/305507-11-0-5ce76a/odoo/models.py", line 2535, in read
    values[name] = field.convert_to_read(record[name], record, use_name_get)
  File "/home/odoo/runbot/extra/runbot/static/build/305507-11-0-5ce76a/odoo/models.py", line 4675, in __getitem__
    return self._fields[key].__get__(self, type(self))
  File "/home/odoo/runbot/extra/runbot/static/build/305507-11-0-5ce76a/odoo/fields.py", line 940, in __get__
    self.determine_value(record)
  File "/home/odoo/runbot/extra/runbot/static/build/305507-11-0-5ce76a/odoo/fields.py", line 1051, in determine_value
    self.compute_value(recs)
  File "/home/odoo/runbot/extra/runbot/static/build/305507-11-0-5ce76a/odoo/fields.py", line 1007, in compute_value
    self._compute_value(records)
  File "/home/odoo/runbot/extra/runbot/static/build/305507-11-0-5ce76a/odoo/fields.py", line 998, in _compute_value
    getattr(records, self.compute)()
  File "/home/odoo/runbot/extra/runbot/static/build/305507-11-0-5ce76a/odoo/addons/account/models/partner.py", line 294, in _invoice_total
    self.env.cr.execute(query, where_clause_params)
  File "/home/odoo/runbot/extra/runbot/static/build/305507-11-0-5ce76a/odoo/sql_db.py", line 155, in wrapper
    return f(self, *args, **kwargs)
  File "/home/odoo/runbot/extra/runbot/static/build/305507-11-0-5ce76a/odoo/sql_db.py", line 232, in execute
    res = self._obj.execute(query, params)
psycopg2.ProgrammingError: relation "account_invoice_report" does not exist
LINE 3:                     FROM account_invoice_report account_invo...
                                 ^

Expected behavior: Should open Contact's form View

Video/Screenshot link (optional):

@sswapnesh
Copy link
Contributor Author

@Elkasitu Probably for you.

@Yenthe666
Copy link
Collaborator

You seem to be finding a lot of these kind of bugs haha. Alternatively of interest for @qdp-odoo too.

@Yenthe666 Yenthe666 added the 11.0 label Feb 22, 2018
@sswapnesh
Copy link
Contributor Author

Yes, I think 6 or 7 bugs are related to module Uninstallation.

@Elkasitu Elkasitu self-assigned this Feb 23, 2018
Elkasitu pushed a commit to odoo-dev/odoo that referenced this issue Feb 23, 2018
* Install sale_management, contacts
* Uninstall sale (not sale_management)
* Try to access any partner via contacts
    -> BOOM, traceback: relation account_invoice_report does not exist

For some reason, uninstalling `sale` drops the SQL view for
account.invoice.report which in turn means that anything that requires
the view will break, this was the case for accessing the res_partner
form view.

Fixes odoo#23270 by forcing account.invoice.report.init() upon
uninstallation of the `sale` module.
Elkasitu pushed a commit that referenced this issue Feb 23, 2018
* Install sale_management, contacts
* Uninstall sale (not sale_management)
* Try to access any partner via contacts
    -> BOOM, traceback: relation account_invoice_report does not exist

For some reason, uninstalling `sale` drops the SQL view for
account.invoice.report which in turn means that anything that requires
the view will break, this was the case for accessing the res_partner
form view.

Fixes #23270 by forcing account.invoice.report.init() upon
uninstallation of the `sale` module.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants