mirror of
https://github.com/OCA/manufacture.git
synced 2025-01-28 16:37:15 +02:00
[MIG] mrp_sale_info: Migration to 11.0
This commit is contained in:
@@ -19,7 +19,7 @@ New fields are displayed in tree and in form views (Extra information tab).
|
||||
|
||||
.. 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/9.0
|
||||
:target: https://runbot.odoo-community.org/runbot/129/11.0
|
||||
|
||||
Bug Tracker
|
||||
===========
|
||||
@@ -31,7 +31,7 @@ help us smashing it by providing a detailed and welcomed `feedback
|
||||
<https://github.com/OCA/
|
||||
manufacture/issues/new?body=module:%20
|
||||
mrp_sale_info%0Aversion:%20
|
||||
9.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
||||
11.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
||||
|
||||
Credits
|
||||
=======
|
||||
@@ -47,9 +47,9 @@ Contributors
|
||||
* Rafael Blasco <rafabn@antiun.com>
|
||||
* Antonio Espinosa <antonioea@antiun.com>
|
||||
* Javier Iniesta <javieria@antiun.com>
|
||||
* Oihane Crucelaegui <oihanecrucelaegi@avanzosc.es>",
|
||||
* Pedro M. Baeza <pedro.baeza@serviciosbaeza.com>",
|
||||
* Ana Juaristi <ajuaristio@gmail.com>"
|
||||
* Oihane Crucelaegui <oihanecrucelaegi@avanzosc.es>
|
||||
* Pedro M. Baeza <pedro.baeza@serviciosbaeza.com>
|
||||
* Ana Juaristi <anajuaristi@avanzosc.es>
|
||||
* Victor M. Martin <victor.martin@elico-corp.com>
|
||||
|
||||
Maintainer
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# © 2016 Antiun Ingenieria S.L. - Javier Iniesta
|
||||
# Copyright 2016 Antiun Ingenieria S.L. - Javier Iniesta
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from . import models
|
||||
|
||||
@@ -1,28 +1,26 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# © 2016 Antiun Ingenieria S.L. - Javier Iniesta
|
||||
# Copyright 2016 Antiun Ingenieria S.L. - Javier Iniesta
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
{
|
||||
"name": "MRP Sale Info",
|
||||
"summary": "Adds sale information to Manufacturing models",
|
||||
"version": "9.0.1.0.0",
|
||||
"version": "11.0.1.0.0",
|
||||
"category": "Manufacturing",
|
||||
"website": "http://www.antiun.com",
|
||||
"author": "Antiun Ingeniería S.L., "
|
||||
"OdooMRP team, "
|
||||
"AvanzOSC, "
|
||||
"Serv. Tecnol. Avanzados - Pedro M. Baeza, "
|
||||
"website": "https://github.com/oca/manufacture",
|
||||
"author": "AvanzOSC, "
|
||||
"Tecnativa, "
|
||||
"Odoo Community Association (OCA)",
|
||||
"license": "AGPL-3",
|
||||
"application": False,
|
||||
'installable': False,
|
||||
'installable': True,
|
||||
"depends": [
|
||||
"mrp_operations",
|
||||
"mrp",
|
||||
"sale_mrp",
|
||||
"sale_order_dates",
|
||||
"stock"
|
||||
"stock",
|
||||
"sale_stock",
|
||||
],
|
||||
"data": [
|
||||
"views/mrp_production.xml",
|
||||
"views/mrp_production_workcenter_line.xml"
|
||||
"views/mrp_workorder.xml",
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# © 2016 Antiun Ingenieria S.L. - Javier Iniesta
|
||||
# Copyright 2016 Antiun Ingenieria S.L. - Javier Iniesta
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from . import mrp_production
|
||||
from . import mrp_production_workcenter_line
|
||||
from . import mrp_workorder
|
||||
|
||||
@@ -1,17 +1,18 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# © 2016 Antiun Ingenieria S.L. - Javier Iniesta
|
||||
# Copyright 2016 Antiun Ingenieria S.L. - Javier Iniesta
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from openerp import models, fields
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class MrpProduction(models.Model):
|
||||
_inherit = "mrp.production"
|
||||
|
||||
sale_id = fields.Many2one(
|
||||
'sale.order', string='Sale order', readonly=True, store=True,
|
||||
related='move_prod_id.procurement_id.sale_line_id.order_id')
|
||||
partner_id = fields.Many2one(related='sale_id.partner_id',
|
||||
string='Customer', store=True)
|
||||
commitment_date = fields.Datetime(related='sale_id.commitment_date',
|
||||
string='Commitment Date', store=True)
|
||||
comodel_name='sale.order', string='Sale order', readonly=True,
|
||||
store=True, related='procurement_group_id.sale_id')
|
||||
partner_id = fields.Many2one(
|
||||
comodel_name='res.partner', related='sale_id.partner_id',
|
||||
string='Customer', store=True)
|
||||
commitment_date = fields.Datetime(
|
||||
related='sale_id.commitment_date', string='Commitment Date',
|
||||
store=True)
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# © 2016 Antiun Ingenieria S.L. - Javier Iniesta
|
||||
# Copyright 2016 Antiun Ingenieria S.L. - Javier Iniesta
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from openerp import models, fields
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class MrpProductionWorkcenterLine(models.Model):
|
||||
_inherit = "mrp.production.workcenter.line"
|
||||
class MrpWorkorder(models.Model):
|
||||
_inherit = "mrp.workorder"
|
||||
|
||||
sale_id = fields.Many2one(related='production_id.sale_id',
|
||||
string='Sale order', readonly=True, store=True)
|
||||
@@ -1,13 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<odoo>
|
||||
<record id="mrp_production_form_view" model="ir.ui.view">
|
||||
<field name="name">MRP Production Form with Sale Order</field>
|
||||
<field name="model">mrp.production</field>
|
||||
<field name="inherit_id" ref="sale_mrp.mrp_production_form_view_inherit_sale_mrp" />
|
||||
<field name="inherit_id" ref="mrp.mrp_production_form_view" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="sale_name" position="after">
|
||||
<field name="availability" position="after">
|
||||
<field name="sale_id"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="commitment_date"/>
|
||||
@@ -20,7 +18,7 @@
|
||||
<field name="model">mrp.production</field>
|
||||
<field name="inherit_id" ref="mrp.mrp_production_tree_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="date_planned" position="after">
|
||||
<field name="date_planned_start" position="after">
|
||||
<field name="sale_id"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="commitment_date"/>
|
||||
@@ -28,5 +26,4 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
</odoo>
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="mrp_production_workcenter_tree_view_inherit" model="ir.ui.view">
|
||||
<field name="name">MRP Production Work Order Tree with Sale Order</field>
|
||||
<field name="model">mrp.production.workcenter.line</field>
|
||||
<field name="inherit_id" ref="mrp_operations.mrp_production_workcenter_tree_view_inherit"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="date_planned" position="after">
|
||||
<field name="sale_id"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="commitment_date"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="mrp_production_workcenter_form_view_inherit" model="ir.ui.view">
|
||||
<field name="name">MRP Production Work Order Form with Sale Order</field>
|
||||
<field name="model">mrp.production.workcenter.line</field>
|
||||
<field name="inherit_id" ref="mrp_operations.mrp_production_workcenter_form_view_inherit"/>
|
||||
<field name="arch" type="xml">
|
||||
|
||||
<xpath expr="//page/group[1]" position="after">
|
||||
<group string="Sale Information">
|
||||
<field name="sale_id"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="commitment_date"/>
|
||||
</group>
|
||||
</xpath>
|
||||
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
29
mrp_sale_info/views/mrp_workorder.xml
Normal file
29
mrp_sale_info/views/mrp_workorder.xml
Normal file
@@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="mrp_production_workcenter_tree_view_inherit" model="ir.ui.view">
|
||||
<field name="name">MRP Work Order Tree with Sale Order</field>
|
||||
<field name="model">mrp.workorder</field>
|
||||
<field name="inherit_id" ref="mrp.mrp_production_workcenter_tree_view_inherit"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="date_planned_start" position="after">
|
||||
<field name="sale_id"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="commitment_date"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="mrp_production_workcenter_form_view_inherit" model="ir.ui.view">
|
||||
<field name="name">MRP Work Order Form with Sale Order</field>
|
||||
<field name="model">mrp.workorder</field>
|
||||
<field name="inherit_id" ref="mrp.mrp_production_workcenter_form_view_inherit"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="production_id" position="after">
|
||||
<field name="sale_id"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="commitment_date"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user