mirror of
https://github.com/OCA/manufacture.git
synced 2025-01-28 16:37:15 +02:00
Move from odoomrp/odoomrp-wip
This commit is contained in:
@@ -1,12 +1,76 @@
|
|||||||
|
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
|
||||||
|
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
:alt: License: AGPL-3
|
||||||
|
|
||||||
|
===============================
|
||||||
Don't confirm MOs when procured
|
Don't confirm MOs when procured
|
||||||
===============================
|
===============================
|
||||||
|
|
||||||
This module prevents the automatic confirmation of manufacturing order when
|
This module prevents the automatic confirmation of manufacturing order when
|
||||||
procurement orders are executed.
|
procurement orders are executed.
|
||||||
|
|
||||||
|
Installation
|
||||||
|
============
|
||||||
|
|
||||||
|
To install this module, you need to:
|
||||||
|
|
||||||
|
1. Clone the branch 8.0 of the repository https://github.com/OCA/manufacture
|
||||||
|
2. Add the path to this repository in your configuration (addons-path)
|
||||||
|
3. Update the module list
|
||||||
|
4. Go to menu *Setting -> Modules -> Local Modules*
|
||||||
|
5. Search For *Procurement MRP no Confirm*
|
||||||
|
6. Install the module
|
||||||
|
|
||||||
|
Usage
|
||||||
|
=====
|
||||||
|
|
||||||
|
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
|
||||||
|
:alt: Try me on Runbot
|
||||||
|
:target: https://runbot.odoo-community.org/runbot/129/8.0
|
||||||
|
|
||||||
|
|
||||||
Known issues / Roadmap
|
Known issues / Roadmap
|
||||||
======================
|
======================
|
||||||
|
|
||||||
* If the production order workflow has been altered in the transition
|
* If the production order workflow has been altered in the transition
|
||||||
*prod_trans_draft_picking* to have another condition, when uninstalling this
|
*prod_trans_draft_picking* to have another condition, when uninstalling this
|
||||||
module, you will need to restore the custom condition.
|
module, you will need to restore the custom condition.
|
||||||
|
|
||||||
|
Bug Tracker
|
||||||
|
===========
|
||||||
|
|
||||||
|
Bugs are tracked on `GitHub Issues
|
||||||
|
<https://github.com/OCA/manufacture/issues>`_. In case of trouble, please
|
||||||
|
check there if your issue has already been reported. If you spotted it first,
|
||||||
|
help us smashing it by providing a detailed and welcomed feedback.
|
||||||
|
|
||||||
|
Credits
|
||||||
|
=======
|
||||||
|
|
||||||
|
Images
|
||||||
|
------
|
||||||
|
|
||||||
|
* Odoo Community Association: `Icon <https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg>`_.
|
||||||
|
|
||||||
|
Contributors
|
||||||
|
------------
|
||||||
|
|
||||||
|
* Pedro M. Baeza <pedro.baeza@tecnativa.com>
|
||||||
|
* Ainara Galdona <agaldona@avanzosc.es>
|
||||||
|
* Oihane Crucelaegui <oihanecrucelaegi@avanzosc.es>
|
||||||
|
* Andhitia Rama <andhitia.r@opensynergy-indonesia.com>
|
||||||
|
|
||||||
|
Maintainer
|
||||||
|
----------
|
||||||
|
|
||||||
|
.. image:: https://odoo-community.org/logo.png
|
||||||
|
:alt: Odoo Community Association
|
||||||
|
:target: https://odoo-community.org
|
||||||
|
|
||||||
|
This module is maintained by the OCA.
|
||||||
|
|
||||||
|
OCA, or the Odoo Community Association, is a nonprofit organization whose
|
||||||
|
mission is to support the collaborative development of Odoo features and
|
||||||
|
promote its widespread use.
|
||||||
|
|
||||||
|
To contribute to this module, please visit https://odoo-community.org.
|
||||||
|
|||||||
@@ -1,20 +1,7 @@
|
|||||||
# -*- encoding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
##############################################################################
|
# © 2015 AvanzOSC
|
||||||
#
|
# © 2015 Pedro M. Baeza
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||||
# it under the terms of the GNU Affero General Public License as published
|
|
||||||
# by the Free Software Foundation, either version 3 of the License, or
|
|
||||||
# (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program. If not, see http://www.gnu.org/licenses/.
|
|
||||||
#
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
from . import models
|
from . import models
|
||||||
from openerp import SUPERUSER_ID, api
|
from openerp import SUPERUSER_ID, api
|
||||||
|
|||||||
@@ -1,32 +1,19 @@
|
|||||||
# -*- encoding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
##############################################################################
|
# © 2015 AvanzOSC
|
||||||
#
|
# © 2015 Pedro M. Baeza
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||||
# it under the terms of the GNU Affero General Public License as published
|
|
||||||
# by the Free Software Foundation, either version 3 of the License, or
|
|
||||||
# (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program. If not, see http://www.gnu.org/licenses/.
|
|
||||||
#
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
{
|
{
|
||||||
"name": "Procurement MRP no Confirm",
|
"name": "Procurement MRP no Confirm",
|
||||||
"version": "1.0",
|
"version": "8.0.1.0.0",
|
||||||
"depends": ["mrp"],
|
"depends": ["mrp"],
|
||||||
"author": "OdooMRP team,"
|
"author": "OdooMRP team,"
|
||||||
"AvanzOSC,"
|
"AvanzOSC,"
|
||||||
"Serv. Tecnol. Avanzados - Pedro M. Baeza",
|
"Tecnativa,"
|
||||||
|
"Odoo Community Association (OCA)",
|
||||||
"category": "MRP",
|
"category": "MRP",
|
||||||
'data': ["data/mrp_production_workflow.xml"],
|
"data": ["data/mrp_production_workflow.xml"],
|
||||||
'demo': [],
|
"installable": True,
|
||||||
'installable': True,
|
"auto_install": False,
|
||||||
'auto_install': False,
|
"uninstall_hook": "uninstall_hook",
|
||||||
'uninstall_hook': 'uninstall_hook',
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,32 +0,0 @@
|
|||||||
# Translation of Odoo Server.
|
|
||||||
# This file contains the translation of the following modules:
|
|
||||||
# * procurement_mrp_no_confirm
|
|
||||||
#
|
|
||||||
msgid ""
|
|
||||||
msgstr ""
|
|
||||||
"Project-Id-Version: Odoo Server 8.0\n"
|
|
||||||
"Report-Msgid-Bugs-To: \n"
|
|
||||||
"POT-Creation-Date: 2014-11-20 16:56+0000\n"
|
|
||||||
"PO-Revision-Date: 2014-11-20 17:57+0100\n"
|
|
||||||
"Last-Translator: \n"
|
|
||||||
"Language-Team: \n"
|
|
||||||
"MIME-Version: 1.0\n"
|
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
|
||||||
"Plural-Forms: \n"
|
|
||||||
|
|
||||||
#. module: procurement_mrp_no_confirm
|
|
||||||
#: model:ir.model,name:procurement_mrp_no_confirm.model_mrp_production
|
|
||||||
msgid "Manufacturing Order"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: procurement_mrp_no_confirm
|
|
||||||
#: field:mrp.production,no_confirm:0
|
|
||||||
msgid "No Confirm"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: procurement_mrp_no_confirm
|
|
||||||
#: model:ir.model,name:procurement_mrp_no_confirm.model_procurement_order
|
|
||||||
msgid "Procurement"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
@@ -1,20 +1,7 @@
|
|||||||
# -*- encoding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
##############################################################################
|
# © 2015 AvanzOSC
|
||||||
#
|
# © 2015 Pedro M. Baeza
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||||
# it under the terms of the GNU Affero General Public License as published
|
|
||||||
# by the Free Software Foundation, either version 3 of the License, or
|
|
||||||
# (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program. If not, see http://www.gnu.org/licenses/.
|
|
||||||
#
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
from . import procurement_order
|
from . import procurement_order
|
||||||
from . import mrp_production
|
from . import mrp_production
|
||||||
|
|||||||
@@ -1,20 +1,7 @@
|
|||||||
# -*- encoding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
##############################################################################
|
# © 2015 AvanzOSC
|
||||||
#
|
# © 2015 Pedro M. Baeza
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||||
# it under the terms of the GNU Affero General Public License as published
|
|
||||||
# by the Free Software Foundation, either version 3 of the License, or
|
|
||||||
# (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program. If not, see http://www.gnu.org/licenses/.
|
|
||||||
#
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
from openerp import models, fields
|
from openerp import models, fields
|
||||||
|
|
||||||
|
|||||||
@@ -1,20 +1,7 @@
|
|||||||
# -*- encoding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
##############################################################################
|
# © 2015 AvanzOSC
|
||||||
#
|
# © 2015 Pedro M. Baeza
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||||
# it under the terms of the GNU Affero General Public License as published
|
|
||||||
# by the Free Software Foundation, either version 3 of the License, or
|
|
||||||
# (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program. If not, see http://www.gnu.org/licenses/.
|
|
||||||
#
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
from openerp import models, api
|
from openerp import models, api
|
||||||
|
|
||||||
|
|||||||
BIN
procurement_mrp_no_confirm/static/description/icon.png
Normal file
BIN
procurement_mrp_no_confirm/static/description/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.2 KiB |
6
procurement_mrp_no_confirm/tests/__init__.py
Normal file
6
procurement_mrp_no_confirm/tests/__init__.py
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# © 2015 AvanzOSC
|
||||||
|
# © 2015 Pedro M. Baeza
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||||
|
|
||||||
|
from . import test_procurement
|
||||||
52
procurement_mrp_no_confirm/tests/test_procurement.py
Normal file
52
procurement_mrp_no_confirm/tests/test_procurement.py
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# © 2015 AvanzOSC
|
||||||
|
# © 2015 Pedro M. Baeza
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||||
|
|
||||||
|
from openerp.tests.common import TransactionCase
|
||||||
|
from datetime import datetime
|
||||||
|
|
||||||
|
|
||||||
|
class TestProcurement(TransactionCase):
|
||||||
|
|
||||||
|
def setUp(self, *args, **kwargs):
|
||||||
|
result = super(TestProcurement, self).setUp(*args, **kwargs)
|
||||||
|
|
||||||
|
self.product = self.env.ref("product.product_product_4b")
|
||||||
|
self.location = self.env.ref("stock.stock_location_stock")
|
||||||
|
|
||||||
|
criteria = [
|
||||||
|
("location_id", "=", self.location.id),
|
||||||
|
("action", "=", "manufacture"),
|
||||||
|
]
|
||||||
|
|
||||||
|
self.rule = self.env["procurement.rule"].search(
|
||||||
|
criteria)[0]
|
||||||
|
|
||||||
|
self.proc_data = {
|
||||||
|
"name": "Test Procurement",
|
||||||
|
"product_id": self.product.id,
|
||||||
|
"location_id": self.location.id,
|
||||||
|
"product_qty": 1.0,
|
||||||
|
"product_uom": self.product.uom_id.id,
|
||||||
|
"date_planned": datetime.now().strftime("%Y-%m-%d %H:%M:%S"),
|
||||||
|
"rule_id": self.rule.id,
|
||||||
|
}
|
||||||
|
|
||||||
|
return result
|
||||||
|
|
||||||
|
def test_1(self):
|
||||||
|
proc = self.env["procurement.order"].create(self.proc_data)
|
||||||
|
|
||||||
|
proc.run()
|
||||||
|
self.assertEqual(
|
||||||
|
proc.state,
|
||||||
|
"running")
|
||||||
|
|
||||||
|
# procurement should generate MO
|
||||||
|
self.assertTrue(proc.production_id)
|
||||||
|
|
||||||
|
# MO should in draft state
|
||||||
|
self.assertEqual(
|
||||||
|
proc.production_id.state,
|
||||||
|
"draft")
|
||||||
Reference in New Issue
Block a user