oca / product-variant Goto Github PK
View Code? Open in Web Editor NEWLicense: GNU Affero General Public License v3.0
License: GNU Affero General Public License v3.0
I'm looking and comparing the views and i found some problems with them:
Description: when the user is looking in the PO or SO it wants to know what product and what attributes it has, that's why the description field in SO is the most adequate for a view. That field in PO shows the reference code, while users want to know more clear information.
Product Template: it can be showed too in the PO view, or in neither of the two.
Product: It can be shown in both, but while in PO is showed(it shows just for products that have previously set attribute values #125), it is blank in the SO.
I don't know what is the approach behind this differences but i think this changes could be good.
https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-13.0
Missing module? Check https://github.com/OCA/maintainer-tools/wiki/%5BFAQ%5D-Missing-modules-in-migration-issue-list
module: product_variant_configurator
version: 11.0
Steps to reproduce
Create an inventory adjustment and click on 'Start Inventory'
Current behavior
Odoo Server Error:
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/odoo-11.0+e.20181225-py3.5.egg/odoo/http.py", line 651, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/usr/local/lib/python3.5/dist-packages/odoo-11.0+e.20181225-py3.5.egg/odoo/http.py", line 310, in _handle_exception
raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
File "/usr/local/lib/python3.5/dist-packages/odoo-11.0+e.20181225-py3.5.egg/odoo/tools/pycompat.py", line 87, in reraise
raise value
File "/usr/local/lib/python3.5/dist-packages/odoo-11.0+e.20181225-py3.5.egg/odoo/http.py", line 693, in dispatch
result = self._call_function(**self.params)
File "/usr/local/lib/python3.5/dist-packages/odoo-11.0+e.20181225-py3.5.egg/odoo/http.py", line 342, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/odoo-11.0+e.20181225-py3.5.egg/odoo/service/model.py", line 97, in wrapper
return f(dbname, *args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/odoo-11.0+e.20181225-py3.5.egg/odoo/http.py", line 335, in checked_call
result = self.endpoint(*a, **kw)
File "/usr/local/lib/python3.5/dist-packages/odoo-11.0+e.20181225-py3.5.egg/odoo/http.py", line 937, in call
return self.method(*args, **kw)
File "/usr/local/lib/python3.5/dist-packages/odoo-11.0+e.20181225-py3.5.egg/odoo/http.py", line 515, in response_wrap
response = f(*args, **kw)
File "/usr/local/lib/python3.5/dist-packages/odoo-11.0+e.20181225-py3.5.egg/odoo/addons/web/controllers/main.py", line 938, in call_button
action = self._call_kw(model, method, args, {})
File "/usr/local/lib/python3.5/dist-packages/odoo-11.0+e.20181225-py3.5.egg/odoo/addons/web/controllers/main.py", line 926, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/usr/local/lib/python3.5/dist-packages/odoo-11.0+e.20181225-py3.5.egg/odoo/api.py", line 689, in call_kw
return call_kw_multi(method, model, args, kwargs)
File "/usr/local/lib/python3.5/dist-packages/odoo-11.0+e.20181225-py3.5.egg/odoo/api.py", line 680, in call_kw_multi
result = method(recs, *args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/odoo-11.0+e.20181225-py3.5.egg/odoo/addons/stock/models/stock_inventory.py", line 197, in action_start
vals.update({'line_ids': [(0, 0, line_values) for line_values in inventory._get_inventory_lines_values()]})
File "/usr/local/lib/python3.5/dist-packages/odoo-11.0+e.20181225-py3.5.egg/odoo/addons/stock/models/stock_inventory.py", line 260, in _get_inventory_lines_values
GROUP BY product_id, location_id, lot_id, package_id, partner_id """ % domain, args)
File "/usr/local/lib/python3.5/dist-packages/odoo-11.0+e.20181225-py3.5.egg/odoo/sql_db.py", line 155, in wrapper
return f(self, *args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/odoo-11.0+e.20181225-py3.5.egg/odoo/sql_db.py", line 232, in execute
res = self._obj.execute(query, params)
psycopg2.ProgrammingError: column reference "product_id" is ambiguous
LINE 4: ON product_product.id = product_id
Expected behavior
Inventory adjustment started
https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-14.0
Missing module? Check https://github.com/OCA/maintainer-tools/wiki/%5BFAQ%5D-Missing-modules-in-migration-issue-list
If pricelist discount_policy is equal to 'without_discount', and you search for a template in sale order line, then an error is raised because this line:
https://github.com/OCA/product-variant/blob/11.0/sale_variant_configurator/models/sale_order.py#L143
generate a list of tuples with a product.product recordset null, as product_id field is empty at this moment:
To reproduce the error only have to change the discount_policy of the pricelist of the sale order and search for a template with variants in the sale order line.
The log I've got:
2019-06-26 16:49:49,911 25905 ERROR database odoo.sql_db: bad query: b"SELECT item.id FROM product_pricelist_item AS item LEFT JOIN product_category AS categ ON item.categ_id = categ.id WHERE (item.product_tmpl_id IS NULL OR item.product_tmpl_id = any(ARRAY[false]))AND (item.product_id IS NULL OR item.product_id = any(ARRAY[false]))AND (item.categ_id IS NULL OR item.categ_id = any('{}')) AND (item.pricelist_id = 1) AND (item.date_start IS NULL OR item.date_start<='2019-06-26 16:28:12') AND (item.date_end IS NULL OR item.date_end>='2019-06-26 16:28:12')ORDER BY item.applied_on, item.min_quantity desc, categ.parent_left desc"
ERROR: operator does not exist: integer = boolean
LINE 1: ...m.product_tmpl_id IS NULL OR item.product_tmpl_id = any(ARRA...
^
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.2019-06-26 16:49:49,912 25905 ERROR database odoo.http: Exception during JSON request handling.
Traceback (most recent call last):
File "/home/cubells/Dades/git/odoo11/src/core/odoo/http.py", line 653, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/home/cubells/Dades/git/odoo11/src/core/odoo/http.py", line 312, in _handle_exception
raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
File "/home/cubells/Dades/git/odoo11/src/core/odoo/tools/pycompat.py", line 87, in reraise
raise value
File "/home/cubells/Dades/git/odoo11/src/core/odoo/http.py", line 695, in dispatch
result = self._call_function(**self.params)
File "/home/cubells/Dades/git/odoo11/src/core/odoo/http.py", line 344, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/home/cubells/Dades/git/odoo11/src/core/odoo/service/model.py", line 97, in wrapper
return f(dbname, *args, **kwargs)
File "/home/cubells/Dades/git/odoo11/src/core/odoo/http.py", line 337, in checked_call
result = self.endpoint(*a, **kw)
File "/home/cubells/Dades/git/odoo11/src/core/odoo/http.py", line 939, in call
return self.method(*args, **kw)
File "/home/cubells/Dades/git/odoo11/src/core/odoo/http.py", line 517, in response_wrap
response = f(*args, **kw)
File "/home/cubells/Dades/git/odoo11/src/core/addons/web/controllers/main.py", line 934, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/home/cubells/Dades/git/odoo11/src/core/addons/web/controllers/main.py", line 926, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/home/cubells/Dades/git/odoo11/src/core/odoo/api.py", line 689, in call_kw
return call_kw_multi(method, model, args, kwargs)
File "/home/cubells/Dades/git/odoo11/src/core/odoo/api.py", line 680, in call_kw_multi
result = method(recs, *args, **kwargs)
File "/home/cubells/Dades/git/odoo11/src/core/odoo/models.py", line 5222, in onchange
record._onchange_eval(name, field_onchange[name], result)
File "/home/cubells/Dades/git/odoo11/src/core/odoo/models.py", line 5039, in _onchange_eval
method_res = method(self)
File "/home/cubells/Dades/git/odoo11/src/other-addons/sale_variant_configurator/models/sale_order.py", line 143, in product_uom_change
self._update_price_configurator()
File "/home/cubells/Dades/git/odoo11/src/other-addons/sale_variant_configurator/models/sale_order.py", line 123, in _update_price_configurator
self.price_extra + self._get_display_price(product_tmpl),
File "/home/cubells/Dades/git/odoo11/src/core/addons/sale/models/sale.py", line 1042, in _get_display_price
final_price, rule_id = self.order_id.pricelist_id.with_context(product_context).get_product_price_rule(self.product_id, self.product_uom_qty or 1.0, self.order_id.partner_id)
File "/home/cubells/Dades/git/odoo11/src/core/addons/product/models/product_pricelist.py", line 276, in get_product_price_rule
return self._compute_price_rule([(product, quantity, partner)], date=date, uom_id=uom_id)[product.id]
File "/home/cubells/Dades/git/odoo11/src/other-addons/product_variant_configurator/models/pricelist.py", line 21, in _compute_price_rule
products_qty_partner, date=date, uom_id=uom_id,
File "/home/cubells/Dades/git/odoo11/src/core/addons/product/models/product_pricelist.py", line 155, in _compute_price_rule
(prod_tmpl_ids, prod_ids, categ_ids, self.id, date, date))
File "/home/cubells/Dades/git/odoo11/src/core/odoo/sql_db.py", line 155, in wrapper
return f(self, *args, **kwargs)
File "/home/cubells/Dades/git/odoo11/src/core/odoo/sql_db.py", line 232, in execute
res = self._obj.execute(query, params)
psycopg2.errors.UndefinedFunction: operator does not exist: integer = boolean
LINE 1: ...m.product_tmpl_id IS NULL OR item.product_tmpl_id = any(ARRA...
^
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.
odoo.models.unlink: User #1 deleted product.configurator.attribute records with IDs:
Odoo Warning:
Record does not exist or has been deleted.
This error occurs with the module:
https://github.com/apesquero/sale-workflow/tree/10.0/payment_signal
When we change the value of the signal to any other value and save.
Thank you very much
Hi,
I'm testing this module too, and I found other problem with set attribute values:
As you can see, if I put a set value as an attribute value, the default code does not get it, but if I create a new value, get the default code correctly.
Why?
PD: It is another problem related to previously created objects(products, attribute values).
Why do we need a security group here as we can handle it with a config parameter?
When you create product variants with extra price set in its attributes, if you have installed product_variant_configurator this extra price are not reflect in the product variant price
Our goal is manage sales tier prices at product variant level in product variant sales tab.
We tested product_variant_sale_price on Odoo 12CE, it works fine with tier prices based on variant level only when we set pricing to "Prices computed from formulas (discounts, margins, roundings)" in Sales / Configuration / Setting.
However we would prefer to be able to manage tier prices in the product variant sales tab. To do so we need to set Pricing to "Multiple prices per product (e.g. customer segments, currencies)" in Sales / Configuration / Setting. In this case tier prices are managed at product level not at product variant level.
When we add/change tier prices in product variant sales tab this updates prices to all product variants.
Thank you to share your suggestions
Hi all,
Could you migrate product_variant_cost_price to V9, please?
I will check it and give you feedback as soon as it is migrated.
Thank you.
Hi,
I'm seeing the current interface and i think it could be better:
It is not needed to handle all line product in the new view, it just requires having a select box to select the product and the product's attribute fields. Also, creating a new attribute value does not require a new form since the attribute must to be the current attribute and the other fields(sequence and attribute sequence) can be filled automatically.
What do you think about that?
Admin user who is having the "Product Default Code Behavior" group set a reference mask for a product template. Then another user without the "Product Default Code Behavior" security group make changes to any field other than attribute_line_ids, reference_mask, code_prefix etc can trigger the default_code generation using the default_reference_mask
First of all a big thanks for the impressive work,
MODULE: https://www.odoo.com/apps/modules/10.0/sale_order_variant_mgmt/
In this step:
Press "Add variants" button located in the upper right corner of the "Order Lines" tab.
It would be great if you could possibly select the product template in this module by entering the product internal reference as well as selecting from drop down 👍
Odoo deletes the default_code when a product.template has more than 1 variant.
I think this would be better to have the default_code still present on a multiple variants template when using this module because the template has the code_prefix which is the template's default_code
That way, the code_prefix would be visible in the tree view instead of an empty column
Here is Odoo's code I would like to change:
@api.depends('product_variant_ids', 'product_variant_ids.default_code')
def _compute_default_code(self):
unique_variants = self.filtered(lambda template: len(template.product_variant_ids) == 1)
for template in unique_variants:
template.default_code = template.product_variant_ids.default_code
for template in (self - unique_variants):
# template.default_code = ''
template.default_code = template.code_prefix
Any thoughts about this ?
Trying to add vendors variant price
Selects a vendor
Selects product
Selects variant ... BUM!
Uncaught Error: KeyError: 'id'
http://localhost:8069/web/content/4480-7039b89/web.assets_backend.js:1585
Traceback:
Error: KeyError: 'id'
at F.getitem (http://localhost:8069/web/content/4480-7039b89/web.assets_backend.js:1585:161)
at F.getattr (http://localhost:8069/web/content/4480-7039b89/web.assets_backend.js:1586:69)
at F.getattribute (http://localhost:8069/web/content/4480-7039b89/web.assets_backend.js:1385:38)
at Object.py.PY_getAttr (http://localhost:8069/web/content/4480-7039b89/web.assets_backend.js:1349:176)
at Object.py.evaluate (http://localhost:8069/web/content/4480-7039b89/web.assets_backend.js:1452:11)
at Object.py.evaluate (http://localhost:8069/web/content/4480-7039b89/web.assets_backend.js:1447:111)
at Object.py.evaluate (http://localhost:8069/web/content/4480-7039b89/web.assets_backend.js:1449:99)
at Object.py.eval (http://localhost:8069/web/content/4480-7039b89/web.assets_backend.js:1454:284)
at http://localhost:8069/web/content/4480-7039b89/web.assets_backend.js:1596:136
at Function..each..forEach (http://localhost:8069/web/content/4172-629d75f/web.assets_common.js:12:558)
Hello, I have verified that when you select a product (product_tmpl_id) that does not have "product_id", it does not add the price of the variant (price_extra).
I created the solution in this fix. #98
But, there are problems with product.pricelist and the option "Show public price & discount to the customer".
Error in sql.
This module needs to create deeper modifications.
Thank you
Hi,
I'm testing this module and i have a rare bug with it:
As you can see, i did save the product configuration for the same product with different values, it is clear in the description column, but when I to try to confirm the SO it says that i must to define the attribute values, but why?
So, i review the product configurated values and they are empty. Why?
I did the same process with a from-zero new product without previous variants i hadn't any problem, what's happening here?
Testing this module I found another issue:
As you can see, if you put some default attribute values in the product variants the configurator will show the product variant name, and just with the first attribute's value, but if the product hasn't any previously set attribute value, I will just show the product template name.
It happens with all lines related to that product in PO and in SO.
Why?
Hello,
I'm working with this module in order to manage all size variants in an easy way, but I'm getting a bug.
I installed this module in a pre-existing database with all my product with their respective variants, no problems; i go to the sale module and i create a new sale, i try to choose a product as a product template and i get this:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/http.py", line 651, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 310, in _handle_exception
raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
File "/usr/lib/python3/dist-packages/odoo/tools/pycompat.py", line 87, in reraise
raise value
File "/usr/lib/python3/dist-packages/odoo/http.py", line 693, in dispatch
result = self._call_function(**self.params)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 342, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 97, in wrapper
return f(dbname, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 335, in checked_call
result = self.endpoint(*a, **kw)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 937, in __call__
return self.method(*args, **kw)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 515, in response_wrap
response = f(*args, **kw)
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 934, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 926, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/api.py", line 689, in call_kw
return call_kw_multi(method, model, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/api.py", line 680, in call_kw_multi
result = method(recs, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/models.py", line 5099, in onchange
record._onchange_eval(name, field_onchange[name], result)
File "/usr/lib/python3/dist-packages/odoo/models.py", line 4994, in _onchange_eval
method_res = method(self)
File "/var/lib/odoo/addons/11.0/product-variant/sale_variant_configurator/models/sale_order.py", line 52, in _onchange_product_tmpl_id_configurator
self.order_id.partner_id.id)[self.order_id.pricelist_id.id]
KeyError: False
Why?
Odoo 11.0-20181126 (Community Edition)
Hello, there are any errors with the last update in sale_variant_configurator.
The problem is that the instance is SaleOrder, and in this class the name is SaleOrderLine.
Step:
Modify a product form, add a supplier, select product's variant, fill all the field, save supplier info and product form. When re-opening, one can see that product's variant in the supplier info form is gone, the supplier infos looks set for the product template.
Opening the variant form, one can see that supplier infos are set as a variant template.
May be this is intended, in this case it' a UI problem : the select variant field shouldn't be available in the product supplier form.
I just installed the module and I don't know if it's me doing something wrong, or if it's the module.
I have created a product template without creating the variants. When I go to the product variant, it lets me select the product template, but when I select it, I get the following error
I hope you can help me
Greetings
Error:
Odoo Server Error
Traceback (most recent call last):
File "/opt/odoo13/odoo/odoo/api.py", line 745, in get
value = self._data[field][record._ids[0]]
KeyError: <NewId 0x7f4f623ee9b0>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/odoo13/odoo/odoo/fields.py", line 1002, in get
value = env.cache.get(record, self)
File "/opt/odoo13/odoo/odoo/api.py", line 751, in get
raise CacheMiss(record, field)
odoo.exceptions.CacheMiss: ('product.product(<NewId 0x7f4f623ee9b0>,).website_url', None)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/odoo13/odoo/odoo/api.py", line 745, in get
value = self._data[field][record._ids[0]]
KeyError:
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/odoo13/odoo/odoo/fields.py", line 1002, in get
value = env.cache.get(record, self)
File "/opt/odoo13/odoo/odoo/api.py", line 751, in get
raise CacheMiss(record, field)
odoo.exceptions.CacheMiss: ('product.template(,).website_url', None)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/odoo13/odoo/odoo/http.py", line 624, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/opt/odoo13/odoo/odoo/http.py", line 310, in _handle_exception
raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
File "/opt/odoo13/odoo/odoo/tools/pycompat.py", line 14, in reraise
raise value
File "/opt/odoo13/odoo/odoo/http.py", line 669, in dispatch
result = self._call_function(**self.params)
File "/opt/odoo13/odoo/odoo/http.py", line 350, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/opt/odoo13/odoo/odoo/service/model.py", line 94, in wrapper
return f(dbname, *args, **kwargs)
File "/opt/odoo13/odoo/odoo/http.py", line 339, in checked_call
result = self.endpoint(*a, **kw)
File "/opt/odoo13/odoo/odoo/http.py", line 915, in call
return self.method(*args, **kw)
File "/opt/odoo13/odoo/odoo/http.py", line 515, in response_wrap
response = f(*args, **kw)
File "/opt/odoo13/odoo/addons/web/controllers/main.py", line 1322, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/opt/odoo13/odoo/addons/web/controllers/main.py", line 1314, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/opt/odoo13/odoo/odoo/api.py", line 387, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/opt/odoo13/odoo/odoo/api.py", line 374, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "/opt/odoo13/odoo/odoo/models.py", line 6124, in onchange
for name in nametree
File "/opt/odoo13/odoo/odoo/models.py", line 6125, in
if name not in done and snapshot0.has_changed(name)
File "/opt/odoo13/odoo/odoo/models.py", line 5992, in has_changed
return self[name] != record[name]
File "/opt/odoo13/odoo/odoo/models.py", line 5640, in getitem
return self._fields[key].get(self, type(self))
File "/opt/odoo13/odoo/odoo/fields.py", line 1026, in get
self.compute_value(recs)
File "/opt/odoo13/odoo/odoo/fields.py", line 1111, in compute_value
records._compute_field_value(self)
File "/opt/odoo13/odoo/odoo/models.py", line 3939, in _compute_field_value
getattr(self, field.compute)()
File "/opt/odoo13/odoo/addons/website_sale/models/product.py", line 418, in _compute_product_website_url
product.website_url = "%s#attr=%s" % (product.product_tmpl_id.website_url, attributes)
File "/opt/odoo13/odoo/odoo/fields.py", line 1026, in get
self.compute_value(recs)
File "/opt/odoo13/odoo/odoo/fields.py", line 1111, in compute_value
records._compute_field_value(self)
File "/opt/odoo13/odoo/odoo/models.py", line 3939, in _compute_field_value
getattr(self, field.compute)()
File "/opt/odoo13/odoo/addons/website_sale/models/product.py", line 379, in _compute_website_url
product.website_url = "/shop/product/%s" % slug(product)
File "/opt/odoo13/odoo/addons/http_routing/models/ir_http.py", line 91, in slug
raise ValueError("Cannot slug non-existent record %s" % value)
ValueError: Cannot slug non-existent record product.template(,)
Hi,
I am geting other problem with the variant configurator:
When i create a new value for the attribute it is not saved related to the value, so, i cannot choose it again the next time, it forces us to create that value again, but it brings us other problem:
It is because of the value already exists:
The idea is getting the current values in the product as much as possible.
How can we do it?
Conditions:
-The check of allow using different UOMs is marked.
-the module Product Variant Sale Price is installed.
If you select a product with units by default, but you change the UOM on the sale order to Dozens the price is multiplied by 144 instead of 12.
My request is for a user to have the ability to add/delete attributes to/from a Product template:
In the example i've used product CHEMISE with two Attributes: Color and Size and they have the following Attribute Values:
Color: C1 - C2 - C3
Size: 42 - 44 - 46 - 48
So by using a plus/minus button we could add or delete attributes on the fly! Or if removing the attribute values, at least adding extra ones will help.
Thanks.
Would be nice to have a similiar 2D matrix feature, which the sale_order_variant_mgmt addon has.
Most of the time our customers use only 2 dimensions for their product variants. For creating variants a 2D matrix would be handy.
I plan to work in new functionality to be able to rescrict atributes values.
For example, I habe a product with:
But, :
Restrictions must be configurated by product.
Impacted versions: 11.0 e
Steps to reproduce:
Current behavior:
When activating sales message in the product, the name in the sales order is False with demo user
Expected behavior:
When activating the message for sale from the product, obtain the product name correctly in the sales order with any user
Video/Screenshot link (optional):
The product_id field https://github.com/OCA/product-variant/blob/10.0/product_variant_configurator/models/product_configurator.py#L31 and https://github.com/OCA/product-variant/blob/10.0/product_variant_configurator/models/product_product.py#L10 does conflict with adjustmen inventary:
ProgrammingError: column reference "product_id" is ambiguous
LINE 1: SELECT product_id, sum(qty) as product_qty, location_id, lot...
https://github.com/OCA/OCB/blob/10.0/addons/stock/models/stock_inventory.py#L266
module: product_variant_sale_price
version: 13.0
Steps to reproduce
add a product called sanitizers set sales price to 470
Create Variants size or volume and Classification (100ml Alcohol base, 100ml Gel Base, Gallon Gel Base, and Gallon Alcohol Base)
Create variants scent (Apple Mint and Strawberry)
Configure variants pricing based on size and classifications (eg. 100ml Gel Base with a value extra price of -420, and 100ml Alcohol Base with an value extra price of -435, and Gallon Gel Base with an value extra price of 80)
Update quantity 1 by 1.
Current behavior
When doing sale invoice, and adding a product, if i select the sanitizer product and choose on the variants. specifically on 100ml Alcohol Base, the price that pops up in the invoice page is the price of the Sanitizer Alcohol base which is 35 and not 50. product variants prices a properly configured as stated above.
screenshots of the said problem is provided.
Expected behavior
The product Sanitizer Gel Base Price should be 50 and not 35 which is the price of Sanitizer Alcohol Base.
Further to #42 (comment) I started working at https://github.com/tafaRU/product-variant/tree/10.0-add-product_variant_template_data
Before to continue I'd like to be sure that I'm working properly, so that I share my Todo list as follows:
product_variant_template_data
merging inside of it all the features of the three modules above mentionedI won't move https://github.com/OCA/product-variant/tree/8.0/product_variant_available_in_pos
as its data is more focused on point_of_sale
.
While I have doubts about also moving https://github.com/OCA/product-variant/tree/8.0/product_variant_cost_price and https://github.com/OCA/product-variant/tree/8.0/product_variant_sale_price.
Your feedback are welcome!
Enable Vendor Pricelist in Purchase, Go to Purchases / Purchase / Vendor Pricelist, try to add a variant. It raises the JS error below while accessing the variant selection.
Module works well through product variant view.
http://abimo:8069/web/content/13475-32770e5/web.assets_backend.js:1585
Retraçage :
getitem@http://abimo:8069/web/content/13475-32770e5/web.assets_backend.js:1585:161
getattr@http://abimo:8069/web/content/13475-32770e5/web.assets_backend.js:1586:64
getattribute@http://abimo:8069/web/content/13475-32770e5/web.assets_backend.js:1385:33
py.PY_getAttr@http://abimo:8069/web/content/13475-32770e5/web.assets_backend.js:1349:174
py.evaluate@http://abimo:8069/web/content/13475-32770e5/web.assets_backend.js:1452:8
py.evaluate@http://abimo:8069/web/content/13475-32770e5/web.assets_backend.js:1447:108
py.evaluate@http://abimo:8069/web/content/13475-32770e5/web.assets_backend.js:1449:96
py.eval@http://abimo:8069/web/content/13475-32770e5/web.assets_backend.js:1454:281
eval_domains/<@http://abimo:8069/web/content/13475-32770e5/web.assets_backend.js:1596:133
_.forEach@http://abimo:8069/web/content/13433-04fa24e/web.assets_common.js:12:558
.mixin/</.prototype[name]@http://abimo:8069/web/content/13433-04fa24e/web.assets_common.js:69:521
eval_domains@http://abimo:8069/web/content/13475-32770e5/web.assets_backend.js:1595:254
eval_domains/<@http://abimo:8069/web/content/13475-32770e5/web.assets_backend.js:1596:298
_.forEach@http://abimo:8069/web/content/13433-04fa24e/web.assets_common.js:12:558
.mixin/</.prototype[name]@http://abimo:8069/web/content/13433-04fa24e/web.assets_common.js:69:521
eval_domains@http://abimo:8069/web/content/13475-32770e5/web.assets_backend.js:1595:254
eval_domains/<@http://abimo:8069/web/content/13475-32770e5/web.assets_backend.js:1596:298
_.forEach@http://abimo:8069/web/content/13433-04fa24e/web.assets_common.js:12:558
.mixin/</.prototype[name]@http://abimo:8069/web/content/13433-04fa24e/web.assets_common.js:69:521
eval_domains@http://abimo:8069/web/content/13475-32770e5/web.assets_backend.js:1595:254
pyeval@http://abimo:8069/web/content/13475-32770e5/web.assets_backend.js:1609:24
eval_arg@http://abimo:8069/web/content/13475-32770e5/web.assets_backend.js:1612:61
ensure_evaluated@http://abimo:8069/web/content/13475-32770e5/web.assets_backend.js:1615:11
call@http://abimo:8069/web/content/13475-32770e5/web.assets_backend.js:1476:1
name_search@http://abimo:8069/web/content/13475-32770e5/web.assets_backend.js:1751:1038
get_search_result@http://abimo:8069/web/content/13475-32770e5/web.assets_backend.js:2214:25
source@http://abimo:8069/web/content/13475-32770e5/web.assets_backend.js:2325:103
_search@http://abimo:8069/web/content/13433-04fa24e/web.assets_common.js:1461:142
$.widget/</proxiedPrototype[prop]</<@http://abimo:8069/web/content/13433-04fa24e/web.assets_common.js:1021:328
search@http://abimo:8069/web/content/13433-04fa24e/web.assets_common.js:1461:8
$.widget/</proxiedPrototype[prop]</<@http://abimo:8069/web/content/13433-04fa24e/web.assets_common.js:1021:328
each@http://abimo:8069/web/content/13433-04fa24e/web.assets_common.js:370:758
each@http://abimo:8069/web/content/13433-04fa24e/web.assets_common.js:358:636
render_editable/<@http://abimo:8069/web/content/13475-32770e5/web.assets_backend.js:2320:1041
dispatch@http://abimo:8069/web/content/13433-04fa24e/web.assets_common.js:637:378
add/elemData.handle@http://abimo:8069/web/content/13433-04fa24e/web.assets_common.js:610:151
https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-10.0
The costprice seems to be divided by number of variants..
Settings
Steps to reproduce:
Result:
Costprice on the first product is 100 euro, this is expected.
Costprice on the second product is 12.50 euro, expected amount is 25 euro.
For an video, see https://www.youtube.com/watch?v=Xef1A3wxYKU
when adding products to sale order with a different price or a discount defined in a price list, this price is not used but only the standard price
Hi all,
module: https://github.com/OCA/product-variant/tree/9.0/product_variant_supplierinfo
It seems that when you create a new purchase of a variant:
@bealdav @PierrickBrun @Daniel-CA @chienandalu @gdgellatly @pedrobaeza
I have detected an issue with the module product_default_variant_code
Indeed the write on multi-record is broken.
If you take a look here : https://github.com/OCA/product-variant/blob/10.0/product_variant_default_code/models/product.py#L129 the code check "self.attribute_line_ids" or "self" can be a list of record.
I do not have the time to propose I fix right now. But maybe next week
https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-11.0
The name_search available at Product variant dimension type
class product_variant_dimension_type(orm.Model):
_name = "product.variant.dimension.type"
def name_search(self, cr, uid, name='', args=None, operator='ilike', context=None, limit=None):
if not context.get('product_tmpl_id', False):
args = None
return super(product_variant_dimension_type,
self).name_search(cr, uid, '', args, 'ilike', None, None)
The name_search should have been
def name_search(self, cr, uid, name='', args=None, operator='ilike', context=None, limit=None):
if not context.get('product_tmpl_id', False):
args = None
return super(product_variant_dimension_type,
self).name_search(cr, uid, name=name, args=args, operator=operator, context=context, limit=limit)
Why is the parameter values cleared at the return statement of NAME_SEARCH method?
What is the reason to clear the DOMAIN or args in the name_search?
Is this done to handle some special case?
I had raised a question @ launchpad(https://answers.launchpad.net/openerp-product-variant/+question/253433). Since, the Management of the project has been moved to GitHub, I am resubmitting the question here.
Good morning,
I found a bug, seven days ago, ith the unit of measure:
In a new DB, I have only installed sale_management and product_variant_sale_price modules, I have created a unit of measure "Three months" with factor_inv = 3.0.
The problem is that when I add a product in a sale.order.line, the calculation of price_unit is wrong.
The calculation is price = list_price * factor_inv, but if I install product_variant_sale_price this calculation is executed twice: price = (list_price * factor_inv)² .
This PR only remove the suspects lines of code: #164
Thanks a lot.
Stock History create product_id in product_price_history but stock_history report uses product_template https://github.com/odoo/odoo/blob/8.0/addons/stock_account/wizard/stock_valuation_history.py#L71
Hi I face to a UI issue with the module product_variant_default_code
When you try to create an new template, odoo will show you the "Internal Reference" see the capture
As the general information is the first tab the user will start here and fill the "Internal Reference" with the code he want to affect for this template.
Then the user will fill the information on the variant 'color, size'...
After saving the user expect to have the variant generated with the right code, but instead the code on the template have been remove !
In reality the code have been not remove because the user have filled the "internal_reference" (that we do not used in case of product.template with multiple variant) and now we are showing the "code_prefix". But in the point of view of the end user is very unuser-friendly.
I think we should always show the "code_prefix" then
In case we create a product.product directly (or we modify it) we should also update the code_prefix with the value of the "internal_reference"
Moreover when you are in the tree view of the product_template. We should show the prefix_code instead of the internal_reference in order to see the "code" of the template. And also filter on this field
The behavior I describe here was the existing behavior of the version 8 in product_code_builder https://github.com/OCA/product-attribute/tree/8.0/product_code_builder
What do you think?
@bealdav @pedrobaeza @Daniel-CA @gdgellatly @chienandalu @gurneyalex
https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-12.0
Thanks for the effort for this amazing module.
Ive just noticed that the quantity total sum in the matrix doesnt calculate the accumulate of quantities between attribute values .
TOTAL SHOWING ZERO 0
Screenshot:
htps://ibb.co/gEdPBa
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.