Commit Graph
84 Commits
Author SHA1 Message Date
Thibault Delavallée 304c81c91c [CLEAN] stock: pre-migration cleaning
General remarks concerning cleaning commits preparing the stock migration
=========================================================================

Small update / cleaning before moving and migrating. This commit contains
the cleaning of stock_picking_type and stock_picking models.

The first cleaning performed is to clean methods having a browse record or
a list of records replacing ids parameter. Those are converted into classic
old API methods using cr, uid, ids. This eases the migration as they are
then migrated into multi methods.

Another cleaning concerns naming things. Some methods are renamed to ease
the code readability. Some parameters are also renamed as well as some
variables. This kind of change is performed only when the readability
is improved. Otherwise the code is kept as it is to avoid rewriting too
much of the code.

Finally unnecessary stuff is also removed. This concerns dead code (methods
not used in community nor in enterprise) and unnecessary code splitting
(tools methods called once without real added value are directly put into
their called method).

- stock.move: no specific changes; note that a method called only in mrp
  has been moved to mrp.
- product: no specific changes
- config settings: no specific changes
- wizards: no specific changes

stock.quant main changes
========================

 - ``apply_removal_strategy`` method updated to return only the removal
   strategy instead of having a mix of several things (overrides updated)
 - ``quants_get_**`` methods renamed to ease code understanding
 - quants_unreserve from stock.quant to stock.move model because its primary
   record is a move, not quants

stock.inventory and stock.inventory.line main changes
=====================================================

 - stock.inventory: ``move_ids_exist`` field remove. Unused.

stock.picking and stock.picking.type main changes
=================================================

 - stock.picking: ``move_lines_related`` is removed. Indeed it is used only
   to display a slightly different view of moves contained inside a picking.
   However this field causes a lot of issues when migrated into the new API.
   The view is updated to keep the same look and feel while avoiding an
   unnecessary field.
 - stock.picking.type: complete_name field is removed. Using display_name is
   sufficient for the existing use cases.

stock.warehouse and stock.orderpoint main changes
=================================================

 - stock.warehouse: removed ``resupply_from_wh``, unused field

stock.pack.operation main changes
=================================

 - stock.pack.operation: ``processed_boolean`` fields renamed to ``is_done``
   to match its use in the code.

stock.location main changes
===========================

Note that in this commit a strange override in create has been replaced by a
cleaner override in default_get in order to have something more understandable

procurement main changes
========================

 - in this commit some code located in procurement has been moved to the
   orderpoint model. Indeed those methods take an orderpoint as main
   argument, making it more orderpoint methods than procurement methods
 - ``_prepare_orderpoint_procurement`` method has been merged with its
   strange override in stock_calendar to have something a bit more modular
2016-04-29 12:18:34 +02:00
Josse Colpaert 8380d88b68 [IMP] mrp: source location on manufacture pull rule can be used to set raw material location 2015-09-30 16:34:58 +02:00
Nicolas Martinelli 3d9e2a6cb7 [IMP] mrp*: adaptation due to the new Sale module
Major changes:
- No use of UoS anymore

Reason: complete rewrite of the Sale module.

Responsible: fp, dbo, nim
2015-08-27 18:10:19 +02:00
Olivier Dony 0bd4545348 [LEGAL] Use global LICENSE/COPYRIGHT files, remove boilerplate text
- Preserved explicit 3rd-party copyright notices
- Explicit boilerplate should not be necessary - copyright law applies
  automatically in all countries thanks to Berne Convention + WTO rules,
  and a reference to the applicable license is clear enough.
2015-06-02 03:16:04 +02:00
Christophe Simonis 14a7d52307 [MERGE] forward port of branch 8.0 up to 327e471 2015-05-21 14:50:39 +02:00
Denis Ledoux 235cd2d015 [FIX] mrp: find company bom when MO created from procurement through cron
Manufacturing Orders can be created from procurements,
as SUPERUSER_ID, since the procurements can be processed
through the WH scheduler, which is always ran as SUPERUSER_ID

In such a case, the record rules are ignored, and a BOM
normally not accessible to a user thanks to the multi-company
record rule could be chosen as the BOM of the MO.

This revision forces to find a BOM from a specific company
in such a case.

opw-640120
2015-05-18 17:20:31 +02:00
Christophe Simonis 0da722aa6a [MERGE] forward port of branch 8.0 up to bff6dff 2015-05-11 15:12:24 +02:00
Goffin Simon 44fecec058 [FIX] mrp: Manufacture Order Sequence
The name of the manufacture order created must include the sequence linked
to the company of the salesperson.

opw:632600
2015-05-08 08:46:16 +02:00
Christophe Simonis fab4d6d442 [MERGE] forward port of branch 8.0 up to ea54d4a 2015-01-06 11:49:04 +01:00
Leonardo Donelli 4a0b13ed92 [REF] remove vim modelines and resulting trailing blank lines
Let 2015 be a year without modelines!
cf #4174
2014-12-31 15:52:13 +01:00
Josse Colpaert c973db83e4 [IMP] Propagate cancel should be done for multiple procurements at once 2014-12-19 10:58:27 +01:00
Christophe Simonis 5ca7fa18fc [MERGE] forward port of branch 8.0 up to 31a01ea 2014-12-03 19:24:57 +01:00
Christophe Simonis 2ed212dcbf [MERGE] forward port of branch 7.0 up to d6daf5f 2014-12-03 17:51:06 +01:00
Benoit Guillot bc2a52fb28 [IMP] mrp: add prepare method for manufacturing orders to allow override
Fixes #3973
2014-12-03 10:48:23 +01:00
Josse Colpaert 8c8056d95f [IMP] Query should pass through orm and as such the refreshes can be removed in the code, which will go faster as it is done automatically by the new api 2014-12-02 16:38:36 +01:00
Josse Colpaert 2f5ca4380a Revert "[IMP] Remove unnecessary refresh statements because of new api"
This reverts commit b213438176.
2014-11-17 09:44:10 +01:00
Josse Colpaert b213438176 [IMP] Remove unnecessary refresh statements because of new api 2014-11-17 09:24:06 +01:00
Josse Colpaert 25d2ed6d4b [IMP] Update module descriptions of procurement and product_extended + _bom_find and properties
Module description of procurement was deprecated (talking about mrp, ...) and in product_extended
it described things not implemented in the module.

In _bom_find, we passed a UoM which was not used in Saas-4 and it would not be logical that you
need to select a BoM that matches the UoM, so I removed it.

In the demo data, there was still a push rule which triggered a move from output to pack.  The copy=False
is correct for production_id when you would have these push rules.

For the properties: we want to allow to take a bom which has no properties, but only when there is no other
BoM matching the properties we pass.

Update module descriptions

[IMP] production_id copy + no round

[IMP] _bom_find without uom, property correction
2014-09-30 10:31:33 +02:00
Josse Colpaert ae2eb43e30 [IMP] Implement comments on pull request 2014-09-12 13:49:42 +02:00
Raphael Collet 33eb3dffb2 [REM] models: remove the magic methods signal_XXX() 2014-07-07 11:50:30 +02:00
Christophe Matthieu 43977deb71 [IMP] product: refactoring of product variant. The main view became the view of product template and the product product (or product variant) are created with the variant values combinaison. Bom is splitted into bom and bom line and can use the variant combinaison. 2014-05-27 09:42:52 +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
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
Quentin (OpenERP) e36b32a661 [MERGE] merged with main trunk (revision 9186)
bzr revid: qdp-launchpad@openerp.com-20140228131516-ihigousbe5p1nt68
2014-02-28 14:15:16 +01:00
Denis Ledoux 3e4d932c58 [MERGE] Forward-port of latest 7.0 bugfixes, up to rev. 9801 revid:mat@openerp.com-20140131160304-22mokur2uuo1cw4r
bzr revid: dle@openerp.com-20140131162637-046v995ozpy22qjj
2014-01-31 17:26:37 +01:00
Martin Trigaux 62d72aa238 [FIX] stock: when creating manufacturing order from procurement workflow, do not write location on state (already set previously). (opw 603600)
This avoids having an access rights error when trying to write on a move in done state (eg: in case of force availibility)

bzr revid: mat@openerp.com-20140131160304-22mokur2uuo1cw4r
2014-01-31 17:03:04 +01:00
Quentin (OpenERP) e32b5bb6ae [FIX] sale_mrp; fixed error in yaml test. It seems we forgot the property_ids field on sale.order.line -_- . Also removed a unused method (_prepare_order_line_procurement on procurement order => this must be/is already defined in sale.order object)
bzr revid: qdp-launchpad@openerp.com-20140121084946-8aws5axdkgr8ng9r
2014-01-21 09:49:46 +01:00
Denis Ledoux 74e0fbae83 [MERGE] Forward-port of latest 7.0 bugfixes, up to rev. 9752 revid:dle@openerp.com-20140110173823-lfekux2jxrj5v9gn
bzr revid: dle@openerp.com-20140110160158-ypr2pp63ld6j5g4l
bzr revid: dle@openerp.com-20140110174038-3yogwf6hwk7kpa8w
2014-01-10 18:40:38 +01:00
Martin Trigaux fd9d8b9ff3 [FIX] mrp: move _prepare_order_line_procurement to module sale_mrp as mrp module does not depends from sale
bzr revid: mat@openerp.com-20140110153133-qozwrixyrwxjr44n
2014-01-10 16:31:33 +01:00
Denis Ledoux 05aab83eb1 [MERGE] Forward-port of latest 7.0 bugfixes, up to rev. 9743 revid:qdp-launchpad@openerp.com-20140108160719-9i8xhrat49cn9l5e
bzr revid: chs@openerp.com-20140107141524-xzz39a2ym66swr0t
bzr revid: chs@openerp.com-20140107172248-zic9mqg0rigy2czb
bzr revid: chs@openerp.com-20140108160418-ph17jgy5hlejj9hr
bzr revid: dle@openerp.com-20140108171400-8r0fwv3wi36w2im0
2014-01-08 18:14:00 +01:00
Martin Trigaux 0b7ecf8a21 [FIX] mrp: move _prepare_order_line_procurement to model sale.order instead of procurement.oder. This will add the lost property_ids that was removed at rev 9622.
bzr revid: mat@openerp.com-20140108114639-jc40rfbrbi1s37e3
2014-01-08 12:46:39 +01:00
Quentin (OpenERP) 6204218a43 [FIX] mrp: fixed traceback when no BoM defined for a mrp product. Fixed also messages on procurement. Set the BoM on creation of mrp.production also instead of waiting the computation
bzr revid: qdp-launchpad@openerp.com-20131129144327-f7vdb0ozpm02fe4u
2013-11-29 15:43:27 +01:00
Quentin (OpenERP) 3e023b667b [REM] mrp: removed deprecated and unused code
bzr revid: qdp-launchpad@openerp.com-20131028090054-39qvajzoto3xb9dz
2013-10-28 10:00:54 +01:00
Quentin (OpenERP) e0b7ff8de6 [IMP] stock, procurement, purchase, mrp: cancelation of a procurement now propagate the cancellation upstream if the rule says so
bzr revid: qdp-launchpad@openerp.com-20131021151235-y0kjr9vy06a3curr
2013-10-21 17:12:35 +02:00
Quentin (OpenERP) 11fa96bbbd [FIX] fixed find_suitable_rule, fixed data for main warehouse and added debug statement for crashing yaml test
bzr revid: qdp-launchpad@openerp.com-20131003091709-q4boyc5dwz2ec7ho
2013-10-03 11:17:09 +02:00
Josse Colpaert 30f27b8cbb [IMP] Move route_ids from product from stock_location to stock and remove supply_method (change with route)
bzr revid: jco@openerp.com-20130909115515-7z6ixaxe7bpxxe73
2013-09-09 13:55:15 +02:00
Josse Colpaert 3c8390289b [IMP] _run method should return whether it succeeded and change the state. Other methods migth do a message_post
bzr revid: jco@openerp.com-20130819134615-m0divzqr7rslzhcx
2013-08-19 15:46:15 +02:00
Josse Colpaert 794f31aa76 [IMP] Further remove procure_method in product
bzr revid: jco@openerp.com-20130813145228-17q4z7rgqs8dwrw0
2013-08-13 16:52:28 +02:00
Josse Colpaert 2cda30253f [IMP] Change move_id in move_dest_id where needed (thanks to branch of psi), give error message when making purchase order for product without supplier
bzr revid: jco@openerp.com-20130812123717-y6golm2oaxn6n9pm
2013-08-12 14:37:17 +02:00
Quentin (OpenERP) a0318270f5 [WIP] stock_location: if a route is defined on the procurement it has higher priority + refactoring
bzr revid: qdp-launchpad@openerp.com-20130712160533-41ts0t6tgorgptdz
2013-07-12 18:05:33 +02:00
Josse Colpaert 91f043137f [WIP] Procurement group for pickings
bzr revid: jco@openerp.com-20130712103645-u1eobg8i3s86b7by
2013-07-12 12:36:45 +02:00
Josse Colpaert a93abb22e1 [WIP] Add _get_route_domain for finding suitable rules in purchase/mrp when stock_location is installed
bzr revid: jco@openerp.com-20130712083740-hz8um0e208r7jsbi
2013-07-12 10:37:40 +02:00
Josse Colpaert a0f7808075 [WIP] Implement procurement rule for manufacturing (similar to purchase)
bzr revid: jco@openerp.com-20130711170604-yxm1d7a0qmdpps60
2013-07-11 19:06:04 +02:00
Olivier Dony 0f983a0146 [MERGE] Forward-port of latest 7.0 bugfixes, up to rev. 9183
rev-id launchpad_translations_on_behalf_of_openerp-20130531070107-7d2k818beg8965ll

bzr revid: odo@openerp.com-20130603121852-jdl6vlo9dmjk0rlc
2013-06-03 14:18:52 +02:00
Martin Trigaux 28a4b350f4 [FIX] sale_stock: property_ids is in mrp
bzr revid: mat@openerp.com-20130528124849-u1uren6fjfe1pcxz
2013-05-28 14:48:49 +02:00
Vo Minh Thu e69326ee3b [REF] removed explicit model instanciations.
bzr revid: vmt@openerp.com-20130415102349-vgcrfok2k5y10cwz
2013-04-15 12:23:49 +02:00
Tejas Tank ddf3057db5 [IMP] mrp: use the new signal_xxx methods instead of trg_validate.
bzr revid: tta@openerp.com-20130201051233-tcegov6upxq1jsqo
2013-02-01 10:42:33 +05:30
Olivier Dony 03b6acd13d [MERGE] Access inherited product fields on the product directly rather than template, courtesy of Alexis de Lattre (Akretion)
It makes the code a little more straightforward and does not hurt.

bzr revid: odo@openerp.com-20121218225015-6r9ydxjlh147m3z1
2012-12-18 23:50:15 +01:00
Quentin (OpenERP) b8e3477f06 [MERGE] procurement workflow fixes + removal of a unused file hr_payroll_account/hr_payroll_account_workflow.xml
bzr revid: qdp-launchpad@openerp.com-20121218161136-dqcinl0gputptkt3
2012-12-18 17:11:36 +01:00
Quentin (OpenERP) 6c98483d6f [FIX] mrp, mrp_jit, procurement: fix of the procurement order workflow
bzr revid: qdp-launchpad@openerp.com-20121217144136-hen0i0op21f4z1y1
2012-12-17 15:41:36 +01:00