[8.0.1.0.0][mrp_production_request] Backport From 9.0

This commit is contained in:
mike
2018-03-07 14:51:21 +07:00
committed by Andhitia Rama
parent d361117e56
commit 3cbd1f9884
12 changed files with 386 additions and 371 deletions

View File

@@ -82,6 +82,7 @@ Contributors
* Lois Rilo Antelo <lois.rilo@eficent.com>
* Jordi Ballester <jordi.ballester@eficent.com>
* Opensynergy Indonesia <openerp@opensynergy-indonesia.com>
Maintainer
----------

View File

@@ -6,7 +6,7 @@
"summary": "Allows you to use Manufacturing Request as a previous "
"step to Manufacturing Orders for better manufacture "
"planification.",
"version": "9.0.1.0.0",
"version": "8.0.1.0.0",
"category": "Manufacturing",
"website": "https://github.com/OCA/manufacture",
"author": "Eficent,"

View File

@@ -2,14 +2,21 @@
<!-- Copyright 2017 Eficent Business and IT Consulting Services S.L.
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<odoo noupdate="1">
<openerp>
<data noupdate="1">
<record id="sequence_mrp_production_request" model="ir.sequence.type">
<field name="name">MRP Production Request</field>
<field name="code">mrp.production.request</field>
</record>
<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/%(range_year)s/</field>
<field name="padding">5</field>
<field name="prefix">MR/%(year)s/</field>
<field eval="5" name="padding"/>
<field name="company_id" eval="False"/>
</record>
</odoo>
</data>
</openerp>

View File

@@ -4,7 +4,7 @@
from openerp import api, fields, models, _
import openerp.addons.decimal_precision as dp
from openerp.exceptions import UserError
from openerp.exceptions import Warning as UserError
class MrpProductionRequest(models.Model):
@@ -15,7 +15,7 @@ class MrpProductionRequest(models.Model):
@api.model
def _company_get(self):
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
def _get_default_requested_by(self):

View File

@@ -1,9 +1,8 @@
<?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) -->
<odoo>
<data noupdate="0">
<openerp>
<data noupdate="0">
<record model="ir.module.category" id="module_category_mrp_production_request">
<field name="name">Manufacturing Request</field>
@@ -25,9 +24,6 @@
<field name="category_id" ref="module_category_mrp_production_request"/>
</record>
</data>
<data noupdate="0">
<record model="ir.rule" id="mrp_production_request_comp_rule">
<field name="name">Manufacturing Request multi-company</field>
<field name="model_id" ref="model_mrp_production_request"/>
@@ -69,5 +65,5 @@
<field name="perm_unlink" eval="True"/>
</record>
</data>
</odoo>
</data>
</openerp>

View File

@@ -4,10 +4,11 @@
from openerp.tests.common import TransactionCase
from openerp import fields
from openerp.exceptions import UserError
from openerp.exceptions import Warning as UserError
class TestMrpProductionRequest(TransactionCase):
def setUp(self, *args, **kwargs):
super(TestMrpProductionRequest, self).setUp(*args, **kwargs)
self.production_model = self.env['mrp.production']

View File

@@ -1,8 +1,8 @@
<?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) -->
<odoo>
<openerp>
<data>
<record model="ir.ui.view" id="view_mrp_production_request_form">
<field name="name">mrp.production.request.form</field>
<field name="model">mrp.production.request</field>
@@ -221,4 +221,5 @@
<field name="key2">client_action_multi</field>
</record>
</odoo>
</data>
</openerp>

View File

@@ -1,7 +1,8 @@
<?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) -->
<odoo>
<openerp>
<data>
<record id="mrp_production_form_view" model="ir.ui.view">
<field name="name">mrp.production.form - mrp_production_request</field>
@@ -15,4 +16,5 @@
</field>
</record>
</odoo>
</data>
</openerp>

View File

@@ -1,7 +1,8 @@
<?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) -->
<odoo>
<openerp>
<data>
<record model="ir.ui.view" id="procurement_form_view">
<field name="name">procurement.order.form - mrp_production_request</field>
@@ -14,4 +15,5 @@
</field>
</record>
</odoo>
</data>
</openerp>

View File

@@ -1,7 +1,8 @@
<?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) -->
<odoo>
<openerp>
<data>
<record model="ir.ui.view" id="view_template_property_form">
<field name="name">product.template.form - mrp_production_request</field>
@@ -15,4 +16,5 @@
</field>
</record>
</odoo>
</data>
</openerp>

View File

@@ -1,7 +1,8 @@
<?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) -->
<odoo>
<openerp>
<data>
<record id="mrp_production_request_create_mo_view" model="ir.ui.view">
<field name="name">mrp.production.request.create.mo.form</field>
@@ -15,7 +16,7 @@
options='{"no_open": True}'/>
<field name="pending_qty"/>
<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">
@@ -56,4 +57,5 @@
<field name="target">new</field>
</record>
</odoo>
</data>
</openerp>

View File

@@ -3,3 +3,4 @@
product-attribute
account-analytic
product-variant
stock-logistics-warehouse