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

i see this error when i want to validate product that receive 

what is this error?how can fix this?

Error:

Odoo Server Error


Traceback (most recent call last):

  File "C:\Program Files (x86)\Odoo 13.0\server\odoo\http.py", line 619, in _handle_exception

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

  File "C:\Program Files (x86)\Odoo 13.0\server\odoo\http.py", line 309, in _handle_exception

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

  File "C:\Program Files (x86)\Odoo 13.0\server\odoo\tools\pycompat.py", line 14, in reraise

    raise value

  File "C:\Program Files (x86)\Odoo 13.0\server\odoo\http.py", line 664, in dispatch

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

  File "C:\Program Files (x86)\Odoo 13.0\server\odoo\http.py", line 345, in _call_function

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

  File "C:\Program Files (x86)\Odoo 13.0\server\odoo\service\model.py", line 93, in wrapper

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

  File "C:\Program Files (x86)\Odoo 13.0\server\odoo\http.py", line 338, in checked_call

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

  File "C:\Program Files (x86)\Odoo 13.0\server\odoo\http.py", line 909, in __call__

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

  File "C:\Program Files (x86)\Odoo 13.0\server\odoo\http.py", line 510, in response_wrap

    response = f(*args, **kw)

  File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\web\controllers\main.py", line 1323, in call_button

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

  File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\web\controllers\main.py", line 1311, in _call_kw

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

  File "C:\Program Files (x86)\Odoo 13.0\server\odoo\api.py", line 395, in call_kw

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

  File "C:\Program Files (x86)\Odoo 13.0\server\odoo\api.py", line 382, in _call_kw_multi

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

  File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\stock\wizard\stock_immediate_transfer.py", line 34, in process

    pick_to_do.action_done()

  File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\stock\models\stock_picking.py", line 705, in action_done

    todo_moves._action_done(cancel_backorder=self.env.context.get('cancel_backorder'))

  File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\stock_account\models\stock_move.py", line 246, in _action_done

    valued_moves['in'].product_price_update_before_done()

  File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\stock_last_purchase_price\models\stock.py", line 40, in product_price_update_before_done

    raise UserError(_('Configuration error. Please configure the price difference account on the product or its category to process this operation.'))

NameError: name '_' is not defined

Avatar
Discard

Please use a meaningful title.

Best Answer

Hi,

From the error message it seems that you are using custom module and the error is coming from that module. Open the module with the technical name stock_last_purchase_price and inside it you will have stock.py file inside the models folder.


To fix the error import _ by adding this line of code,

from odoo import _

Thanks

Avatar
Discard
Related Posts Replies Views Activity
1
Mar 15
4679
0
Mar 15
4240
2
Feb 23
2128
6
Jan 24
12675
2
May 15
9779