Commit Graph
123 Commits
Author SHA1 Message Date
Cédric Krier abc4bd5a96 Use context to check model and field access
issue4081
review8481002
2014-09-17 21:45:58 +02:00
Sergi Almacellas Abellana 6de834b6b8 Use grouped_slice helper.
issue3516
review10301002
2014-07-17 19:00:19 +02:00
Cédric Krier 6088cc5928 Fix values test for check of no move
The check must be performed even if the value of the field is False.

issue4057
review11371002
2014-07-17 14:30:45 +02:00
Sergi Almacellas Abellana 3b7892c15c Make warehouse required on product quantities by warehouse
issue4054
review7421002
2014-07-16 10:54:03 +02:00
Cédric Krier 0ac9fe8bd5 Use correct grouping when adding to warehouse
issue3843
review11281005
2014-05-27 22:22:28 +02:00
Cédric Krier 88935e3612 Fix context test in Product.get_cost_value
issue3868
review6311002
2014-05-27 22:21:36 +02:00
Cédric Krier ca5f2ae5a6 Fix product_by_location with stock_skip_warehouse and no product_ids
issue3843
review5171002
2014-04-18 19:30:22 +02:00
Cédric Krier c11b49fc3b Prevent changing product type if stock move exists
issue3558
review2311003
2013-12-20 14:02:53 +01:00
Cédric Krier 0ba33d88a2 Use a sequence of records, values in write
issue3499
review1641003
2013-12-19 14:45:31 +01:00
Guillem Barba 38ab876749 New methods on stock.move to compute quantities more modular
* Split products_by_location into two methods on Move:
  compute_quantities_query and compute_quantities
* Use new methods to compute quantities in StockMixin._search_quantity()

issue3201
review971002
2013-12-17 16:22:36 +01:00
Cédric Krier 97fa01f6da Generalize the modification check for no move
review2001002
2013-12-12 13:05:09 +01:00
Guillem Barba 0096fed655 Add Mixin class with helper to setup stock quantity fields
Add StockMixin class in move.py file with helper functions to be used in getter
and searcher methods of quantity fields.
Reimplemented getter and searcher of quantity/forecast_quantity fields of
Product to use these helper functions.
Add test over product's quantity fields.

issue3279
review963003
2013-09-09 14:11:53 +02:00
Cédric Krier 4f833ee812 Migration to python-sql
review1001002
2013-09-06 22:34:48 +02:00
Cédric Krier 77c5845141 Extend Lot Management
Allow to customize move creation of Inventory
Allow to customize unique constraint on Inventory
Allow specific grouping Period Cache
Add grouping on products_by_location and assign_try

review845002
2013-06-21 23:24:17 +02:00
Cédric Krier 4d8c8968be Fix date selection when using period in products_by_location
effective_date and planned_date could be both NULL so they must be considered
as date.max to be included.

review897003
2013-06-06 20:41:29 +02:00
Cédric Krier 1c7db5dd30 Use root to search on period and search on closed periods
products_by_location can be called by users without read access to period.
And only closed period has cache.

review875002
2013-05-22 19:18:43 +02:00
Cédric Krier b0ab39804c Include NULL planned_date with datetime.date.max
review790002
2013-04-16 15:31:10 +02:00
Cédric Krier b5a7415da3 Catch OverflowError in get_quantity when appending timedelta
If date is date.max then appending one day to it will raise an OverflowError.

review761002
2013-04-06 12:33:50 +02:00
Cédric Krier 388aed5112 Use forecast for quantity by warehouse to include today moves
review718002
2013-03-21 19:19:52 +01:00
Cédric Krier a81cd74495 Fix flake8 2013-02-24 16:18:17 +01:00
Cédric Krier c23a2c9808 Fix parent quantities computation
issue2694
review558002
2012-10-15 23:16:29 +02:00
Cédric Krier c5f83d3810 Active Record 2012-09-24 22:18:17 +02:00
Cédric Krier 5c89c26823 Add Product Quantities By Warehouse
review423001
2012-07-25 20:36:58 +02:00
Cédric Krier 9fe60068ee Add date on "Products by Locations" like for "Product by Locations"
review373003
2012-05-30 11:14:19 +02:00
Cédric Krier a316fa5722 Fix cost computation when date is before product creation
When product_cost_history is installed, the cost_price could be None

review373002
2012-05-22 14:31:56 +02:00
Cédric Krier bd7f66d7db Fix pep8 and pyflakes 2012-04-03 20:07:43 +02:00
Nicolas Évrard 200bd670e6 Integer, Numeric and Float allow None as value
NULL value is None and not False

issue2022
review237004
2012-03-23 18:38:54 +01:00
Cédric Krier 98417cafaa Use reduce_ids for product_ids clause
review290003
2012-03-19 14:23:22 +01:00
Nicolas Évrard 5f2b135b09 Add cost value to location / product contextualized views
review246002
2012-03-04 16:09:08 +01:00
Cédric Krier a16c147f93 Re-add rounding of quantities in products_by_location
Wrongly removed in changeset da0d4ec97240

issue2380
review222001
2012-01-27 20:17:26 +01:00
Cédric Krier 82458c020e New wizard design 2012-01-02 18:07:56 +01:00
Nicolas Évrard f6b35baa82 fix pyflake errors
review164008
2011-11-02 16:13:35 +01:00
Cédric Krier c4fc2a95ba Remove support of Python2.5 and fix py3 warnings 2011-07-12 00:18:06 +02:00
Cédric Krier 8eeb3c949f Change Pool into a Singleton 2011-07-03 13:19:14 +02:00
Cédric Krier 6a72f2dfca Use list of ids for browse instead of set 2011-06-15 12:03:16 +02:00
Cédric Krier d741548abc Backed out changeset 58be4bdca2af 2011-06-15 12:01:44 +02:00
Cédric Krier 22bd98c502 Use list of ids for browse instead of set 2011-05-30 13:38:49 +02:00
Cédric Krier 82534cf54e Improve stock quantity computation with internal_quantity and periods 2011-04-09 12:39:31 +02:00
Cédric Krier a445ac90e1 Add missing super call in Product and Location to view_header_get for issue1695 2010-09-19 18:39:29 +02:00
Cédric Krier 8f69bf7fc9 Use safe_eval instead of eval for issue1640 2010-08-31 19:11:48 +02:00
Cédric Krier cd62ea725f Update for new Transaction 2010-08-19 22:22:44 +02:00
Cédric Krier cde2f4668a Fix _search_quantity_eval_domain as domain is no more a list for issue1525 2010-04-18 19:25:47 +02:00
Cédric Krier 6c2908774a New interface for Function/Property fields 2010-03-11 16:54:32 +01:00
Bertrand Chenal e0db9d42e6 Optimisation for stock quantities computation:
- Avoid to sort locations
- Use UNION ALL instead of UNION
2010-02-19 11:48:56 +01:00
Cédric Krier 8a26b11dd9 Use get_id of ir.model.data 2010-01-21 12:10:01 +01:00
Cédric Krier bfab410ce8 Use PySON 2010-01-20 11:04:28 +01:00
Cédric Krier 9be26709fb Compute infinite date end like a future date for issue1259 2009-10-28 09:18:00 +01:00
Cédric Krier e2fb7aa69c Use stock_assign to compute product by location with future date 2009-10-28 09:17:16 +01:00
Cédric Krier 37f803d4b3 Fix search_quantity to compute product_by_location like get_quantity 2009-10-27 10:19:07 +01:00
Cédric Krier 8cd9edde5d Test stock_date_end in context before comparing with today 2009-10-27 10:17:57 +01:00