Commit Graph

628 Commits

Author SHA1 Message Date
Christophe Simonis b15461baba [MERGE] forward port of branch 7.0 up to 1d01872 2015-07-10 16:30:48 +02:00
Nicolas Martinelli a4ef73fb09 [FIX] mrp: merge lines where products to consume are identical
Method action_produce does not support the case where the same product appears
on multiple lines. We do this to avoid major changes in a stable version.

opw-644093
2015-07-09 11:11:01 +02:00
Christophe Simonis 59d82e6fe7 [MERGE] forward port of branch 7.0 up to 5042d91 2015-04-07 13:36:01 +02:00
Martin Trigaux 49e7e67a27 [FIX] mrp: allow same product on different bom line
Relax the constraint on BoM to allow to have two different lines with the same
product. As the error message says, the purpose of the constraint was to forbid
having the manufactured product as one of the components but had this side
effect.
Such scenario of the same product twice makes sense when using the date
attributes on the lines (e.g. changing quantities)
opw 621468
2015-04-02 16:06:14 +02:00
Christophe Simonis 6b70b80a0e [MERGE] forward port of branch 7.0 up to 881c10b 2015-03-25 17:41:53 +01:00
Nicolas Martinelli 52649934e3 [FIX] mrp: constraints capacity_per_cycle to be strictly positive
A capacity per cycle only makes sense if it is strictly positive. This also prevents to
divide by zero in _bom_explode.
2015-03-19 11:33:04 +01:00
Denis Ledoux 8c150c609e [MERGE] forward port of branch 7.0 up to 7530d28 2015-01-15 13:37:30 +01:00
Ravi Gohil 7530d28183 [FIX] mrp: production traceability
Upstream traceability on produced goods (serial number on finished product) was
broken due to wrong values in cache for production.move_lines2 after production.
Refresh the value of production after each action_consume to make such the state
of the cache is correct. opw 609450

Similar fix for manufactruing order not going in done state in some specific
configrations (e.g. some components being phantom BOM).
Again due to wrong cache state after consumption. opw 610515
Fixes #1296
2015-01-15 12:04:23 +01:00
Denis Ledoux a692c6e934 [MERGE] forward port of branch 7.0 up to f406847 2015-01-15 11:49:28 +01:00
Denis Ledoux 30a7bea024 [FIX] mrp: prevent creating production lines when testing if production is of product type
The method test_if_product, used in the workflow to test that the mrp production is for a product (!= service), used to call the method _action_compute_lines in order to compute the production lines and determine from them the production type.

The thing is, the method _action_compute_lines, despite the fact it returns the lines of the production, actually creates the lines. So, just to test if the production was of product type, the productin lines were created, in database.

This rev. introduces a _prepare_lines method, which returns the computed production lines, without actually creating them in database, so the test_if_product method can test if the production is of product type without creating the production lines.

Therefore, production lines are now computed and created during the action_compute method, instead of computing them when the production was tested to get the production type.

Computing the lines before the action_compute has as side effect to not set the scheduled date of the work orders in module mrp_operations, at MO confirmation (as, on confirmation, the action_compute method is called only for productions for which the lines are not yet computed, and mrp_operations overide action_compute to set the scheduled date)

opw-620189
2015-01-14 15:37:27 +01:00
Akash Balar 70a51cd761 [FIX] mrp : skip lines not within date range specified on BOM
As date_start and date_stop are date field and not datetime, should use
DEFAULT_SERVER_DATE_FORMAT for search. opw 619592
2015-01-14 12:10:46 +01:00
Denis Ledoux 02f4f9a572 [MERGE] forward port of branch 7.0 up to e2dd18f 2014-11-26 12:35:36 +01:00
Denis Ledoux e2dd18f1e7 [FIX] mrp: prevent recursion from phantom boms with no lines
if the bom is phantom and has no line, we attempt to find a new bom with the default product uom
This is possible that we find the same bom that the current one
In such a case, we must not explode, to avoid recursion.
2014-11-26 12:34:45 +01:00
Christophe Simonis e74fb09a00 [MERGE] forward port of branch 7.0 up to ab5ecef 2014-11-12 10:56:38 +01:00
Martin Trigaux e27afc13cb [FIX] mrp: prevent suppression of bom if used in mo
The field bom_id is required on a manufacturing order and deleting a mrp.bom would block the current mo.
Restrict the suppression for manufacturing order in progress.
Fixes #3417
2014-11-10 15:37:53 +01:00
Denis Ledoux c666030539 [MERGE] forward port of branch 7.0 up to cd69dee 2014-11-05 13:39:41 +01:00
Julien Legros 61a8971db5 [FIX] mrp: chain product move and MO locations
When validating a SO containing a `make to stock` + `manufacture` product
(with bom + orderpoint), we have the following stock moves:
* Product move
* Manufacturing order
Selling 1 such product would yield 2 as incoming quantity, an
inconsistency that this commit solves by setting the location_id of the
product move to the MO's location_dest_id (in the same fashion that
the create_pickings method does in an mts/buy case)

opw-616229
2014-11-05 12:44:02 +01:00
Christophe Simonis bf53aeda94 [MERGE] forward port of branch 7.0 up to e5533d0 2014-06-19 15:32:32 +02:00
Najlaâ El Khayat e7285c6e1d Production : Source location of the BOM
Use the source location defined on the current MO's routing not directly on the BOM
2014-06-19 14:51:32 +02:00
Denis Ledoux c2ba11e72e [MERGE] Forward-port of latest 7.0 bugfixes, up to rev. 9885 revid:dle@openerp.com-20140310114026-r0ijm0m36su19wn7
bzr revid: dle@openerp.com-20140310122101-gicombyc5ii0yz6a
2014-03-10 13:21:01 +01:00
Martin Trigaux 5db649549c [IMP] mrp: use also the ceiling method from product
bzr revid: mat@openerp.com-20140306094504-37r691hxcemp0ual
2014-03-06 10:45:04 +01:00
Denis Ledoux 1fb1a6f2af [MERGE] Forward-port of latest 7.0 bugfixes, up to rev. 9789 revid:dle@openerp.com-20140124120102-we2yxio553ws2yz4
bzr revid: dle@openerp.com-20140120174449-tui0a24zgn9bien2
bzr revid: dle@openerp.com-20140121125538-ke7i6kaz486hwgl8
bzr revid: dle@openerp.com-20140122134115-0ogjemlqe327xoac
bzr revid: dle@openerp.com-20140123103655-mf2zslfbgue97ed2
bzr revid: dle@openerp.com-20140124121027-uk9zy4dx9tqlsblr
2014-01-24 13:10:27 +01:00
Denis Ledoux 83677ed6e6 [REVERT] 9401 dle@openerp.com-20130830125155-1vedifnupu2xvth7
This had as side-effect to not allow splitting BOMs
(a manufacturing order for 1 unit of a BOM producing 10 units consumed the lines like it was 10 units, not 1)

This fix was to avoid having a fraction of a unit (for instance, 0.5 unit).

But, finally, it is preferable to allow splitting units:
1. Most users do not use several uoms, and in this case, the unit is the default uom (hidden).
2. At the moment, it is allowed to ask a manufacturing order splitting up the unit uom
(It is allowed to ask the production of 0.5 USB Adapter, for instance)
Thus, we should allow the splitting up of the unit uom in the lines too.

bzr revid: dle@openerp.com-20140124120102-we2yxio553ws2yz4
2014-01-24 13:01:02 +01:00
Denis Ledoux d69ecb8d8f [FIX] mrp, stock: avoid float rounding errors using float_compare
bzr revid: dle@openerp.com-20140122133822-fkt5gqanpptlx9jx
2014-01-22 14:38:22 +01:00
Olivier Dony 44664076da [MERGE] Forward-port of latest 7.0 fixes up to rev 9618 rev-id: dle@openerp.com-20131120142131-s333lyva85cyn41o
bzr revid: odo@openerp.com-20131120144059-yyh7emvgdarff09b
bzr revid: odo@openerp.com-20131120144318-11nmn1zj00zmi10z
2013-11-20 15:43:18 +01:00
Martin Trigaux a8f47d3747 [MERGE] [FIX] mrp: correctly handle internal type for stock.picking on manufacturing order
lp bug: https://launchpad.net/bugs/1117229 fixed

bzr revid: mat@openerp.com-20131119162522-x4fw8hluvfzt27ha
2013-11-19 17:25:22 +01:00
Olivier Dony 5cba82e2c9 [MERGE] Forward-port of latest saas-1 bugfixes, up to rev. 8788 dle@openerp.com-20131003094541-ro29hhkas03rdvw8
bzr revid: odo@openerp.com-20131003111222-upt1ytb92db50zay
2013-10-03 13:12:22 +02:00
Denis Ledoux a9158e5993 [MERGE] Forward-port of latest 7.0 bugfixes, up to rev. 9487 rev-id: dle@openerp.com-20130930141202-ghnujem348kydd2m
bzr revid: dle@openerp.com-20130930150804-b4j080uy06t4n7f1
2013-09-30 17:08:04 +02:00
Rifakat e2e20bae4c [FIX] mrp: improved fix, used DEFAULT_SERVER_DATETIME_FORMAT for date, removed extra AND and _order from search()
bzr revid: rha@tinyerp.com-20130924062648-qshruwnukmtn0b7w
2013-09-24 11:56:48 +05:30
Denis Ledoux db84e912bd [MERGE] Forward-port of latest saas-1 bugfixes, up to rev. 8781 rev-id: dle@openerp.com-20130923165651-0jt823r5wy37enw6
bzr revid: dle@openerp.com-20130923171310-mav1riq3d2rebmv2
2013-09-23 19:13:10 +02:00
Denis Ledoux 546a191f0a [MERGE] Forward-port of latest 7.0 bugfixes, up to rev. 9459 rev-id: fva@openerp.com-20130918153347-fy4nuvbm82ngfb8x
bzr revid: mat@openerp.com-20130826135110-f9q4p65ds2aholcw
bzr revid: dle@openerp.com-20130828141129-ecxl2vlpb8vw0o9f
bzr revid: dle@openerp.com-20130828162659-n8a0ku9o3h01qaov
bzr revid: dle@openerp.com-20130830094205-q3itwd7x0246d9n6
bzr revid: dle@openerp.com-20130830133604-mfnfbscn5wdk4vi4
bzr revid: dle@openerp.com-20130902131244-v9uh0s8rg4889i7j
bzr revid: mat@openerp.com-20130903134105-68ziuaccreu6rs61
bzr revid: chs@openerp.com-20130906171851-jtfsf4au1k30wwlr
bzr revid: dle@openerp.com-20130909103120-k5oefxgebhyslac3
bzr revid: dle@openerp.com-20130909170047-pbzw4ernvcpivbhh
bzr revid: chs@openerp.com-20130910122113-171osvcukxffxcry
bzr revid: tde@openerp.com-20130912121059-k840pi4rwdzpez8g
bzr revid: dle@openerp.com-20130913085251-p906ci2divy82jur
bzr revid: tde@openerp.com-20130913092546-kzshg1a7sls566l8
bzr revid: mat@openerp.com-20130917122102-drf8fj9lrjj0fvju
bzr revid: mat@openerp.com-20130917161614-w8u2c1ayeb5kxm30
bzr revid: dle@openerp.com-20130918161305-7ep1642nxzyy3vhd
2013-09-18 18:13:05 +02:00
Martin Trigaux 461b5d8191 [MERGE] [FIX] mrp_subproduct: correctly take into account subproduct_factor when checking quantities on BoM
bzr revid: mat@openerp.com-20130916123442-cch34mghmwh1p18e
2013-09-16 14:34:42 +02:00
Martin Trigaux 3029fc869e [MERGE] [FIX] mrp: producing a BoM of type service is no longer blocked in ready state, correctly transmit project reference when create task from sale order
bzr revid: mat@openerp.com-20130916113323-8an09x0d7svv2j7d
2013-09-16 13:33:23 +02:00
Martin Trigaux 503f69cba3 [IMP] project_mrp: cleaning and add condition for triggering signal
bzr revid: mat@openerp.com-20130916100120-kuuyofh3o8e3iv8c
2013-09-16 12:01:20 +02:00
Martin Trigaux 7485ec46d7 [IMP] mrp: trigger workflow only if no move lines
bzr revid: mat@openerp.com-20130916094604-zonoyxeic948mjn2
2013-09-16 11:46:04 +02:00
Paramjit Singh Sahota 2b65bbfa82 [IMP] Improved code to return product_lines.
bzr revid: psa@tinyerp.com-20130912135445-xf0rmbh117fznd5v
2013-09-12 19:24:45 +05:30
Paramjit Singh Sahota 8825f2070b [IMP] Improved method name and code accordingly.
bzr revid: psa@tinyerp.com-20130912131434-99xv1prw3o4dy9ge
2013-09-12 18:44:34 +05:30
Paramjit Singh Sahota 387bffe50e [IMP] Divided the action_compute method and improved code according to that.
bzr revid: psa@tinyerp.com-20130912115556-9c67dzpr6mao251w
2013-09-12 17:25:56 +05:30
Paramjit Singh Sahota 000ca6103d [IMP] Added another testcase for 2 service type product
And improved code for bom product with service type product used in SO doesnt link the project perfectly.

bzr revid: psa@tinyerp.com-20130912110454-x9tidij14xj09joz
2013-09-12 16:34:54 +05:30
Paramjit Singh Sahota a0cb8675df [IMP] Improved code
bzr revid: psa@tinyerp.com-20130911145615-wzy1kmajr7j1731y
2013-09-11 20:26:15 +05:30
Paramjit Singh Sahota a3482a990f [IMP] Improved code for the BOM with service type product.
bzr revid: psa@tinyerp.com-20130911141123-snw3u5mgtf4xv3k6
2013-09-11 19:41:23 +05:30
Paramjit Singh Sahota f716d9bf9c [REM] Removed the unwanted code.
bzr revid: psa@tinyerp.com-20130911123044-xgw123lfj62cx71x
2013-09-11 18:00:44 +05:30
Martin Trigaux c48504fdba [MERGE] sync with trunk (state -> stage removed some test)
bzr revid: mat@openerp.com-20130911110755-zf3ytf9m27im6x9k
2013-09-11 13:07:55 +02:00
Christophe Simonis 3fa90321e1 [MERGE] forward port of branch saas-1 up to revid 8772 chs@openerp.com-20130910122113-171osvcukxffxcry
bzr revid: chs@openerp.com-20130910124803-wxkb8gkz1tub5qjf
2013-09-10 14:48:03 +02:00
Bharat R. Devnani (OpenERP) 9adf175561 [IMP] refered sale_line_id of procurement_order from stock_move object
bzr revid: bde@tinyerp.com-20130904061451-ouptbee94gb2dsht
2013-09-04 11:44:51 +05:30
Paramjit Singh Sahota 3f37dabea0 [MERGE] Merged lp:openobject-addons/7.0
bzr revid: psa@tinyerp.com-20130830132612-ekntqdkholcg15sx
2013-08-30 18:56:12 +05:30
Denis Ledoux 9979078aa8 [FIX]mrp: _bom_explode, rounding used must be max(bom.product_rounding, bom.product_uom.rounding), in order to avoid asking 0.5 Unit
bzr revid: dle@openerp.com-20130830125155-1vedifnupu2xvth7
2013-08-30 14:51:55 +02:00
Paramjit Singh Sahota 22669ee07c [MERGE] Merged lp:openobject-addons/7.0
bzr revid: psa@tinyerp.com-20130624131850-bz1speq0m5qvklx5
bzr revid: psa@tinyerp.com-20130813111300-mx6ditfva9dn01nj
2013-08-13 16:43:00 +05:30
Olivier Dony 957fa4e2da [MERGE] mrp: confirmation of procurements when production order is confirmed was broken + fix and re-enable tests
During the workflow signalling refactoring the signal for
confirming the procurements was sent to the wrong model,
thus having no effect at all.
In addition the MRP tests were incorrectly disabled and
did not cover this case properly. They were re-enabled
and corrected to cover it.

bzr revid: odo@openerp.com-20130801132150-gfp1saryq48249pu
2013-08-01 15:21:50 +02:00
Olivier Dony 2c87609288 [FIX] mrp: confirmation of procurements when production order is confirmed was broken + fix and re-enable tests
During the workflow signalling refactoring the signal for
confirming the procurements was sent to the wrong model,
thus having no effect at all.
In addition the MRP tests were incorrectly disabled and
did not cover this case properly. They were re-enabled
and corrected to cover it.

bzr revid: odo@openerp.com-20130801125820-ubpq9wsew6q5w2hf
2013-08-01 14:58:20 +02:00