Git Product home page Git Product logo

product-configurator's Introduction

Runboat Build Status codecov Translation Status

Product Configurator

Advanced Product Configurator, based on the Pledra project, https://github.com/pledra/odoo-product-configurator.

This repository supports Odoo versions 14.0 and later. For previous Odoo versions, please refer to the Pledra repository.

Available addons

addon version maintainers summary
product_configurator 14.0.1.4.0 PCatinean Base for product configuration interface modules
product_configurator_mrp 14.0.1.3.0 PCatinean BOM Support for configurable products
product_configurator_mrp_component 14.0.1.1.3 PCatinean BOM Support for configurable products
product_configurator_purchase 14.0.1.1.0 PCatinean Product configuration interface for Purchase
product_configurator_restriction_policy 14.0.1.0.0 Adds a Restriction Policy for processing restrictions.
product_configurator_sale 14.0.1.2.0 PCatinean Product configuration interface modules for Sale
product_configurator_sale_mrp 14.0.1.0.2 PCatinean BOM Support for sales wizard
product_configurator_stock 14.0.1.1.0 PCatinean Product configuration interface module for Stock
website_product_configurator 14.0.1.2.0 PCatinean Configure products in e-shop
website_product_configurator_mrp 14.0.1.0.0 PCatinean Website integration of MRP

Licenses

This repository is licensed under AGPL-3.0.

However, each module can have a totally different license, as long as they adhere to Odoo Community Association (OCA) policy. Consult each module's __manifest__.py file, which contains a license key that explains its license.


OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

product-configurator's People

Contributors

auneor avatar benjahe avatar bizzappdev avatar chandresh-osi avatar chandresh-serpentcs avatar csil300 avatar donatasv avatar dreispt avatar freni-osi avatar herczegp avatar luc-demeyer avatar matt454357 avatar max3903 avatar oca-git-bot avatar oca-transbot avatar oca-travis avatar patrickrwilson avatar pcatinean avatar pledrateam avatar sbidoul avatar tv-openbig avatar vimalpatelserpentcs avatar weblate avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

product-configurator's Issues

Custom Attributes on Configurable Components

Module

product_configuator_mrp_component

Describe the bug

When a product has custom attributes and configurable components, the configurable components must contain the same custom attributes as the parent product.

To Reproduce

14.0

Steps to reproduce the behavior:

  1. Create a product with a custom attribute
  2. Create a configurable component with no custom attributes
  3. Use configurator to configure parent product

Expected behavior
The configurator should recognize that the component does not require the custom attribute and disregard the custom values coming in.

Additional context
This should be fixed by disregarding custom attributes that do not apply to the component in the validate_configuration function.

product_configurator fails to upgrade after #11 was merged

The toggle_config method does not exists in product.product.

2021-05-17 10:15:25,295 24623 INFO 14-boti-0419 odoo.addons.base.models.ir_ui_view: toggle_config is not a valid action on product.product                                                                                                                                                                                                              View name: product.configurator.form.view.custom.vals
Error context:                                                                                                                                                               view: ir.ui.view(2890,)
 xmlid: product_form_view_custom_vals_inherit
 view.model: product.product
 view.parent: ir.ui.view(429,)
 file: /home/daniel/work14/bot/odoo-boti/src/third-party/product_configurator/views/product_view.xml

Dynamic BoM not working (or working as expected)

Recreate: Create configurable product -> add variant attributes -> create BoM -> add two lines that use "configuration set" to restrict the BoM upon variant creation -> configure product -> check new BoM created for variant (it is empty)

image

expected behavior: The new variant BoM should have created the components that matched the configuration set config of the master BoM.

[14.0] oca-product-configurator on runboat throws traceback with demo data

Traceback :
`Odoo Server Error
Traceback (most recent call last):
File "/opt/odoo/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
result = request.dispatch()
File "/opt/odoo/odoo/http.py", line 683, in dispatch
result = self._call_function(**self.params)
File "/opt/odoo/odoo/http.py", line 359, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/opt/odoo/odoo/service/model.py", line 94, in wrapper
return f(dbname, *args, **kwargs)
File "/opt/odoo/odoo/http.py", line 347, in checked_call
result = self.endpoint(*a, **kw)
File "/opt/odoo/odoo/http.py", line 912, in call
return self.method(*args, **kw)
File "/opt/odoo/odoo/http.py", line 531, in response_wrap
response = f(*args, **kw)
File "/opt/odoo/addons/web/controllers/main.py", line 1398, in call_button
action = self._call_kw(model, method, args, kwargs)
File "/opt/odoo/addons/web/controllers/main.py", line 1386, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/opt/odoo/odoo/api.py", line 399, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/opt/odoo/odoo/api.py", line 386, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "/mnt/data/odoo-addons-dir/product_configurator/wizard/product_configurator.py", line 917, in action_next_step
return self.action_config_done()
File "/mnt/data/odoo-addons-dir/product_configurator/wizard/product_configurator.py", line 1030, in action_config_done
self.config_session_id.action_confirm()
File "/mnt/data/odoo-addons-dir/product_configurator/models/product_config.py", line 497, in action_confirm
product_id = session.create_get_variant()
File "/mnt/data/odoo-addons-dir/product_configurator_mrp/models/product_config.py", line 132, in create_get_variant
self.create_get_bom(variant=variant, product_tmpl_id=self.product_tmpl_id)
File "/mnt/data/odoo-addons-dir/product_configurator_mrp_component/models/product_config.py", line 84, in create_get_bom
return super().create_get_bom(variant, product_tmpl_id=None, values=None)
File "/mnt/data/odoo-addons-dir/product_configurator_mrp/models/product_config.py", line 58, in create_get_bom
bom_line_vals, ["product_id", "product_qty"], specs
File "/opt/odoo/odoo/models.py", line 6214, in onchange
changed_values = {name: values[name] for name in names}
File "/opt/odoo/odoo/models.py", line 6214, in
changed_values = {name: values[name] for name in names}
Exception

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/opt/odoo/odoo/http.py", line 639, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/opt/odoo/odoo/http.py", line 315, in _handle_exception
raise exception.with_traceback(None) from new_cause
KeyError: 'product_qty'`

Module

product_configurator_mrp

Describe the bug

Traceback when

To Reproduce

Affected versions:

Steps to reproduce the behavior:
Go to runboat http://oca-product-configurator-14-0-pr65-ee3b1bf3c53a.runboat.odoo-community.org/web#id=42&action=408&model=product.template&view_type=form&cids=&menu_id=247

  1. go to CONFIGURATOR > TEMPLATES
  2. select '2 Series'
  3. push on button : configure product
  4. next - next ...

Result:

image

Expected behavior
No traceback

Additional context
Tested with standard demo data on runboat, no change of the data

Backend configurator refactoring

When this project started out the website module was not that mature and neither was qweb. This meant that the standard views were used with tons of hacks on fields_get and fields_view_get. It was already difficult to maintain but now with the website configurator gaining a lot more traction, keeping both in sync is a tedious and time consuming task.

As such the backend wizard should be refactored to load a qweb view that will be re-used in the frontend and drop the old design completely. Since we have to re-build logic from the backend to the frontend (onchanges, domain restrictions) we might as well just do it for the backend also and have less work alltogether.

[14.0][BUG] MRP: BoM created for variants ignores quantities

Module

product_configurator_mrp

Describe the bug

When a user configures a product with a master BoM, the variant gets created with it's own associated BoM however the quantities of the components seem to be ignored.

Operations are also ignored and should be copied over to the variant BoM.

Here is a simple BoM for the product template that has several components with quantities.
image

After configuring the product, the variant is created with it's BoM but the quantities are ignored and the default 1.0 are set.
image

You can see it doesn't matter if configuration sets are used or not, all components have a qty of 1 on the variant's BoM.

To Reproduce

Affected versions: 14.0 (I didn't check other versions)

Steps to reproduce the behavior:

  1. Create a configurable product.
  2. Create a BoM for the configurable product. Add component lines with and without configuration sets.
  3. Configure the product so it will create a variant and variant BoM.

Expected behavior
The variant's BoM components should contain the quantities that are specified in the product templates BoM. Below is a corrected screenshot of the expected output of the items explained in the description of the bug.
image

Additional context
This was discovered in v14 so it's unknown if this is an issue in other versions.

Migration to version 14.0

Todo

https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-14.0

Modules to migrate

[16.0] product_configurator: xml domain

Module

product_configurator

Describe the bug

Can't create rule from product.
`Traceback (most recent call last):
File "/opt/odoo/odoo/odoo/http.py", line 1633, in _serve_db
return service_model.retrying(self._serve_ir_http, self.env)
File "/opt/odoo/odoo/odoo/service/model.py", line 133, in retrying
result = func()
File "/opt/odoo/odoo/odoo/http.py", line 1660, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "/opt/odoo/odoo/odoo/http.py", line 1864, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "/opt/odoo/odoo/odoo/addons/base/models/ir_http.py", line 154, in _dispatch
result = endpoint(**request.params)
File "/opt/odoo/odoo/odoo/http.py", line 697, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "/opt/odoo/odoo/addons/web/controllers/dataset.py", line 42, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/opt/odoo/odoo/addons/web/controllers/dataset.py", line 33, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/opt/odoo/odoo/odoo/api.py", line 464, in call_kw
result = _call_kw_model(method, model, args, kwargs)
File "/opt/odoo/odoo/odoo/api.py", line 435, in _call_kw_model
result = method(recs, *args, **kwargs)
File "/opt/odoo/odoo/odoo/models.py", line 1617, in name_search
return self.browse(ids).sudo().name_get()
File "/opt/odoo/odoo/odoo/models.py", line 5140, in browse
if not ids:
File "/opt/odoo/odoo/odoo/tools/query.py", line 217, in bool
return bool(self._result)
File "/opt/odoo/odoo/odoo/tools/func.py", line 28, in get
value = self.fget(obj)
File "/opt/odoo/odoo/odoo/tools/query.py", line 210, in _result
self._cr.execute(query_str, params)
File "/opt/odoo/odoo/odoo/sql_db.py", line 321, in execute
res = self._obj.execute(query, params)
psycopg2.errors.DatatypeMismatch: ARRAY types integer and boolean cannot be matched
LINE 1: ...= true) AND ("product_attribute"."id" in (ARRAY[6,false,ARRA...
^

The above server error caused the following client error:
RPC_ERROR: Odoo Server Error
RPCError@http://localhost:8069/web/assets/1750-aec1d4e/web.assets_backend.min.js:997:274
makeErrorFromResponse@http://localhost:8069/web/assets/1750-aec1d4e/web.assets_backend.min.js:1001:163
jsonrpc/promise</<@http://localhost:8069/web/assets/1750-aec1d4e/web.assets_backend.min.js:1009:34`

To Reproduce

16.0:

Steps to reproduce the behavior:

  1. Go to configurable product -> section Configurator
  2. Create new configuration restriction with new Restriction (don't use existing one, but this issue can be with existing rule too)
  3. Go to restriction and try to create Rule.
  4. If restriction and rule are created from separate menu (not product), works correctly.

Expected behavior
Should be allowed to create Restriction Rule.

Additional context
It happens because of the domain on field declaration and xml file:
domain=lambda self: self._compute_attribute_id_domain()
domain="[('id', 'in', context.get('product_attribute_ids', []))]"
Domains are duplicated and the one in xml is not working.

Product Configurator module installation getting error with Odoo v.15.0

When i try to install Product Configurator (product_configurator) module, i am getting these errors. I am using Odoo v.15.0.

Is it compitiable this module with v.15.0?

Traceback (most recent call last):
  File "/opt/odoo/odoo-server/odoo/tools/cache.py", line 85, in lookup
    r = d[key]
  File "/opt/odoo/odoo-server/odoo/tools/func.py", line 71, in wrapper
    return func(self, *args, **kwargs)
  File "/opt/odoo/odoo-server/odoo/tools/lru.py", line 34, in __getitem__
    a = self.d[obj]
KeyError: ('ir.model.data', <function IrModelData._xmlid_lookup at 0x7fe7bec28700>, 'web.assets_backend')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/odoo/odoo-server/odoo/tools/convert.py", line 680, in _tag_root
    f(rec)
  File "/opt/odoo/odoo-server/odoo/tools/convert.py", line 658, in _tag_template
    return self._tag_record(record)
  File "/opt/odoo/odoo-server/odoo/tools/convert.py", line 567, in _tag_record
    f_val = self.id_get(f_ref)
  File "/opt/odoo/odoo-server/odoo/tools/convert.py", line 663, in id_get
    res = self.model_id_get(id_str, raise_if_not_found)
  File "/opt/odoo/odoo-server/odoo/tools/convert.py", line 669, in model_id_get
    return self.env['ir.model.data']._xmlid_to_res_model_res_id(id_str, raise_if_not_found=raise_if_not_found)
  File "/opt/odoo/odoo-server/odoo/addons/base/models/ir_model.py", line 1935, in _xmlid_to_res_model_res_id
    return self._xmlid_lookup(xmlid)[1:3]
  File "<decorator-gen-35>", line 2, in _xmlid_lookup
  File "/opt/odoo/odoo-server/odoo/tools/cache.py", line 90, in lookup
    value = d[key] = self.method(*args, **kwargs)
  File "/opt/odoo/odoo-server/odoo/addons/base/models/ir_model.py", line 1928, in _xmlid_lookup
    raise ValueError('External ID not found in the system: %s' % xmlid)
ValueError: External ID not found in the system: web.assets_backend

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/odoo/odoo-server/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
    result = request.dispatch()
  File "/opt/odoo/odoo-server/odoo/http.py", line 687, in dispatch
    result = self._call_function(**self.params)
  File "/opt/odoo/odoo-server/odoo/http.py", line 359, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/opt/odoo/odoo-server/odoo/service/model.py", line 94, in wrapper
    return f(dbname, *args, **kwargs)
  File "/opt/odoo/odoo-server/odoo/http.py", line 348, in checked_call
    result = self.endpoint(*a, **kw)
  File "/opt/odoo/odoo-server/odoo/http.py", line 916, in __call__
    return self.method(*args, **kw)
  File "/opt/odoo/odoo-server/odoo/http.py", line 535, in response_wrap
    response = f(*args, **kw)
  File "/opt/odoo/enterprise/addons/web/controllers/main.py", line 1352, in call_button
    action = self._call_kw(model, method, args, kwargs)
  File "/opt/odoo/enterprise/addons/web/controllers/main.py", line 1340, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/opt/odoo/odoo-server/odoo/api.py", line 464, in call_kw
    result = _call_kw_multi(method, model, args, kwargs)
  File "/opt/odoo/odoo-server/odoo/api.py", line 451, in _call_kw_multi
    result = method(recs, *args, **kwargs)
  File "<decorator-gen-74>", line 2, in button_immediate_install
  File "/opt/odoo/odoo-server/odoo/addons/base/models/ir_module.py", line 74, in check_and_log
    return method(self, *args, **kwargs)
  File "/opt/odoo/odoo-server/odoo/addons/base/models/ir_module.py", line 483, in button_immediate_install
    return self._button_immediate_function(type(self).button_install)
  File "/opt/odoo/odoo-server/odoo/addons/base/models/ir_module.py", line 600, in _button_immediate_function
    registry = modules.registry.Registry.new(self._cr.dbname, update_module=True)
  File "/opt/odoo/odoo-server/odoo/modules/registry.py", line 87, in new
    odoo.modules.load_modules(registry, force_demo, status, update_module)
  File "/opt/odoo/odoo-server/odoo/modules/loading.py", line 474, in load_modules
    processed_modules += load_marked_modules(cr, graph,
  File "/opt/odoo/odoo-server/odoo/modules/loading.py", line 363, in load_marked_modules
    loaded, processed = load_module_graph(
  File "/opt/odoo/odoo-server/odoo/modules/loading.py", line 222, in load_module_graph
    load_data(cr, idref, mode, kind='data', package=package)
  File "/opt/odoo/odoo-server/odoo/modules/loading.py", line 69, in load_data
    tools.convert_file(cr, package.name, filename, idref, mode, noupdate, kind)
  File "/opt/odoo/odoo-server/odoo/tools/convert.py", line 745, in convert_file
    convert_xml_import(cr, module, fp, idref, mode, noupdate)
  File "/opt/odoo/odoo-server/odoo/tools/convert.py", line 811, in convert_xml_import
    obj.parse(doc.getroot())
  File "/opt/odoo/odoo-server/odoo/tools/convert.py", line 731, in parse
    self._tag_root(de)
  File "/opt/odoo/odoo-server/odoo/tools/convert.py", line 693, in _tag_root
    raise ParseError('while parsing %s:%s, somewhere inside\n%s' % (
Exception

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/odoo/odoo-server/odoo/http.py", line 643, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/opt/odoo/odoo-server/odoo/http.py", line 301, in _handle_exception
    raise exception.with_traceback(None) from new_cause
odoo.tools.convert.ParseError: while parsing None:8, somewhere inside
<data name="Product Configurator Assets" inherit_id="web.assets_backend">
        <xpath expr="." position="inside">
            <link rel="stylesheet" type="text/scss" href="/product_configurator/static/scss/form_widget.scss"/>
            <script type="text/javascript" src="/product_configurator/static/js/form_widgets.js"/>
            <script type="text/javascript" src="/product_configurator/static/js/data_manager.js"/>
            <script type="text/javascript" src="/product_configurator/static/js/relational_fields.js"/>
        </xpath>
    </data>

[14.0, 16.0][BUG] Custom values lost

Module

  • product_configurator (for the structure definition).
  • website_product_configurator (generate the problem)

Describe the bug

In the product_configurator module, the model product.config.session.custom.value is created to store the custom value introduced by user during the config session.
In the website_product_configurator module, the cron "Delete inactive config-sessions" delete the session without update since 3 days.
=> So if we have configurator with custom value in the website, the custom values are lost 3 days after the configuration.

To Reproduce

Affected versions: 14.0, 16.0

Steps to reproduce the behavior:

  1. install website_product_configurator
  2. create a configurable product with custom values
  3. configure the product in a sale order (from the sale order or from the website, the result is the same)
  4. wait for 3 days (or modifie the write_date of the new product.config.session)
    => The session is deleted and the custom values are lost for this sale order

Expected behavior
Keep the custom value for this order.

Possible solutions

  1. Archive the cron
    or,
  2. Store the custom values on the sale order line as Odoo do from v12 with the model product.attribute.custom.value
    => in addition, I would like to discuss the possibility to override the Odoo model product.attribute.custom.value instead (or in addition) of using product.config.session.custom.value (maybe juste for the migration to v16)

Best regards

Configuration session refactoring

Having a configuration session stored in the database is mandatory especially with more advanced cases i.e complex configurations. However having draft sessions (incomplete sessions from backend or frontend public user) stored in the database is not that good of a design. For one it puts high strain on the database (every change from every public user in the frontend triggers first a creation of a session and subsequently a write in the config session / db). Second, cleaning up these sessions from the database as the volumes increase causes a lot of issues.

A refactoring is in order to transfer at least the draft configuration sessions to http sessions and manage domain restrictions / validation / price computation etc without the use of database persistence.

Error shown when product has not configuration steps and user clicks 'configure' button

Reproducing Steps:
Create a new configurable product.
Add attributes in the variants tab.
Click the 'Configure Product' button.

The following error shows:

File "C:\Odoo\Odoo 14.0e\server\odoo\addons\product_configurator\wizard\product_configurator.py", line 670, in prepare_attrs_initial
return attrs, field_name, custom_field, config_steps, cfg_step_ids
Exception

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "C:\Odoo\Odoo 14.0e\server\odoo\http.py", line 639, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "C:\Odoo\Odoo 14.0e\server\odoo\http.py", line 315, in _handle_exception
raise exception.with_traceback(None) from new_cause
UnboundLocalError: local variable 'cfg_step_ids' referenced before assignment

Website Product Configurator error message

QWeb
Error message:

Error to render compiling AST
MissingError: Record does not exist or has been deleted.
(Record: product.product(45315,), User: 14)
Template: website_product_configurator.cfg_product
Path: /t/t[1]
Node:

The error occured while rendering the template website_product_configurator.cfg_product and evaluating the following expression:

Traceback
Traceback (most recent call last):
File "/home/odoo/src/odoo/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
result = request.dispatch()
File "/home/odoo/src/odoo/odoo/http.py", line 806, in dispatch
r = self._call_function(**self.params)
File "/home/odoo/src/odoo/odoo/http.py", line 359, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/home/odoo/src/odoo/odoo/service/model.py", line 94, in wrapper
return f(dbname, *args, **kwargs)
File "/home/odoo/src/odoo/odoo/http.py", line 350, in checked_call
result.flatten()
File "/home/odoo/src/odoo/odoo/http.py", line 1242, in flatten
self.response.append(self.render())
File "/home/odoo/src/odoo/odoo/http.py", line 1235, in render
return env["ir.ui.view"]._render_template(self.template, self.qcontext)
File "/home/odoo/src/odoo/odoo/addons/base/models/ir_ui_view.py", line 1709, in _render_template
return self.browse(self.get_view_id(template))._render(values, engine)
File "/home/odoo/src/odoo/addons/website/models/ir_ui_view.py", line 411, in _render
return super(View, self)._render(values, engine=engine, minimal_qcontext=minimal_qcontext)
File "/home/odoo/src/odoo/addons/web_editor/models/ir_ui_view.py", line 28, in _render
return super(IrUiView, self)._render(values=values, engine=engine, minimal_qcontext=minimal_qcontext)
File "/home/odoo/src/odoo/odoo/addons/base/models/ir_ui_view.py", line 1717, in _render
return self.env[engine]._render(self.id, qcontext)
File "/home/odoo/src/enterprise/web_studio/models/ir_qweb.py", line 44, in _render
return super(IrQWeb, self)._render(template, values=values, **options)
File "/home/odoo/src/odoo/odoo/addons/base/models/ir_qweb.py", line 55, in _render
result = super(IrQWeb, self)._render(id_or_xml_id, values=values, **context)
File "/home/odoo/src/odoo/odoo/addons/base/models/qweb.py", line 258, in _render
self.compile(template, options)(self, body.append, values or {})
File "/home/odoo/src/odoo/odoo/addons/base/models/qweb.py", line 338, in _compiled_fn
raise QWebException("Error to render compiling AST", e, path, node and etree.tostring(node[0], encoding='unicode'), name)
Exception

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/home/odoo/src/odoo/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
result = request.dispatch()
File "/home/odoo/src/odoo/odoo/http.py", line 806, in dispatch
r = self._call_function(**self.params)
File "/home/odoo/src/odoo/odoo/http.py", line 359, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/home/odoo/src/odoo/odoo/service/model.py", line 94, in wrapper
return f(dbname, *args, **kwargs)
File "/home/odoo/src/odoo/odoo/http.py", line 350, in checked_call
result.flatten()
File "/home/odoo/src/odoo/odoo/http.py", line 1242, in flatten
self.response.append(self.render())
File "/home/odoo/src/odoo/odoo/http.py", line 1235, in render
return env["ir.ui.view"]._render_template(self.template, self.qcontext)
File "/home/odoo/src/odoo/odoo/addons/base/models/ir_ui_view.py", line 1709, in _render_template
return self.browse(self.get_view_id(template))._render(values, engine)
File "/home/odoo/src/odoo/addons/website/models/ir_ui_view.py", line 411, in _render
return super(View, self)._render(values, engine=engine, minimal_qcontext=minimal_qcontext)
File "/home/odoo/src/odoo/addons/web_editor/models/ir_ui_view.py", line 28, in _render
return super(IrUiView, self)._render(values=values, engine=engine, minimal_qcontext=minimal_qcontext)
File "/home/odoo/src/odoo/odoo/addons/base/models/ir_ui_view.py", line 1717, in _render
return self.env[engine]._render(self.id, qcontext)
File "/home/odoo/src/enterprise/web_studio/models/ir_qweb.py", line 44, in _render
return super(IrQWeb, self)._render(template, values=values, **options)
File "/home/odoo/src/odoo/odoo/addons/base/models/ir_qweb.py", line 55, in _render
result = super(IrQWeb, self)._render(id_or_xml_id, values=values, **context)
File "/home/odoo/src/odoo/odoo/addons/base/models/qweb.py", line 258, in _render
self.compile(template, options)(self, body.append, values or {})
File "/home/odoo/src/odoo/odoo/addons/base/models/qweb.py", line 338, in _compiled_fn
raise QWebException("Error to render compiling AST", e, path, node and etree.tostring(node[0], encoding='unicode'), name)
odoo.addons.base.models.qweb.QWebException: Record does not exist or has been deleted.
(Record: product.product(45315,), User: 14)
Traceback (most recent call last):
File "/home/odoo/src/odoo/odoo/api.py", line 790, in get
return field_cache[record._ids[0]]
KeyError: 45315

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/odoo/src/odoo/odoo/fields.py", line 970, in get
value = env.cache.get(record, self)
File "/home/odoo/src/odoo/odoo/api.py", line 793, in get
raise CacheMiss(record, field)
odoo.exceptions.CacheMiss: 'product.product(45315,).list_price'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/odoo/src/odoo/odoo/api.py", line 790, in get
return field_cache[record._ids[0]]
KeyError: 45315

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/odoo/src/odoo/odoo/fields.py", line 970, in get
value = env.cache.get(record, self)
File "/home/odoo/src/odoo/odoo/api.py", line 793, in get
raise CacheMiss(record, field)
odoo.exceptions.CacheMiss: 'product.product(45315,).product_tmpl_id'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/odoo/src/odoo/odoo/fields.py", line 1019, in get
self.compute_value(recs)
File "/home/odoo/src/odoo/odoo/fields.py", line 1175, in compute_value
records._compute_field_value(self)
File "/home/odoo/src/odoo/addons/mail/models/mail_thread.py", line 410, in _compute_field_value
return super()._compute_field_value(field)
File "/home/odoo/src/odoo/odoo/models.py", line 4063, in _compute_field_value
field.compute(self)
File "/home/odoo/src/odoo/odoo/fields.py", line 541, in _compute_related
values = [first(value[name]) for value in values]
File "/home/odoo/src/odoo/odoo/fields.py", line 541, in
values = [first(value[name]) for value in values]
File "/home/odoo/src/odoo/odoo/models.py", line 5666, in getitem
return self._fields[key].get(self, type(self))
File "/home/odoo/src/odoo/odoo/fields.py", line 2483, in get
return super().get(records, owner)
File "/home/odoo/src/odoo/odoo/fields.py", line 1000, in get
raise MissingError("\n".join([
odoo.exceptions.MissingError: Record does not exist or has been deleted.
(Record: product.product(45315,), User: 14)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/odoo/src/odoo/odoo/api.py", line 790, in get
return field_cache[record._ids[0]]
KeyError: 45315

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/odoo/src/odoo/odoo/fields.py", line 970, in get
value = env.cache.get(record, self)
File "/home/odoo/src/odoo/odoo/api.py", line 793, in get
raise CacheMiss(record, field)
odoo.exceptions.CacheMiss: 'product.product(45315,).product_tmpl_id'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/odoo/src/odoo/odoo/addons/base/models/qweb.py", line 331, in _compiled_fn
return compiled(self, append, new, options, log)
File "", line 1, in template_website_product_configurator_cfg_product_419
File "/home/odoo/src/odoo/addons/website_sale_stock/models/product_template.py", line 20, in _get_combination_info
combination_info = super(ProductTemplate, self)._get_combination_info(
File "/home/odoo/src/odoo/addons/website_sale/models/product.py", line 284, in _get_combination_info
combination_info = super(ProductTemplate, self)._get_combination_info(
File "/home/odoo/src/user/variant_price_system/models/product_template.py", line 81, in _get_combination_info
list_price = product.price_compute('list_price')[product.id]
File "/home/odoo/src/user/variant_price_system/models/product_product.py", line 30, in price_compute
prices[product.id] = product[price_type] or 0.0
File "/home/odoo/src/odoo/odoo/models.py", line 5666, in getitem
return self._fields[key].get(self, type(self))
File "/home/odoo/src/odoo/odoo/fields.py", line 1021, in get
self.compute_value(record)
File "/home/odoo/src/odoo/odoo/fields.py", line 1175, in compute_value
records._compute_field_value(self)
File "/home/odoo/src/odoo/addons/mail/models/mail_thread.py", line 410, in _compute_field_value
return super()._compute_field_value(field)
File "/home/odoo/src/odoo/odoo/models.py", line 4063, in _compute_field_value
field.compute(self)
File "/home/odoo/src/odoo/odoo/fields.py", line 541, in _compute_related
values = [first(value[name]) for value in values]
File "/home/odoo/src/odoo/odoo/fields.py", line 541, in
values = [first(value[name]) for value in values]
File "/home/odoo/src/odoo/odoo/models.py", line 5666, in getitem
return self._fields[key].get(self, type(self))
File "/home/odoo/src/odoo/odoo/fields.py", line 2483, in get
return super().get(records, owner)
File "/home/odoo/src/odoo/odoo/fields.py", line 1000, in get
raise MissingError("\n".join([
odoo.exceptions.MissingError: Record does not exist or has been deleted.
(Record: product.product(45315,), User: 14)

Error to render compiling AST
MissingError: Record does not exist or has been deleted.
(Record: product.product(45315,), User: 14)
Template: website_product_configurator.cfg_product
Path: /t/t[1]
Node:

Product configurator Server error

product_configurator BUG

product_configurator module breaks the original weight field of product.product and product.template models. So all standard SQL reports (e.g. sale.report, purchase.report) where is used product weight works incorrectly

Module

product_configurator
`

Describe the bug

stored field weight turns to non stored

To Reproduce

Affected versions: 14.0

Steps to reproduce the behavior:

  1. Create a new test001 product with a weight of 10kg
    pic1

  2. Create a purchase order with product test001
    pic2

  3. Open standard purchase report
    pic3

Expected behavior
Gross Weight should be 10kg

Error when adding configuration restrictions on a product

Recreation:
Configurator -> Configuration Restrictions -> Add a line -> Configure a new Attribute line -> Save
image


Error:
Odoo Server Error

Traceback (most recent call last):
File "/opt/odoo/odoo-boti/odoo/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
result = request.dispatch()
File "/opt/odoo/odoo-boti/odoo/odoo/http.py", line 683, in dispatch
result = self._call_function(**self.params)
File "/opt/odoo/odoo-boti/odoo/odoo/http.py", line 359, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/opt/odoo/odoo-boti/odoo/odoo/service/model.py", line 94, in wrapper
return f(dbname, *args, **kwargs)
File "/opt/odoo/odoo-boti/odoo/odoo/http.py", line 347, in checked_call
result = self.endpoint(*a, **kw)
File "/opt/odoo/odoo-boti/odoo/odoo/http.py", line 912, in call
return self.method(*args, **kw)
File "/opt/odoo/odoo-boti/odoo/odoo/http.py", line 531, in response_wrap
response = f(*args, **kw)
File "/opt/odoo/odoo-boti/odoo/addons/web/controllers/main.py", line 1389, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/opt/odoo/odoo-boti/odoo/addons/web/controllers/main.py", line 1381, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/opt/odoo/odoo-boti/odoo/odoo/api.py", line 396, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/opt/odoo/odoo-boti/odoo/odoo/api.py", line 383, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "/opt/odoo/odoo-boti/odoo/addons/base_automation/models/base_automation.py", line 344, in write
write.origin(records, vals, **kw)
File "/opt/odoo/odoo-boti/odoo/addons/sale_timesheet/models/product.py", line 84, in write
return super(ProductTemplate, self).write(vals)
File "/opt/odoo/odoo-boti/odoo/addons/stock_account/models/product.py", line 50, in write
res = super(ProductTemplate, self).write(vals)
File "/opt/odoo/odoo-boti/src/third-party/product_configurator/models/product.py", line 345, in write
return super(ProductTemplate, self).write(vals)
File "/opt/odoo/odoo-boti/odoo/addons/mrp/models/product.py", line 38, in write
return super().write(values)
File "/opt/odoo/odoo-boti/odoo/addons/stock/models/product.py", line 769, in write
return super(ProductTemplate, self).write(vals)
File "/opt/odoo/odoo-boti/odoo/addons/product/models/product_template.py", line 427, in write
res = super(ProductTemplate, self).write(vals)
File "/opt/odoo/odoo-boti/odoo/addons/mail/models/mail_thread.py", line 322, in write
result = super(MailThread, self).write(values)
File "/opt/odoo/odoo-boti/odoo/addons/mail/models/mail_activity.py", line 766, in write
return super(MailActivityMixin, self).write(vals)
File "/opt/odoo/odoo-boti/odoo/odoo/models.py", line 3663, in write
field.write(self, vals[fname])
File "/opt/odoo/odoo-boti/odoo/odoo/fields.py", line 3043, in write
return self.write_batch([(records, value)])
File "/opt/odoo/odoo-boti/odoo/odoo/fields.py", line 3064, in write_batch
return self.write_real(records_commands_list, create)
File "/opt/odoo/odoo-boti/odoo/odoo/fields.py", line 3236, in write_real
flush()
File "/opt/odoo/odoo-boti/odoo/odoo/fields.py", line 3200, in flush
comodel.create(to_create)
File "/opt/odoo/odoo-venv/lib/python3.8/site-packages/decorator.py", line 232, in fun
return caller(func, *(extras + args), **kw)
File "/opt/odoo/odoo-boti/odoo/odoo/api.py", line 345, in _model_create_multi
return create(self, arg)
File "/opt/odoo/odoo-boti/odoo/odoo/addons/base/models/ir_fields.py", line 533, in create
recs = super().create(vals_list)
File "/opt/odoo/odoo-venv/lib/python3.8/site-packages/decorator.py", line 232, in fun
return caller(func, *(extras + args), **kw)
File "/opt/odoo/odoo-boti/odoo/odoo/api.py", line 345, in _model_create_multi
return create(self, arg)
File "/opt/odoo/odoo-boti/odoo/odoo/models.py", line 3868, in create
records = self._create(data_list)
File "/opt/odoo/odoo-boti/odoo/odoo/models.py", line 4026, in _create
field.create([
File "/opt/odoo/odoo-boti/odoo/odoo/fields.py", line 3038, in create
self.write_batch(record_values, True)
File "/opt/odoo/odoo-boti/odoo/odoo/fields.py", line 3064, in write_batch
return self.write_real(records_commands_list, create)
File "/opt/odoo/odoo-boti/odoo/odoo/fields.py", line 3632, in write_real
cr.execute(query, pairs)
File "/opt/odoo/odoo-venv/lib/python3.8/site-packages/decorator.py", line 232, in fun
return caller(func, *(extras + args), **kw)
File "/opt/odoo/odoo-boti/odoo/odoo/sql_db.py", line 101, in check
return f(self, *args, **kwargs)
File "/opt/odoo/odoo-boti/odoo/odoo/sql_db.py", line 298, in execute
res = self._obj.execute(query, params)
Exception

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/opt/odoo/odoo-boti/odoo/odoo/http.py", line 639, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/opt/odoo/odoo-boti/odoo/odoo/http.py", line 315, in handle_exception
raise exception.with_traceback(None) from new_cause
psycopg2.errors.UndefinedTable: relation "cfg_line_attr_val_id_rel" does not exist
LINE 1: INSERT INTO cfg_line_attr_val_id_rel (cfg_line_id, attr_val
...
^

Values in multiple configuration restrictions are hidden.

If you have multiple configuration restrictions, that share a common value the user should be able to choose, that value is omitted from the selectable options during configuration. This is because the code doesn't take into account if multiple restrictions are available for the same attribute.

Example:
The example below is to configure different types of bottles. You can see that depending on their 'container type' (Glass Bottle/Plastic Bottle/Can) It shows the type of cap that is available. If the value 'None' is added to multiple restriction values it will omit that value and make it not available to the user to select.

Note: In this example it's added to all three but it functions the same if it's just added to 2 of them.
image

You can see that the 'None' option doesn't show for any of the selections.
image

Ideally, it should show all the selections if the restriction applies, even if the value is used in multiple restrictions.

[14.0][BUG] product_configurator_mrp (Duplicate Components on Variant BoM's)

Module

product_configurator_mrp

Describe the bug

If the same configuration set is used for several components on the product template BoM, when it generates the BoM for the variant it will add duplicate components to the variant BoM.

To Reproduce

Affected versions: 14.0 is where this was noticed.

Steps to reproduce the behavior:

  1. Create configurable product template

image

2. Create master BoM for product template with a configuration set that can be used on multiple lines.

image

3. Configure the product using an attribute value that is contained in the multiple config set. You will see the BoM for the variant that is created will contain duplicates.

image

Expected behavior
The variant BoM should not contain duplicates on only the components that apply.
Sample with correct BoM components
image

Issue with theme Clarico Vega

On attempting to edit a configurable product from the frontend the following error is received

Traceback:
TypeError: Cannot read property 'addEventListener' of undefined
at Class.start (https://www.website.com/web/content/1445-fa7ef71/1/web_editor.assets_wysiwyg.js:717:27)
at Class.prototype. [as start] (https://www.website.com/web/content/1474-e99e3a8/1/web.assets_common_lazy.js:4520:488)
at https://www.website.com/web/content/1474-e99e3a8/1/web.assets_common_lazy.js:4861:52
at async Promise.all (index 1)
at async Class.start (https://www.website.com/web/content/1445-fa7ef71/1/web_editor.assets_wysiwyg.js:1021:580)
at async Class._startEditMode (https://www.website.com/web/content/1443-1b1cc1b/1/website.assets_editor.js:56:26)
at async Promise.all (index 0)

product_configurator_mrp: Error creating MO when enterprise quality_controll is installed

Module

product_configurator_mrp v14

Describe the bug

When product_configurator_mrp and enterprise module quality_control is installed, then creating MO through Configure button throws error

Error:
Odoo Server Error

Traceback (most recent call last):
  File "/opt/odoo/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
    result = request.dispatch()
  File "/opt/odoo/odoo/http.py", line 683, in dispatch
    result = self._call_function(**self.params)
  File "/opt/odoo/odoo/http.py", line 359, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/opt/odoo/odoo/service/model.py", line 94, in wrapper
    return f(dbname, *args, **kwargs)
  File "/opt/odoo/odoo/http.py", line 347, in checked_call
    result = self.endpoint(*a, **kw)
  File "/opt/odoo/odoo/http.py", line 912, in __call__
    return self.method(*args, **kw)
  File "/opt/odoo/odoo/http.py", line 531, in response_wrap
    response = f(*args, **kw)
  File "/opt/odoo/addons/web/controllers/main.py", line 1398, in call_button
    action = self._call_kw(model, method, args, kwargs)
  File "/opt/odoo/addons/web/controllers/main.py", line 1386, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/opt/odoo/odoo/api.py", line 399, in call_kw
    result = _call_kw_multi(method, model, args, kwargs)
  File "/opt/odoo/odoo/api.py", line 386, in _call_kw_multi
    result = method(recs, *args, **kwargs)
  File "/mnt/extra-addons/product_configurator/wizard/product_configurator.py", line 923, in action_next_step
    return self.action_config_done()
  File "/mnt/extra-addons/product_configurator_mrp/wizard/product_configurator_mrp.py", line 66, in action_config_done
    updates = mrpProduction.onchange(line_vals, ["product_id"], specs)
  File "/opt/odoo/odoo/models.py", line 6228, in onchange
    snapshot0 = Snapshot(record, nametree, fetch=(not first_call))
  File "/opt/odoo/odoo/models.py", line 6072, in __init__
    self.fetch(name)
  File "/opt/odoo/odoo/models.py", line 6080, in fetch
    self[name] = [Snapshot(line, tree[name]) for line in record[name]]
  File "/opt/odoo/odoo/models.py", line 6080, in <listcomp>
    self[name] = [Snapshot(line, tree[name]) for line in record[name]]
  File "/opt/odoo/odoo/models.py", line 6072, in __init__
    self.fetch(name)
  File "/opt/odoo/odoo/models.py", line 6082, in fetch
    self[name] = record[name]
  File "/opt/odoo/odoo/models.py", line 5689, in __getitem__
    return self._fields[key].__get__(self, type(self))
  File "/opt/odoo/odoo/fields.py", line 1021, in __get__
    self.compute_value(recs)
  File "/opt/odoo/odoo/fields.py", line 1177, in compute_value
    records._compute_field_value(self)
  File "/opt/odoo/addons/mail/models/mail_thread.py", line 410, in _compute_field_value
    return super()._compute_field_value(field)
  File "/opt/odoo/odoo/models.py", line 4069, in _compute_field_value
    getattr(self, field.compute)()
  File "/mnt/enterprise/quality_control/models/quality.py", line 405, in _compute_quality_check_qty
    """ % (where_clause,), where_clause_args + [product.id]
  File "<decorator-gen-3>", line 2, in execute
  File "/opt/odoo/odoo/sql_db.py", line 101, in check
    return f(self, *args, **kwargs)
  File "/opt/odoo/odoo/sql_db.py", line 298, in execute
    res = self._obj.execute(query, params)
Exception

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/odoo/odoo/http.py", line 639, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/opt/odoo/odoo/http.py", line 315, in _handle_exception
    raise exception.with_traceback(None) from new_cause
psycopg2.ProgrammingError: can't adapt type 'NewId'

Steps to reproduce the behavior:

  1. Install product_configurator_mrp and quality_controll
  2. In Manufacturing Order view use the button "Configure"
  3. when clicking Next in the final step, Odoo throws error

Expected behavior
Expected behavior is to create MO, not throw error.

Additional context
This happens when quality_control_point_qty is calculated and somehow the products on which is called are NewId type.

[14][BUG] No taxes configuring a product on the website (European laws say it must be shown with tax)

Module

I think the problem is in the module website_product_configurator , but I'm not sure that the function for calculating the price with taxes is there, since it must be common to the backend and it is normal for the backend to show the price without taxes.

Describe the bug

When you look at the configurable products on the website, neither the calculated price nor the attributes are shown with taxes.
I have Odoo well configured:

  • Settings > Website > Product Price > Tax-Included
  • Settings > Invoicing > Default Taxes
  • Each product indicating the default tax for the customer.
    And all the other products (non-configurable) of the website are shown with taxes in the category view, and also when you show the details of one not configurable.
    But when you look at a configurable product, neither the calculated price nor the attributes are shown with taxes.
    The taxes are finally added when completing the purchase, but this is not what the European laws for the protection of the final consumer say. Prices must be announced with VAT, or both, but not without VAT.

To Reproduce

Fresh install Odoo OCB 14.0 + product-configurator

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.