Commit Graph

2651 Commits

Author SHA1 Message Date
sve-openerp b747b3d30b [IMP] product: usability improvement in pricelist
Explicitly specifiy that quantities are in product uom
2014-11-28 15:50:57 +01:00
Christophe Simonis ec30b21336 [MERGE] forward port of branch 7.0 up to de07c64 2014-11-28 15:16:38 +01:00
Olivier Dony fc85a7ee5c [FIX] product: remove unnecessary UoM rounding step, add missing test
Remove the intermediate rounding inside _compute_qty(), as it
is not necessary after rev. fa2f7b86 and has undesired side-effects.

An extra float_round() operation inside _compute_qty()
had been added at rev. 311c77bb to avoid a float representation
error in UoM factors that could bias the ceiling() operation
done as the last conversion step.

Example 1:
Dozen has a factor of 1/12, which was previously stored in the
database with a decimal accuracy of 12 significant decimal digits.
This meant the factor was exactly stored as 0.08333333333333.
When reading this back into a Python float, the precision was not
sufficient, and the UoM conversion of 1 Dozen to Units gave a
result of 12.00000000000047961...
After the final ceiling() operation to Unit's rounding, the
converted value ended up as 13.

This problem was initially solved using an extra rounding.

However at revision fa2f7b86 the decimal precision used to store
UoM factors was increased to preserve all significant digits.
This added the extra precision necessary to read the Dozen factor
back into an accurate float value of 1/12, and the conversion of
1 Dozen now gives 12.0 Units, even without the intermediate
rounding operation. (Works for other factor values too)

At the same time that extra rounding operation has undesired
side-effects, as it requires a fixed precision derived from
the rounding precisions of the UoMs. But there is no given precision
that would work in all cases for this intermediate value. It is
always possible to find a valid combination of UoM roundings
that breaks that intermediate step, e.g. by forcing integer
roundings.

Example 2:
Let Grams have a rounding precision set to 1 because no smaller
quantities are allowed, and Kilograms a rounding of 0.001 to allow
representing 1 Gram. (gram factor = 1000 and kilogram rounding = .001
by default)
If we try to convert 1234 Grams into Kilograms, the extra rounding
introduced in 311c77bb will cause a rounding of 1234.0/1000.0 at
the precision of Grams (1), which gives 1.0 as a result.
The net result of this conversion gives 1234.0 Gram = 1.0 Kilogram,
while the correct result (1.234 Kilogram) is perfectly compatible
with the UoM settings.

Similar errors could be triggered with various rounding settings, as
long as the intermediate rounding needs a finite precision.

Two extra tests have been added to cover Example 1 and Example 2.

--
Related to #2072, #1125, #1126, #2672
Closes #2495, #2498
2014-11-27 16:44:34 +01:00
Olivier Dony 9bc712b075 [REV] product: rev. 42f5114 needs further review
Incorrect use of stock.move in product module + needs review.

This reverts commit 42f511405a4efe88e3903a4b4040ec9d83e462e2:
"[IMP] When no stock moves, change whatever you want, otherwise no change at all for UoM.  #3440 Enhancement request richard-willowit"
2014-11-26 18:20:28 +01:00
Josse Colpaert 42f511405a [IMP] When no stock moves, change whatever you want, otherwise no change at all for UoM. #3440 Enhancement request richard-willowit
The default UoM can only be changed when there are no stock moves (or only cancelled ones), but to any category.
The purchase UoM can be changed whenever you want, but has to be in the same category as the default UoM.

Closes #3440

[IMP] When no stock moves, change whatever you want, otherwise no change at all for UoM.  #3440 Enhancement request richard-willowit

[FIX] Remove line

[FIX] Constraint should be applied when UoM or PO UoM is changed
2014-11-26 18:01:00 +01:00
Christophe Matthieu d3c562d4e8 [FIX] product: keep attribute on a variant with only one attribute
When adding informational attribute, with only one possible value, it used to be skipped.
Instead keep it and add it on every variant.

To avoid dropping and recreating product (and lose eventual customisations), the attributes with only one possible value are set on every product.
This makes sure that in following test, these are not considered in variants_inactive variable.

Fixes #3204
2014-11-26 14:35:08 +01:00
Denis Ledoux 02f4f9a572 [MERGE] forward port of branch 7.0 up to e2dd18f 2014-11-26 12:35:36 +01:00
Martin Trigaux 7dca12ee08 [FIX] product: comparison of currency rounding
Setting 0.0001 as precision used to be converted to 9.999999999999999e-05
precision_digits of 6 is the precision of the field 'rounding' on res.currency
Fixes #3875
2014-11-25 18:41:00 +01:00
Martin Trigaux 4ce7af3573 [FIX] product: creation of reference uom
Set a default value for factor when creating a new uom.
Could not create a new UoM with type reference (if creates a reference uom, no need to pass a factor).

Change the readonly filter to (type = bigger) to make the field writable for reference uom.
This is needed to force the reset of the factor when switching of type (onchange_type).
As the field was readonly, kept the old value for factor.
2014-11-24 11:04:50 +01:00
Olivier Dony a6d24db305 [I18N] Update translations from Launchpad 8.0 branches 2014-11-19 17:49:12 +01:00
Denis Ledoux d9e48bae42 [MERGE] forward port of branch saas-3 up to 7ab4137 2014-11-14 16:58:24 +01:00
Denis Ledoux 7ab413724a [MERGE] forward port of branch 7.0 up to da15c9d 2014-11-14 15:59:33 +01:00
Denis Ledoux 5b2f13abdf [FIX] product: more accurate name_search
First, name_search searches on default_code, then, if the limit is not reached, it searches on the product name
The results found from the default code search must be removed from the search domain when doing the search on the product name, to avoid having results already found by the search on the default_code

opw-618015
2014-11-14 13:42:52 +01:00
Raphael Collet b8071bbaca [FIX] addons: incorrect new-api invocation of method write() with context
This fixes #3411.
2014-11-13 13:34:55 +01:00
Christophe Matthieu 7ffbd5c726 [FIX] product: name_get of product.attribute.value
name was confusing for bom and product if the value of the attribute is display without the attribute name
added key in context to keep the previous behaviour (e.g. in product view where the attribute name is present)
2014-11-07 12:03:47 +01:00
David Monjoie 0c74b9d027 [FIX] product: pricelist shouldn't convert uom when not needed or incompatible uom types
Otherwise the Search More view will crash for example for sale order line because it will fetch the price of all products and then try to convert uoms for pricelist rule application without checking uom compatibility
2014-11-07 09:08:53 +01:00
David Monjoie 3629bfe64f [FIX] product: pricelists based on the supplier prices now return first supplier price if partner not in suppliers instead of returning 0
Without this, sale pricelists cannot be based on supplier prices as the partner is never a supplier so the price would be 0
Note: behavior change ok with fp
2014-11-05 12:22:36 +01:00
Denis Ledoux 0f52e22906 [FIX] product: use new api to retrieve user company 2014-11-04 13:04:50 +01:00
Denis Ledoux f7723037d6 [MERGE] forward port of branch saas-3 up to 8c4a7cb 2014-11-04 12:30:01 +01:00
Denis Ledoux 8c4a7cb371 [MERGE] forward port of branch 7.0 up to 5035c76 2014-11-04 12:19:58 +01:00
Denis Ledoux 5035c76f42 [FIX] product: product prices can be company dependent
Some prices, as standard_price, being a property, are company dependent. Therefore, when browsing as superuser, force_company is mandatory to get the property of the user company
2014-11-04 11:54:03 +01:00
David Monjoie fd20241b0d [FIX] product: pricelist now consider the quantity in product uom qty for rule application purposes 2014-11-03 09:09:52 +01:00
Christophe Simonis 8e637bac92 [MERGE] forward port of branch saas-3 up to 21b1203 2014-10-29 19:33:02 +01:00
Christophe Simonis 21b1203ee0 [MERGE] forward port of branch 7.0 up to 43db726 2014-10-29 19:05:43 +01:00
Mohammad Alhashash 43db7267c5 [FIX] stock: UoS quantity in stock.picking
Implements the UoS TODO items on stock.picking.do_partial() to fix #1432.
Add a new method _compute_uos_qty() on product.product to computes
product's invoicing quantity in UoS from quantity in UoM.

The created invoice will use the product_uos of the stock.move, meaning keeping
the quantity specified on the partial picking and the unit of measure of the
original stock.move (e.g. recieving 1 dozen from a 12 unit picking should either
get uos=dozen, uos_qty=1 or uos=unit, uos_qty=12, not a mix of both)

Fixes #1432, opw 611479
2014-10-29 10:10:50 +01:00
Martin Trigaux 339b549f41 Forward port of branch 7.0 up to rev 8abd003 2014-10-27 12:03:01 +01:00
Martin Trigaux 8abd003ef0 [FIX] product: reference in test 2014-10-27 11:41:23 +01:00
Martin Trigaux 9f5e989d5d Forward port of branch 7.0 up to 42bf0a5 2014-10-27 11:21:41 +01:00
Christophe Matthieu 3986e8c509 [FIX] product: is_product_variant is all time false. result: can not change ean because the field is hidden in the view. Need to overwrite the function field on product.product to have the real value (true for product.product) 2014-10-27 10:24:13 +01:00
Martin Trigaux 79ebe1060d [FIX] product: pricelist, uom and price_surcharge
The price_surcharge attribute must be computed based on the reference unit of measure (divided by the factor).
This is to make sure than 12 units and 1 dozen have the same price after pricelist computation (opw 599727).

Added test checking the correctness of pricelist computation based on unit of measures.
2014-10-24 17:21:42 +02:00
Christophe Simonis 562272d9a0 [MERGE] forward port of branch saas-3 up to c89d1a0 2014-10-23 13:08:44 +02:00
Denis Ledoux 0e4216361b [MERGE] forward port of branch 7.0 up to 3a0af6a 2014-10-22 19:26:27 +02:00
Martin Trigaux 3a0af6af7b [FIX] product.uom: safer handling of factor/factor_inv in UI
Add readonly attribute to avoid sending both factor and factor_inv value to the backend when saving.
This was possible if the user switched between uom_type to fill the two fields.
2014-10-22 14:28:35 +02:00
Cedric Snauwaert fa2f7b86bf [FIX] product: remove digits_precision from uom factor fields
Remove the hardcoded precision of 12 on factor and factor_inv,
to use the complete natural precision of NUMERIC types,
preserving all significant digits.

e.g. a UoM with a factor_inv of 6.0 used to be computed as:
factor_inv: 6.0 -> factor: 0.166666666667 (1.0/6.0, rounded to 12 digits) -> factor_inv: 5.999999999988 (1.0/factor)
which could lead to errors such 12*0.166666666667 = 2.000000000004 instead of 2.0

Slightly changed the way the ORM handles float fields to allow setting `digits=0`
as a way to explicitly require a NUMERIC value but without enforcing/rounding
the values at the ORM level, i.e. a truly full-precision field.

NUMERIC type has unlimited precision but is less efficient so should not be
used as the default behaviour, which is why we keep float8 as an alternative.

Modified the view to display the product UOM factor with a 5 digits value by default.
This value is for usability purpose only, the field still accepts bigger precision, by
setting the `digits` option on the field in the form view.

This change is safe in a stable series, the `digits=0` alternative is
treated the same as the default `digits=None` everywhere in the framework,
except when creating the database field.
2014-10-22 14:28:34 +02:00
Martin Trigaux 7705f883d2 [FIX] base: support float rounding with rounding_method=UP (ceiling)
Add rounding_method parameter on float_round method to offer
HALF-UP (default, usual round) or UP (ceiling) rounding method.
Use the second method instead of math.ceil() for product
reservations.

For UP, the python math.ceil() method uses "torwards infinity"
rounding method while we want "away from zero".
Therefore we use the absolute value of normalized_value to make
sure than -1.8 is rounded to -2.0 and not -1.

Fixes #1125 #2793

This is a cherry-pick of d4972ff which was reverted at 333852e due
to remaining issue with negative values.
2014-10-22 14:28:22 +02:00
Denis Ledoux 342f7492c7 [FIX] product: price_rule_get_multi returns a dict with a dict with tuples 2014-10-15 18:52:38 +02:00
David Monjoie 2cde5596b9 [FIX] product_visible_discount: fix display of unit price according to rule base price like in 7.0 as requested by gab 2014-10-15 15:46:28 +02:00
Christophe Simonis 3110d97c3d [FIX] product: correct name_get for products with resellers.
Error introduced during forward-port commit 14f3085
2014-10-14 17:04:19 +02:00
Denis Ledoux da17723bef [FIX] product: use new api to retrieve product standard price as SUPERUSER
As it looks like self is a product.template, and product can be a product.product. Using the new api avoid to have this problem.
2014-10-14 12:46:07 +02:00
Denis Ledoux b447d7b063 [FIX] product: redo forward port 2832d2d for fix 12eb157 lost with 43977de 2014-10-14 12:02:20 +02:00
Olivier Dony 7439421ad2 [I18N] Update translations from Launchpad 8.0 branches 2014-10-08 17:52:25 +02:00
Denis Ledoux b13898c058 [MERGE] forward port of branch 7.0 up to 03df412f 2014-10-07 17:34:42 +02:00
Lionel Sausin (Numérigraphe) 04bc91cb4e [FIX] stock: groups mixup in views
Use group_production_lot for serial options, group_stock_packaging for packaging, use group_tracking_lot for pallet/parcel
Groups are removed completly from the view for stock.tracking as they render the view useless.

Always display weights on the product form
They really have nothing to do with the logistic units and we don't have another group to restrict them to.

Fixes #1443
2014-10-06 14:43:11 +02:00
Josse Colpaert fc65efbb9b [FIX] Fix inheritance in point_of_sale views + ean visible on creation + landed costs views
[IMP] Set custom EAN not visible when multiple variants

[IMP] Change landed costs views + make ean visible upon creation
2014-10-06 09:14:20 +02:00
Josse Colpaert 899f2066e9 [FIX] Adapt product variants in order to show internal code and ean13 #2772
[IMP] Typo
2014-10-06 09:14:20 +02:00
Denis Ledoux 14f3085776 [MERGE] forward port of branch saas-3 up to 77500e5 2014-10-02 15:36:58 +02:00
Denis Ledoux 77500e54ec [MERGE] forward port of branch 7.0 up to eb9113c 2014-10-02 15:34:02 +02:00
Martin Trigaux 78144410a4 [IMP] product: name_get matching on commercial_partner_id for suppliers
The name_get of a product will use some information (e.g. default_code) based on the supplier.
The matching of the supplier should use the commercial_partner_id in case the supplier info are on the company and the partner_id in the context belongs to the company (e.g. creates quotation with a contact of the company).
Fixes #1219
2014-10-02 10:59:18 +02:00
Christophe Simonis 388f1a1d7e [MERGE] forward port of branch saas-3 up to 3d4b82c 2014-10-01 16:46:03 +02:00
Denis Ledoux 3d4b82cd56 [MERGE] forward port of branch 7.0 up to 9cc54dc 2014-10-01 12:41:42 +02:00
Denis Ledoux 9cc54dcd2c [FIX] product: name_search handles negative operators 2014-10-01 12:39:59 +02:00
Denis Ledoux 07ee2a1de9 [MERGE] forward port of branch saas-3 up to 39bb45a 2014-09-26 21:58:06 +02:00
Denis Ledoux 39bb45a8ea [MERGE] forward port of branch 7.0 up to 333852e 2014-09-26 21:32:40 +02:00
Denis Ledoux 333852e19d Revert "[FIX] product,float_utils: perform ceiling via float_round with new rounding_method UP"
This reverts commit d4972ffdb6.

Seems to break some cases, at least in _product_reserve from stock/stock.py

Actual use case:

SELECT product_uom, sum(product_qty) AS product_qty FROM stock_move WHERE location_dest_id=%s AND location_id<>%s AND product_id=3645 AND state='done' GROUP BY product_uom;
returning 1 | 6

SELECT product_uom,-sum(product_qty) AS product_qty FROM stock_move WHERE location_id=%s AND location_dest_id<>%s AND product_id=%s AND state in ('done', 'assigned') GROUP BY product_uom;
returning 1 | -6

results += cr.dictfetchall()
    total = 0.0
    results2 = 0.0
    for r in results:
        amount = uom_obj._compute_qty(cr, uid, r['product_uom'], r['product_qty'], context.get('uom', False))
        results2 += amount
        total += amount
Total = 1, amount = -5

It should actually be
Total = 0, amount = -6
2014-09-26 21:21:06 +02:00
Christophe Simonis e2e60bf4eb [MERGE] forward port of branch saas-3 up to fe8106f 2014-09-26 12:53:59 +02:00
Denis Ledoux 76067367b2 [MERGE] forward port of branch 7.0 up to 5f6d324 2014-09-25 15:10:37 +02:00
Cedric Snauwaert 311c77bb88 [FIX] product: _compute_qty: first round before ceiling, to avoid pathological cases
Fixes problem when we try to sell 12 units of a product and change it to 1 dozen,
the algorithm was then trying to recompute the original amount and was getting
12,0000048 as a result which was then passed to the ceiling method, getting 13.0!

See also previous commit and issue #1125, PR #1126
2014-09-24 17:11:26 +02:00
Cedric Snauwaert d4972ffdb6 [FIX] product,float_utils: perform ceiling via float_round with new rounding_method UP
Modified product ceiling() to use float_round() with special mode
for rounding UP (away from zero), avoiding pathological cases where
float representations errors were ceiling to the superior unit.

Also added correspding tests for rounding_method=UP

Fixes issue #1125, and replaces PR #1126.
2014-09-24 17:11:25 +02:00
Grzegorz Krukar bcf3bca87b [FIX] product: typo in field string 2014-09-24 09:44:10 +02:00
Olivier Dony b74d830eb2 [I18N] Update translation templates with latest term changes 2014-09-23 19:13:50 +02:00
Olivier Dony 1c5b5e4290 [I18N] Update translations from Launchpad 8.0 branches
server: rev. 26 rev-id launchpad_translations_on_behalf_of_openerp-20140923072744-tkfs0yinu8msjh09
addons: rev. 39 rev-id launchpad_translations_on_behalf_of_openerp-20140923072715-5j7qvnuvmmb1zzy1
web: rev. 23 rev-id launchpad_translations_on_behalf_of_openerp-20140923072757-jvh9l6r2x0vfcyhb
2014-09-23 13:42:05 +02:00
Josse Colpaert ac2d50d27a [IMP] Assign all destination moves at once, add packaging 2014-09-22 11:29:39 +02:00
Richard deMeester 86eeea12f0 [FIX] product: Put product_variant_count on template form view.
Was missing to be used in domain added at 92d8f15.
Fixes #2570
2014-09-22 11:04:00 +02:00
Christophe Matthieu 92d8f15a18 [FIX] product: Even when the product template has more than 1 variant, the default_code is displayed. 2014-09-19 12:30:57 +02:00
Olivier Dony 53aa92d3c9 [I18N] Update translations from Launchpad branches 2014-09-18 11:47:16 +02:00
Josse Colpaert 5aeccbd90e [IMP] Use display_name instead of partner_ref 2014-09-17 21:42:07 +02:00
Fabien Meghazi 8ccd4c67e5 [IMP] Convert product demo png's to 8bit 2014-09-16 19:55:00 +02:00
Christophe Simonis 780dd9891f [MERGE] forward port of branch saas-5 up to 7eab880 2014-09-15 14:00:02 +02:00
Christophe Simonis 56f2b7ae0f [MERGE] forward port of branch saas-3 up to fdc6271 2014-09-12 18:53:48 +02:00
Josse Colpaert ae2eb43e30 [IMP] Implement comments on pull request 2014-09-12 13:49:42 +02:00
Josse Colpaert 246c425226 [WIP] Pricelist of purchase is not in stock only and remove product_manufacturer module in view + manufacturer 2014-09-12 13:49:42 +02:00
Denis Ledoux abba7aa212 [FIX] product: can be sold as default filter for templates 2014-09-11 17:54:58 +02:00
Olivier Dony 57829ce3ec [FIX] product,purchase,point_of_sale: force empty values for dropped fields
At 96f038a product-related fields were removed due
to an important product.template/product.product
refactoring. As the field values were simply
dropped, they may not be nullified when upgrading an
existing database. Forcing them to False will take
care of it.
2014-09-10 14:58:45 +02:00
Commandant Custo ef5b078b74 [IMP] product: Order product.template by name
When no order is forced, it's more user-friendly if the products are ordered by alphabetical order.
This will mainly be applied:
* In the list view in the back-end
* In the eCommerce, for products with equal website_sequence
2014-09-09 16:08:32 +02:00
rsi-odoo 6202918754 [IMP] product : Improve tooltip of pricelist on min_quantity field. 2014-09-09 14:16:38 +02:00
Olivier Dony fac96241df [I18N] Update 8.0 translations with latest changes from Launchpad 2014-09-08 19:04:25 +02:00
Josse Colpaert 9b34358196 [IMP] Adapt mrp workflow and moves + Differ between Bose speakers and Custom Computer 2014-09-03 19:18:17 +02:00
Josse Colpaert 6553e22306 [WIP] Create procurement when Phantom 2014-09-03 19:18:16 +02:00
Fabien Pinckaers 8aca457e34 [IMP] Updated website urls on modules and info page 2014-08-26 21:40:18 +02:00
Christophe Matthieu b3aad9f511 [FIX] product: don't display 'create and edit' option on many2many_tag to create variant on product_template. The quick create is confusing for users 2014-08-22 14:20:14 +02:00
Josse Colpaert 71b33e7975 [IMP] Counterpart locations and weights should not be read-only in case of type service, but should simply be invisible as the other fields 2014-08-21 17:23:54 +02:00
Christophe Simonis 5dff035878 [MERGE] forward port of branch saas-5 up to 39bee35 2014-08-20 20:33:17 +02:00
Christophe Simonis c3131317d7 [MERGE] forward port of branch saas-4 up to ddef2dd 2014-08-20 17:57:22 +02:00
Christophe Simonis ddef2dd10a [MERGE] forward port of branch saas-3 up to 8f13e83 2014-08-20 17:51:20 +02:00
Christophe Simonis 8f13e8320e [MERGE] forward port of branch 7.0 up to d0a0b7d 2014-08-20 17:45:05 +02:00
Hardik Ansodariya 86f99ef250 [IMP] product: filter and group by category_id on product.template
Was removed (for unknown reason) during refactoring of product and template (opw 611699)
2014-08-20 11:05:53 +02:00
kevin wang ad05669460 [IMP] product: specify a view for 'Variant Values' action 2014-08-19 11:33:29 +02:00
Frederic van der Essen 24df6dc8b2 [FIX] product, point_of_sale: add a display_default_code context option that can remove the internal reference (default code) from the displayed product name. Used in the point of sale to unclutter the receipt & GUI 2014-08-18 14:51:15 +02:00
Thomas Groutars 397e83554b [FIX] product: make sure unlinked product still exists
When uninstalling/updating a module, we may execute unlink method on product.template before product.product. In such cases, the product is already removed after removeing the template (_inherits) and the chained unlink of the product would fail (traceback when browsing).
2014-08-18 10:37:03 +02:00
Olivier Dony 50ef63881a [I18N] Update 8.0 translation with latest source code 2014-08-14 17:01:54 +02:00
Olivier Dony 96c36e895c [I18N] Update all 7.0 translation templates with latest terms and annotations
Total new terms: 168
Total deleted terms: 95
Total identical terms: 16329
(Some modules skipped, typically all l10n_* modules)
2014-08-14 02:24:24 +02:00
Olivier Dony 2bbff57691 [IMP] hr,mail,product,project,base: use @auto_join=True on _inherits FK field
This can give a performance boost on large databases
and should not be a concern in terms of access control
as the inheritance already grants access to the parent
records.
2014-08-07 18:03:08 +02:00
Denis Ledoux 1bb219907f [MERGE] forward port of branch saas-5 up to 655a5b9 2014-08-04 16:56:10 +02:00
Christophe Matthieu 1d76fa0b1c [FIX] product: some fields on the product template readonly when my product doesn't have any variant 2014-07-29 15:20:25 +02:00
Martin Trigaux 6dc94f0c4e Forward port of branch saas-5 up to eda2f06 2014-07-28 16:37:56 +02:00
Martin Trigaux eda2f064cf [FIX] stock: backport of rev 0a6d63b 2014-07-28 09:35:25 +02:00
Olivier Dony ef53a831c6 [MERGE] Forward-port saas-5 up to a5f7891 2014-07-23 16:58:00 +02:00
Denis Ledoux a5f7891b68 [MERGE] forward port of branch saas-4 up to 5739aebfb1 2014-07-23 13:18:30 +02:00
Christophe Matthieu 2182797d93 Merge pull request #1262 from odoo-dev/8.0-fix-product-lst_price-chm
[FIX] product: user who don't use product variant can't edit the price of the product in product view. This behavior is not understandable. Add a function inverse to set the value (remove the variante price before change the list_price of the template)
2014-07-18 16:04:28 +02:00
Richard Mathot 6f1b820d33 [REF] OpenERP --> Odoo in various UI texts (2)
Some things missed by commit 8b67a7202d
2014-07-18 14:59:38 +02:00
Christophe Matthieu 380a7e97f5 [FIX] product: user who don't use product variant can't edit the price of the product in product view. This behavior is not understandable. Add a function inverse to set the value (remove the variante price before change the list_price of the template) 2014-07-18 11:33:09 +02:00
qdp-odoo d35d47165e Merge pull request #1124 from odoo-dev/master-wmsstaging4-jco
fixes related to WMS, product variants and templates... from Josse
2014-07-17 18:18:16 +02:00
Josse Colpaert 28ad04a4de [IMP] Only show number of variants when more than one + bug cursor Compute Minimum Stock Rules 2014-07-16 13:50:56 +02:00
xmo-odoo 16d67445da Merge pull request #1076 from xmo-odoo/8.0-shop-fix-xmo
Fix access rights issues in new API for the shop home page
2014-07-16 10:28:51 +02:00
Josse Colpaert db715f99f4 [IMP] Change reception to receipt 2014-07-16 10:23:57 +02:00
Josse Colpaert 32dd003d60 [MERGE] Resolve conflicts 8.0 2014-07-13 09:27:20 +02:00
Martin Trigaux 0a6d63b82c [FIX] product: unfuck templates and products in views
product.product reuses most of the product.template views however some parts need to be excluded or replaced.
Instead of adding template only parts in base view and removing it for product, split the views in 'common' (product_template_form_view), 'template only' (product_template_only_form_view) and 'product only' (product_normal_form_view) where the first is inherited by the other two. The attribute mode='primary' on both second views allows to make sure that future inheritance of product_template_form_view and product_template_only_form_view will work with the full rendered product_template_form_view view.
This allows us to have valid buttons in crm for bill of material (filters based on active_id).
Also cleaning the mess with circular dependencies.
2014-07-11 17:03:04 +02:00
Xavier Morel 6014d44b2b [IMP] add read access to all users for product.pricelist.type
In new API, selection field value is checked (against the selection's possible
values) at both read and write. For pricelist.type this requires read access
to product.pricelist.type.
2014-07-11 13:32:46 +02:00
Christophe Simonis f654a7719b [MERGE] forward port of branch saas-5 up to 73d39a0 2014-07-10 22:49:53 +02:00
Martin Trigaux bd163d7bd4 [FIX] product: allow user to set price at template creation
The lst_price field on product.template is a related to list_price. As we do not allow to set a value for related fields at creation (see orm.py , L4180), we display the list_price instead (float field).
On the product.product form, we display the lst_price (function field, readonly) as we don't want to allow changing the template price from the product. opw 609497
2014-07-09 13:20:48 +02:00
Atul Patel 5207f12be0 [FIX]product: disable menu name come from report declaration.because it's called from wizard 2014-07-08 16:11:28 +05:30
Christophe Matthieu 4117c9c3ed [FIX] product: add menu item to attributes and attribute values. Adding constraint to prevent deleting attributes with references to products. 2014-07-08 09:12:17 +02:00
Josse Colpaert 2518767005 [IMP] Start of extra primary view on product template that is not inherited by product_product 2014-07-07 21:45:11 +02:00
Raphael Collet cbe2dbb672 [MERGE] new v8 api by rco
A squashed merge is required as the conversion of the apiculture branch from
bzr to git was not correctly done. The git history contains irrelevant blobs
and commits. This branch brings a lot of changes and fixes, too many to list
exhaustively.

- New orm api, objects are now used instead of ids
- Environements to encapsulates cr uid context while maintaining backward compatibility
- Field compute attribute is a new object oriented way to define function fields
- Shared browse record cache
- New onchange protocol
- Optional copy flag on fields
- Documentation update
- Dead code cleanup
- Lots of fixes
2014-07-06 17:05:41 +02:00
Fabien Pinckaers 5cc81dd64f Fixes 2014-07-02 18:18:29 +02:00
Christophe Simonis f31ea32229 [FIX] product: add missing dependency: report 2014-07-01 15:23:11 +02:00
Christophe Simonis 1f57528bc6 [MERGE] forward port of branch saas-5 up to 8dfd5ea 2014-06-27 16:14:40 +02:00
Denis Ledoux 368936df7c [FIX] product, website_sale: Go in GB (Go is fr) 2014-06-26 23:31:57 +02:00
Antony Lesuisse 893aace122 [MERGE] website_sale optional-products 2014-06-26 12:31:15 +02:00
Jaydeep Barot 026e38b48f [REM] Unnecessary `size` parameters on char fields 2014-06-25 17:13:43 +02:00
Christophe Matthieu e75d9525bb merge upstream 2014-06-20 10:09:16 +02:00
Christophe Simonis eef6330c55 [MERGE] forward port of branch saas-5 up to adf07a9 2014-06-19 16:23:32 +02:00
Christophe Matthieu dcce993958 [FIX] website_sale: typo and preview display all time in modal 2014-06-17 10:54:47 +02:00
kevin wang b4cbac3cba [FIX] product: create works for internal reference and ean13 code in product.template
This is a temporary workaround until these fields are removed from the template or the view is more explicit about the meaning of this field (the one on the first variant)
Fix #542
2014-06-17 10:48:44 +02:00
Christophe Matthieu 45a6012f22 [FIX] product: remove unused values 2014-06-16 17:33:18 +02:00
Christophe Matthieu 0f78e602d6 [FIX] website_sale: tour; product split kanban view of product and product template 2014-06-13 17:08:19 +02:00
Christophe Matthieu 1e9c72f308 [MERGE] from master 2014-06-13 12:35:23 +02:00
Fabien Meghazi faa09da325 Removed version="7.0" from form views 2014-06-12 09:09:59 +02:00
Christophe Matthieu 8319356630 [IMP] website_sale: allow optional products in shop; In shop, it opens the modal jus after having clicked on the 'Add to cart'. The modal contains the optional products. 2014-06-11 12:50:41 +02:00
sve-odoo b33bf57832 [ADD] Default value for supplierinfo.min_qty
And remove default value for function field "qty"
2014-06-05 09:55:30 +02:00
Christophe Simonis 3f85d4b493 [FIX] product: correct SyntaxError made by kdiff3 (once again) during previous forward port 2014-06-03 21:45:21 +02:00
Christophe Simonis a5908c5812 [MERGE] forward port of branch saas-5 up to b1c0bc0 2014-06-03 20:02:00 +02:00
Christophe Matthieu 7770ca8013 Merge pull request #320 from odoo-dev/saas-5-website_sale-product-layout-chm
[FIX] website_sale: change template for product and variant selector (type color)
2014-06-03 18:07:43 +02:00
Christophe Matthieu 057d26f860 [IMP] product: set at false one product variant of ipad 2014-06-03 16:58:26 +02:00
Guewen Baconnier 79f2b47576 Wrong variable name. The write() method should accept both int/long and tuple/list 2014-06-03 16:13:54 +02:00
Denis Ledoux 1c4825294b [FIX] product: product_variant group does not exist anymore
Therefore, the pricelist item view must show the field product_tmpl_id in any case
2014-06-03 15:03:13 +02:00
Martin Trigaux c1ae43c807 Merge pull request #292 from guewen/product-missing-report-dependency
[FIX] product: add module 'report' module in its dependencies

The product pricelist report model inherit from report.abstract_report but report was not present in dependencies.
2014-06-03 14:25:18 +02:00
Guewen Baconnier b4f72fba96 [FIX] product: fix _set_price_extra method
avoid crash is context is None
create call does not have ids parameter
2014-06-03 14:19:51 +02:00
Christophe Matthieu 36cdac48b7 [IMP] product: move product packaging field from product.product to product.template 2014-06-03 11:53:41 +02:00
Christophe Matthieu 91cb75babd [FIX] product: remove wrong field on product.template. TODO: move packaging field form product.product to product.template 2014-06-03 11:15:17 +02:00
Christophe Matthieu da6f02027a [FIX] product: set required at false for product template field when creating a product product. 2014-06-03 11:13:50 +02:00
Christophe Matthieu caf4bf77bc [FIX] product: check if context is none in _set_standard_price before check context keys 2014-06-02 15:48:24 +02:00
Guewen Baconnier 2da1adcf8f The 'product' module must list the 'report' module in its dependencies
because it refers to the 'report.abstract_report' module

Fixes #290
2014-06-02 14:58:28 +02:00
Christophe Simonis b8af4775e3 [IMP] product: improve field labels about variant/attributes distinction 2014-05-30 10:00:54 +02:00
Christophe Matthieu 435b5b9ca3 [IMP] product: rename fields variant_ids into attribute_line_ids on the template and attribute_value_ids on the product. 2014-05-28 19:42:15 +02:00
Christophe Matthieu 152ec5bf50 [FIX] product: revert change for price_extra. Need to filter by template to apply the price_extra. 2014-05-28 19:04:23 +02:00
Christophe Matthieu 6958d56a66 [IMP] product: fixes for review 2014-05-28 18:30:03 +02:00
Christophe Matthieu 256a17d419 [IMP] product: rename field variants_ids to respect odoo typo; add demo data for mrp 2014-05-28 11:46:32 +02:00
Christophe Matthieu 3f69628f96 [FIX] product: recursion error when active field on product.template is modified 2014-05-28 11:29:20 +02:00
Christophe Matthieu d24aede8d7 [FIX] product: don't create new variants if the product.template is create by product.product. 2014-05-27 18:03:15 +02:00