issue on bi_sale_discount_with_tax 13.0 (#768)
Status: OPEN
Date: 07/05/2021
ID: 768
S/O number: SO2021/1402502
Reviewer: Tirth Mehta
Module Name: bi_sale_discount_with_tax
Version: 13.0

Assigned to
Mansi Ramani
Reported by
Jaleel alsharaf

Hi Team,
I have installed the app and it works perfectly in the sales module, however when i tried to close a POS session, i got the following error:


Odoo Server Error

Traceback (most recent call last):

File "/odoo/odoo13-server/odoo/", line 624, in _handle_exception

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

File "/odoo/odoo13-server/odoo/", line 310, in _handle_exception

raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])

File "/odoo/odoo13-server/odoo/tools/", line 14, in reraise

raise value

File "/odoo/odoo13-server/odoo/", line 669, in dispatch

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

File "/odoo/odoo13-server/odoo/", line 350, in _call_function

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

File "/odoo/odoo13-server/odoo/service/", line 94, in wrapper

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

File "/odoo/odoo13-server/odoo/", line 339, in checked_call

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

File "/odoo/odoo13-server/odoo/", line 915, in _call_

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

File "/odoo/odoo13-server/odoo/", line 515, in response_wrap

response = f(*args, **kw)

File "/odoo/odoo13-server/addons/web/controllers/", line 1331, in call_button

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

File "/odoo/odoo13-server/addons/web/controllers/", line 1319, in _call_kw

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

File "/odoo/odoo13-server/odoo/", line 387, in call_kw

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

File "/odoo/odoo13-server/odoo/", line 374, in _call_kw_multi

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

File "/odoo/custom/addons/pos_retail/models/pos/", line 108, in action_pos_session_validate

return super(PosSession, self).action_pos_session_validate()

File "/odoo/odoo13-server/addons/point_of_sale/models/", line 264, in action_pos_session_validate

return self.action_pos_session_close()

File "/odoo/odoo13-server/addons/point_of_sale/models/", line 283, in action_pos_session_close

return self._validate_session()

File "/odoo/custom/addons/pos_retail/models/pos/", line 229, in _validate_session

res = super(PosSession, self.with_context(context))._validate_session()

File "/odoo/odoo13-server/addons/point_of_sale/models/", line 300, in _validate_session


File "/odoo/odoo13-server/addons/point_of_sale/models/", line 365, in _create_account_move


File "<decorator-gen-241>", line 2, in create

File "/odoo/odoo13-server/odoo/", line 335, in _model_create_multi

return create(self, [arg])

File "/odoo/custom/addons/bi_sale_discount_with_tax/models/", line 452, in create

if name != 'Discount':

UnboundLocalError: local variable 'name' referenced before assignment

Message and communication history