Commit Graph
30 Commits
Author SHA1 Message Date
Richard Mathot e666694e2a [FIX] mrp: more Voodoo magic
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
2020-09-23 11:50:42 +00:00
Richard Mathot 84da465c60 [FIX] mrp: installation on very large inventories
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
2020-09-23 11:50:09 +00:00
Nicolas Martinelli 0d16e7331c [FIX] mrp, mrp_subcontracting: clean-up routes at uninstall
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

closes odoo/odoo#48206

X-original-commit: ce219b8375dc14daf9d380433d254b622a947773
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-03-23 14:18:10 +00:00
Ankita Raval 65513ef3f9 [IMP] mrp: mrp_document
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

closes odoo/odoo#42168

Related: odoo/enterprise#8977
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-03-04 10:12:46 +00:00
William Henrotin 644474cb93 [FIX] stock, mrp: handle multi method
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
2019-04-19 12:16:54 +00:00
Arnold Moyaux 1e160dffd3 [IMP] stock, mrp: picking before and after manufacturing
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
2018-08-13 15:38:34 +02:00
xmo-odoo b4429c2a91 [FIX] Various P3-related import changes
* LDAP import: python-ldap is not python3-compatible, pyldap is

  Warning: only supported from debian Stretch (current testing)?
  https://packages.debian.org/search?searchon=names&keywords=pyldap

* implicitly relative imports
* imports of moved or removed stdlib modules

issue #8530
2017-04-28 09:06:53 +02:00
Dhaval Panchal c8a39e734f [MOV] mrp: move and split
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
2016-07-04 16:22:35 +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
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
Turkesh Patel (Open ERP) 55c4d298ef [ADD] added configuration view for mrp
bzr revid: tpa@tinyerp.com-20120305105243-owrr6ks1326t1hi2
2012-03-05 16:22:43 +05:30
Stephane Wirtel 57911141bc [IMP] Move all installers into base_setup
bzr revid: stw@openerp.com-20110926164323-ob28bw1zgfmaih9c
2011-09-26 18:43:23 +02:00
uco (OpenERP) 9ce10244bc [IMP] procurment: Task ID-819: mrp_procurement should be renamed in procurement : renamed files
bzr revid: uco@tinyerp.com-20100527054542-0jq7fam3f6ga071f
2010-05-27 11:15:42 +05:30
uco (OpenERP) 0479ed81bc [ADD] mrp, mrp_procurement: Task ID-574: Remove mrp.procurement from the MRP module. Separated mrp.procurment object into new module mrp_procurement.
bzr revid: uco@tinyerp.co.in-20100429133007-ut53koctlffi8g2a
2010-04-29 19:00:07 +05:30
Harry (Open ERP) 17968f108d [IMP] mrp: if cost price of component is changed, also change cost price of main product
bzr revid: hmo@tinyerp.com-20100326101501-vlreabb9h6ishpqf
2010-03-26 15:45:01 +05:30
Harry (Open ERP) aa2f699167 [IMP] stock, mrp: code improve on scrap, consume, split line
bzr revid: hmo@tinyerp.com-20100317075605-7md35k8okenczlg9
2010-03-17 13:26:05 +05:30
Harry (Open ERP) bdc78703ea [MERGE]
bzr revid: hmo@tinyerp.com-20100311142449-gfhiuwigpchfr074
2010-03-11 19:54:49 +05:30
Harry (Open ERP) 03ff37e5f6 [IMP] mrp: add new wizard for produce product and change workflow of production order
bzr revid: hmo@tinyerp.com-20100224081706-x156eauvbp3btnwp
2010-02-24 13:47:06 +05:30
Christophe Simonis 3dfcd6465b [MERGE]
bzr revid: chs@tinyerp.com-20100113140328-71w2yvlwbfn8oj34
2010-01-13 15:03:28 +01:00
Stephane Wirtel fb3ef7a2f4 [FIX] Change the year of the copyright
bzr revid: stephane@openerp.com-20100112091839-a6p7tenhb4e4zxyx
2010-01-12 10:18:39 +01:00
Xavier Morel 32cb703007 [add] mrp: installer base
bzr revid: xmo@tinyerp.com-20100106155735-dab19qqp06017lz6
2010-01-06 16:57:35 +01:00
PSO(OpenERP) eb0b928cc0 Changed licencing terms
bzr revid: hda@tinyerp.com-20091014111534-1vtk21rz8byhszzf
2009-10-14 16:45:34 +05:30
ChristopheChauvet(syleam) 41e8ed59ef changed encoding to coding in all py files
lp bug: https://launchpad.net/bugs/357182 fixed

bzr revid: hda@tinyerp.com-20091013055837-3ntnbe8b938xmk97
2009-10-13 11:28:37 +05:30
Christophe Chauvet 28ede437d9 [IMP]
* 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
2009-03-06 23:18:24 +01:00
Stephane Wirtel 21f104a506 [IMP] Update the copyright to 2009
bzr revid: stephane@tinyerp.com-20090104221250-55q32ayj2t8kzb2k
2009-01-04 23:12:50 +01:00
Christophe Simonis f5fad0ba30 passing modules in GPL-3
bzr revid: christophe@tinyerp.com-20081103191856-jhcivvwb16fvz2os
2008-11-03 20:18:56 +01:00
Fabien Pinckaers f9cc58e368 Improved Scheduler
bzr revid: fp@tinyerp.com-20080909091144-9lj9kyziwc250hwr
2008-09-09 11:11:44 +02:00
Christophe Simonis 3e3d897e88 add encoding comment and vim comment
bzr revid: christophe@tinyerp.com-20080723144147-77o5t9adx26a84lt
2008-07-23 16:41:47 +02:00
stw 0feb782c6a add Copyright and GPL license into the Header of Python files
bzr revid: stw-d9a6d631f7cfdab5a120a6b0104ce2dbf8644841
2008-06-16 11:00:21 +00:00
pinky a83dce15e0 New trunk
bzr revid: pinky-dedd7f8a42bd4557112a0513082691b8590ad6cc
2006-12-07 13:41:40 +00:00