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
Tags:

Assigned to
Contact
Mansi Ramani
mansi.ramani@browseinfo.in
Reported by
Contact
Jaleel alsharaf
jaleel@ideasholding.com

Description
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:

Error:

Odoo Server Error



Traceback (most recent call last):

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

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

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

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

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

raise value

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

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

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

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

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

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

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

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

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

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

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

response = f(*args, **kw)

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

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

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

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

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

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

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

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

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

return super(PosSession, self).action_pos_session_validate()

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

return self.action_pos_session_close()

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

return self._validate_session()

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

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

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

self._create_account_move()

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

'ref': self.name,

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

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

return create(self, [arg])

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

if name != 'Discount':

UnboundLocalError: local variable 'name' referenced before assignment

Message and communication history