Commit Graph
166 Commits
Author SHA1 Message Date
Cédric Krier b84bf9598e Fix flake8 errors and warnings
We add the flake8 configuration used so we ensure everyone uses the same.
We remove the usage of __all__ for non public API.
When possible, we rationalize the class name according to its __name__ and module.

issue9082
review297061002
2020-03-01 12:33:54 +01:00
Cédric Krier 78a8d3a410 Use a fresh product instance to find best product supplier
This ensure to be able to read all the product suppliers.

issue8723
review284231002
2019-10-24 19:08:07 +02:00
Cédric Krier 50c4f62a61 Replace product_suppliers by product_suppliers_used
issue6799
2019-03-15 16:32:07 +01:00
Cédric Krier 0c2538d4be Use int and Decimal instead of lambda
issue7816
review74401002
2018-10-31 18:17:35 +01:00
Cédric Krier 259e792e65 Remove migration before 3.0
issue6470
review52421002
2018-08-09 20:43:51 +02:00
Cédric Krier 1c79e14517 Replace sort with cmp by sort on key
Python3 does not support anymore such ordering.

issue7608
review74281002
2018-08-09 20:39:56 +02:00
Cédric Krier becaf00695 Remove support for Python 2.7
issue7497
review53261002
2018-06-26 19:11:57 +02:00
Cédric Krier 5458df665e Ceil purchase request quantity
It is better to buy a little more than not enough.

issue7184
review45341003
2018-04-03 13:19:16 +02:00
Cédric Krier fa071d8596 Replace product_ids by grouping_filter
issue7141
review43151002
2018-02-28 18:27:08 +01:00
Florian Preinstorfer eb6da682e7 Round stock_level field before creating a new Request
The field stock_level is of type float and has digits assigned to it. Due to
floating point arithmetic, the calculated stock_level could have more digits
than allowed and therefore its value needs to be rounded before creating
creating a new PurchaseRequest.

issue6668
review43331002
2017-08-11 23:14:50 +02:00
Cédric Krier 1de698aeda Do not compare current quantity when min quantity is None
Since issue6279, the min_quantity can be None.

issue6572
review42421002
2017-06-24 10:18:34 +02:00
Cédric Krier 841d4ae164 Remove Property fields
issue2349
review39281002
2017-04-01 00:39:00 +02:00
Nicolas Évrard 6c67a63a8c Add support for overflowing quantities
issue6279
review27121002
2017-03-01 10:16:07 +01:00
Cédric Krier 56aba762a6 Merge supply into one wizard
issue6147
review25941002
2017-01-15 01:33:07 +01:00
Cédric Krier ab3e27a19f Do not create purchase request if other order point exists
issue6138
review26991002
2017-01-13 20:16:14 +01:00
Sergi Almacellas Abellana 405d2a7e24 Fix antipatern of create/write in loop
issue3516
review6901002
2016-07-27 10:09:12 +02:00
Cédric Krier 835694042f Add configuration for the supply period
issue5575
review26321002
2016-06-21 10:11:57 +02:00
Sergi Almacellas Abellana 7ffb3b587d Fix NoneType error when comparing purchases without warehouse
issue5478
review19231002
2016-04-26 12:39:27 +02:00
Cédric Krier 1746f1a21b Use defaultdict for quantities of get_shortage
get_shortage requires to have a quantity for all products but
products_by_location doesn't guarantee it.

issue5333
review16171002
2016-04-26 09:52:48 +02:00
Nicolas Évrard cb13389256 move find_best_supplier from stock_supply to purchase_request
issue5349
review19131002
2016-03-29 19:25:01 +02:00
Nicolas Évrard 0b18dade82 Move purchase request to purchase_request module
issue5349
review24811002
2016-03-25 16:59:49 +01:00
Nicolas Évrard 40e3df3d5b Follow PEP-0249 for Transaction and backends
issue4949
review19781002
2016-03-03 21:55:56 +01:00
Cédric Krier 9d6ec11baf Test for create_request should allow zero quantity
Since changeset c12f565887e7, it is allowed to have a quantity of zero for the
purchase request. So the test for manual creation should not catch this case.

issue5328
review21701002
2016-02-22 23:16:12 +01:00
Nicolas Évrard 24ce8b6e46 Add searcher on purchase
issue5139
review20551002
2015-11-23 16:50:03 +01:00
Nicolas Évrard 95ec33db65 Adding exception state on the purchase requests
issue5107
review16811002
2015-11-17 17:30:42 -03:00
Nicolas Évrard 11f873785f Generate purchase requests even if rounding set the quantity to 0
issue4500
review14931002
2015-10-05 10:25:27 +02:00
Nicolas Évrard f0d499b978 Add searcher on purchase_request's state
issue4046
review14361002
2015-10-04 00:50:21 +02:00
Cédric Krier a61b523904 Use Constraint instance in ModelSQL._sql_constraints
issue4814
review15491002
2015-06-22 17:00:12 +02:00
Sergi Almacellas Abellana 60c56c0d84 Add unit digits to purchase requests
issue4282
review10581002
2015-02-09 19:53:51 +01:00
Cédric Krier 680b2318a2 Add missing company domain/field
issue4311
review7691002
2014-12-03 16:14:22 +01:00
Cédric Krier 1e516b0d7c Fix most flake8 errors
review8771002
2014-12-02 12:56:15 +01:00
Cédric Krier cc9ad04326 Wrong computation of delta to find shortages
On the first loop, get_shortage adds a second times the delta of moves at
current date.

issue4215
review9751002
2014-10-06 22:16:14 +02:00
Cédric Krier 6ee8bf9118 Remove ask for payment term in create purchase wizard
Since changeset c56c08f68eaa, payment term is no more required for purchase in
draft state.

issue4176
review10531002
2014-09-17 22:10:29 +02:00
Cédric Krier a821023312 Use context to check model and field access
issue4081
review8481002
2014-09-17 21:46:06 +02:00
Cédric Krier 90232b3f26 Fix missing list convertion after grouped_slice
review5461002
2014-07-31 19:34:38 +02:00
Sergi Almacellas Abellana 42ce031989 Use grouped_slice helper.
issue3516
review10301002
2014-07-17 19:01:32 +02:00
Guillem Barba 199b604465 Supply purchase to CreatePurchase.compute_purchase_line()
issue4015
review14321002
2014-07-09 23:04:13 +02:00
Cédric Krier 952f1f591f Use common get_origin pattern for purchase request
issue4021
review13371002
2014-07-09 00:53:26 +02:00
Sergi Almacellas Abellana b743ed3e56 Add currency property on purchase request
issue3987
review12381002
2014-06-21 12:31:29 +02:00
Sergi Almacellas Abellana 1e339ce90b Allow to calculate purchase requests filtered by warehouse
issue3887
review12271003
2014-05-13 10:39:25 +02:00
Cédric Krier f1f0c7c612 Remove duplicate question on warning message
issue3821
2014-04-29 19:25:09 +02:00
Cédric Krier 43f3f12c41 Fix naming collision in generate_requests
Only requests with last products were deleted.

issue3684
review3591003
2014-02-20 23:20:40 +01:00
Cédric Krier 0a60f014b0 Fix labels for Requests creation
issue3427
review2161002
2013-12-12 13:10:18 +01:00
Cédric Krier abf4819d3d Fix usage of context company
Default value of company should be -1 to get the right cast and an impossible
value.
Replace False by None as other value in "in" clause.

issue3394
review1119002
2013-10-09 18:25:59 +02:00
Cédric Krier 41d599b492 Migration to python-sql
review1001002
2013-09-06 22:34:56 +02:00
Cédric Krier 83590bd3d4 Extend Lot Management
review845002
2013-06-21 23:26:16 +02:00
Cédric Krier 9ac62d7f4e Prevent delete of purchased request
review907003
2013-06-06 20:44:15 +02:00
Cédric Krier b114594387 Add warning for late supplier moves when creating purchase request
review821002
2013-05-23 23:30:42 +02:00
Albert Cervera i Areny a3f375c9d9 Replace _constraints with validate in ModelStorage and improve user messages.
issue2616
review371002
2013-03-07 16:56:07 +01:00
Cédric Krier 448b3d994c Allow to generate purchase request for subset of products
review695002
2013-03-06 13:34:05 +01:00