Issue for bi_sale_discount_with_tax (#671)
Status: OPEN
Date: 03/05/2021
ID: 671
S/O number: SO2021/1398275
Reviewer: Hiral Bhatt
Module Name: bi_sale_discount_with_tax
Version: 14.0
Tags: Odoo.Sh,

Assigned to
Contact
Shubhajit Kushari
shubhajit.kushari@browseinfo.in
Reported by
Contact
james@keslighting.co.uk
james@keslighting.co.uk

Description
Hi, Installed this app via Github without error, however when I tried to install the app I got the following error -

Error:

Odoo Server Error



Traceback (most recent call last):

File "/home/odoo/src/odoo/odoo/addons/base/models/ir_http.py", line 237, in _dispatch

result = request.dispatch()

File "/home/odoo/src/odoo/odoo/http.py", line 683, in dispatch

result = self._call_function(**self.params)

File "/home/odoo/src/odoo/odoo/http.py", line 359, in _call_function

return checked_call(self.db, *args, **kwargs)

File "/home/odoo/src/odoo/odoo/service/model.py", line 94, in wrapper

return f(dbname, *args, **kwargs)

File "/home/odoo/src/odoo/odoo/http.py", line 347, in checked_call

result = self.endpoint(*a, **kw)

File "/home/odoo/src/odoo/odoo/http.py", line 912, in __call__

return self.method(*args, **kw)

File "/home/odoo/src/odoo/odoo/http.py", line 531, in response_wrap

response = f(*args, **kw)

File "/home/odoo/src/odoo/addons/web/controllers/main.py", line 1393, in call_button

action = self._call_kw(model, method, args, kwargs)

File "/home/odoo/src/odoo/addons/web/controllers/main.py", line 1381, in _call_kw

return call_kw(request.env[model], method, args, kwargs)

File "/home/odoo/src/odoo/odoo/api.py", line 396, in call_kw

result = _call_kw_multi(method, model, args, kwargs)

File "/home/odoo/src/odoo/odoo/api.py", line 383, in _call_kw_multi

result = method(recs, *args, **kwargs)

File "<decorator-gen-72>", line 2, in button_immediate_install

File "/home/odoo/src/odoo/odoo/addons/base/models/ir_module.py", line 73, in check_and_log

return method(self, *args, **kwargs)

File "/home/odoo/src/odoo/odoo/addons/base/models/ir_module.py", line 474, in button_immediate_install

return self._button_immediate_function(type(self).button_install)

File "/home/odoo/src/odoo/odoo/addons/base/models/ir_module.py", line 592, in _button_immediate_function

modules.registry.Registry.new(self._cr.dbname, update_module=True)

File "/home/odoo/src/odoo/odoo/modules/registry.py", line 89, in new

odoo.modules.load_modules(registry._db, force_demo, status, update_module)

File "/home/odoo/src/odoo/odoo/modules/loading.py", line 453, in load_modules

processed_modules += load_marked_modules(cr, graph,

File "/home/odoo/src/odoo/odoo/modules/loading.py", line 346, in load_marked_modules

loaded, processed = load_module_graph(

File "/home/odoo/src/odoo/odoo/modules/loading.py", line 198, in load_module_graph

registry.init_models(cr, model_names, {'module': package.name}, new_install)

File "/home/odoo/src/odoo/odoo/modules/registry.py", line 420, in init_models

env['base'].flush()

File "/home/odoo/src/odoo/odoo/models.py", line 5436, in flush

self.recompute()

File "/home/odoo/src/odoo/odoo/models.py", line 5895, in recompute

process(field)

File "/home/odoo/src/odoo/odoo/models.py", line 5879, in process

field.recompute(recs)

File "/home/odoo/src/odoo/odoo/fields.py", line 1153, in recompute

self.compute_value(recs)

File "/home/odoo/src/odoo/odoo/fields.py", line 1175, in compute_value

records._compute_field_value(self)

File "/home/odoo/src/odoo/addons/mail/models/mail_thread.py", line 410, in _compute_field_value

return super()._compute_field_value(field)

File "/home/odoo/src/odoo/odoo/models.py", line 4061, in _compute_field_value

getattr(self, field.compute)()

File "/home/odoo/src/user/bi_sale_discount_with_tax/models/account_move.py", line 214, in _compute_amount_account

rec.discount_account_id = line.account_id.id

Exception



The above exception was the direct cause of the following exception:



Traceback (most recent call last):

File "/home/odoo/src/odoo/odoo/http.py", line 639, in _handle_exception

return super(JsonRequest, self)._handle_exception(exception)

File "/home/odoo/src/odoo/odoo/http.py", line 315, in _handle_exception

raise exception.with_traceback(None) from new_cause

NameError: name 'rec' is not defined

Message and communication history