Commit Graph

2623 Commits

Author SHA1 Message Date
Odoo Translation Bot fe3835faff [I18N] Update translation terms from Transifex 2015-07-05 01:52:32 +02:00
Temur Vibliani 99b7a6e7a1 [FIX] product: fake error log from product.template
Disabled fake error log from product.template.create_variant_ids() function.

Closes #7182
2015-06-30 14:07:30 +02:00
Odoo Translation Bot acc1b525fa [I18N] Update translation terms from Transifex 2015-06-29 08:42:08 +02:00
Xavier Morel 443c38dbc0 [IMP] product: fnct_inv of image variant
Doesn't seem to have much effect, but it's probably still better to not
have 3 UPDATE run every time we create a new product.product.
2015-06-25 10:39:31 +02:00
Odoo Translation Bot 35b2463324 [I18N] Update translation terms from Transifex 2015-06-22 13:21:18 +02:00
Raphael Collet dca1894b5d [IMP] product: optimize `name_get()` of `product.category`
Using the new API takes better advantage of the cache than calling `read()`.
In the list of products, `name_get()` now generates 2 queries instead of 144!
2015-06-17 10:48:29 +02:00
Odoo Translation Bot e2c9699cfc [I18N] Update translation terms from Transifex 2015-06-08 14:03:50 +02:00
Lionel Sausin 08fabb1d64 [FIX] product: Don't force arbitrary precision on weights
The product view forces the decimal accuracy to 3 digits on weight and
weight_net, but the accuracy can actually be set using the 'Decimal Acuracy'
feature so it must not be forced here.
2015-06-03 17:49:04 +02:00
Goffin Simon 7f8cd01431 [FIX] product: Product field
"product.product" model inherits from "product.template"  model then
all the float fields in "product.product" include those from "product.template".
A list is used to conserve the order of the fields.

Fixes #2067
opw:639766
2015-06-01 09:11:22 +02:00
Martin Trigaux 4528ccf148 [I18N] First sync of translations from Transifex
Translation is that which transforms everything so that nothing changes.
 -- Grass Günter
2015-05-29 21:58:20 +02:00
Nicolas Martinelli 46eb9e2639 [FIX] product: cut date to keep format '%Y-%m-%d'
Ensures the date format is '%Y-%m-%d', since it is the format of
pricelist.version_id.date_start/date_end.

opw-640436
2015-05-29 13:58:53 +02:00
Olivier Dony 1cea0dc4e9 [I18N] Final sync + cleanup of Launchpad Translations, moving to Transifex
See https://github.com/odoo/odoo/wiki/Translations
2015-05-29 10:55:06 +02:00
Olivier Dony ebb5ddcd65 [I18N] Sync latest translations from Launchpad (not the final one) 2015-05-21 14:42:20 +02:00
Denis Ledoux 3e14a4ee5e [FIX] product: supplier pricelist field in partner form
This is related to revision 73432ffe9f.

The inherited view adding
the purchase pricelist field on the partner form
no longer worked for user being in the purchase pricelist group
but not in the sale pricelist group, since the field was added
after the sale pricelist field, which was no longer in the view
for these users.

This revision partially revert the above revision, but
add the purchase pricelist group in the groups of the view,
so the view is loaded only if the user is part of one group
or the other.

opw-639685
2015-05-13 11:57:11 +02:00
Denis Ledoux 73432ffe9f [FIX] *: accesses of views concernings specific groups
If the whole view relates to a specific group,
apply the group on the view itself instead of
each view part (each fields, each page, each div,...),
so the view is loaded / added to the base view
only if the user is in the right group.
So the view is not loaded uselessly
and the fields are not read for nothing
(performances & security).

Indeed, when a group is applied on a field itself, the field content
is read, but hidden, therefore reading the content of the field
uselessly, and potentially leading to accesses issues
if the user hasn't the rights to read the field.
(e.g. reading a property when not having access to the model
of the proprty, pricelists on partners for instance)

opw-634402
2015-05-12 11:33:43 +02:00
Josse Colpaert cf6d7479d5 [IMP] Stock valuation: Avoid consumables with real-time valuation
When the product is a consumable, avoid to use real-time valuation, by adapting
the onchange in the views and making the valuation field invisible when the
product is a consumable / service.
2015-05-12 09:53:20 +02:00
Olivier Dony 622e00baa5 [I18N] Sync 8.0 translations from Launchpad 2015-04-28 09:45:53 +02:00
Martin Trigaux 9e1100ae2f [FIX] product: pricelist specific to a product
Double list comprehension is a nice try but does not work in python.
prod_ids was a list containing only the first variant, so getting the
product-specific pricelists only for the first variant of the first template.
Fixes #2900
2015-04-23 10:38:48 +02:00
Martin Trigaux d84b5d35ac [FIX] product: pricelist on product to apply on template
If a product as only one variant, using the product.product or the
product.template in the pricelist configuration should have the same effect.
This is particulary important for the ecommerce where template without variants
do not show the product. Having a pricelist for that product had no effect on
the price used in the e-commerce.

Fixes #2900, opw 615153
2015-04-22 16:27:05 +02:00
Denis Ledoux 23ffff7a6f [FIX] product: recursive category name search
Before this rev.,
if you had two child categories with the same name, e.g.:

- Chocolates / Orange
- Fruits / Orange

In the product list, searching for category "Fruits / Orange"
also returned the products from category "Chocolates / Orange",
because it fetched all products which had "Orange" in the category.

This rev. corrects this (in the above example, it returns
only products from category "Fruits / Orange".

The code is particularly complex. A proper solution would be
to store the complete name field (but this cannot be done in
stable releases, such as 8.0).

Besides, it handles the fact a product category child can have
' / ' directly in its name (it's not only the category tree separator).
e.g., you could have a category name called 'Fruits / Orange' directly
not only in the complete name.

opw-628793
2015-04-13 17:30:16 +02:00
Denis Ledoux 83e8c54637 [FIX] product: import product.template fields using default_code
This rev. is related to 489a96c257

It wasn't possible anymore to perform an import of
a product.template field in a model
(e.g. mrp.bom), while it should be the case.

In the context of an import,
the operator of the name_search is '='.
Therefore, in this super call, the operator was '='
and the name was '' (empty).
In such a case, ('name', '=', '') is added
to the search domain by the base name_search method
(in models.py),
leading to the domain
[('id', 'in', template_ids), ('name', '=', '')]
which will lead to no results.

Forcing 'ilike' as domain is correct, as the actual
name_search, with the correct operator,
has already been performed in the lines above, the
point of this second name_search is to get
the right order along with the right name_get.

opw-632089
2015-04-03 11:06:49 +02:00
Christophe Simonis 8ad11055bb [MERGE] forward port of branch saas-3 up to 12f600c 2015-04-01 19:13:25 +02:00
Christophe Simonis 12f600cec9 [MERGE] forward port of branch 7.0 up to 35077af 2015-04-01 19:07:59 +02:00
Denis Ledoux e311a423cd [FIX] product: ratio help tooltip according to type in UOMs
In the form view of a unit of measure,
if the unit of measure was of type
"Bigger than the reference unit"
The help in the tooltip of the ratio field was wrong
Besides, this help message was contradictory
with the formula written just below the field.

opw-631672
2015-03-31 11:01:36 +02:00
Commandant Custo 0fd51c2e6e [FIX] product: Set rounding of "Unit" to 0.001
This fix prevents unexpected rounding when the
"Multiple Unit of Measure" feature is not installed.
2015-03-30 17:19:17 +02:00
Jeremy Kersten 42aa9096d9 [FIX] product: fix search view to search on attribute name.
Searching 'memory' doesn't work before...
2015-03-26 23:25:28 +01:00
Antony Lesuisse f090652c99 [FIX] product: allow active pricelist version copy
Always set active false when copy is used to prevent the overlapping
version constraint.

Closes #5822
2015-03-24 23:11:25 +01:00
Olivier Dony d8c4e4fa76 [FIX] product: unused import as of 489a96c257 2015-03-18 14:10:18 +01:00
Olivier Dony 489a96c257 [FIX] product.template: name_search order + mismatch on IDs
Improve commit bf31ab6718a8b9c8afdd29120e5056533b0a2ade:
 - do not use the product.product name_search() when there is no
   search term (it's only useful with a search term
 - do not use the product.product name_search() when the extra
   domain (args) has a criterion on IDs - these will be *template*
   ids, not *variant* ids, so the results would be wrong
 - Since templates and variants use a different natural `_order`,
   perform an extra name_search() on templates after gathering the
   ids to return, to apply the proper sort ordering. Increases the
   penalty by doing 2 name_search() calls.

This issue could be seen e.g. in the breadcrumbs where the
display_name variable is displayed for templates, and indirectly
relies on name_search() due to an old hack in call_kw in order to
implement the "future_display_name".
2015-03-18 11:40:51 +01:00
Christophe Simonis 4a3c4713e9 [MERGE] forward port of branch 7.0 up to 209ce6f 2015-03-09 11:24:32 +01:00
Leonardo Donelli 017f346dd3 [FIX] product: keep partner to base pricelist
When a rule is based on another pricelist, the partner was not passed to the
base pricelist.
2015-03-04 14:33:06 +01:00
Anton Chepurov 47ca07ba19 [FIX] product: sort attributes before checking existing variants
When generating the list of all needed variants, the attributes are sorted based
on the order in field attribute_line_ids while, when comparing with existing
variants, the order of the attributes on the product.product is the order
on the field attribute_value_ids. As both order could be different (no direct
relation), variants could be wrongly recreated instead of keeping existing one.

Make sure the attribute lists are always sorted.

Fixes #4361
2015-03-03 15:40:19 +01:00
Leonardo Pistone ddb900c7c5 [FIX] product: demo data irrelevant product description
Closes #4735
2015-03-01 03:34:00 +01:00
Olivier Dony 05bbe78d87 [FIX] product.product: name_search() must preserve natural order
The natural order was discarded when merging results with a set,
and this was actually un-necessary as the second search()
excludes the previously found `ids`.
2015-02-26 14:03:05 +01:00
Olivier Dony bf31ab6718 [FIX] product.template: name_search compatibility with product.product
In the rare places with a m2o field to product.template
(e.g BoMs), it is necessary to be able to search on product
codes, EAN, etc, the way it works on product.product.
This is done by delegating the name_search to product.product
and then returning the corresponding templates.
This has a small penalty of executing name_get() twice,
but is simpler and more robust for future changes.

An alternative would have been to extract the name_search()
method into a mixin and mix it on both product.product and
product.template. However this would be more brittle and
only work as long as the name_search implementation strictly
uses fields that are present in both tables.

OPW 626662
2015-02-26 14:03:05 +01:00
Frédéric van der Essen 717e4106ad [FIX] product: backport of 0059d7b, avoid rounding 0 for kg
The precision 'Product Unit of Measure' was defined after the declaration of kg.
Since fc85a7ee, the precision of kg is set in data to 0.001.
As the Product Unit of Measure was not defined yet, the rounding was stripped to
(16,2) precision, so getting a rounding of 0.0 for the kg unit of measure.

[FIX] product: the declaration of decimal precision was done after
the declaration of uom precision, preventing uom precision from going above
the default decimal precision. + made the Kg unit precise up to grams by default.
2015-02-23 16:46:46 +05:30
Olivier Dony 91d4b947f6 [I18N] Update translations from Launchpad 8.0 branches 2015-02-18 11:51:07 +01:00
Christophe Matthieu 8518a963e0 [FIX] product: if the product has no attribute and you add one without any value, the product is deleted. 2015-02-16 13:22:50 +01:00
moylop260 88ab3db5f2 [FIX] product: missing default init before using it as dict
This revision bring back the possibility to use the copy method
of product.product without passing parameters

Closes #5236
2015-02-13 15:03:13 +01:00
moylop260 9ec5529ac1 [FIX] product: avoid duplicate product ref in demo data
Closes #5142
2015-02-11 10:14:35 +01:00
Denis Ledoux 769c62ef27 [MERGE] forward port of branch saas-3 up to f92b2f8 2015-02-06 14:19:30 +01:00
Denis Ledoux f92b2f8d4d [MERGE] forward port of branch 7.0 up to 0b7db55 2015-02-06 14:02:43 +01:00
David Monjoie d7f30de9ae [FIX] product: moved pricelist_item ACL from stock to product
Otherwise if we install sale without stock, we can create pricelist and pricelist versions, but not pricelist items.
Fix for issue 626985
2015-02-04 16:17:36 +01:00
Denis Ledoux 0c1d73b1be [FIX] sale: missing context in browse call.
Not passing the context should be exceptional, in almost all cases you should pass it.
In this specific case, not passing it will, for instance,
prevent the use of the key 'active_test' in the context,
and there is therefore no way to count all variants, including disabled ones.
2015-02-02 16:10:27 +01:00
Denis Ledoux cc2a406b4f [FIX] product: uom category name 2015-01-27 11:37:30 +01:00
Olivier Dony 8e03852fd4 [I18N] Update translations from Launchpad 8.0 branches 2015-01-26 16:36:51 +01:00
Olivier Dony 25b1df2eb3 [FIX] product: better expose default_code on product.template
For companies not working with variants,
it is important to be able to search in the
Products menu (product.template)  using
product codes.
It is useful as well to see the codes
in the default kanban view too, even if
it is only the code of the first variant.
2015-01-24 04:25:51 +01:00
Olivier Dony a3c369f53f [FIX] product: force empty domain for variants action
Takes care of resetting it from older versions
e.g. rev d97e7a6a4e
and c0076916f3, as
the old `variants` field that was used does not
exist anymore, crashing at opening.
2015-01-23 23:23:27 +01:00
Olivier Dony 495ec92251 [I18N] Update translations from Launchpad 8.0 branches 2015-01-21 15:36:54 +01:00
Olivier Dony 39f00b3637 [I18N] Update translation templates with latest terms
Total new terms: 270
Total deleted terms: 82
Total identical terms: 19653
Old total number of terms: 19735
New total number of terms: 19923
2015-01-21 15:31:22 +01:00