Installing mrp on a large database will take lots of time computing the
unit_factor of stock_moves created in stock. As this value is only
needed in mrp, this commit bypass the computation for moves that have
been generated before the mrp installation
closesodoo/odoo#97750
Task: 2918852
X-original-commit: a2f064446b1e232efc3e6924879f63b79e0bc986
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
The unlink fail in __init__.py uninstall hook is managed, however
when it fail, the error is catch but the cursor is not rollback and
do not accept additional transaction. That result in a traceback at
uninstall.
opw-2453939
closesodoo/odoo#66309
X-original-commit: 66d9dce9b6e6e65000ba0b62efcb153f2d3eec15
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
It appears that if you update a record more than once in the same
PostgreSQL transaction, PostgreSQL is going to re-check all the
constraints on the table.
** THIS IS THE PART WHERE THE BLACK MAGIC HAPPENS **
We combine the setting of the default value of stock.move.unit_factor in
the same UPDATE query to avoid the constraint re-check; it saves
approximately 60% of the SQL running time in my case.
** ... AND NOW YOU CAN SAY: WHAT THE F...?! **
Thanks to @rco-odoo for the tip; he knows it from the wise @nseinlet.
X-original-commit: 8e47e2f605309c8ed0d5509f7bb070528d8f32c4
Before this commit, installation of MRP in a database with 4.8M
stock.move + 4.8M stock.move.line was not possible at all.
The process lasted for a very long time (>90 min in our tests) then
eventually failed after using the whole RAM of your server.
This commit allows installing MRP in databases with large stock.move /
stock.move.line tables by bootstrapping the slow parts in SQL.
A more general fix regarding the time complexity of some parts of the
prefetching algorithm is coming later in 13.0-init-computed-fields-rco
opw-2281585
X-original-commit: 549de5601efdad3ebdb03feb8beb1e898f80113a
When `mrp` or `mrp_subcontracting` are uninstalled, the routes used as
'Picking Before Manufacturing Route' and 'Resupply Subcontractor' are
kept active. When the modules are re-installed, the routes are created
again, and appear duplicated.
The routes should be deleted if they are not used anywhere else.
opw-2222895
closesodoo/odoo#48206
X-original-commit: ce219b8375dc14daf9d380433d254b622a947773
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Purpose:
Modernizes and facilitates files upload in manufacturing app.
In this Commit:
- Show the image in Kanban.
- Allow to access a preview of the file when clicking on it in the
Kanban view.
- Add a 'Edit', 'Delete' and 'Download' in kanban card dropdown menu.
- Add Upload button in control panel to upload document which will
create new record of `mrp.document` and also add a testcase for it.
task-1960733
closesodoo/odoo#42168
Related: odoo/enterprise#8977
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
Commit 84ae731d5d used 'self.code' in a method
called by a multi one. As 'self.code' expect a singleton, the transaction
raise an error in case of multiple records into the recordset
This commit calls the method into a loop on 'self and change its signature
to pass 'code' and be sure its a non multi one
Currently MRP do not handle multi locations for components. In order to
be able to use both feature at the same time, we could:
- Improve mrp in order to handle multiple stock.move.line for a
componenet stock.move
- Add a rule that allow to bring all the good from multiple location to
a single location. (was already possible but it requires some
configuration)
This commit introduce a checkbox on the warehouse in order to
automatically configure all the routes/rules/locations/picking_types,...
necessary to bring all the components to a single location before
running the manufacturing order.
Technically it also refactor some stock_warehouse.py methods in order to
easily override the picking_type, rules and routes creation.
Thank to Hetashree Chauhan <hch@odoo.com> for his help.
task_id: 27785
Split files and move them according to the new API guidelines. Containing
- mrp splitted into its main models and files
- stock code moved into its own models and files
- various renaming
- 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.
* add missing tools.translate
* translate all missing raise
* add encoding: utf-8 in missing file
* add vim comment (when missing) at the end of file
* convert tabs to spaces (PEP8 Compliant)
* more pythonic when concatenate value
bzr revid: christophe.chauvet@syleam.fr-20090306221824-xt1oeip60sq8fwws