Commit Graph

132 Commits

Author SHA1 Message Date
Mart Raudsepp 05de60cbf9 [FIX] Correct floating number handling for _procure_orderpoint_confirm
Fixes comparison with min_quantity orderpoint in scheduler - basic floating
point math issue in procurement scheduler when comparing current quantity
with orderpoint minimum quantity. In certain cases floating point comparison
could result in e.g 400.0 < 400.0 == True due to typical floating point
comparison issues, as Odoo doesn't use Decimal types where the issue
doesn't exist.

Fixes early exiting out of the loop cycle, in case qty is already near zero.
Fixes the new procurement creation check, to not do that if it's close
enough to zero already, to be considered a floating point math error, not
really non-zero.

These combined (or at least the last one) avoid each supply_method == buy
pending in draft PO's getting a zero quantity extra procurement order each
time the scheduler runs. Otherwise there could be hundreds of zero quantity
procurement orders pending, which makes the confirming of the PO take hours,
due to creating hundreds of stock moves for each order line.

Use float_compare helper to solve all these with floating point type for now,
instead of the more evasion possibility of converting to Decimal module.
Two potential bad comparisons remain, add FIXME notes for now until further
analysis.

Also: Float rounding on reste when comparing and on the procurement qty
2014-12-03 16:10:58 +01:00
Josse Colpaert 518b2f6a3f [FIX] super of scheduler / delivery method and phantom boms / average price
[FIX] super of scheduler should have same params + use_new_cursor should be passed to procure orderpoint confirm

[IMP] Make sure the delivery works when doing phantom boms

[FIX] This should update the average price properly when having multiple moves with the same product

[FIX] Average price should take into account the quantities of all variants

[FIX] Make sure purchase picking type in other company works

[IMP] Views of quants and destination locations of moves
2014-11-13 11:50:01 +01:00
Josse Colpaert 26cb72d104 [FIX] Currency_id on purchase requisition + move created from procurement should go to location of procurement not of rule (procurement location can be child of rule location. In handy for customer locations)
[FIX] Other elements of purchase of purchase requisition

[IMP] Picking type on purchase requisition

[FIX] Location of purchase
2014-10-14 23:19:15 +02:00
Josse Colpaert 3dcb020373 [IMP] Change documentation + new action_consume/qty/origin corrections
Simplify the action_consume of the consumption lines after the corrections
by Kevin Wang.  Also the UoMs are revised as the action_consume uses the default UoM
of the product.

We have to avoid circular boms where a child bom should not contain the product that
represents the parent bom, but it is possible for example to use another product of the parent bom in
the child bom.

As the consume line move has no procurement rule, its origin will have no description.  So, when there is
none it will also check the description of the previous move (when passed to procurement for example) This way
the chained moves or purchase order for example will have the MO-number as origin and not nothing.

[IMP] Change assignation

[IMP] UoM changes continuation

[IMP] Make sure we can use 2 times the same product in a BoM

[IMP] Source document for consume lines to procurement
2014-09-30 10:31:33 +02:00
Josse Colpaert 30a64c1d32 Merge pull request #2178 from odoo-dev/8.0-wmsmultiop-jco
[IMP] Courtesy of kevin3274 issue 1258: orderpoint should have float mul...
2014-09-04 10:32:48 +02:00
Josse Colpaert 8502d3854c [IMP] Courtesy of kevin3274 issue 1258: orderpoint should have float multiple instead of integer 2014-09-03 22:25:00 +02:00
Josse Colpaert 11828c69db [IMP] Phantom BoMs only out of services products should work 2014-09-03 19:18:16 +02:00
Josse Colpaert 68aee1c82e [WIP] In between test 2014-09-03 19:18:16 +02:00
Josse Colpaert 6a071b049d [WIP] This should be enough to put sale order to delivered when all tasks have been done. Problem is that because of procurement_jit it is creating it twice 2014-09-03 19:18:16 +02:00
Olivier Dony e11eddf753 [MERGE] Forward-port of saas-5 up to 20cc18d 2014-08-13 20:46:47 +02:00
Denis Ledoux ca55a24374 [FIX] procurement, stock: forward port of bug fix 3609ba10f2 2014-08-13 12:00:38 +02:00
Josse Colpaert 3b636a5df0 [WIP] Simplify procurement check and sales order workflow and that way phantom boms will work 2014-07-15 18:38:06 +02:00
Josse Colpaert cd653f1db2 [FIX] run schedulers domain 2014-06-19 10:36:42 +02:00
Josse Colpaert ce3645c9d9 [IMP] Corrections on pull request 2014-06-18 16:33:53 +02:00
Josse Colpaert ef228f273f Merge remote-tracking branch 'odoo/master' into master-wmsstaging3-jco 2014-06-18 15:23:39 +02:00
Amit Vora b0a5e9286d [IMP]rename project_mrp to sale_service 2014-06-17 17:12:49 +02:00
Josse Colpaert f30cf0cf1b [IMP] Run schedulers and minimum stock rules done by company + purchase order should change date when adding (to) lines 2014-06-11 14:05:13 +02:00
Olivier Dony d9ff7c4efc [FIX] procurement: restore fixes for background procurement from rev.9b6f5dc, accidentally reverted by v8 WMS branch
Probably forgotten during a sync with master, as the
fixes belong to a different file now.
This is the second part of the fix in previous commit.
2014-06-02 19:47:03 +02:00
Josse Colpaert 6905b58f46 [IMP] Picking priorities to priority of move instead + propagation + show package operations after done 2014-05-22 11:02:58 +02:00
Quentin (OpenERP) cf25f17766 [FIX] stock: removing product_qty from stock move creation
bzr revid: qdp-launchpad@openerp.com-20140508110357-zl3et4ojq5np9bpj
2014-05-08 13:03:57 +02:00
Quentin (OpenERP) 661c109189 [FIX] procurement.rule._get_action() needs to be translatable
bzr revid: qdp-launchpad@openerp.com-20140507171431-jtyz901xmej6elmp
2014-05-07 19:14:31 +02:00
Josse Colpaert 0ecc81b22c [IMP] Create MTO pull rule for resupply with delivery one step
bzr revid: jco@openerp.com-20140430115455-1fhssek8z7s28nck
2014-04-30 13:54:55 +02:00
Josse Colpaert c25cd043f3 [IMP] If no company_id given in procurement rules, you should use locations or even the company of the procurement
bzr revid: jco@openerp.com-20140430080037-nqyfrsrtxul839sp
2014-04-30 10:00:37 +02:00
Josse Colpaert a49dca23de [IMP] Put partner_id from rule on move when necessary
bzr revid: jco@openerp.com-20140430074022-cekktpwoucv1rhcd
2014-04-30 09:40:22 +02:00
Quentin (OpenERP) cba2365d95 [MERGE] branch of jco fixing shipping exception in mrp + cancellation in chained moves
bzr revid: qdp-launchpad@openerp.com-20140425132449-s7e8duh884rirrqz
2014-04-25 15:24:49 +02:00
Quentin (OpenERP) f402240ade [MERGE] stock usability improvements
bzr revid: qdp-launchpad@openerp.com-20140424143838-a3so6ouc1q3la3ch
2014-04-24 16:38:38 +02:00
Josse Colpaert 7e733fcfaa [IMP] Do not check rule when cancelling procurement in propagation, works through stock move
bzr revid: jco@openerp.com-20140424091731-3ptkt7qr26i9ofnf
2014-04-24 11:17:31 +02:00
Quentin (OpenERP) 2e7579c54d [MERGE] branch of jco with fix of orderpoint computation + small refactoring of action_cancel() of purchase.order
bzr revid: qdp-launchpad@openerp.com-20140423155557-t0gp3akhzb2y85cz
2014-04-23 17:55:57 +02:00
Josse Colpaert 5807343602 [MERGE] Merge from trunk-wms
bzr revid: jco@openerp.com-20140423095528-h4dpd9gdmh8lmk6j
2014-04-23 11:55:28 +02:00
Quentin (OpenERP) d69f5e20ec [REF] stock: refactoring set active field on push and pull rules as a normal field (previously related on the route) as the route_id field is not required
bzr revid: qdp-launchpad@openerp.com-20140423082322-ms66ta8zq0uklw32
2014-04-23 10:23:22 +02:00
Josse Colpaert ea456d4458 [IMP] Remove supply move created message
bzr revid: jco@openerp.com-20140422125945-ff769vzlw1hmh6au
2014-04-22 14:59:45 +02:00
Josse Colpaert c0f2b01dab [IMP] Warehouse orderpoint uom is related, take into account procurement uom for orderpoint calc
bzr revid: jco@openerp.com-20140418160208-4tn1uxdnlecpdi3m
2014-04-18 18:02:08 +02:00
Josse Colpaert f322e6303d [WIP] Fix orderpoint
bzr revid: jco@openerp.com-20140418121426-bebr3h2l96hf1ro7
2014-04-18 14:14:26 +02:00
Quentin (OpenERP) c41941d978 [FIX] a lot a fixes or usability improvements. Includes a branch of jco as well with other fixes
bzr revid: qdp-launchpad@openerp.com-20140416145313-eiadz94h9wolhb9b
2014-04-16 16:53:13 +02:00
Quentin (OpenERP) 398d96f273 [MERGE] merged trunk up to revision 9327
bzr revid: qdp-launchpad@openerp.com-20140414094743-hv0u7qhigv1to2uc
2014-04-14 11:47:43 +02:00
Josse Colpaert 36b12e4339 [MERGE] Merge from trunk-wms
bzr revid: jco@openerp.com-20140411095928-jnlqi15cn7zz491d
2014-04-11 11:59:28 +02:00
Quentin (OpenERP) 79344b903b [MERGE] stock: usability improvements
bzr revid: qdp-launchpad@openerp.com-20140408075353-5yy5to2hb65vo41q
2014-04-08 09:53:53 +02:00
Quentin (OpenERP) b14883f10c [MERGE] jco branch with few bugfixes
bzr revid: qdp-launchpad@openerp.com-20140407175001-g4rx6rft090ul2li
2014-04-07 19:50:01 +02:00
Josse Colpaert 6a50b1663b [IMP] group_id on orderpoint + copy of orderpoint/package should not copy procurements/quants child packages
bzr revid: jco@openerp.com-20140407141458-xg1jbl2ctnfzs5eh
2014-04-07 16:14:58 +02:00
Josse Colpaert 9cffdb0034 [MERGE] Merge from trunk-wms
bzr revid: jco@openerp.com-20140403161933-7vjq7jdxg11f0fhz
2014-04-03 18:19:33 +02:00
Quentin (OpenERP) b4dc004c01 [FIX] stock: procurement orderpoint fixed and a bit refactored
bzr revid: qdp-launchpad@openerp.com-20140403145216-pfs8b73a302e7gjy
2014-04-03 16:52:16 +02:00
Josse Colpaert 1ff8b73671 [MERGE] Merge from trunk-wms
bzr revid: jco@openerp.com-20140403130335-9grgeg4e0r0yqsbi
2014-04-03 15:03:35 +02:00
Quentin (OpenERP) fe0e95d29b [IMP] procurement: removed the schedule_range field on res.company which was error prone and not really usefull + made the scheduler run in SUPERUSER to avoid intercompany and access rights issues + made the run of procurement as SUPERUSER too for the same reasons
bzr revid: qdp-launchpad@openerp.com-20140403071010-5mrox75rkufur2nw
2014-04-03 09:10:10 +02:00
Josse Colpaert 0abd2c8ae7 [IMP] Should make sure to pass parameters as context for orderpoint
bzr revid: jco@openerp.com-20140402134103-jpduk6k4xzh8vw97
2014-04-02 15:41:03 +02:00
Quentin (OpenERP) b8b22532a6 [FIX] stock, sale_stock, purchase: fixed the dropshipping flow
bzr revid: qdp-launchpad@openerp.com-20140327121140-18yxvp8wcdlqvaa5
2014-03-27 13:11:40 +01:00
Josse Colpaert 6e7fb705ee [IMP] change desciption and groups of procure_method
bzr revid: jco@openerp.com-20140327105749-4u7mx6u85b4rys61
2014-03-27 11:57:49 +01:00
Quentin (OpenERP) bde6b6d6e5 [REF] refactoring made during code review. Some optimization patches have been rewritten more clearly, others abandonned or kept. WIP
bzr revid: qdp-launchpad@openerp.com-20140319163359-2ea7tjn5ba1ggein
2014-03-19 17:33:59 +01:00
Quentin (OpenERP) e202c84b27 [REF] stock: assign picking by batch on confirmation of stock moves. This new version will work for confirmed move from elsewhere than the sale order
bzr revid: qdp-launchpad@openerp.com-20140318115746-fixnxghkrlth38ze
2014-03-18 12:57:46 +01:00
Quentin (OpenERP) b70f1e4472 [FIX] stock: the date planned of a procurement created by an orderpoint must be the scheduler runtime because the goods may come from something else than a purchase, thus there is no point at adding the seller delay there
bzr revid: qdp-launchpad@openerp.com-20140312163941-76rs8c1uudmrvh15
2014-03-12 17:39:41 +01:00
Quentin (OpenERP) 17b17b34b9 [MERGE] merged the branch that add the possibility to sum quantities in PO lines for the same product and UoM (when triggering a purchase to solve a procurement) and that contains several fixes on the purchase and purchase_requisition modules (workflow, shipped boolean, procurement resolution...) + a fix on the 'waiting' state of stock moves that was wrongly never set before
bzr revid: qdp-launchpad@openerp.com-20140217231230-6vc9ojo0jxz0yfss
2014-02-18 00:12:30 +01:00