port/8.0/mrp disable force availability button (#249)

* mrp_disable_force_availability_button

* [ADD] Backport of mrp_disable_force_availability_button
This commit is contained in:
Stefan Rijnhart (Opener)
2018-02-01 14:56:30 +01:00
committed by Jordi Ballester Alomar
parent ac9d5c3b0d
commit 48a6c9cc93
5 changed files with 102 additions and 0 deletions

View File

@@ -0,0 +1,49 @@
.. 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
=====================================
MRP Disable Force Availability Button
=====================================
This module creates a security group that limits the visibility of "Force
availability" button on manufacture order to those that belong to
this group.
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
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
=======
Contributors
------------
* Lois Rilo <lois.rilo@eficent.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.

View File

@@ -0,0 +1,3 @@
# -*- coding: utf-8 -*-
# Copyright 2017 Eficent Business and IT Consulting Services S.L.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

View File

@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Copyright 2017 Eficent Business and IT Consulting Services S.L.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "MRP Disable force availability button",
"version": "8.0.1.0.0",
"summary": "Disable force availability button in manufacturing orders.",
"author": "Eficent,Odoo Community Association (OCA)",
"website": "http://www.odoomrp.com",
"category": "Manufacturing",
"license": "AGPL-3",
"application": False,
"installable": True,
"depends": ["mrp"],
"data": [
"security/mrp_disable_force_availability_button_security.xml",
"views/mrp_operation_view.xml",
],
}

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2017 Eficent Business and IT Consulting Services S.L.
License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl-3.0) -->
<openerp><data noupdate="1">
<record id="mrp.group_mrp_force_availability" model="res.groups">
<field name="name">Allow to force availability on
Manufacturing Orders</field>
<field name="category_id" ref="base.module_category_hidden" />
<field name="users" eval="[(4, ref('base.user_root'))]"/>
</record>
</data></openerp>

View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2017 Eficent Business and IT Consulting Services S.L.
License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl-3.0) -->
<openerp><data>
<record model="ir.ui.view" id="mrp_production_form_view">
<field name="name">mrp.production - mrp_disable_force_availability_button</field>
<field name="model">mrp.production</field>
<field name="inherit_id" ref="mrp.mrp_production_form_view" />
<field name="arch" type="xml">
<button name="force_production" position="attributes">
<attribute name="groups">mrp.group_mrp_force_availability</attribute>
</button>
</field>
</record>
</data></openerp>