Cédric Krier
a99477ac15
Improve selection of moves used for cost
...
issue8700
review282201004
2019-10-14 00:04:14 +02:00
Cédric Krier
06f262091b
Add today record in Product Quantities By Warehouse
...
As the action has a search value that limits from today, having a fake record
for today shows the current stock quantity.
issue8681
review264281002
2019-10-08 19:00:25 +02:00
Thierry Bruyere
40a403c77b
Add a global method to set default warehouse
...
issue8396
review277371003
2019-09-07 23:13:33 +02:00
Cédric Krier
802c014e1e
Open product quantities by warehouse to show moves
...
We add also a custom rec_name for stock.product_quantities_warehouse to use as
action name.
issue8350
review253511002
2019-06-16 19:11:48 +02:00
Cédric Krier
f654b87e70
Remove custom _Date class from ProductQuantitiesByWarehouse
...
It is useless and can be taken as a property.
issue8355
2019-05-28 09:52:08 +02:00
Cédric Krier
93f5c11fbe
Ensure date of Product Quantities By Warehouse is a date instance
...
On SQLite, the date column of the table query is not converted into date
instance but into string.
issue8355
review261481002
2019-05-22 18:31:21 +02:00
Cédric Krier
a67d1952a7
Add ir.message and use custom exceptions
...
issue3672
2018-12-29 14:20:29 +01:00
David Harper
93f3022413
Add help text
...
issue6401
review34861002
2018-12-04 12:25:45 +01:00
Cédric Krier
5061618d5b
Remove support for Python 2.7
...
issue7497
review53261002
2018-06-26 19:11:55 +02:00
Cédric Krier
df8c27aba6
Do not browse records at a datetime before they were created
...
If user tries to get the cost price of a product before it was created, it
should return None instead of raising an access error.
issue7334
review49281002
2018-04-20 18:36:25 +02:00
Cédric Krier
101eaecb89
Check no stock move also on Product
...
As fields can be redefined on Product, we must check both Models.
issue7253
review41981002
2018-03-27 10:51:36 +02:00
Cédric Krier
f632a9cc67
Remove product_ids from products_by_location for grouping_filter
...
issue7141
review44651002
2018-02-28 18:25:18 +01:00
Cédric Krier
8c326b8ae0
Ensure grouping_filter has the right length
...
issue7141
review40111002
2018-02-20 17:58:12 +01:00
Cédric Krier
55082d76a6
Allow to group per product columns to compute quantity
...
This is needed to add the quantity relates on the template form.
issue7068
review40031002
2018-02-11 14:38:33 +01:00
Cédric Krier
136fcf1824
Browse again the products to have the modified context in get_cost_value
...
The context is set but it has no effect if the records are not instantiated
with it.
issue7044
review43881002
2018-01-12 12:54:35 +01:00
Cédric Krier
8fdf25363b
Manage negative quantity in cost re-computation the same way as on move
...
In case of negative quantity, the unit price is used as cost price if it is an
incoming and the cost price is kept if tit is an outgoing.
issue6770
review44311002
2017-09-26 01:36:23 +02:00
Cédric Krier
f132407fc0
Move cost price to product level instead of template
...
issue6515
review41321002
2017-07-05 14:51:50 +02:00
Diego Abad
2b8a3909a8
Change test on recompute_cost_price because of Function field
...
Since changeset 578bdd3fd776, cost_price on product.product
is a function field, using TemplateFunction pattern.
It is necessary to change test on recompute_cost_price and
recompute_cost_average_price because of Function field, and
change scenario for average cost price to force to write
recomputed cost.
issue5966
review27721003
2016-10-28 23:28:58 +02:00
Sergi Almacellas Abellana
b3f7f3ddda
Forecast date should return a date instead of a datetime
...
issue5690
review32271002
2016-07-08 10:20:07 +02:00
Sergi Almacellas Abellana
7851e5aed6
Use context model in quantities computation actions
...
issue5541
review20181002
2016-06-15 10:45:54 +02:00
Cédric Krier
2e04a068ee
Add Python3 support
...
issue3211
2016-02-26 00:04:09 +01:00
Cédric Krier
38df5fb1fb
Write the right cost to the right product in recompute_cost_price
...
As some products can be skipped if they are services, the zip loop can be
shifted. So it is replaced by a dictionary which have also the advantage to
group the write of the same cost.
Also if all the products are services, the call to write is empty which is not
allowed.
issue5218
review22681002
2016-01-13 21:02:12 +01:00
Cédric Krier
a6ecb53580
Use CURRENT_TIMESTAMP instead of NOW
...
CURRENT_TIMESTAMP is the correct SQL standard way.
issue4837
review22281002
2015-07-01 19:42:33 +02:00
Cédric Krier
b677e166ca
Allow to re-compute cost price
...
and to change unit price of move done
issue4729
review12131002
2015-06-15 00:58:00 +02:00
Marius Grigaitis
a50b6f21fd
Use the last cost_price of the day for cost_value calculation
...
issue4432
review13831002
2014-12-31 15:27:12 +01:00
Cédric Krier
994bd8a103
Fix most flake8 errors
...
review8771002
2014-12-02 12:56:04 +01:00
Robin Baumgartner
486006e8ff
Use Null constant from python-sql for comparisons
...
issue4143
review13701003
2014-11-24 14:03:52 +01:00
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