[MOD] Added <mrp_partner_note> and renamed *notes modules to *note

This commit is contained in:
oihane
2015-03-05 12:18:18 +01:00
parent e7a1f30ab8
commit a6ad8ad92d
7 changed files with 114 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
Partner production notes
========================
This module adds the possibility of defining a note for production in the
partner so when the MO is automatically created it will be written this note
in it.
Credits
=======
Contributors
------------
* Oihane Crucelaegui <oihanecrucelaegi@avanzosc.es>
* Pedro M. Baeza <pedro.baeza@serviciosbaeza.com>
* Ana Juaristi <ajuaristio@gmail.com>

View File

@@ -0,0 +1,6 @@
# -*- encoding: utf-8 -*-
##############################################################################
# For copyright and license notices, see __openerp__.py file in root directory
##############################################################################
from . import models

View File

@@ -0,0 +1,40 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# This program is free software: you can redistribute it and/or modify
# 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 Affero General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
##############################################################################
{
"name": "MRP - Partner production notes",
"version": "1.0",
"depends": [
"sale",
"mrp",
"mrp_production_note",
],
"author": "OdooMRP team",
"website": "http://www.odoomrp.com",
"contributors": [
"Oihane Crucelaegui <oihanecrucelaegi@avanzosc.es>",
"Pedro M. Baeza <pedro.baeza@serviciosbaeza.com>",
"Ana Juaristi <ajuaristio@gmail.com>"
],
"category": "Manufacturing",
"summary": "",
"data": [
"views/res_partner_view.xml",
],
"installable": True,
}

View File

@@ -0,0 +1,7 @@
# -*- encoding: utf-8 -*-
##############################################################################
# For copyright and license notices, see __openerp__.py file in root directory
##############################################################################
from . import res_partner
from . import procurement_order

View File

@@ -0,0 +1,17 @@
# -*- encoding: utf-8 -*-
##############################################################################
# For copyright and license notices, see __openerp__.py file in root directory
##############################################################################
from openerp import models, api
class ProcurementOrder(models.Model):
_inherit = 'procurement.order'
@api.model
def _prepare_mo_vals(self, procurement):
res = super(ProcurementOrder, self)._prepare_mo_vals(procurement)
sale_proc = procurement.move_dest_id.procurement_id
res['notes'] = sale_proc.sale_line_id.order_id.partner_id.mrp_notes
return res

View File

@@ -0,0 +1,12 @@
# -*- encoding: utf-8 -*-
##############################################################################
# For copyright and license notices, see __openerp__.py file in root directory
##############################################################################
from openerp import models, fields
class ResPartner(models.Model):
_inherit = 'res.partner'
mrp_notes = fields.Html(string='Production Notes')

View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data>
<record model="ir.ui.view" id="res_partner_production_notes_form_view">
<field name="name">res.partner.production_notes.form</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form" />
<field name="arch" type="xml">
<page name="internal_notes" position="inside">
<label for="mrp_notes" />
<field name="mrp_notes" />
</page>
</field>
</record>
</data>
</openerp>