Commit Graph
17 Commits
Author SHA1 Message Date
Stephane Le Cornec 05f8bbd635 [FIX] product: use given argument in name_search override
Do not force to use the comptued one. Make an AND between both.

Closes #22396
2018-06-12 16:09:08 +02:00
Christophe Simonis 2dbc1edef9 [MERGE] forward port branch saas-16 up to b503e79722 2018-02-05 13:42:10 +01:00
Christophe Simonis f22cf5f711 [MERGE] forward port branch 10.0 up to e5f2e6d390 2018-02-05 12:02:02 +01:00
Christophe Simonis e5f2e6d390 [MERGE] forward port branch 9.0 up to b08185fc66 2018-02-05 11:30:42 +01:00
Denis Ledoux 70e1efd41e [FIX] product: non-random default variant attribute order
Before this revision, if the user did not re-order
the sequence of its attribute values manually,
the attributes in the variant name were ordered
randomly.
e.g. On the ipod, one time it could be the color before
the GB, one time the other way around.

Besides, this could lead to an issue in the pivot table,
as mentioned in the revision
834b38a84d.

However, on the contrary on what is done in the above revision,
these attributes must not be ordered on their value name,
but rather on their sequence, and if they have the same,
on their attribute, so the order is always deterministic.
2017-07-06 10:41:00 +02:00
Denis Ledoux 4613455d45 Revert "[FIX] stock : traceback pivot view for stock moves"
This reverts commit 834b38a84d. It also reverts 003328ec82
that improved the sorted.
2017-07-06 10:40:42 +02:00
Olivier Dony b9e2207267 [MERGE] Forward-port 10.0 up to 7e44444878 2017-06-01 00:15:27 +02:00
Yannick Tivisse 003328ec82 [FIX] product: Display the variants in the same order for one product
Currently the variants are ordered by the attribute value in the name_get. That way, all the attributes aren't displayed in the same order.

Ordering by the variant attribute name will solve this issue.

Closes https://github.com/odoo/odoo/pull/17034
2017-05-29 15:12:22 +02:00
Christophe Simonis 64b7d4e8a8 [MERGE] forward port branch 10.0 up to 3f6e573c67 2017-04-24 12:53:34 +02:00
amoyaux 834b38a84d [FIX] stock : traceback pivot view for stock moves
Use case when it can happens (non deterministic):
- Enable product variant
- Have different stock moves with the product variant
- Click on the stock moves in the section reports
- Switch to pivot view
-> Traceback : can't find path of null

This happens in the js in the function find_path_in_tree,
this function try to find path for children object. There is
a condition root.children[i].path[l] === path[l] (2 strings
comparaison).

With product variant this condition can be overpass when it should
have been triggered. The product path string is represented as follow
[Ref]Name(variants) -> Sometime the variants in the string do not have
the same order and thus the condition is never true and the function
return null instead of the correct root.

This commit corrects the name_get function for product product
in order to always return the variants in the same order.
2017-04-24 09:26:54 +02:00
Kinjal Mehta b2eb54abe5 [IMP] product: order the attribute values by sequence then by id
=======
purpose
=======

By default, the sequence is 0 for all new attributes and the result is messed up. The product attribute values are not ordered in the same way in a list view.

That's because the results are not returned from sql ordered by id if the sequence is the same. Just add this in the order definition will remove the non-deterministic behavior.
2016-11-03 13:34:42 +01:00
Olivier Dony 715860ea29 [FIX] mail, product: remove deprecated m2m params
`id1`, `id2`, `rel` are deprecated now that we switched to the
new API, and are simply ignored.
Keeping them is confusing because the default names are being
used instead.

@rco-odoo: We should add a warning in the m2m constructor if these
unsupported parameters are still passed.
2016-10-27 10:20:17 +02:00
David Beal 1d6df46aba [IMP] product: add _variant_name() in product.attribute.value
To be possible to override the name_get of the variants
Closes #13053
2016-10-12 08:52:54 +02:00
Martin Geubelle b94ddcbd70 [ADD] product,website_sale: attribute without variant
A new field `create_variant` has been added on `product.attribute`.
If unchecked, the attribute will not create variant.

These attributes will be added on the sale order description if bought from the shop.
The lines of a product with these attributes will be splitted to keep the description.
2016-08-22 13:39:41 +02:00
Thibault Delavallée 665d1ec146 [FIX] various: fix digits_compute attribute changed to digits in new API 2016-08-09 11:03:12 +02:00
Thibault Delavallée 1aa5bc0fdf [MIG] product: migrate addon to new API 2016-08-01 15:05:33 +02:00
Thibault Delavallée 03b7ef16c8 [SPLIT] product: split product python and views into submodels
product.py and product_views.xml contained code related to several models.
This commit split those files to separate submodels :

 * decimal_precision
 * product_attribute: product.attribute, product.attribute.value,
   product.attribute.line
 * product_template: product.template
 * product_uom: product.uom and product.uom.categ
 * res_currency

Product now contains product.product model, along with some smaller
models (product.packaging, product.supplierinfo, product.category,
product.price.history)
2016-08-01 12:13:11 +02:00