[MIG] mrp_sale_info: migration to 13.0

This commit is contained in:
Bhavesh Odedra
2021-03-01 12:29:22 -07:00
parent c55d7d63ac
commit 8f751a3437
5 changed files with 16 additions and 6 deletions

View File

@@ -5,13 +5,13 @@
{
"name": "MRP Sale Info",
"summary": "Adds sale information to Manufacturing models",
"version": "12.0.1.0.0",
"version": "13.0.1.0.0",
"category": "Manufacturing",
"website": "https://github.com/oca/manufacture",
"author": "AvanzOSC, " "Tecnativa, " "Odoo Community Association (OCA)",
"license": "AGPL-3",
"application": False,
"installable": True,
"depends": ["mrp", "sale_stock",],
"data": ["views/mrp_production.xml", "views/mrp_workorder.xml",],
"depends": ["mrp", "sale_stock"],
"data": ["views/mrp_production.xml", "views/mrp_workorder.xml"],
}

View File

@@ -16,11 +16,20 @@ class StockRule(models.Model):
location_id,
name,
origin,
company_id,
values,
bom,
):
res = super()._prepare_mo_vals(
product_id, product_qty, product_uom, location_id, name, origin, values, bom
product_id,
product_qty,
product_uom,
location_id,
name,
origin,
company_id,
values,
bom,
)
res["source_procurement_group_id"] = (
values.get("group_id").id if values.get("group_id", False) else False

View File

@@ -8,3 +8,4 @@
* Rafael Blasco
* Pedro M. Baeza
* Rubén Bravo <rubenred18@gmail.com>
* Bhavesh Odedra <bodedra@opensourceintegrators.com>

View File

@@ -19,7 +19,7 @@ class TestMrpSaleInfo(common.SavepointCase):
}
)
cls.bom = cls.env["mrp.bom"].create(
{"product_tmpl_id": cls.product.product_tmpl_id.id,}
{"product_tmpl_id": cls.product.product_tmpl_id.id}
)
cls.partner = cls.env["res.partner"].create({"name": "Test client"})
cls.sale_order = cls.env["sale.order"].create(

View File

@@ -5,7 +5,7 @@
<field name="model">mrp.production</field>
<field name="inherit_id" ref="mrp.mrp_production_form_view" />
<field name="arch" type="xml">
<field name="availability" position="after">
<field name="picking_type_id" position="after">
<field name="sale_id" />
<field name="partner_id" />
<field name="commitment_date" />