mirror of
https://github.com/OCA/manufacture.git
synced 2025-01-28 16:37:15 +02:00
[8.0.1.0.0][mrp_production_request] Backport From 9.0
This commit is contained in:
@@ -82,6 +82,7 @@ Contributors
|
|||||||
|
|
||||||
* Lois Rilo Antelo <lois.rilo@eficent.com>
|
* Lois Rilo Antelo <lois.rilo@eficent.com>
|
||||||
* Jordi Ballester <jordi.ballester@eficent.com>
|
* Jordi Ballester <jordi.ballester@eficent.com>
|
||||||
|
* Opensynergy Indonesia <openerp@opensynergy-indonesia.com>
|
||||||
|
|
||||||
Maintainer
|
Maintainer
|
||||||
----------
|
----------
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
"summary": "Allows you to use Manufacturing Request as a previous "
|
"summary": "Allows you to use Manufacturing Request as a previous "
|
||||||
"step to Manufacturing Orders for better manufacture "
|
"step to Manufacturing Orders for better manufacture "
|
||||||
"planification.",
|
"planification.",
|
||||||
"version": "9.0.1.0.0",
|
"version": "8.0.1.0.0",
|
||||||
"category": "Manufacturing",
|
"category": "Manufacturing",
|
||||||
"website": "https://github.com/OCA/manufacture",
|
"website": "https://github.com/OCA/manufacture",
|
||||||
"author": "Eficent,"
|
"author": "Eficent,"
|
||||||
|
|||||||
@@ -2,14 +2,21 @@
|
|||||||
<!-- Copyright 2017 Eficent Business and IT Consulting Services S.L.
|
<!-- Copyright 2017 Eficent Business and IT Consulting Services S.L.
|
||||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
|
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
|
||||||
|
|
||||||
<odoo noupdate="1">
|
<openerp>
|
||||||
|
<data noupdate="1">
|
||||||
|
|
||||||
<record id="seq_mrp_production_request" model="ir.sequence">
|
<record id="sequence_mrp_production_request" model="ir.sequence.type">
|
||||||
<field name="name">Manufacturing Request</field>
|
<field name="name">MRP Production Request</field>
|
||||||
<field name="code">mrp.production.request</field>
|
<field name="code">mrp.production.request</field>
|
||||||
<field name="prefix">MR/%(range_year)s/</field>
|
</record>
|
||||||
<field name="padding">5</field>
|
|
||||||
<field name="company_id" eval="False"/>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
</odoo>
|
<record id="seq_mrp_production_request" model="ir.sequence">
|
||||||
|
<field name="name">Manufacturing Request</field>
|
||||||
|
<field name="code">mrp.production.request</field>
|
||||||
|
<field name="prefix">MR/%(year)s/</field>
|
||||||
|
<field eval="5" name="padding"/>
|
||||||
|
<field name="company_id" eval="False"/>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
</data>
|
||||||
|
</openerp>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
from openerp import api, fields, models, _
|
from openerp import api, fields, models, _
|
||||||
import openerp.addons.decimal_precision as dp
|
import openerp.addons.decimal_precision as dp
|
||||||
from openerp.exceptions import UserError
|
from openerp.exceptions import Warning as UserError
|
||||||
|
|
||||||
|
|
||||||
class MrpProductionRequest(models.Model):
|
class MrpProductionRequest(models.Model):
|
||||||
@@ -15,7 +15,7 @@ class MrpProductionRequest(models.Model):
|
|||||||
@api.model
|
@api.model
|
||||||
def _company_get(self):
|
def _company_get(self):
|
||||||
company_id = self.env['res.company']._company_default_get(self._name)
|
company_id = self.env['res.company']._company_default_get(self._name)
|
||||||
return self.env['res.company'].browse(company_id.id)
|
return self.env['res.company'].browse(company_id)
|
||||||
|
|
||||||
@api.model
|
@api.model
|
||||||
def _get_default_requested_by(self):
|
def _get_default_requested_by(self):
|
||||||
|
|||||||
@@ -1,73 +1,69 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!-- Copyright 2017 Eficent Business and IT Consulting Services S.L.
|
<!-- Copyright 2017 Eficent Business and IT Consulting Services S.L.
|
||||||
License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl-3.0) -->
|
License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl-3.0) -->
|
||||||
<odoo>
|
<openerp>
|
||||||
|
<data noupdate="0">
|
||||||
|
|
||||||
<data noupdate="0">
|
<record model="ir.module.category" id="module_category_mrp_production_request">
|
||||||
|
<field name="name">Manufacturing Request</field>
|
||||||
|
<field name="parent_id" ref="base.module_category_manufacturing"/>
|
||||||
|
<field name="sequence">20</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
<record model="ir.module.category" id="module_category_mrp_production_request">
|
<record id="group_mrp_production_request_user" model="res.groups">
|
||||||
<field name="name">Manufacturing Request</field>
|
<field name="name">User</field>
|
||||||
<field name="parent_id" ref="base.module_category_manufacturing"/>
|
<field name="implied_ids" eval="[(4, ref('base.group_user'))]"/>
|
||||||
<field name="sequence">20</field>
|
<field name="category_id" ref="module_category_mrp_production_request"/>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="group_mrp_production_request_user" model="res.groups">
|
<record id="group_mrp_production_request_manager" model="res.groups">
|
||||||
<field name="name">User</field>
|
<field name="name">Manager</field>
|
||||||
<field name="implied_ids" eval="[(4, ref('base.group_user'))]"/>
|
<field name="implied_ids"
|
||||||
<field name="category_id" ref="module_category_mrp_production_request"/>
|
eval="[(4, ref('mrp_production_request.group_mrp_production_request_user'))]"/>
|
||||||
</record>
|
<field name="users" eval="[(4, ref('base.user_root'))]"/>
|
||||||
|
<field name="category_id" ref="module_category_mrp_production_request"/>
|
||||||
|
</record>
|
||||||
|
|
||||||
<record id="group_mrp_production_request_manager" model="res.groups">
|
<record model="ir.rule" id="mrp_production_request_comp_rule">
|
||||||
<field name="name">Manager</field>
|
<field name="name">Manufacturing Request multi-company</field>
|
||||||
<field name="implied_ids"
|
<field name="model_id" ref="model_mrp_production_request"/>
|
||||||
eval="[(4, ref('mrp_production_request.group_mrp_production_request_user'))]"/>
|
<field name="global" eval="True"/>
|
||||||
<field name="users" eval="[(4, ref('base.user_root'))]"/>
|
<field name="domain_force">['|',('company_id','=',False),
|
||||||
<field name="category_id" ref="module_category_mrp_production_request"/>
|
('company_id','child_of',[user.company_id.id])]</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
</data>
|
<record id="mrp_production_request_followers_rule" model="ir.rule">
|
||||||
<data noupdate="0">
|
<field name="name">Follow Manufacturing Request</field>
|
||||||
|
<field name="model_id" ref="model_mrp_production_request"/>
|
||||||
|
<field name="groups" eval="[(6,0, [ref('group_mrp_production_request_user')])]"/>
|
||||||
|
<field name="perm_read" eval="True"/>
|
||||||
|
<field name="perm_write" eval="False"/>
|
||||||
|
<field name="perm_create" eval="False"/>
|
||||||
|
<field name="perm_unlink" eval="False"/>
|
||||||
|
<field name="domain_force">['|',('requested_by','=',user.id),
|
||||||
|
('message_partner_ids', 'in', [user.partner_id.id])]</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
<record model="ir.rule" id="mrp_production_request_comp_rule">
|
<record id="mrp_production_request_rule" model="ir.rule">
|
||||||
<field name="name">Manufacturing Request multi-company</field>
|
<field name="name">Manufacturing Request User</field>
|
||||||
<field name="model_id" ref="model_mrp_production_request"/>
|
<field name="model_id" ref="model_mrp_production_request"/>
|
||||||
<field name="global" eval="True"/>
|
<field name="groups" eval="[(6,0, [ref('group_mrp_production_request_user')])]"/>
|
||||||
<field name="domain_force">['|',('company_id','=',False),
|
<field name="perm_read" eval="True"/>
|
||||||
('company_id','child_of',[user.company_id.id])]</field>
|
<field name="perm_write" eval="True"/>
|
||||||
</record>
|
<field name="perm_create" eval="True"/>
|
||||||
|
<field name="perm_unlink" eval="True"/>
|
||||||
|
<field name="domain_force">[('requested_by','=',user.id)]</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
<record id="mrp_production_request_followers_rule" model="ir.rule">
|
<record id="mpr_production_request_line_manager_rule" model="ir.rule">
|
||||||
<field name="name">Follow Manufacturing Request</field>
|
<field name="name">Manufacturing Request Line Manager</field>
|
||||||
<field name="model_id" ref="model_mrp_production_request"/>
|
<field name="model_id" ref="model_mrp_production_request"/>
|
||||||
<field name="groups" eval="[(6,0, [ref('group_mrp_production_request_user')])]"/>
|
<field name="groups" eval="[(6,0, [ref('group_mrp_production_request_manager')])]"/>
|
||||||
<field name="perm_read" eval="True"/>
|
<field name="perm_read" eval="True"/>
|
||||||
<field name="perm_write" eval="False"/>
|
<field name="perm_write" eval="True"/>
|
||||||
<field name="perm_create" eval="False"/>
|
<field name="perm_create" eval="True"/>
|
||||||
<field name="perm_unlink" eval="False"/>
|
<field name="perm_unlink" eval="True"/>
|
||||||
<field name="domain_force">['|',('requested_by','=',user.id),
|
</record>
|
||||||
('message_partner_ids', 'in', [user.partner_id.id])]</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<record id="mrp_production_request_rule" model="ir.rule">
|
</data>
|
||||||
<field name="name">Manufacturing Request User</field>
|
</openerp>
|
||||||
<field name="model_id" ref="model_mrp_production_request"/>
|
|
||||||
<field name="groups" eval="[(6,0, [ref('group_mrp_production_request_user')])]"/>
|
|
||||||
<field name="perm_read" eval="True"/>
|
|
||||||
<field name="perm_write" eval="True"/>
|
|
||||||
<field name="perm_create" eval="True"/>
|
|
||||||
<field name="perm_unlink" eval="True"/>
|
|
||||||
<field name="domain_force">[('requested_by','=',user.id)]</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<record id="mpr_production_request_line_manager_rule" model="ir.rule">
|
|
||||||
<field name="name">Manufacturing Request Line Manager</field>
|
|
||||||
<field name="model_id" ref="model_mrp_production_request"/>
|
|
||||||
<field name="groups" eval="[(6,0, [ref('group_mrp_production_request_manager')])]"/>
|
|
||||||
<field name="perm_read" eval="True"/>
|
|
||||||
<field name="perm_write" eval="True"/>
|
|
||||||
<field name="perm_create" eval="True"/>
|
|
||||||
<field name="perm_unlink" eval="True"/>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
</data>
|
|
||||||
</odoo>
|
|
||||||
|
|||||||
@@ -4,10 +4,11 @@
|
|||||||
|
|
||||||
from openerp.tests.common import TransactionCase
|
from openerp.tests.common import TransactionCase
|
||||||
from openerp import fields
|
from openerp import fields
|
||||||
from openerp.exceptions import UserError
|
from openerp.exceptions import Warning as UserError
|
||||||
|
|
||||||
|
|
||||||
class TestMrpProductionRequest(TransactionCase):
|
class TestMrpProductionRequest(TransactionCase):
|
||||||
|
|
||||||
def setUp(self, *args, **kwargs):
|
def setUp(self, *args, **kwargs):
|
||||||
super(TestMrpProductionRequest, self).setUp(*args, **kwargs)
|
super(TestMrpProductionRequest, self).setUp(*args, **kwargs)
|
||||||
self.production_model = self.env['mrp.production']
|
self.production_model = self.env['mrp.production']
|
||||||
|
|||||||
@@ -1,224 +1,225 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!-- Copyright 2017 Eficent Business and IT Consulting Services S.L.
|
<!-- Copyright 2017 Eficent Business and IT Consulting Services S.L.
|
||||||
License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl-3.0) -->
|
License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl-3.0) -->
|
||||||
<odoo>
|
<openerp>
|
||||||
|
<data>
|
||||||
<record model="ir.ui.view" id="view_mrp_production_request_form">
|
<record model="ir.ui.view" id="view_mrp_production_request_form">
|
||||||
<field name="name">mrp.production.request.form</field>
|
<field name="name">mrp.production.request.form</field>
|
||||||
<field name="model">mrp.production.request</field>
|
<field name="model">mrp.production.request</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<form string="Manufacturing Request">
|
<form string="Manufacturing Request">
|
||||||
<header>
|
<header>
|
||||||
<button name="button_draft"
|
<button name="button_draft"
|
||||||
states="to_approve,approved,cancel,done"
|
states="to_approve,approved,cancel,done"
|
||||||
string="Reset"
|
string="Reset"
|
||||||
type="object"
|
type="object"
|
||||||
groups="mrp_production_request.group_mrp_production_request_manager"/>
|
groups="mrp_production_request.group_mrp_production_request_manager"/>
|
||||||
<button name="button_to_approve" states="draft"
|
<button name="button_to_approve" states="draft"
|
||||||
string="Request approval" type="object"
|
string="Request approval" type="object"
|
||||||
class="oe_highlight"/>
|
class="oe_highlight"/>
|
||||||
<button name="button_approved" states="to_approve"
|
<button name="button_approved" states="to_approve"
|
||||||
string="Approve" type="object" class="oe_highlight"
|
string="Approve" type="object" class="oe_highlight"
|
||||||
groups="mrp_production_request.group_mrp_production_request_manager"/>
|
groups="mrp_production_request.group_mrp_production_request_manager"/>
|
||||||
<button name="%(mrp_production_request_create_mo_action)d"
|
<button name="%(mrp_production_request_create_mo_action)d"
|
||||||
context="{'default_mrp_production_request_id':active_id}"
|
context="{'default_mrp_production_request_id':active_id}"
|
||||||
states="approved"
|
states="approved"
|
||||||
string="Create Manufacturing Order" type="action"/>
|
string="Create Manufacturing Order" type="action"/>
|
||||||
<button name="button_done" states="approved"
|
<button name="button_done" states="approved"
|
||||||
string="Done" type="object" class="oe_highlight"
|
string="Done" type="object" class="oe_highlight"
|
||||||
groups="mrp_production_request.group_mrp_production_request_manager"/>
|
groups="mrp_production_request.group_mrp_production_request_manager"/>
|
||||||
<button name="button_cancel" states="to_approve,approved"
|
<button name="button_cancel" states="to_approve,approved"
|
||||||
string="Reject" type="object"
|
string="Reject" type="object"
|
||||||
groups="mrp_production_request.group_mrp_production_request_manager"/>
|
groups="mrp_production_request.group_mrp_production_request_manager"/>
|
||||||
<field name="state" widget="statusbar"
|
<field name="state" widget="statusbar"
|
||||||
statusbar_visible="draft,approved,done"/>
|
statusbar_visible="draft,approved,done"/>
|
||||||
</header>
|
</header>
|
||||||
<sheet>
|
<sheet>
|
||||||
<label string="Manufacturing Request"/>
|
<label string="Manufacturing Request"/>
|
||||||
<h1>
|
<h1>
|
||||||
<field name="name"/>
|
<field name="name"/>
|
||||||
</h1>
|
</h1>
|
||||||
<group name="request">
|
<group name="request">
|
||||||
<group>
|
|
||||||
<field name="product_id"
|
|
||||||
domain="[('bom_ids','!=',False),('bom_ids.type','!=','phantom')]"/>
|
|
||||||
<field name="product_tmpl_id" invisible="1"/>
|
|
||||||
<field name="bom_id"
|
|
||||||
domain="['&', '|', ('product_id','=',product_id),
|
|
||||||
'&', ('product_tmpl_id.product_variant_ids','=',product_id),
|
|
||||||
('product_id','=',False), ('type', '=', 'normal')]"/>
|
|
||||||
</group>
|
|
||||||
<group>
|
|
||||||
<field name="product_qty"/>
|
|
||||||
<field name="done_qty"/>
|
|
||||||
<field name="manufactured_qty"/>
|
|
||||||
<field name="pending_qty"/>
|
|
||||||
<field name="product_uom" groups="product.group_uom"/>
|
|
||||||
<field name="category_uom_id" invisible="1"/>
|
|
||||||
</group>
|
|
||||||
</group>
|
|
||||||
<group>
|
|
||||||
<group name="users">
|
|
||||||
<field name="requested_by"/>
|
|
||||||
<field name="assigned_to"/>
|
|
||||||
</group>
|
|
||||||
<group>
|
|
||||||
<field name="description"/>
|
|
||||||
</group>
|
|
||||||
</group>
|
|
||||||
<notebook>
|
|
||||||
<page name="mrp_production" string="Manufacturing Orders">
|
|
||||||
<field name="mrp_production_ids"/>
|
|
||||||
</page>
|
|
||||||
<page name="extra" string="Extra information">
|
|
||||||
<group>
|
<group>
|
||||||
<group>
|
<field name="product_id"
|
||||||
<field name="procurement_id"/>
|
domain="[('bom_ids','!=',False),('bom_ids.type','!=','phantom')]"/>
|
||||||
<field name="procurement_state"/>
|
<field name="product_tmpl_id" invisible="1"/>
|
||||||
<field name="origin"/>
|
<field name="bom_id"
|
||||||
</group>
|
domain="['&', '|', ('product_id','=',product_id),
|
||||||
<group>
|
'&', ('product_tmpl_id.product_variant_ids','=',product_id),
|
||||||
<field name="location_src_id"/>
|
('product_id','=',False), ('type', '=', 'normal')]"/>
|
||||||
<field name="location_dest_id"/>
|
|
||||||
<field name="date_planned"/>
|
|
||||||
</group>
|
|
||||||
</group>
|
</group>
|
||||||
|
<group>
|
||||||
|
<field name="product_qty"/>
|
||||||
|
<field name="done_qty"/>
|
||||||
|
<field name="manufactured_qty"/>
|
||||||
|
<field name="pending_qty"/>
|
||||||
|
<field name="product_uom" groups="product.group_uom"/>
|
||||||
|
<field name="category_uom_id" invisible="1"/>
|
||||||
|
</group>
|
||||||
|
</group>
|
||||||
|
<group>
|
||||||
|
<group name="users">
|
||||||
|
<field name="requested_by"/>
|
||||||
|
<field name="assigned_to"/>
|
||||||
|
</group>
|
||||||
|
<group>
|
||||||
|
<field name="description"/>
|
||||||
|
</group>
|
||||||
|
</group>
|
||||||
|
<notebook>
|
||||||
|
<page name="mrp_production" string="Manufacturing Orders">
|
||||||
|
<field name="mrp_production_ids"/>
|
||||||
|
</page>
|
||||||
|
<page name="extra" string="Extra information">
|
||||||
|
<group>
|
||||||
|
<group>
|
||||||
|
<field name="procurement_id"/>
|
||||||
|
<field name="procurement_state"/>
|
||||||
|
<field name="origin"/>
|
||||||
|
</group>
|
||||||
|
<group>
|
||||||
|
<field name="location_src_id"/>
|
||||||
|
<field name="location_dest_id"/>
|
||||||
|
<field name="date_planned"/>
|
||||||
|
</group>
|
||||||
|
</group>
|
||||||
|
|
||||||
</page>
|
</page>
|
||||||
</notebook>
|
</notebook>
|
||||||
</sheet>
|
</sheet>
|
||||||
<div class="oe_chatter">
|
<div class="oe_chatter">
|
||||||
<field name="message_follower_ids" widget="mail_followers"/>
|
<field name="message_follower_ids" widget="mail_followers"/>
|
||||||
<field name="message_ids" widget="mail_thread"/>
|
<field name="message_ids" widget="mail_thread"/>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record model="ir.ui.view" id="view_mrp_production_request_tree">
|
<record model="ir.ui.view" id="view_mrp_production_request_tree">
|
||||||
<field name="name">mrp.production.request.tree</field>
|
<field name="name">mrp.production.request.tree</field>
|
||||||
<field name="model">mrp.production.request</field>
|
<field name="model">mrp.production.request</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<tree decoration-info="state in ('draft','to_approve')"
|
<tree decoration-info="state in ('draft','to_approve')"
|
||||||
decoration-muted="state in ('cancel')"
|
decoration-muted="state in ('cancel')"
|
||||||
string="Manufacturing Requests">
|
string="Manufacturing Requests">
|
||||||
<field name="name"/>
|
<field name="name"/>
|
||||||
<field name="product_id"/>
|
<field name="product_id"/>
|
||||||
<field name="requested_by"/>
|
<field name="requested_by"/>
|
||||||
<field name="assigned_to"/>
|
<field name="assigned_to"/>
|
||||||
<field name="product_qty"/>
|
<field name="product_qty"/>
|
||||||
<field name="pending_qty"/>
|
<field name="pending_qty"/>
|
||||||
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
|
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
|
||||||
<field name="origin"/>
|
<field name="origin"/>
|
||||||
<field name="date_planned"/>
|
<field name="date_planned"/>
|
||||||
<field name="state"/>
|
<field name="state"/>
|
||||||
</tree>
|
</tree>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="view_mrp_production_request_search" model="ir.ui.view">
|
<record id="view_mrp_production_request_search" model="ir.ui.view">
|
||||||
<field name="name">mrp.production.request.search</field>
|
<field name="name">mrp.production.request.search</field>
|
||||||
<field name="model">mrp.production.request</field>
|
<field name="model">mrp.production.request</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<search string="Search Manufacturing Request">
|
<search string="Search Manufacturing Request">
|
||||||
<field name="name" string="Manufacturing Request"/>
|
<field name="name" string="Manufacturing Request"/>
|
||||||
<field name="mrp_production_ids" string="Manufacturing Orders"/>
|
<field name="mrp_production_ids" string="Manufacturing Orders"/>
|
||||||
<field name="requested_by"/>
|
<field name="requested_by"/>
|
||||||
<field name="assigned_to" />
|
<field name="assigned_to" />
|
||||||
<field name="origin"/>
|
<field name="origin"/>
|
||||||
<field name="state"/>
|
<field name="state"/>
|
||||||
<field name="pending_qty" invisible="1"/>
|
<field name="pending_qty" invisible="1"/>
|
||||||
<!--Filters:-->
|
<!--Filters:-->
|
||||||
<filter name="unassigned" string="Unassigned"
|
<filter name="unassigned" string="Unassigned"
|
||||||
domain="[('assigned_to','=', False)]"
|
domain="[('assigned_to','=', False)]"
|
||||||
help="Unassigned Request"/>
|
help="Unassigned Request"/>
|
||||||
<filter domain="[('assigned_to','=', uid)]"
|
<filter domain="[('assigned_to','=', uid)]"
|
||||||
string="Assigned to me"/>
|
string="Assigned to me"/>
|
||||||
<filter domain="[('requested_by','=', uid)]"
|
<filter domain="[('requested_by','=', uid)]"
|
||||||
string="My requests" help="Requested by me"/>
|
string="My requests" help="Requested by me"/>
|
||||||
<separator/>
|
<separator/>
|
||||||
<filter domain="[('pending_qty','!=', 0.0)]"
|
<filter domain="[('pending_qty','!=', 0.0)]"
|
||||||
string="Pending Qty" name="pending"
|
string="Pending Qty" name="pending"
|
||||||
help="Request with pending quantity"/>
|
help="Request with pending quantity"/>
|
||||||
<separator/>
|
<separator/>
|
||||||
<filter name="state_draft" string="Draft"
|
<filter name="state_draft" string="Draft"
|
||||||
domain="[('state','=','draft')]"
|
domain="[('state','=','draft')]"
|
||||||
help="Request is to be approved"/>
|
help="Request is to be approved"/>
|
||||||
<filter name="state_to_approve" string="To Approve"
|
<filter name="state_to_approve" string="To Approve"
|
||||||
domain="[('state','=','to_approve')]"
|
domain="[('state','=','to_approve')]"
|
||||||
help="Request is to be approved"/>
|
help="Request is to be approved"/>
|
||||||
<filter name="state_approved" string="Approved"
|
<filter name="state_approved" string="Approved"
|
||||||
domain="[('state','=','approved')]"
|
domain="[('state','=','approved')]"
|
||||||
help="Request is approved"/>
|
help="Request is approved"/>
|
||||||
<filter name="state_cancel" string="Cancelled"
|
<filter name="state_cancel" string="Cancelled"
|
||||||
domain="[('state','=','cancel')]"
|
domain="[('state','=','cancel')]"
|
||||||
help="Request is cancelled"/>
|
help="Request is cancelled"/>
|
||||||
<filter name="state_done" string="Done"
|
<filter name="state_done" string="Done"
|
||||||
domain="[('state','=','done')]"
|
domain="[('state','=','done')]"
|
||||||
help="Request is done"/>
|
help="Request is done"/>
|
||||||
<filter string="Unread Messages"
|
<filter string="Unread Messages"
|
||||||
name="message_needaction"
|
name="message_needaction"
|
||||||
domain="[('message_needaction','=',True)]"/>
|
domain="[('message_needaction','=',True)]"/>
|
||||||
<filter domain="[('requested_by','=', uid)]"
|
<filter domain="[('requested_by','=', uid)]"
|
||||||
help="My requests"/>
|
help="My requests"/>
|
||||||
<!--Group by:-->
|
<!--Group by:-->
|
||||||
<filter string="Requested by" icon="terp-personal"
|
<filter string="Requested by" icon="terp-personal"
|
||||||
domain="[]"
|
domain="[]"
|
||||||
context="{'group_by':'requested_by'}"/>
|
context="{'group_by':'requested_by'}"/>
|
||||||
<filter string="Assigned to" icon="terp-personal"
|
<filter string="Assigned to" icon="terp-personal"
|
||||||
domain="[]"
|
domain="[]"
|
||||||
context="{'group_by':'assigned_to'}"/>
|
context="{'group_by':'assigned_to'}"/>
|
||||||
<filter string="Source" icon="terp-gtk-jump-to-rtl" domain="[]"
|
<filter string="Source" icon="terp-gtk-jump-to-rtl" domain="[]"
|
||||||
context="{'group_by':'origin'}"/>
|
context="{'group_by':'origin'}"/>
|
||||||
</search>
|
</search>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
|
||||||
<record model="ir.actions.act_window" id="mrp_production_request_action">
|
<record model="ir.actions.act_window" id="mrp_production_request_action">
|
||||||
<field name="name">Manufacturing Requests</field>
|
<field name="name">Manufacturing Requests</field>
|
||||||
<field name="type">ir.actions.act_window</field>
|
<field name="type">ir.actions.act_window</field>
|
||||||
<field name="res_model">mrp.production.request</field>
|
<field name="res_model">mrp.production.request</field>
|
||||||
<field name="view_type">form</field>
|
<field name="view_type">form</field>
|
||||||
<field name="view_mode">tree,form</field>
|
<field name="view_mode">tree,form</field>
|
||||||
<field name="context">{"search_default_pending":1}</field>
|
<field name="context">{"search_default_pending":1}</field>
|
||||||
<field name="help" type="html">
|
<field name="help" type="html">
|
||||||
<p class="oe_view_nocontent_create">
|
<p class="oe_view_nocontent_create">
|
||||||
Click to start a new manufacturing request process.
|
Click to start a new manufacturing request process.
|
||||||
</p><p>
|
</p><p>
|
||||||
A Manufacturing Request is an instruction to production to produce
|
A Manufacturing Request is an instruction to production to produce
|
||||||
a certain quantity of a given product.
|
a certain quantity of a given product.
|
||||||
</p>
|
</p>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<menuitem
|
<menuitem
|
||||||
id="menu_mrp_production_request_act"
|
id="menu_mrp_production_request_act"
|
||||||
sequence="10"
|
sequence="10"
|
||||||
parent="mrp.menu_mrp_manufacturing"
|
parent="mrp.menu_mrp_manufacturing"
|
||||||
action="mrp_production_request_action"
|
action="mrp_production_request_action"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!--Sever actions-->
|
<!--Sever actions-->
|
||||||
<record id="action_server_mrp_production_request_refresh"
|
<record id="action_server_mrp_production_request_refresh"
|
||||||
model="ir.actions.server">
|
model="ir.actions.server">
|
||||||
<field name="name">Refresh Quantities</field>
|
<field name="name">Refresh Quantities</field>
|
||||||
<field name="condition">True</field>
|
<field name="condition">True</field>
|
||||||
<field name="type">ir.actions.server</field>
|
<field name="type">ir.actions.server</field>
|
||||||
<field name="model_id" ref="model_mrp_production_request" />
|
<field name="model_id" ref="model_mrp_production_request" />
|
||||||
<field name="state">code</field>
|
<field name="state">code</field>
|
||||||
<field name="code">self._compute_manufactured_qty(cr, uid, context.get('active_ids', []), context=context)</field>
|
<field name="code">self._compute_manufactured_qty(cr, uid, context.get('active_ids', []), context=context)</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record model="ir.values" id="action_mrp_production_request_refresh">
|
<record model="ir.values" id="action_mrp_production_request_refresh">
|
||||||
<field name="name">Compute Quantities</field>
|
<field name="name">Compute Quantities</field>
|
||||||
<field name="action_id"
|
<field name="action_id"
|
||||||
ref="action_server_mrp_production_request_refresh" />
|
ref="action_server_mrp_production_request_refresh" />
|
||||||
<field name="value" eval="'ir.actions.server,' + str(ref('action_server_mrp_production_request_refresh'))" />
|
<field name="value" eval="'ir.actions.server,' + str(ref('action_server_mrp_production_request_refresh'))" />
|
||||||
<field name="key">action</field>
|
<field name="key">action</field>
|
||||||
<field name="model_id" ref="model_mrp_production_request" />
|
<field name="model_id" ref="model_mrp_production_request" />
|
||||||
<field name="model">mrp.production.request</field>
|
<field name="model">mrp.production.request</field>
|
||||||
<field name="key2">client_action_multi</field>
|
<field name="key2">client_action_multi</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
</odoo>
|
</data>
|
||||||
|
</openerp>
|
||||||
|
|||||||
@@ -1,18 +1,20 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!-- Copyright 2017 Eficent Business and IT Consulting Services S.L.
|
<!-- Copyright 2017 Eficent Business and IT Consulting Services S.L.
|
||||||
License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl-3.0) -->
|
License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl-3.0) -->
|
||||||
<odoo>
|
<openerp>
|
||||||
|
<data>
|
||||||
|
|
||||||
<record id="mrp_production_form_view" model="ir.ui.view">
|
<record id="mrp_production_form_view" model="ir.ui.view">
|
||||||
<field name="name">mrp.production.form - mrp_production_request</field>
|
<field name="name">mrp.production.form - mrp_production_request</field>
|
||||||
<field name="model">mrp.production</field>
|
<field name="model">mrp.production</field>
|
||||||
<field name="inherit_id"
|
<field name="inherit_id"
|
||||||
ref="mrp.mrp_production_form_view"/>
|
ref="mrp.mrp_production_form_view"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<field name="move_prod_id" position="after">
|
<field name="move_prod_id" position="after">
|
||||||
<field name="mrp_production_request_id"/>
|
<field name="mrp_production_request_id"/>
|
||||||
|
</field>
|
||||||
</field>
|
</field>
|
||||||
</field>
|
</record>
|
||||||
</record>
|
|
||||||
|
|
||||||
</odoo>
|
</data>
|
||||||
|
</openerp>
|
||||||
|
|||||||
@@ -1,17 +1,19 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!-- Copyright 2017 Eficent Business and IT Consulting Services S.L.
|
<!-- Copyright 2017 Eficent Business and IT Consulting Services S.L.
|
||||||
License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl-3.0) -->
|
License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl-3.0) -->
|
||||||
<odoo>
|
<openerp>
|
||||||
|
<data>
|
||||||
|
|
||||||
<record model="ir.ui.view" id="procurement_form_view">
|
<record model="ir.ui.view" id="procurement_form_view">
|
||||||
<field name="name">procurement.order.form - mrp_production_request</field>
|
<field name="name">procurement.order.form - mrp_production_request</field>
|
||||||
<field name="model">procurement.order</field>
|
<field name="model">procurement.order</field>
|
||||||
<field name="inherit_id" ref="procurement.procurement_form_view"/>
|
<field name="inherit_id" ref="procurement.procurement_form_view"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<xpath expr="//field[@name='origin']" position="after">
|
<xpath expr="//field[@name='origin']" position="after">
|
||||||
<field name="mrp_production_request_id"/>
|
<field name="mrp_production_request_id"/>
|
||||||
</xpath>
|
</xpath>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
</odoo>
|
</data>
|
||||||
|
</openerp>
|
||||||
|
|||||||
@@ -1,18 +1,20 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!-- Copyright 2017 Eficent Business and IT Consulting Services S.L.
|
<!-- Copyright 2017 Eficent Business and IT Consulting Services S.L.
|
||||||
License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl-3.0) -->
|
License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl-3.0) -->
|
||||||
<odoo>
|
<openerp>
|
||||||
|
<data>
|
||||||
|
|
||||||
<record model="ir.ui.view" id="view_template_property_form">
|
<record model="ir.ui.view" id="view_template_property_form">
|
||||||
<field name="name">product.template.form - mrp_production_request</field>
|
<field name="name">product.template.form - mrp_production_request</field>
|
||||||
<field name="model">product.template</field>
|
<field name="model">product.template</field>
|
||||||
<field name="inherit_id"
|
<field name="inherit_id"
|
||||||
ref="stock.view_template_property_form"/>
|
ref="stock.view_template_property_form"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<field name="route_ids" position="after">
|
<field name="route_ids" position="after">
|
||||||
<field name="mrp_production_request"/>
|
<field name="mrp_production_request"/>
|
||||||
|
</field>
|
||||||
</field>
|
</field>
|
||||||
</field>
|
</record>
|
||||||
</record>
|
|
||||||
|
|
||||||
</odoo>
|
</data>
|
||||||
|
</openerp>
|
||||||
|
|||||||
@@ -1,59 +1,61 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!-- Copyright 2017 Eficent Business and IT Consulting Services S.L.
|
<!-- Copyright 2017 Eficent Business and IT Consulting Services S.L.
|
||||||
License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl-3.0) -->
|
License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl-3.0) -->
|
||||||
<odoo>
|
<openerp>
|
||||||
|
<data>
|
||||||
|
|
||||||
<record id="mrp_production_request_create_mo_view" model="ir.ui.view">
|
<record id="mrp_production_request_create_mo_view" model="ir.ui.view">
|
||||||
<field name="name">mrp.production.request.create.mo.form</field>
|
<field name="name">mrp.production.request.create.mo.form</field>
|
||||||
<field name="model">mrp.production.request.create.mo</field>
|
<field name="model">mrp.production.request.create.mo</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<form string="Select event to register">
|
<form string="Select event to register">
|
||||||
<group name="origin" string="Manufacture Request status"
|
<group name="origin" string="Manufacture Request status"
|
||||||
col="6">
|
col="6">
|
||||||
<group colspan="2">
|
<group colspan="2">
|
||||||
<field name="mrp_production_request_id"
|
<field name="mrp_production_request_id"
|
||||||
options='{"no_open": True}'/>
|
options='{"no_open": True}'/>
|
||||||
<field name="pending_qty"/>
|
<field name="pending_qty"/>
|
||||||
<button name="compute_product_line_ids" type="object"
|
<button name="compute_product_line_ids" type="object"
|
||||||
string="Compute lines" colspan="2" icon="fa-cogs"/>
|
string="Compute lines" colspan="2" icon="gtk-execute"/>
|
||||||
|
</group>
|
||||||
|
<group colspan="4">
|
||||||
|
<field name="product_line_ids" nolabel="1">
|
||||||
|
<tree>
|
||||||
|
<field name="product_id"/>
|
||||||
|
<field name="product_uom"/>
|
||||||
|
<field name="product_qty"/>
|
||||||
|
<field name="available_qty"/>
|
||||||
|
<field name="bottle_neck_factor"/>
|
||||||
|
</tree>
|
||||||
|
</field>
|
||||||
|
</group>
|
||||||
</group>
|
</group>
|
||||||
<group colspan="4">
|
<group name="destination" string="Manufacturing Order:" col="4">
|
||||||
<field name="product_line_ids" nolabel="1">
|
<field name="mo_qty"/>
|
||||||
<tree>
|
<field name="product_uom" options="{'no_open': True}"
|
||||||
<field name="product_id"/>
|
groups="product.group_uom"/>
|
||||||
<field name="product_uom"/>
|
|
||||||
<field name="product_qty"/>
|
|
||||||
<field name="available_qty"/>
|
|
||||||
<field name="bottle_neck_factor"/>
|
|
||||||
</tree>
|
|
||||||
</field>
|
|
||||||
</group>
|
</group>
|
||||||
</group>
|
|
||||||
<group name="destination" string="Manufacturing Order:" col="4">
|
|
||||||
<field name="mo_qty"/>
|
|
||||||
<field name="product_uom" options="{'no_open': True}"
|
|
||||||
groups="product.group_uom"/>
|
|
||||||
</group>
|
|
||||||
|
|
||||||
<footer>
|
<footer>
|
||||||
<button name="create_mo"
|
<button name="create_mo"
|
||||||
type="object"
|
type="object"
|
||||||
string="Create MO"
|
string="Create MO"
|
||||||
class="oe_highlight"/>
|
class="oe_highlight"/>
|
||||||
or
|
or
|
||||||
<button special="cancel"
|
<button special="cancel"
|
||||||
string="Cancel"/>
|
string="Cancel"/>
|
||||||
</footer>
|
</footer>
|
||||||
</form>
|
</form>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="mrp_production_request_create_mo_action" model="ir.actions.act_window">
|
<record id="mrp_production_request_create_mo_action" model="ir.actions.act_window">
|
||||||
<field name="name">Create Manufacturing Order</field>
|
<field name="name">Create Manufacturing Order</field>
|
||||||
<field name="res_model">mrp.production.request.create.mo</field>
|
<field name="res_model">mrp.production.request.create.mo</field>
|
||||||
<field name="view_type">form</field>
|
<field name="view_type">form</field>
|
||||||
<field name="view_mode">form</field>
|
<field name="view_mode">form</field>
|
||||||
<field name="target">new</field>
|
<field name="target">new</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
</odoo>
|
</data>
|
||||||
|
</openerp>
|
||||||
|
|||||||
@@ -3,3 +3,4 @@
|
|||||||
product-attribute
|
product-attribute
|
||||||
account-analytic
|
account-analytic
|
||||||
product-variant
|
product-variant
|
||||||
|
stock-logistics-warehouse
|
||||||
|
|||||||
Reference in New Issue
Block a user