Skip to content

Commit

Permalink
Merge 173c852 into 8aff8f8
Browse files Browse the repository at this point in the history
  • Loading branch information
andhit-r committed Aug 6, 2016
2 parents 8aff8f8 + 173c852 commit 6ce3c61
Show file tree
Hide file tree
Showing 14 changed files with 373 additions and 0 deletions.
84 changes: 84 additions & 0 deletions procurement_mrp_no_confirm/README.rst
@@ -0,0 +1,84 @@
.. 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
==============

This module prevents the automatic confirmation of manufacturing order when
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

Configuration
=============

No configuration needed

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
======================

* If the production order workflow has been altered in the transition
*prod_trans_draft_picking* to have another condition, when uninstalling this
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
<https://github.com/OCA/
manufacture/issues/new?body=module:%20
procurement_mrp_no_confirm%0Aversion:%20
8.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

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@serviciosbaeza.com>
* Ainara Galdona <agaldona@avanzosc.es>
* Oihane Crucelaegui <oihanecrucelaegi@avanzosc.es>

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.
15 changes: 15 additions & 0 deletions procurement_mrp_no_confirm/__init__.py
@@ -0,0 +1,15 @@
# -*- coding: utf-8 -*-
# © 2015 AvanzOSC
# © 2015 Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from . import models
from openerp import SUPERUSER_ID, api


def uninstall_hook(cr, registry):
"""Restore workflow condition."""
with api.Environment.manage():
env = api.Environment(cr, SUPERUSER_ID, {})
transition = env.ref('mrp.prod_trans_draft_picking')
transition.condition = True
19 changes: 19 additions & 0 deletions procurement_mrp_no_confirm/__openerp__.py
@@ -0,0 +1,19 @@
# -*- coding: utf-8 -*-
# © 2015 AvanzOSC
# © 2015 Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

{
"name": "Procurement MRP no Confirm",
"version": "8.0.1.0.0",
"depends": ["mrp"],
"author": "OdooMRP team,"
"AvanzOSC,"
"Serv. Tecnol. Avanzados - Pedro M. Baeza,"
"Odoo Community Association (OCA)",
"category": "MRP",
"data": ["data/mrp_production_workflow.xml"],
"installable": True,
"auto_install": False,
"uninstall_hook": "uninstall_hook",
}
11 changes: 11 additions & 0 deletions procurement_mrp_no_confirm/data/mrp_production_workflow.xml
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data>
<record id="mrp.prod_trans_draft_picking" model="workflow.transition">
<field name="act_from" ref="mrp.prod_act_draft"/>
<field name="act_to" ref="mrp.prod_act_confirmed"/>
<field name="signal">button_confirm</field>
<field name="condition">not no_confirm</field>
</record>
</data>
</openerp>
32 changes: 32 additions & 0 deletions procurement_mrp_no_confirm/i18n/es.po
@@ -0,0 +1,32 @@
# 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 "Órden de fabricación"

#. module: procurement_mrp_no_confirm
#: field:mrp.production,no_confirm:0
msgid "No Confirm"
msgstr "No confirmar"

#. module: procurement_mrp_no_confirm
#: model:ir.model,name:procurement_mrp_no_confirm.model_procurement_order
msgid "Procurement"
msgstr "Abastecimiento"

33 changes: 33 additions & 0 deletions procurement_mrp_no_confirm/i18n/it.po
@@ -0,0 +1,33 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * procurement_mrp_no_confirm
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: odoomrp-wip (8.0)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-11-20 18:10+0000\n"
"PO-Revision-Date: 2015-09-10 16:34+0000\n"
"Last-Translator: <>\n"
"Language-Team: Italian (http://www.transifex.com/oca/odoomrp-wip-8-0/language/it/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: it\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. module: procurement_mrp_no_confirm
#: model:ir.model,name:procurement_mrp_no_confirm.model_mrp_production
msgid "Manufacturing Order"
msgstr "Ordine di produzione"

#. 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 ""
32 changes: 32 additions & 0 deletions procurement_mrp_no_confirm/i18n/procurement_mrp_no_confirm.pot
@@ -0,0 +1,32 @@
# 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 ""

33 changes: 33 additions & 0 deletions procurement_mrp_no_confirm/i18n/pt_BR.po
@@ -0,0 +1,33 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * procurement_mrp_no_confirm
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: odoomrp-wip (8.0)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-10-07 10:44+0000\n"
"PO-Revision-Date: 2015-10-09 03:37+0000\n"
"Last-Translator: danimaribeiro <danimaribeiro@gmail.com>\n"
"Language-Team: Portuguese (Brazil) (http://www.transifex.com/oca/odoomrp-wip-8-0/language/pt_BR/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: pt_BR\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"

#. module: procurement_mrp_no_confirm
#: model:ir.model,name:procurement_mrp_no_confirm.model_mrp_production
msgid "Manufacturing Order"
msgstr "Ordem de Produção"

#. 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 "Aprovisionamento"
33 changes: 33 additions & 0 deletions procurement_mrp_no_confirm/i18n/ro.po
@@ -0,0 +1,33 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * procurement_mrp_no_confirm
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: odoomrp-wip (8.0)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-11-20 18:10+0000\n"
"PO-Revision-Date: 2015-09-10 16:34+0000\n"
"Last-Translator: <>\n"
"Language-Team: Romanian (http://www.transifex.com/oca/odoomrp-wip-8-0/language/ro/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: ro\n"
"Plural-Forms: nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?2:1));\n"

#. module: procurement_mrp_no_confirm
#: model:ir.model,name:procurement_mrp_no_confirm.model_mrp_production
msgid "Manufacturing Order"
msgstr "Comandă fabricație"

#. 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 "Aprovizionare"
33 changes: 33 additions & 0 deletions procurement_mrp_no_confirm/i18n/sl.po
@@ -0,0 +1,33 @@
# 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: 2015-08-15 09:03+0200\n"
"Last-Translator: Matjaz Mozetic <m.mozetic@matmoz.si>\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"
"Language: sl\n"
"X-Generator: Poedit 1.8.4\n"

#. module: procurement_mrp_no_confirm
#: model:ir.model,name:procurement_mrp_no_confirm.model_mrp_production
msgid "Manufacturing Order"
msgstr "Proizvodni nalog"

#. module: procurement_mrp_no_confirm
#: field:mrp.production,no_confirm:0
msgid "No Confirm"
msgstr "Brez potrditve"

#. module: procurement_mrp_no_confirm
#: model:ir.model,name:procurement_mrp_no_confirm.model_procurement_order
msgid "Procurement"
msgstr "Oskrbovanje"
7 changes: 7 additions & 0 deletions procurement_mrp_no_confirm/models/__init__.py
@@ -0,0 +1,7 @@
# -*- coding: utf-8 -*-
# © 2015 AvanzOSC
# © 2015 Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from . import procurement_order
from . import mrp_production
13 changes: 13 additions & 0 deletions procurement_mrp_no_confirm/models/mrp_production.py
@@ -0,0 +1,13 @@
# -*- coding: utf-8 -*-
# © 2015 AvanzOSC
# © 2015 Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from openerp import models, fields


class MrpProduction(models.Model):

_inherit = 'mrp.production'

no_confirm = fields.Boolean('No Confirm')
28 changes: 28 additions & 0 deletions procurement_mrp_no_confirm/models/procurement_order.py
@@ -0,0 +1,28 @@
# -*- coding: utf-8 -*-
# © 2015 AvanzOSC
# © 2015 Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from openerp import models, api


class ProcurementOrder(models.Model):

_inherit = 'procurement.order'

@api.multi
def write(self, vals):
production_obj = self.env['mrp.production']
if vals.get('production_id'):
production = production_obj.browse(vals['production_id'])
production.no_confirm = True
return super(ProcurementOrder, self).write(vals)

@api.multi
def make_mo(self):
res = super(ProcurementOrder, self).make_mo()
for procurement in self:
if (procurement.production_id and
procurement.production_id.no_confirm):
procurement.production_id.no_confirm = False
return res
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 6ce3c61

Please sign in to comment.