Commit Graph
25 Commits
Author SHA1 Message Date
Christophe Matthieu 166a9d26e3 [IMP] website_sale: create a new compute field to use prefetching and increase performance 2016-08-29 15:31:44 +02:00
Christophe Simonis f4738e7bb5 [MERGE] forward port branch saas-12 up to 78e9c7f 2016-08-26 18:06:17 +02:00
Thibault Delavallée 012270b59d [REV] "[FIX] product: avoid search returning two times the same product"
This reverts commit c34972a296.

Please check what you are doing or stop committing in official branches.
2016-08-26 13:11:07 +02:00
Fabien Pinckaers c34972a296 [FIX] product: avoid search returning two times the same product 2016-08-26 11:48:06 +02:00
Yannick Tivisse a765b3e643 [REM] product: Remove product_manager field
The product_manager field is existing since v6.0 and never displayed in any views. It is used in sale_timesheet module. A task created from a procurement_order (if it is a service and we track the service) is assigned to the product manager. It doesn't make a lot of sense as the value should be set directly in the database. We will remove the field and assign the current user to the task instead, which is the common behavior in Odoo.
2016-08-23 13:19:45 +02:00
Damien Bouvy b70f159f3a [FIX] product: avoid duplicates in name search
A typo probably introduced during the migration to the new api may have
caused duplicates to appear in the name search results since it added
the ids of the wrong recordset.

The previous fix, while effective, also removed a previous optimization
for databases with a lot of products. While the code may seem obscure
on first read, the comments should shed some light on the
implementation choice.

This commit therefore reintroduce the previous code with the exception
of the call to the wrong recordset (self instead of products).

Amends b02a85f
Courtesy of @rco-odoo
2016-08-22 17:27:25 +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
fwi-odoo e36db7a7af [IMP] product: only display attributes with multiple possible values 2016-08-22 13:39:41 +02:00
Fabien Pinckaers b02a85fcf1 [FIX] product: avoid search returning two times the same product 2016-08-21 17:13:26 -07:00
Fabien Pinckaers cd1da32dce [IMP] mrp: better kanban view for attachments 2016-08-21 13:54:51 -07:00
Fabien Pinckaers c2f5457d98 [FIX] product: traceback when name_search on template fixed 2016-08-21 13:06:07 -07:00
Srushti Patel 986b152f16 [IMP] product: ensure variant price is managed on the template
* variant prices should be read only on the variant
* added an help to explain how it works
* because variant prices are managed on the template via the Variant
  Prices button
2016-08-19 09:55:18 +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 9446b14617 [FIX] product: fix wrong decorator introduced when migrating 2016-08-04 15:29:44 +02:00
Thibault Delavallée 0d60e0c87b [IMP] product: clean and simplify code after new API migration
* product.category: remove complete_name field as display_name can be used
  where the field was used
* product.supplierinfo: remove computed qty field. This field originally
  contained the min_qty computed into the product_uom. However commit
  3c186c5807 broke that field without reason.
  Since 2011 no one complained about this field being unnecessary, so let us
  remove it.
* product.template: shorter and less spaghetti version of create_variant
  method
* product_product._sellect_seller: fix use of default parameter in method
  kwargs + use odoo standard datetime default value
2016-08-01 15:05:34 +02:00
Thibault Delavallée 1b4f96cf40 [MIG][IMP] product: migrate and clean product pricelist report 2016-08-01 15:05:33 +02:00
Thibault Delavallée 1aa5bc0fdf [MIG] product: migrate addon to new API 2016-08-01 15:05:33 +02:00
Thibault Delavallée b747b05fa6 [REF] product, template: remove unused is_product_variant computed field, probably from old implementation 2016-08-01 15:05:33 +02:00
Thibault Delavallée 77c9e76e82 [REF] product_pricelist, *: clean the price and rule computation methods
A new API is introduced for price computing using pricelists. It is simplier
to use in most use cases, which is computing the product price in a given
pricelist. Old methods return dictionnaries and tuples, which are rarely
used in the code.
2016-08-01 15:05:32 +02:00
Thibault Delavallée 0f0ca1c133 [REF] product_uom, *: clean quantity computation methods
product_uom._compute_quantity is an ensure one multi method taking a browse
record as second paramter. It replaces _compute_qty and _compute_qty_obj
to have a single and standard computation method.
2016-08-01 15:05:32 +02:00
Thibault Delavallée f3d6a54e36 [REF] product_uom, *: clean price computation method
product_uom._compute_price() is now an ensure_one multi methods, taking
a browse record as second unit. This helps simplifying and unifying the
various calls and price computation methods.
2016-08-01 15:05:32 +02:00
Thibault Delavallée 429cd5970e [REF] product, *: clean price computation methods
Old price_get method is now replaced by price_compute and ready for migration.
Explicit parameters for unit of measure and currency have been added to ease
code understanding.
2016-08-01 15:05:32 +02:00
Thibault Delavallée 62d300d889 [REF] product: clean addon and prepare new API migration
This commit contains mainly the removal of dead code and update of methods
to match multi API.
2016-08-01 12:17:41 +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
mdi-odoo 75867d7bf6 [MOV] product: reorganize addon directory 2016-08-01 12:13:08 +02:00