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

Stacktrace on confirmation #1900

Open
Ruftruy opened this issue Jun 6, 2023 · 0 comments
Open

Stacktrace on confirmation #1900

Ruftruy opened this issue Jun 6, 2023 · 0 comments

Comments

@Ruftruy
Copy link

Ruftruy commented Jun 6, 2023

module: purchase_discount
version: 16.0

Steps to reproduce

  • Create purchase order and enter a purchase discount in a purchase orderline.
  • On confirmation of the PO I get the following stacktrace:
  • `RPC_ERROR
    Odoo Server Error
    Traceback (most recent call last):
    File "/vig-16-test/server/odoo/http.py", line 1583, in _serve_db
    return service_model.retrying(self._serve_ir_http, self.env)
    File "/vig-16-test/server/odoo/service/model.py", line 134, in retrying
    result = func()
    File "/vig-16-test/server/odoo/http.py", line 1610, in _serve_ir_http
    response = self.dispatcher.dispatch(rule.endpoint, args)
    File "/vig-16-test/server/odoo/http.py", line 1808, in dispatch
    result = self.request.registry['ir.http']._dispatch(endpoint)
    File "/vig-16-test/server/odoo/addons/base/models/ir_http.py", line 154, in _dispatch
    result = endpoint(**request.params)
    File "/vig-16-test/server/odoo/http.py", line 696, in route_wrapper
    result = endpoint(self, *args, **params_ok)
    File "/vig-16-test/server/addons/web/controllers/dataset.py", line 46, in call_button
    action = self._call_kw(model, method, args, kwargs)
    File "/vig-16-test/server/addons/web/controllers/dataset.py", line 33, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
    File "/vig-16-test/server/odoo/api.py", line 461, in call_kw
    result = _call_kw_multi(method, model, args, kwargs)
    File "/vig-16-test/server/odoo/api.py", line 448, in _call_kw_multi
    result = method(recs, *args, **kwargs)
    File "/vig-16-test/server/addons/purchase/models/purchase.py", line 495, in button_confirm
    order.button_approve()
    File "/vig-16-test/server/addons/purchase_stock/models/purchase.py", line 111, in button_approve
    self._create_picking()
    File "/vig-16-test/server/addons/purchase_stock/models/purchase.py", line 241, in _create_picking
    moves = order.order_line._create_stock_moves(picking)
    File "/vig-16-test/server/addons/purchase_stock/models/purchase.py", line 582, in _create_stock_moves
    for val in line._prepare_stock_moves(picking):
    File "/vig-16-test/server/addons/purchase_stock/models/purchase.py", line 483, in _prepare_stock_moves
    price_unit = self._get_stock_move_price_unit()
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 73, in _get_stock_move_price_unit
    self.price_unit = price
    File "/vig-16-test/server/odoo/fields.py", line 1320, in set
    records.write({self.name: write_value})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 139, in write
    res = super().write(vals)
    File "/vig-16-test/server/addons/purchase_stock/models/purchase.py", line 387, in write
    moves.write({'price_unit': line._get_stock_move_price_unit()})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 73, in _get_stock_move_price_unit
    self.price_unit = price
    File "/vig-16-test/server/odoo/fields.py", line 1320, in set
    records.write({self.name: write_value})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 139, in write
    res = super().write(vals)
    File "/vig-16-test/server/addons/purchase_stock/models/purchase.py", line 387, in write
    moves.write({'price_unit': line._get_stock_move_price_unit()})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 73, in _get_stock_move_price_unit
    self.price_unit = price
    File "/vig-16-test/server/odoo/fields.py", line 1320, in set
    records.write({self.name: write_value})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 139, in write
    res = super().write(vals)
    File "/vig-16-test/server/addons/purchase_stock/models/purchase.py", line 387, in write
    moves.write({'price_unit': line._get_stock_move_price_unit()})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 73, in _get_stock_move_price_unit
    self.price_unit = price
    File "/vig-16-test/server/odoo/fields.py", line 1320, in set
    records.write({self.name: write_value})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 139, in write
    res = super().write(vals)
    File "/vig-16-test/server/addons/purchase_stock/models/purchase.py", line 387, in write
    moves.write({'price_unit': line._get_stock_move_price_unit()})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 73, in _get_stock_move_price_unit
    self.price_unit = price
    File "/vig-16-test/server/odoo/fields.py", line 1320, in set
    records.write({self.name: write_value})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 139, in write
    res = super().write(vals)
    File "/vig-16-test/server/addons/purchase_stock/models/purchase.py", line 387, in write
    moves.write({'price_unit': line._get_stock_move_price_unit()})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 73, in _get_stock_move_price_unit
    self.price_unit = price
    File "/vig-16-test/server/odoo/fields.py", line 1320, in set
    records.write({self.name: write_value})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 139, in write
    res = super().write(vals)
    File "/vig-16-test/server/addons/purchase_stock/models/purchase.py", line 387, in write
    moves.write({'price_unit': line._get_stock_move_price_unit()})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 73, in _get_stock_move_price_unit
    self.price_unit = price
    File "/vig-16-test/server/odoo/fields.py", line 1320, in set
    records.write({self.name: write_value})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 139, in write
    res = super().write(vals)
    File "/vig-16-test/server/addons/purchase_stock/models/purchase.py", line 387, in write
    moves.write({'price_unit': line._get_stock_move_price_unit()})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 73, in _get_stock_move_price_unit
    self.price_unit = price
    File "/vig-16-test/server/odoo/fields.py", line 1320, in set
    records.write({self.name: write_value})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 139, in write
    res = super().write(vals)
    File "/vig-16-test/server/addons/purchase_stock/models/purchase.py", line 387, in write
    moves.write({'price_unit': line._get_stock_move_price_unit()})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 73, in _get_stock_move_price_unit
    self.price_unit = price
    File "/vig-16-test/server/odoo/fields.py", line 1320, in set
    records.write({self.name: write_value})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 139, in write
    res = super().write(vals)
    File "/vig-16-test/server/addons/purchase_stock/models/purchase.py", line 387, in write
    moves.write({'price_unit': line._get_stock_move_price_unit()})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 73, in _get_stock_move_price_unit
    self.price_unit = price
    File "/vig-16-test/server/odoo/fields.py", line 1320, in set
    records.write({self.name: write_value})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 139, in write
    res = super().write(vals)
    File "/vig-16-test/server/addons/purchase_stock/models/purchase.py", line 387, in write
    moves.write({'price_unit': line._get_stock_move_price_unit()})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 73, in _get_stock_move_price_unit
    self.price_unit = price
    File "/vig-16-test/server/odoo/fields.py", line 1320, in set
    records.write({self.name: write_value})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 139, in write
    res = super().write(vals)
    File "/vig-16-test/server/addons/purchase_stock/models/purchase.py", line 387, in write
    moves.write({'price_unit': line._get_stock_move_price_unit()})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 73, in _get_stock_move_price_unit
    self.price_unit = price
    File "/vig-16-test/server/odoo/fields.py", line 1320, in set
    records.write({self.name: write_value})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 139, in write
    res = super().write(vals)
    File "/vig-16-test/server/addons/purchase_stock/models/purchase.py", line 387, in write
    moves.write({'price_unit': line._get_stock_move_price_unit()})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 73, in _get_stock_move_price_unit
    self.price_unit = price
    File "/vig-16-test/server/odoo/fields.py", line 1320, in set
    records.write({self.name: write_value})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 139, in write
    res = super().write(vals)
    File "/vig-16-test/server/addons/purchase_stock/models/purchase.py", line 387, in write
    moves.write({'price_unit': line._get_stock_move_price_unit()})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 73, in _get_stock_move_price_unit
    self.price_unit = price
    File "/vig-16-test/server/odoo/fields.py", line 1320, in set
    records.write({self.name: write_value})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 139, in write
    res = super().write(vals)
    File "/vig-16-test/server/addons/purchase_stock/models/purchase.py", line 387, in write
    moves.write({'price_unit': line._get_stock_move_price_unit()})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 73, in _get_stock_move_price_unit
    self.price_unit = price
    File "/vig-16-test/server/odoo/fields.py", line 1320, in set
    records.write({self.name: write_value})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 139, in write
    res = super().write(vals)
    File "/vig-16-test/server/addons/purchase_stock/models/purchase.py", line 387, in write
    moves.write({'price_unit': line._get_stock_move_price_unit()})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 73, in _get_stock_move_price_unit
    self.price_unit = price
    File "/vig-16-test/server/odoo/fields.py", line 1320, in set
    records.write({self.name: write_value})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 139, in write
    res = super().write(vals)
    File "/vig-16-test/server/addons/purchase_stock/models/purchase.py", line 387, in write
    moves.write({'price_unit': line._get_stock_move_price_unit()})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 73, in _get_stock_move_price_unit
    self.price_unit = price
    File "/vig-16-test/server/odoo/fields.py", line 1320, in set
    records.write({self.name: write_value})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 139, in write
    res = super().write(vals)
    File "/vig-16-test/server/addons/purchase_stock/models/purchase.py", line 387, in write
    moves.write({'price_unit': line._get_stock_move_price_unit()})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 73, in _get_stock_move_price_unit
    self.price_unit = price
    File "/vig-16-test/server/odoo/fields.py", line 1320, in set
    records.write({self.name: write_value})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 139, in write
    res = super().write(vals)
    File "/vig-16-test/server/addons/purchase_stock/models/purchase.py", line 387, in write
    moves.write({'price_unit': line._get_stock_move_price_unit()})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 73, in _get_stock_move_price_unit
    self.price_unit = price
    File "/vig-16-test/server/odoo/fields.py", line 1320, in set
    records.write({self.name: write_value})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 139, in write
    res = super().write(vals)
    File "/vig-16-test/server/addons/purchase_stock/models/purchase.py", line 387, in write
    moves.write({'price_unit': line._get_stock_move_price_unit()})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 73, in _get_stock_move_price_unit
    self.price_unit = price
    File "/vig-16-test/server/odoo/fields.py", line 1320, in set
    records.write({self.name: write_value})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 139, in write
    res = super().write(vals)
    File "/vig-16-test/server/addons/purchase_stock/models/purchase.py", line 387, in write
    moves.write({'price_unit': line._get_stock_move_price_unit()})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 73, in _get_stock_move_price_unit
    self.price_unit = price
    File "/vig-16-test/server/odoo/fields.py", line 1320, in set
    records.write({self.name: write_value})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 139, in write
    res = super().write(vals)
    File "/vig-16-test/server/addons/purchase_stock/models/purchase.py", line 387, in write
    moves.write({'price_unit': line._get_stock_move_price_unit()})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 73, in _get_stock_move_price_unit
    self.price_unit = price
    File "/vig-16-test/server/odoo/fields.py", line 1320, in set
    records.write({self.name: write_value})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 139, in write
    res = super().write(vals)
    File "/vig-16-test/server/addons/purchase_stock/models/purchase.py", line 387, in write
    moves.write({'price_unit': line._get_stock_move_price_unit()})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 73, in _get_stock_move_price_unit
    self.price_unit = price
    File "/vig-16-test/server/odoo/fields.py", line 1320, in set
    records.write({self.name: write_value})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 139, in write
    res = super().write(vals)
    File "/vig-16-test/server/addons/purchase_stock/models/purchase.py", line 387, in write
    moves.write({'price_unit': line._get_stock_move_price_unit()})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 73, in _get_stock_move_price_unit
    self.price_unit = price
    File "/vig-16-test/server/odoo/fields.py", line 1320, in set
    records.write({self.name: write_value})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 139, in write
    res = super().write(vals)
    File "/vig-16-test/server/addons/purchase_stock/models/purchase.py", line 387, in write
    moves.write({'price_unit': line._get_stock_move_price_unit()})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 73, in _get_stock_move_price_unit
    self.price_unit = price
    File "/vig-16-test/server/odoo/fields.py", line 1320, in set
    records.write({self.name: write_value})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 139, in write
    res = super().write(vals)
    File "/vig-16-test/server/addons/purchase_stock/models/purchase.py", line 387, in write
    moves.write({'price_unit': line._get_stock_move_price_unit()})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 73, in _get_stock_move_price_unit
    self.price_unit = price
    File "/vig-16-test/server/odoo/fields.py", line 1320, in set
    records.write({self.name: write_value})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 139, in write
    res = super().write(vals)
    File "/vig-16-test/server/addons/purchase_stock/models/purchase.py", line 387, in write
    moves.write({'price_unit': line._get_stock_move_price_unit()})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 73, in _get_stock_move_price_unit
    self.price_unit = price
    File "/vig-16-test/server/odoo/fields.py", line 1320, in set
    records.write({self.name: write_value})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 139, in write
    res = super().write(vals)
    File "/vig-16-test/server/addons/purchase_stock/models/purchase.py", line 387, in write
    moves.write({'price_unit': line._get_stock_move_price_unit()})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 73, in _get_stock_move_price_unit
    self.price_unit = price
    File "/vig-16-test/server/odoo/fields.py", line 1320, in set
    records.write({self.name: write_value})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 139, in write
    res = super().write(vals)
    File "/vig-16-test/server/addons/purchase_stock/models/purchase.py", line 387, in write
    moves.write({'price_unit': line._get_stock_move_price_unit()})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 73, in _get_stock_move_price_unit
    self.price_unit = price
    File "/vig-16-test/server/odoo/fields.py", line 1320, in set
    records.write({self.name: write_value})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 139, in write
    res = super().write(vals)
    File "/vig-16-test/server/addons/purchase_stock/models/purchase.py", line 387, in write
    moves.write({'price_unit': line._get_stock_move_price_unit()})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 73, in _get_stock_move_price_unit
    self.price_unit = price
    File "/vig-16-test/server/odoo/fields.py", line 1320, in set
    records.write({self.name: write_value})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 139, in write
    res = super().write(vals)
    File "/vig-16-test/server/addons/purchase_stock/models/purchase.py", line 387, in write
    moves.write({'price_unit': line._get_stock_move_price_unit()})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 73, in _get_stock_move_price_unit
    self.price_unit = price
    File "/vig-16-test/server/odoo/fields.py", line 1320, in set
    records.write({self.name: write_value})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 139, in write
    res = super().write(vals)
    File "/vig-16-test/server/addons/purchase_stock/models/purchase.py", line 387, in write
    moves.write({'price_unit': line._get_stock_move_price_unit()})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 73, in _get_stock_move_price_unit
    self.price_unit = price
    File "/vig-16-test/server/odoo/fields.py", line 1320, in set
    records.write({self.name: write_value})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 139, in write
    res = super().write(vals)
    File "/vig-16-test/server/addons/purchase_stock/models/purchase.py", line 387, in write
    moves.write({'price_unit': line._get_stock_move_price_unit()})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 73, in _get_stock_move_price_unit
    self.price_unit = price
    File "/vig-16-test/server/odoo/fields.py", line 1320, in set
    records.write({self.name: write_value})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 139, in write
    res = super().write(vals)
    File "/vig-16-test/server/addons/purchase_stock/models/purchase.py", line 387, in write
    moves.write({'price_unit': line._get_stock_move_price_unit()})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 73, in _get_stock_move_price_unit
    self.price_unit = price
    File "/vig-16-test/server/odoo/fields.py", line 1320, in set
    records.write({self.name: write_value})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 139, in write
    res = super().write(vals)
    File "/vig-16-test/server/addons/purchase_stock/models/purchase.py", line 387, in write
    moves.write({'price_unit': line._get_stock_move_price_unit()})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 73, in _get_stock_move_price_unit
    self.price_unit = price
    File "/vig-16-test/server/odoo/fields.py", line 1320, in set
    records.write({self.name: write_value})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 139, in write
    res = super().write(vals)
    File "/vig-16-test/server/addons/purchase_stock/models/purchase.py", line 387, in write
    moves.write({'price_unit': line._get_stock_move_price_unit()})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 73, in _get_stock_move_price_unit
    self.price_unit = price
    File "/vig-16-test/server/odoo/fields.py", line 1320, in set
    records.write({self.name: write_value})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 139, in write
    res = super().write(vals)
    File "/vig-16-test/server/addons/purchase_stock/models/purchase.py", line 387, in write
    moves.write({'price_unit': line._get_stock_move_price_unit()})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 73, in _get_stock_move_price_unit
    self.price_unit = price
    File "/vig-16-test/server/odoo/fields.py", line 1320, in set
    records.write({self.name: write_value})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 139, in write
    res = super().write(vals)
    File "/vig-16-test/server/addons/purchase_stock/models/purchase.py", line 387, in write
    moves.write({'price_unit': line._get_stock_move_price_unit()})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 73, in _get_stock_move_price_unit
    self.price_unit = price
    File "/vig-16-test/server/odoo/fields.py", line 1320, in set
    records.write({self.name: write_value})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 139, in write
    res = super().write(vals)
    File "/vig-16-test/server/addons/purchase_stock/models/purchase.py", line 387, in write
    moves.write({'price_unit': line._get_stock_move_price_unit()})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 73, in _get_stock_move_price_unit
    self.price_unit = price
    File "/vig-16-test/server/odoo/fields.py", line 1320, in set
    records.write({self.name: write_value})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 139, in write
    res = super().write(vals)
    File "/vig-16-test/server/addons/purchase_stock/models/purchase.py", line 387, in write
    moves.write({'price_unit': line._get_stock_move_price_unit()})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 73, in _get_stock_move_price_unit
    self.price_unit = price
    File "/vig-16-test/server/odoo/fields.py", line 1320, in set
    records.write({self.name: write_value})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 139, in write
    res = super().write(vals)
    File "/vig-16-test/server/addons/purchase_stock/models/purchase.py", line 387, in write
    moves.write({'price_unit': line._get_stock_move_price_unit()})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 73, in _get_stock_move_price_unit
    self.price_unit = price
    File "/vig-16-test/server/odoo/fields.py", line 1320, in set
    records.write({self.name: write_value})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 139, in write
    res = super().write(vals)
    File "/vig-16-test/server/addons/purchase_stock/models/purchase.py", line 387, in write
    moves.write({'price_unit': line._get_stock_move_price_unit()})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 73, in _get_stock_move_price_unit
    self.price_unit = price
    File "/vig-16-test/server/odoo/fields.py", line 1320, in set
    records.write({self.name: write_value})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 139, in write
    res = super().write(vals)
    File "/vig-16-test/server/addons/purchase_stock/models/purchase.py", line 387, in write
    moves.write({'price_unit': line._get_stock_move_price_unit()})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 73, in _get_stock_move_price_unit
    self.price_unit = price
    File "/vig-16-test/server/odoo/fields.py", line 1320, in set
    records.write({self.name: write_value})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 139, in write
    res = super().write(vals)
    File "/vig-16-test/server/addons/purchase_stock/models/purchase.py", line 387, in write
    moves.write({'price_unit': line._get_stock_move_price_unit()})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 73, in _get_stock_move_price_unit
    self.price_unit = price
    File "/vig-16-test/server/odoo/fields.py", line 1320, in set
    records.write({self.name: write_value})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 139, in write
    res = super().write(vals)
    File "/vig-16-test/server/addons/purchase_stock/models/purchase.py", line 387, in write
    moves.write({'price_unit': line._get_stock_move_price_unit()})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 73, in _get_stock_move_price_unit
    self.price_unit = price
    File "/vig-16-test/server/odoo/fields.py", line 1320, in set
    records.write({self.name: write_value})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 139, in write
    res = super().write(vals)
    File "/vig-16-test/server/addons/purchase_stock/models/purchase.py", line 387, in write
    moves.write({'price_unit': line._get_stock_move_price_unit()})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 73, in _get_stock_move_price_unit
    self.price_unit = price
    File "/vig-16-test/server/odoo/fields.py", line 1320, in set
    records.write({self.name: write_value})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 139, in write
    res = super().write(vals)
    File "/vig-16-test/server/addons/purchase_stock/models/purchase.py", line 387, in write
    moves.write({'price_unit': line._get_stock_move_price_unit()})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 73, in _get_stock_move_price_unit
    self.price_unit = price
    File "/vig-16-test/server/odoo/fields.py", line 1320, in set
    records.write({self.name: write_value})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 139, in write
    res = super().write(vals)
    File "/vig-16-test/server/addons/purchase_stock/models/purchase.py", line 387, in write
    moves.write({'price_unit': line._get_stock_move_price_unit()})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 73, in _get_stock_move_price_unit
    self.price_unit = price
    File "/vig-16-test/server/odoo/fields.py", line 1320, in set
    records.write({self.name: write_value})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 139, in write
    res = super().write(vals)
    File "/vig-16-test/server/addons/purchase_stock/models/purchase.py", line 387, in write
    moves.write({'price_unit': line._get_stock_move_price_unit()})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 73, in _get_stock_move_price_unit
    self.price_unit = price
    File "/vig-16-test/server/odoo/fields.py", line 1320, in set
    records.write({self.name: write_value})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 139, in write
    res = super().write(vals)
    File "/vig-16-test/server/addons/purchase_stock/models/purchase.py", line 387, in write
    moves.write({'price_unit': line._get_stock_move_price_unit()})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 73, in _get_stock_move_price_unit
    self.price_unit = price
    File "/vig-16-test/server/odoo/fields.py", line 1320, in set
    records.write({self.name: write_value})
    ...
    File "/vig-16-test/server/addons/purchase_stock/models/purchase.py", line 387, in write
    moves.write({'price_unit': line._get_stock_move_price_unit()})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 73, in _get_stock_move_price_unit
    self.price_unit = price
    File "/vig-16-test/server/odoo/fields.py", line 1320, in set
    records.write({self.name: write_value})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 139, in write
    res = super().write(vals)
    File "/vig-16-test/server/addons/purchase_stock/models/purchase.py", line 387, in write
    moves.write({'price_unit': line._get_stock_move_price_unit()})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 73, in _get_stock_move_price_unit
    self.price_unit = price
    File "/vig-16-test/server/odoo/fields.py", line 1320, in set
    records.write({self.name: write_value})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 139, in write
    res = super().write(vals)
    File "/vig-16-test/server/addons/purchase_stock/models/purchase.py", line 387, in write
    moves.write({'price_unit': line._get_stock_move_price_unit()})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 73, in _get_stock_move_price_unit
    self.price_unit = price
    File "/vig-16-test/server/odoo/fields.py", line 1320, in set
    records.write({self.name: write_value})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 139, in write
    res = super().write(vals)
    File "/vig-16-test/server/addons/purchase_stock/models/purchase.py", line 387, in write
    moves.write({'price_unit': line._get_stock_move_price_unit()})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 73, in _get_stock_move_price_unit
    self.price_unit = price
    File "/vig-16-test/server/odoo/fields.py", line 1320, in set
    records.write({self.name: write_value})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 139, in write
    res = super().write(vals)
    File "/vig-16-test/server/addons/purchase_stock/models/purchase.py", line 387, in write
    moves.write({'price_unit': line._get_stock_move_price_unit()})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 73, in _get_stock_move_price_unit
    self.price_unit = price
    File "/vig-16-test/server/odoo/fields.py", line 1320, in set
    records.write({self.name: write_value})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 139, in write
    res = super().write(vals)
    File "/vig-16-test/server/addons/purchase_stock/models/purchase.py", line 387, in write
    moves.write({'price_unit': line._get_stock_move_price_unit()})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 73, in _get_stock_move_price_unit
    self.price_unit = price
    File "/vig-16-test/server/odoo/fields.py", line 1320, in set
    records.write({self.name: write_value})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 139, in write
    res = super().write(vals)
    File "/vig-16-test/server/addons/purchase_stock/models/purchase.py", line 387, in write
    moves.write({'price_unit': line._get_stock_move_price_unit()})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 73, in _get_stock_move_price_unit
    self.price_unit = price
    File "/vig-16-test/server/odoo/fields.py", line 1320, in set
    records.write({self.name: write_value})
    File "/vig-16-test/custom/3rdparty/purchase_discount/models/purchase_order.py", line 139, in write
    res = super().write(vals)
    File "/vig-16-test/server/addons/purchase_stock/models/purchase.py", line 382, in write
    result = super(PurchaseOrderLine, self).write(values)
    File "/vig-16-test/server/addons/purchase/models/purchase.py", line 1129, in write
    return super(PurchaseOrderLine, self).write(values)
    File "/vig-16-test/server/addons/analytic/models/analytic_mixin.py", line 76, in write
    return super().write(vals)
    File "/vig-16-test/server/odoo/models.py", line 3656, in write
    self.check_access_rights('write')
    File "/vig-16-test/server/odoo/models.py", line 3442, in check_access_rights
    return self.env['ir.model.access'].check(self._name, operation, raise_exception)
    File "/vig-16-test/server/odoo/addons/base/models/ir_model.py", line 1846, in check
    has_access = model in self._get_allowed_models(mode)
    File "", line 2, in _get_allowed_models
    File "/vig-16-test/server/odoo/tools/cache.py", line 85, in lookup
    r = d[key]
    File "", line 2, in getitem
    File "/vig-16-test/server/odoo/tools/func.py", line 86, in locked
    with getattr(inst, lock_attr):
    RecursionError: maximum recursion depth exceeded while calling a Python object

The above server error caused the following client error:
RPC_ERROR: Odoo Server Error
at makeErrorFromResponse (https://vigotec-test.callista.be/web/assets/447-d026302/web.assets_backend.min.js:977:163)
at XMLHttpRequest. (https://vigotec-test.callista.be/web/assets/447-d026302/web.assets_backend.min.js:985:13)`

Current behavior
Stacktrace appears on confirmation of the purchase order.

Expected behavior
Purchase Order is confirmed after confirmation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant