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

[17.0] product_variant_sale_price: opening product form in ecommerce gives error #367

Open
elmeriniemela opened this issue Sep 23, 2024 · 2 comments
Labels

Comments

@elmeriniemela
Copy link

elmeriniemela commented Sep 23, 2024

Here is the error:

RPC_ERROR
Odoo Server Error
Traceback (most recent call last):
  File "/opt/odoo-test/odoo/odoo/http.py", line 1764, in _serve_db
    return service_model.retrying(self._serve_ir_http, self.env)
  File "/opt/odoo-test/odoo/odoo/service/model.py", line 133, in retrying
    result = func()
  File "/opt/odoo-test/odoo/odoo/http.py", line 1791, in _serve_ir_http
    response = self.dispatcher.dispatch(rule.endpoint, args)
  File "/opt/odoo-test/odoo/odoo/http.py", line 1995, in dispatch
    result = self.request.registry['ir.http']._dispatch(endpoint)
  File "/opt/odoo-test/odoo/addons/website/models/ir_http.py", line 235, in _dispatch
    response = super()._dispatch(endpoint)
  File "/opt/odoo-test/odoo/odoo/addons/base/models/ir_http.py", line 222, in _dispatch
    result = endpoint(**request.params)
  File "/opt/odoo-test/odoo/odoo/http.py", line 741, in route_wrapper
    result = endpoint(self, *args, **params_ok)
  File "/opt/odoo-test/odoo/addons/website_sale_stock_wishlist/controllers/variant.py", line 13, in get_combination_info_website
    return super().get_combination_info_website(*args, **kwargs)
  File "/opt/odoo-test/odoo/odoo/http.py", line 741, in route_wrapper
    result = endpoint(self, *args, **params_ok)
  File "/opt/odoo-test/odoo/addons/website_sale_stock/controllers/variant.py", line 13, in get_combination_info_website
    return super().get_combination_info_website(*args, **kwargs)
  File "/opt/odoo-test/odoo/odoo/http.py", line 741, in route_wrapper
    result = endpoint(self, *args, **params_ok)
  File "/opt/odoo-test/odoo/addons/website_sale/controllers/variant.py", line 18, in get_combination_info_website
    combination_info = product_template._get_combination_info(
  File "/opt/odoo-test/addons/bundles/customer_addons/product_variant_sale_price/models/product_product.py", line 39, in _get_combination_info
    res = super()._get_combination_info(
TypeError: ProductTemplate._get_combination_info() takes from 1 to 6 positional arguments but 7 were given

The above server error caused the following client error:
RPC_ERROR: Odoo Server Error
    RPC_ERROR
        at makeErrorFromResponse (https://customer-test.sprintit.fi/web/assets/1/1db85ee/web.assets_frontend_lazy.min.js:4693:163)
        at XMLHttpRequest.<anonymous> (https://customer-test.sprintit.fi/web/assets/1/1db85ee/web.assets_frontend_lazy.min.js:4697:13)

Module

product_variant_sale_price

Describe the bug

opening product form in ecommerce gives error

To Reproduce

Affected versions: at least 17.0, did not test others

Steps to reproduce the behavior:

  1. Install module
  2. Go to webshop product form
  3. See error

Expected behavior
No error

Additional context
The root cause is that the module calls super with positional arguments.

image

@eikido18
Copy link

I got the same issue initially but not any more.
After i installed product variant configurator, it disappeared.
I don't know if this was the solution. I'm running Odoo 17.

@M4hd1BD
Copy link

M4hd1BD commented Nov 26, 2024

@elmeriniemela is the root cause positional argument or that the original method doesn't have the 'pricelist' argument anymore? See: https://github.com/odoo/odoo/blob/305eaa0f32d28cf8aee9ec83a350d3d84b074cf1/addons/website_sale/models/product_template.py#L338

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

No branches or pull requests

3 participants